Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
e43c3313
Commit
e43c3313
authored
Feb 02, 2016
by
Ad Schellevis
Committed by
Franco Fichtner
Feb 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) let's multiselect that category search
(cherry picked from commit
23ef5f70
)
parent
a67d3b47
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
firewall_rules.php
src/www/firewall_rules.php
+13
-3
No files found.
src/www/firewall_rules.php
View file @
e43c3313
...
@@ -202,13 +202,23 @@ $( document ).ready(function() {
...
@@ -202,13 +202,23 @@ $( document ).ready(function() {
// link category select/search
// link category select/search
$
(
"
#fw_category
"
).
change
(
function
(){
$
(
"
#fw_category
"
).
change
(
function
(){
var
stripe_color
=
'
transparent
'
;
var
stripe_color
=
'
transparent
'
;
var
selected_value
=
$
(
this
).
val
();
var
selected_values
=
[];
$
(
"
#fw_category > option:selected
"
).
each
(
function
(){
if
(
$
(
this
).
val
()
!=
""
)
{
selected_values
.
push
(
$
(
this
).
val
());
}
else
{
// select all when "Filter by category" is selected
selected_values
=
[];
return
false
;
}
})
$
(
"
.rule
"
).
each
(
function
(){
$
(
"
.rule
"
).
each
(
function
(){
// save zebra color
// save zebra color
if
(
$
(
this
).
children
(
0
).
css
(
"
background-color
"
)
!=
'
transparent
'
)
{
if
(
$
(
this
).
children
(
0
).
css
(
"
background-color
"
)
!=
'
transparent
'
)
{
$
(
"
#fw_category
"
).
data
(
'
stripe_color
'
,
$
(
this
).
children
(
0
).
css
(
"
background-color
"
));
$
(
"
#fw_category
"
).
data
(
'
stripe_color
'
,
$
(
this
).
children
(
0
).
css
(
"
background-color
"
));
}
}
if
(
$
(
this
).
data
(
'
category
'
)
!=
selected_value
&&
selected_value
!=
""
)
{
if
(
selected_values
.
indexOf
(
$
(
this
).
data
(
'
category
'
))
==
-
1
&&
selected_values
.
length
>
0
)
{
$
(
this
).
hide
();
$
(
this
).
hide
();
}
else
{
}
else
{
$
(
this
).
show
();
$
(
this
).
show
();
...
@@ -654,7 +664,7 @@ $( document ).ready(function() {
...
@@ -654,7 +664,7 @@ $( document ).ready(function() {
<?php
else
:
?>
<?php
else
:
?>
<tr>
<tr>
<td
colspan=
"5"
>
<td
colspan=
"5"
>
<select
class=
"selectpicker"
data-live-search=
"true"
data-size=
"5"
placeholder=
"
<?=
gettext
(
"select category"
);
?>
"
id=
"fw_category"
>
<select
class=
"selectpicker"
data-live-search=
"true"
data-size=
"5"
multiple
placeholder=
"
<?=
gettext
(
"select category"
);
?>
"
id=
"fw_category"
>
<option
value=
""
>
<?=
gettext
(
"Filter by category"
);
?>
</value>
<option
value=
""
>
<?=
gettext
(
"Filter by category"
);
?>
</value>
<?php
<?php
// collect unique list of categories and append to option list
// collect unique list of categories and append to option list
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment