diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-01-18 16:54:06 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-01-18 16:55:10 -0500 |
commit | 576437f5b589f2b95d11fc40f6d9ee4c811a6b15 (patch) | |
tree | b32b7ef6f1b0e55109b854f597515b1286a0a251 /src/usr/local | |
parent | af8f79b19adf59984dfdd6e4228ce50df132261b (diff) | |
download | pfsense-576437f5b589f2b95d11fc40f6d9ee4c811a6b15.zip pfsense-576437f5b589f2b95d11fc40f6d9ee4c811a6b15.tar.gz |
Prototype #5373
Diffstat (limited to 'src/usr/local')
-rw-r--r-- | src/usr/local/www/firewall_rules.php | 29 | ||||
-rw-r--r-- | src/usr/local/www/jquery/pfSenseHelpers.js | 2 |
2 files changed, 29 insertions, 2 deletions
diff --git a/src/usr/local/www/firewall_rules.php b/src/usr/local/www/firewall_rules.php index ae65db4..f530590 100644 --- a/src/usr/local/www/firewall_rules.php +++ b/src/usr/local/www/firewall_rules.php @@ -276,7 +276,7 @@ display_top_tabs($tab_array); <div class="panel panel-default"> <div class="panel-heading"><h2 class="panel-title"><?=gettext("Rules (Drag to change order)")?></h2></div> <div id="mainarea" class="table-responsive panel-body"> - <table class="table table-hover table-striped table-condensed"> + <table id="ruletable" class="table table-hover table-striped table-condensed"> <thead> <tr> <th><!-- checkbox --></th> @@ -692,6 +692,10 @@ for ($i = 0; isset($a_filter[$i]); $i++): <i class="fa fa-save icon-embed-btn"></i> <?=gettext("Save")?> </button> + <button type="submit" id="addsep" name="addsep" class="btn btn-sm btn-warning" title="<?=gettext('Add separator')?>"> + <i class="fa fa-plus icon-embed-btn"></i> + <?=gettext("Separator")?> + </button> </nav> </form> @@ -743,6 +747,29 @@ events.push(function() { $('#order-store').click(function () { $('[id^=frc]').prop('checked', true); }); + + // Separator bar stuff + $("#addsep").prop('type' ,'button'); + + $("#addsep").click(function() { + alert("This feature is not yet complete. (Nothing is saved)\nIncluded for review only."); + $('#ruletable > tbody:last').append('<tr>' + + '<td bgcolor="#cce5ff" colspan="10"><input id="newsep" placeholder="<?=gettext("Enter a description, Save, then drag to final location.")?>" class="col-md-12" type="text"></input></td>' + + '<td bgcolor="#cce5ff" colspan="2"><button class="btn btn-default btn-sm" id="btnnewsep"><?=gettext("Save")?></button></td>' + + '</tr>'); + + $("#btnnewsep").prop('type' ,'button'); + + $("#btnnewsep").click(function() { + var septext = $('#newsep').val(); + $('#ruletable > tbody:last >tr:last').remove(); + $('#ruletable > tbody:last').append('<tr class="ui-sortable-handle">' + + '<td bgcolor="#cce5ff" colspan="12">' + '<font color="#002699">' + septext + '</font></td>' + + '</tr>'); + }); + }); + + }); //]]> </script> diff --git a/src/usr/local/www/jquery/pfSenseHelpers.js b/src/usr/local/www/jquery/pfSenseHelpers.js index 78d1074..476cc4f 100644 --- a/src/usr/local/www/jquery/pfSenseHelpers.js +++ b/src/usr/local/www/jquery/pfSenseHelpers.js @@ -275,7 +275,7 @@ function renumber() { } function delete_row(rowDelBtn) { - var label; + var rowLabel; // If we are deleting row zero, we need to save/restore the label if (rowDelBtn == "deleterow0") { |