From cf93417ec9da3a8a7d5ed681be58f00e1d6229ad Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 10 Aug 2009 17:37:35 +0000 Subject: [PATCH] A few debug logging fixes --- chrome/content/zotero/preferences/preferences.js | 11 ++++++----- chrome/content/zotero/preferences/preferences.xul | 5 ++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index 49cbe2ecd..2fcdf23d1 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -29,8 +29,8 @@ var _io = {}; var Zotero_Preferences = { - onClose: function () { - Zotero_Preferences.DebugOutput.onClose(); + onUnload: function () { + Zotero_Preferences.Debug_Output.onUnload(); } } @@ -1268,7 +1268,7 @@ Zotero_Preferences.Debug_Output = { document.getElementById('debug-output-submit').disabled = true; document.getElementById('debug-output-submit-progress').hidden = false; - var url = "http://www.zotero.org/utils/dev/repo/report?debug=1"; + var url = "http://www.zotero.org/repo/report?debug=1"; var output = Zotero.Debug.get(); var uploadCallback = function (xmlhttp) { @@ -1407,10 +1407,11 @@ Zotero_Preferences.Debug_Output = { updateLines: function () { + var enabled = Zotero.Debug.storing; var lines = Zotero.Debug.count(); document.getElementById('debug-output-lines').value = lines; var empty = lines == 0; - document.getElementById('debug-output-view').disabled = empty; + document.getElementById('debug-output-view').disabled = !enabled && empty; document.getElementById('debug-output-clear').disabled = empty; document.getElementById('debug-output-submit').disabled = empty; }, @@ -1441,7 +1442,7 @@ Zotero_Preferences.Debug_Output = { }, - onClose: function () { + onUnload: function () { if (this._timer) { this._timer.cancel(); } diff --git a/chrome/content/zotero/preferences/preferences.xul b/chrome/content/zotero/preferences/preferences.xul index e9176bd06..e33c30ed0 100644 --- a/chrome/content/zotero/preferences/preferences.xul +++ b/chrome/content/zotero/preferences/preferences.xul @@ -37,9 +37,8 @@ To add a new preference: in Zotero.Prefs.observe() --> - +