diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-11-17 11:51:53 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-11-17 11:52:18 -0500 |
commit | 8d3f3e34f698b3b5c6b040bb0f77bc5f4f5436b6 (patch) | |
tree | 6caabcc364fbfe6210df2220fcd2f8fe57dd9c89 /src/usr/local/www | |
parent | b0e510462404b640e9ae38de7a6fb121006610f1 (diff) | |
download | pfsense-8d3f3e34f698b3b5c6b040bb0f77bc5f4f5436b6.zip pfsense-8d3f3e34f698b3b5c6b040bb0f77bc5f4f5436b6.tar.gz |
Experimental fix for #5463
Diffstat (limited to 'src/usr/local/www')
-rwxr-xr-x | src/usr/local/www/head.inc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc index be0d572..2787565 100755 --- a/src/usr/local/www/head.inc +++ b/src/usr/local/www/head.inc @@ -57,6 +57,7 @@ require_once("globals.inc"); require_once("functions.inc"); require_once("shortcuts.inc"); require_once("service-utils.inc"); +require_once('notices.inc'); header('Content-Type: text/html; charset=utf-8'); @@ -87,7 +88,7 @@ if (isset($config['system']['webgui']['webguicss'])) { <title><?=$tabtitle?></title> <script>var events = events || [];</script> </head> -<body id="<?=basename($_SERVER['SCRIPT_NAME'], '.php')?>"> + <?php /* Determine automated help URL. Should output the page name and parameters @@ -553,20 +554,21 @@ if (are_notices_pending()):?> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> - <a type="button" class="btn btn-primary" href="javascript:clear_notices();">Mark all as read</a> + <button type="button" id="clearallnotices" class="btn btn-primary"><?=gettext("Mark all as read")?></button> </div> </div> </div> </div> <script> - // Do some Ajax to make index.php clear the notices - function clear_notices() { - xmlhttp=new XMLHttpRequest(); - xmlhttp.open("GET","index.php?closenotice=all",true); - xmlhttp.send(); - location.reload(); // reload the page to clear the notices indicator and dismiss the modal dialog all in one - } +//<![CDATA[ + events.push(function(){ + $('#clearallnotices').click(function() { + <?php close_notice("all"); ?> + window.location = window.location.href; + }); + }); +//]]> </script> <?php endif; |