diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-12-14 11:43:05 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-12-14 11:43:05 -0500 |
commit | 5db26d3f8e0110faa39d3638a81dbd2b3d78d186 (patch) | |
tree | f37074fa597d1890f58d2eadbd1fe7c6c79b4add /src/usr | |
parent | 279ea790549541aa13816572626bdf58fb7da48a (diff) | |
parent | 677d8bdfebace3321da677a57a0756a27332d505 (diff) | |
download | pfsense-5db26d3f8e0110faa39d3638a81dbd2b3d78d186.zip pfsense-5db26d3f8e0110faa39d3638a81dbd2b3d78d186.tar.gz |
Merge pull request #2218 from NOYB/HTML_Compliance_-_Dashboard
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/index.php | 20 | ||||
-rw-r--r-- | src/usr/local/www/jquery/pfSenseHelpers.js | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php index d44b8f6..350ddb7 100644 --- a/src/usr/local/www/index.php +++ b/src/usr/local/www/index.php @@ -312,19 +312,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" name="widgets-available"> + <a data-toggle="collapse" href="#widget-available_panel-body" id="widgets-available"> <i class="fa fa-plus-circle"></i> </a> </span> </div> - <div class="panel-body collapse out"> + <div id="widget-available_panel-body" 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="#" name="btnadd-<?=$widgetname?>"><i class="fa fa-plus"></i> <?=$widgetconfig['name']?></a></div> + <div class="col-sm-3"><a href="#" id="btnadd-<?=$widgetname?>"><i class="fa fa-plus"></i> <?=$widgetconfig['name']?></a></div> <?php endif; ?> <?php endforeach; ?> </div> @@ -355,7 +355,7 @@ foreach ($widgets as $widgetname => $widgetconfig): </div> <div class="hidden" id="widgetSequence"> - <form action="/" method="post" id="widgetSequence" name="widgetForm"> + <form action="/" method="post" id="widgetSequence_Form" name="widgetForm"> <input type="hidden" name="sequence" value="" /> <button type="submit" id="btnstore" class="btn btn-primary">Store widget configuration</button> @@ -403,10 +403,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> @@ -415,7 +415,7 @@ foreach ($widgets as $widgetname => $widgetconfig) </a> </span> </div> - <div class="panel-body collapse<?=($widgetconfig['display']=='close' ? '' : ' in')?>"> + <div id="widget-<?=$widgetname?>_panel-body" class="panel-body collapse<?=($widgetconfig['display']=='close' ? '' : ' in')?>"> <?php include('/usr/local/www/widgets/widgets/'. $widgetname.'.widget.php'); ?> </div> </div> @@ -449,7 +449,7 @@ function updateWidgets(newWidget) sequence += newWidget + ':' + 'col2:open'; $('#widgetSequence').removeClass('hidden'); - $('input[name=sequence]', $('#widgetSequence')).val(sequence); + $('input[name=sequence]', $('#widgetSequence_Form')).val(sequence); } events.push(function() { @@ -471,9 +471,9 @@ events.push(function() { }); // On clicking a widget to install . . - $('[name^=btnadd-]').click(function(event) { + $('[id^=btnadd-]').click(function(event) { // Add the widget name to the list of displayed widgets - updateWidgets(this.name.replace('btnadd-', '')); + updateWidgets(this.id.replace('btnadd-', '')); // We don't want to see the "Store" button because we are doing that automatically $('#btnstore').hide(); diff --git a/src/usr/local/www/jquery/pfSenseHelpers.js b/src/usr/local/www/jquery/pfSenseHelpers.js index cf2bddc..4fbe9f8 100644 --- a/src/usr/local/www/jquery/pfSenseHelpers.js +++ b/src/usr/local/www/jquery/pfSenseHelpers.js @@ -427,7 +427,7 @@ $('tbody:empty').html("<tr><td></td></tr>"); $(el).children('i').toggleClass('fa-minus-circle', true); $(el).children('i').toggleClass('fa-plus-circle', false); - if($(el).closest('a').attr('name') != 'widgets-available') { + if($(el).closest('a').attr('id') != 'widgets-available') { updateWidgets(); } }); @@ -436,7 +436,7 @@ $('tbody:empty').html("<tr><td></td></tr>"); $(el).children('i').toggleClass('fa-minus-circle', false); $(el).children('i').toggleClass('fa-plus-circle', true); - if($(el).closest('a').attr('name') != 'widgets-available') { + if($(el).closest('a').attr('id') != 'widgets-available') { updateWidgets(); } }); |