From 5bef74287dce3e09f072c441112dcc872c73752e Mon Sep 17 00:00:00 2001 From: Tyron Madlener Date: Tue, 16 Aug 2011 13:13:43 +0300 Subject: [PATCH 1/4] Run monitor when tab is focused --- js/server_status_monitor.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index f8a179d9f7..7ac2498810 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -1869,4 +1869,9 @@ $(function() { $('a[href="#clearMonitorConfig"]').show(); } +}); + +// Run the monitor once loaded +$(function() { + $('a[href="#pauseCharts"]').trigger('click'); }); \ No newline at end of file From 63342fdf4a36b1c7282bcf3cc90f31ad61687953 Mon Sep 17 00:00:00 2001 From: Tyron Madlener Date: Tue, 16 Aug 2011 13:14:17 +0300 Subject: [PATCH 2/4] Hide js feature elements when js is disabled --- js/server_status.js | 8 ++++---- themes/original/css/theme_right.css.php | 3 +++ themes/pmahomme/css/theme_right.css.php | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/js/server_status.js b/js/server_status.js index 870f9b1205..bcb25b8f90 100644 --- a/js/server_status.js +++ b/js/server_status.js @@ -15,6 +15,9 @@ // Add a tablesorter parser to properly handle thousands seperated numbers and SI prefixes $(function() { + // Show all javascript related parts of the page + $('.jsfeature').show(); + jQuery.tablesorter.addParser({ id: "fancyNumber", is: function(s) { @@ -110,7 +113,7 @@ $(function() { menuResize(); // Load Server status monitor if (ui.tab.hash == '#statustabs_charting' && ! monitorLoaded) { - $('div#statustabs_charting').append( + $('div#statustabs_charting').append( //PMA_messages['strLoadingMonitor'] + ' ' + '' ); @@ -144,9 +147,6 @@ $(function() { tabStatus[$(this).attr('id')] = 'static'; }); - // Display button links - $('div.buttonlinks').show(); - // Handles refresh rate changing $('.buttonlinks select').change(function() { var chart = tabChart[$(this).parents('div.ui-tabs-panel').attr('id')]; diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 81d01de4a9..83590f927d 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -1126,6 +1126,9 @@ img.sortableIcon { .buttonlinks { float: ; white-space: nowrap; +} + +.jsfeature { display: none; /* Made visible with js */ } diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index 3cd5dc2ce2..805041939e 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -1348,6 +1348,9 @@ img.sortableIcon { .buttonlinks { float: ; white-space: nowrap; +} + +.jsfeature { display: none; /* Made visible with js */ } From 32724b30773492dba6c1bc5fb3a30589042eca6c Mon Sep 17 00:00:00 2001 From: Tyron Madlener Date: Tue, 16 Aug 2011 13:14:48 +0300 Subject: [PATCH 3/4] Replace external advisory urls with url.php?url=sdf&token=... --- libraries/advisor.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/advisor.class.php b/libraries/advisor.class.php index 5d2ed60132..18c447db7f 100644 --- a/libraries/advisor.class.php +++ b/libraries/advisor.class.php @@ -129,7 +129,7 @@ class Advisor // Replaces external Links with PMA_linkURL() generated links $rule['recommendation'] = preg_replace( '#href=("|\')(https?://[^\1]+)\1#ie', - '\'href="\' . PMA_linkURL("\2") . \'"\'', + '\'href="url.php?url=\' . urlencode("\2") . \'&token='.$_SESSION[' PMA_token '].'"\'', $rule['recommendation'] ); break; From 2a54778c3a45b77f0efd72db872c11c2666e70b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 16 Aug 2011 12:31:01 +0200 Subject: [PATCH 4/4] Revert "Replace external advisory urls with url.php?url=sdf&token=..." This reverts commit 32724b30773492dba6c1bc5fb3a30589042eca6c. --- libraries/Advisor.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Advisor.class.php b/libraries/Advisor.class.php index 97298e21ad..bf4fd41b73 100644 --- a/libraries/Advisor.class.php +++ b/libraries/Advisor.class.php @@ -151,7 +151,7 @@ class Advisor // Replaces external Links with PMA_linkURL() generated links $rule['recommendation'] = preg_replace( '#href=("|\')(https?://[^\1]+)\1#ie', - '\'href="url.php?url=\' . urlencode("\2") . \'&token='.$_SESSION[' PMA_token '].'"\'', + '\'href="\' . PMA_linkURL("\2") . \'"\'', $rule['recommendation'] ); break;