From dffa404e98ba86f9d0cb7d8e8c8a46779d75e775 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 2 Nov 2011 21:04:27 +0000 Subject: [PATCH] re-add logs dialog to menu --- static/js/pandora/logsDialog.js | 4 +++- static/js/pandora/menu.js | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/static/js/pandora/logsDialog.js b/static/js/pandora/logsDialog.js index 634221fc..fb7435ec 100644 --- a/static/js/pandora/logsDialog.js +++ b/static/js/pandora/logsDialog.js @@ -87,7 +87,9 @@ pandora.ui.logsDialog = function() { id: 'text', title: 'Text', tooltip: function(data) { - return '
' + data.text.replace(/\n\n/g, '
') + '
'; + return $('').append( + $('
').html(data.text.replace(/\n\n/g, '
')) + ); }, visible: true, width: 640 diff --git a/static/js/pandora/menu.js b/static/js/pandora/menu.js index 904b9979..eebe4050 100644 --- a/static/js/pandora/menu.js +++ b/static/js/pandora/menu.js @@ -139,6 +139,7 @@ pandora.ui.mainMenu = function() { pandora.site.capabilities.canSeeDebugMenu[pandora.user.level] ? [ { id: 'debugMenu', title: 'Debug', items: [ + { id: 'logs', title: 'View Logs...'}, { id: 'clearcache', title: 'Clear Cache'}, { id: 'reloadapplication', title: 'Reload Application'}, { id: 'resetui', title: 'Reset UI Settings'}, @@ -258,6 +259,10 @@ pandora.ui.mainMenu = function() { groups: pandora.site.user.ui.groups }); pandora.$ui.contentPanel.replaceElement(0, pandora.$ui.browser = pandora.ui.browser()); + } else if (data.id == 'logs') { + (pandora.$ui.logsDialog || ( + pandora.$ui.logsDialog = pandora.ui.logsDialog() + )).open(); } else if (data.id == 'clearcache') { Ox.Request.clearCache(); } else if (data.id == 'reloadapplication') {