summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-03-18 12:29:53 -0400
committerStephen Beaver <sbeaver@netgate.com>2016-03-18 12:30:25 -0400
commitcee365e65979d4602ec161066ed177449485fab0 (patch)
treef7d90d1307a425db038656fe61850ebbac79323a /src
parent7468ce30d455248c848cc1ef3f7c0a69009a258f (diff)
downloadpfsense-cee365e65979d4602ec161066ed177449485fab0.zip
pfsense-cee365e65979d4602ec161066ed177449485fab0.tar.gz
Suppress dashboard save icon until needed.
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/head.inc3
-rw-r--r--src/usr/local/www/index.php12
2 files changed, 11 insertions, 4 deletions
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc
index 3d7a159..badc788 100644
--- a/src/usr/local/www/head.inc
+++ b/src/usr/local/www/head.inc
@@ -509,8 +509,7 @@ if (($pagename === "index.php") && ($numColumns > 2)) {
<?php if (isset($widgets)): ?>
<li>
- <!-- <a href="#" title="<?=gettext("Save dashboard layout")?>" id="btnstore" class="invisible"> -->
- <a href="#" title="<?=gettext("Save dashboard layout")?>" id="btnstore">
+ <a href="#" title="<?=gettext("Save dashboard layout")?>" id="btnstore" class="invisible">
<i class="fa fa-save icon-pointer"></i>
</a>
</li>
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php
index bb064af..31fd1ff 100644
--- a/src/usr/local/www/index.php
+++ b/src/usr/local/www/index.php
@@ -389,7 +389,7 @@ foreach ($widgets as $widgetname => $widgetconfig) {
$columnWidth = 12 / $numColumns;
for ($currentColumnNumber = 1; $currentColumnNumber <= $numColumns; $currentColumnNumber++) {
-
+
//if col$currentColumnNumber exists
if (isset($widgetColumns['col'.$currentColumnNumber])) {
@@ -434,7 +434,7 @@ foreach ($widgets as $widgetname => $widgetconfig) {
} else {
echo '<div class="col-md-' . $columnWidth . '" id="widgets-col' . $currentColumnNumber . '"></div>';
}
-
+
}
?>
@@ -515,6 +515,14 @@ events.push(function() {
return undefined;
}
});
+
+ // Show the fa-save icon in the breadcrumb bar if the user opens or closes a panel (In case he/she wants to save the new state)
+ // (Sometimes this will cause us to see the icon when we don't need it, but better that than the other way round)
+ $('.panel').on('hidden.bs.collapse shown.bs.collapse', function (e) {
+ if (e.currentTarget.id != 'widget-available') {
+ $('#btnstore').removeClass("invisible");
+ }
+ });
});
//]]>
</script>
OpenPOWER on IntegriCloud