summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-03-15 15:48:33 -0400
committerStephen Beaver <sbeaver@netgate.com>2016-03-15 15:49:00 -0400
commit4dbdb3583e09f3c9e75515cb8e45e2c53208c388 (patch)
treeb85a6dc10515b399a1e787c6aa86272927d932d3 /src/usr
parent8f934add94041f303259f8a3eefe9d03af0b8b91 (diff)
downloadpfsense-4dbdb3583e09f3c9e75515cb8e45e2c53208c388.zip
pfsense-4dbdb3583e09f3c9e75515cb8e45e2c53208c388.tar.gz
Highlight moved rows to confirm move
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/firewall_rules.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/usr/local/www/firewall_rules.php b/src/usr/local/www/firewall_rules.php
index 2d16205..7269ebf 100644
--- a/src/usr/local/www/firewall_rules.php
+++ b/src/usr/local/www/firewall_rules.php
@@ -904,8 +904,10 @@ events.push(function() {
// "Move to here" (anchor) action
$('[id^=Xmove_]').click(function (event) {
+ // Prent click from toggleing row
event.stopImmediatePropagation();
+ // Save teh traget rule position
var anchor_row = $(this).parents("tr:first");
$('#ruletable > tbody > tr').each(function() {
@@ -913,12 +915,17 @@ events.push(function() {
if (ruleid && !isNaN(ruleid)) {
if ($('#frc' + ruleid).prop('checked')) {
+ // Move the selected rows, un-select them and add highlight class
$(this).insertBefore(anchor_row);
fr_toggle(ruleid, "fr");
+ $('#fr' + ruleid).addClass("highlight");
}
}
});
+ // Tempoerarily set background color so user can more easily see the moved rules, then fade
+ $('.highlight').effect("highlight", {color: "#739b4b;"}, 4000);
+ $('#ruletable tr').removeClass("highlight");
$('#order-store').removeAttr('disabled');
reindex_rules($(anchor_row).parent('tbody'));
dirty = true;
OpenPOWER on IntegriCloud