diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-12-16 17:51:58 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-12-16 17:53:57 -0500 |
commit | 679ac4892d1644e5853adc746c227b1486036303 (patch) | |
tree | 456fcc8f9d0a8e0a15adcd6b2ed03b0201a436ce /src/usr | |
parent | 2a425b40c771b98fd02aec67a04190e458bfb1ee (diff) | |
download | pfsense-679ac4892d1644e5853adc746c227b1486036303.zip pfsense-679ac4892d1644e5853adc746c227b1486036303.tar.gz |
Reverted commit 677d8bdfebace3321da677a57a0756a27332d505, PR 2218
because it broke all of the widget configuration actions.
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/index.php | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php index f2f291f..a1f3565 100644 --- a/src/usr/local/www/index.php +++ b/src/usr/local/www/index.php @@ -263,9 +263,8 @@ if ($config['widgets'] && $config['widgets']['sequence'] != "") { // be backwards compatible $offset = strpos($file, '-container'); - if (false !== $offset) { + if (false !== $offset) $file = substr($file, 0, $offset); - } // Get the widget title that should be in a var defined in the widget's inc file. $widgettitle = ${$file . '_title'}; @@ -308,19 +307,19 @@ pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard"); <div class="panel panel-default" id="widget-available"> <div class="panel-heading"><?=gettext("Available Widgets"); ?> <span class="widget-heading-icon"> - <a data-toggle="collapse" href="#widget-available_panel-body" id="widgets-available"> + <a data-toggle="collapse" href="#widget-available .panel-body" name="widgets-available"> <i class="fa fa-plus-circle"></i> </a> </span> </div> - <div id="widget-available_panel-body" class="panel-body collapse out"> + <div class="panel-body collapse out"> <div class="content"> <div class="row"> <?php foreach ($widgets as $widgetname => $widgetconfig): if ($widgetconfig['display'] == 'none'): ?> - <div class="col-sm-3"><a href="#" id="btnadd-<?=$widgetname?>"><i class="fa fa-plus"></i> <?=$widgetconfig['name']?></a></div> + <div class="col-sm-3"><a href="#" name="btnadd-<?=$widgetname?>"><i class="fa fa-plus"></i> <?=$widgetconfig['name']?></a></div> <?php endif; ?> <?php endforeach; ?> </div> @@ -351,7 +350,7 @@ foreach ($widgets as $widgetname => $widgetconfig): </div> <div class="hidden" id="widgetSequence"> - <form action="/" method="post" id="widgetSequence_Form" name="widgetForm"> + <form action="/" method="post" id="widgetSequence" name="widgetForm"> <input type="hidden" name="sequence" value="" /> <button type="submit" id="btnstore" class="btn btn-primary">Store widget configuration</button> @@ -400,10 +399,10 @@ foreach ($widgets as $widgetname => $widgetconfig) { <div class="panel-heading"> <?=$wtitle?> <span class="widget-heading-icon"> - <a data-toggle="collapse" href="#widget-<?=$widgetname?>_panel-footer" class="config hidden"> + <a data-toggle="collapse" href="#widget-<?=$widgetname?> .panel-footer" class="config hidden"> <i class="fa fa-wrench"></i> </a> - <a data-toggle="collapse" href="#widget-<?=$widgetname?>_panel-body"> + <a data-toggle="collapse" href="#widget-<?=$widgetname?> .panel-body"> <!-- actual icon is determined in css based on state of body --> <i class="fa fa-plus-circle"></i> </a> @@ -412,7 +411,7 @@ foreach ($widgets as $widgetname => $widgetconfig) { </a> </span> </div> - <div id="widget-<?=$widgetname?>_panel-body" class="panel-body collapse<?=($widgetconfig['display'] == 'close' ? '' : ' in')?>"> + <div class="panel-body collapse<?=($widgetconfig['display']=='close' ? '' : ' in')?>"> <?php include('/usr/local/www/widgets/widgets/'. $widgetname.'.widget.php'); ?> </div> </div> @@ -446,7 +445,7 @@ function updateWidgets(newWidget) { } $('#widgetSequence').removeClass('hidden'); - $('input[name=sequence]', $('#widgetSequence_Form')).val(sequence); + $('input[name=sequence]', $('#widgetSequence')).val(sequence); } events.push(function() { @@ -468,9 +467,9 @@ events.push(function() { }); // On clicking a widget to install . . - $('[id^=btnadd-]').click(function(event) { + $('[name^=btnadd-]').click(function(event) { // Add the widget name to the list of displayed widgets - updateWidgets(this.id.replace('btnadd-', '')); + updateWidgets(this.name.replace('btnadd-', '')); // We don't want to see the "Store" button because we are doing that automatically $('#btnstore').hide(); |