diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-04-21 12:52:51 -0400 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-04-21 12:53:36 -0400 |
commit | 6a817d41771f7391f0aa0dde63cac12da515f5e5 (patch) | |
tree | 57c2e9cc19b4858b4c5a6dd81ee4f902b1802cad /src/usr/local/www/firewall_rules.php | |
parent | 348270c3b6292dd7eabdb63afbacd273c37b2df7 (diff) | |
download | pfsense-6a817d41771f7391f0aa0dde63cac12da515f5e5.zip pfsense-6a817d41771f7391f0aa0dde63cac12da515f5e5.tar.gz |
Show insertion point icons only if one or more rules have been selected
(cherry picked from commit c6a8ddf8135881d6e11bd4f17fe4e5d827eea73d)
Diffstat (limited to 'src/usr/local/www/firewall_rules.php')
-rw-r--r-- | src/usr/local/www/firewall_rules.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/usr/local/www/firewall_rules.php b/src/usr/local/www/firewall_rules.php index afe2220..641e50d 100644 --- a/src/usr/local/www/firewall_rules.php +++ b/src/usr/local/www/firewall_rules.php @@ -951,12 +951,24 @@ events.push(function() { reindex_rules($(anchor_row).parent('tbody')); dirty = true; }).mouseover(function(e) { + var ruleselected = false; + $(this).css("cursor", "default"); - if (e.shiftKey) { - $(this).removeClass().addClass("fa fa-lg fa-arrow-down text-danger"); - } else { - $(this).removeClass().addClass("fa fa-lg fa-arrow-up text-danger"); + // Are any rules currently selected? + $('[id^=frc]').each(function () { + if ($(this).prop("checked")) { + ruleselected = true; + } + }); + + // If so, change the icon to show the insetion point + if (ruleselected) { + if (e.shiftKey) { + $(this).removeClass().addClass("fa fa-lg fa-arrow-down text-danger"); + } else { + $(this).removeClass().addClass("fa fa-lg fa-arrow-up text-danger"); + } } }).mouseout(function(e) { $(this).removeClass().addClass("fa fa-anchor"); |