diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-12-01 09:41:13 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-12-01 09:41:13 -0500 |
commit | d5d5836c4f94e70f5f4ddf1df8ac8bb6e684202c (patch) | |
tree | 277adefba5c50e67650b180ef96063ff559839b5 /src/usr/local/www/index.php | |
parent | 3c759cafc710ddef828d3bbf28478a6828505808 (diff) | |
download | pfsense-d5d5836c4f94e70f5f4ddf1df8ac8bb6e684202c.zip pfsense-d5d5836c4f94e70f5f4ddf1df8ac8bb6e684202c.tar.gz |
Experimental changes to Form_Section() to allow the panel to be made collapsable in the same way that dashboard widgets are.
Currently used on diag_logs_filter.php ONLY
Diffstat (limited to 'src/usr/local/www/index.php')
-rw-r--r-- | src/usr/local/www/index.php | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php index 28cc1f4..43846fe 100644 --- a/src/usr/local/www/index.php +++ b/src/usr/local/www/index.php @@ -302,7 +302,7 @@ pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard"); <div class="panel-heading"><?=gettext("Available Widgets"); ?> <span class="widget-heading-icon"> <a data-toggle="collapse" href="#widget-available .panel-body" name="widgets-available"> - <i class="fa fa-plus-cirle"></i> + <i class="fa fa-plus-circle"></i> </a> </span> </div> @@ -420,39 +420,6 @@ function updateWidgets(newWidget) } events.push(function() { - // Hide configuration button for panels without configuration - $('.container .panel-heading a.config').each(function (idx, el){ - var config = $(el).parents('.panel').children('.panel-footer'); - if (config.length == 1) - $(el).removeClass('hidden'); - }); - - // Initial state & toggle icons of collapsed panel - $('.container .panel-heading a[data-toggle="collapse"]').each(function (idx, el){ - var body = $(el).parents('.panel').children('.panel-body') - var isOpen = body.hasClass('in'); - - $(el).children('i').toggleClass('fa-plus-circle', !isOpen); - $(el).children('i').toggleClass('fa-minus-circle', isOpen); - - body.on('shown.bs.collapse', function(){ - $(el).children('i').toggleClass('fa-minus-circle', true); - $(el).children('i').toggleClass('fa-plus-circle', false); - - if($(el).closest('a').attr('name') != 'widgets-available') { - updateWidgets(); - } - }); - - body.on('hidden.bs.collapse', function(){ - $(el).children('i').toggleClass('fa-minus-circle', false); - $(el).children('i').toggleClass('fa-plus-circle', true); - - if($(el).closest('a').attr('name') != 'widgets-available') { - updateWidgets(); - } - }); - }); // Make panels destroyable $('.container .panel-heading a[data-toggle="close"]').each(function (idx, el){ |