Permalink
Browse files

Fixed advisor dialog + microhistory

  • Loading branch information...
1 parent 05462d6 commit e43cbe5b2e85f5aa5a777f7b40d05e97f1231fe5 @roccivic roccivic committed Dec 17, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −4 js/server_status_advisor.js
  2. +0 −1 server_status_advisor.php
@@ -11,11 +11,12 @@
AJAX.registerTeardown('server_status_advisor.js', function() {
$('a[href="#openAdvisorInstructions"]').unbind('click');
$('#statustabs_advisor').html('');
- $('div#emptyDialog').dialog('destroy');
+ $('#advisorDialog').dialog('destroy');
});
AJAX.registerOnload('server_status_advisor.js', function() {
/**** Server config advisor ****/
+ var $dialog = $('<div />').attr('id', 'advisorDialog');
$('a[href="#openAdvisorInstructions"]').click(function() {
var dlgBtns = {};
@@ -66,8 +67,9 @@ AJAX.registerOnload('server_status_advisor.js', function() {
$tr.click(function() {
var rule = $(this).data('rule');
- $('div#emptyDialog').dialog({title: PMA_messages['strRuleDetails']});
- $('div#emptyDialog').html(
+ $dialog
+ .dialog({title: PMA_messages['strRuleDetails']})
+ .html(
'<p><b>' + PMA_messages['strIssuse'] + ':</b><br />' + rule.issue + '</p>' +
'<p><b>' + PMA_messages['strRecommendation'] + ':</b><br />' + rule.recommendation + '</p>' +
'<p><b>' + PMA_messages['strJustification'] + ':</b><br />' + rule.justification + '</p>' +
@@ -80,7 +82,7 @@ AJAX.registerOnload('server_status_advisor.js', function() {
$(this).dialog('close');
};
- $('div#emptyDialog').dialog({ width: 600, buttons: dlgBtns });
+ $dialog.dialog({ width: 600, buttons: dlgBtns });
});
});
}
@@ -59,7 +59,6 @@
);
$output .= '</p>';
$output .= '</div>';
-$output .= '<div id="emptyDialog" style="display:none;"></div>';
$output .= '<div id="advisorData" style="display:none;">';
$advisor = new Advisor();
$output .= htmlspecialchars(

0 comments on commit e43cbe5

Please sign in to comment.