From fece9cf2ce47195953d30686e4e1ede705f8da8c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 23 Mar 2010 19:40:31 +0000 Subject: [PATCH] - Hide error from progress window when saving from translators - Don't open page twice when clicking link from progress window --- chrome/content/zotero/xpcom/progressWindow.js | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/chrome/content/zotero/xpcom/progressWindow.js b/chrome/content/zotero/xpcom/progressWindow.js index 8fbe11e93..797337ec5 100644 --- a/chrome/content/zotero/xpcom/progressWindow.js +++ b/chrome/content/zotero/xpcom/progressWindow.js @@ -222,12 +222,6 @@ Zotero.ProgressWindow = function(_window){ elem.setAttribute('class', 'text-link'); for (var i in part.attributes) { elem.setAttribute(i, part.attributes[i]); - - if (i == 'href') { - // DEBUG: As of Fx2, 'mouseup' seems to be the only - // way to detect a click in a popup window - elem.addEventListener('mouseup', _handleLinkClick, false); - } } } @@ -307,7 +301,13 @@ Zotero.ProgressWindow = function(_window){ } function _disableTimeout() { - _progressWindow.clearTimeout(_timeoutID); + // FIXME: to prevent errors from translator saving (Create New Item appears to still work) + // This shouldn't be necessary, and mouseover isn't properly + // causing the popup to remain + try { + _progressWindow.clearTimeout(_timeoutID); + } + catch (e) {} _timeoutID = false; } @@ -337,7 +337,6 @@ Zotero.ProgressWindow = function(_window){ && (e.screenY >= top) && e.screenY <= (top + this.outerHeight)) { return; } - startCloseTimer(); } @@ -345,13 +344,4 @@ Zotero.ProgressWindow = function(_window){ function _onMouseUp(e) { close(); } - - - /* - * Open URL specified in target's href attribute in a new window - */ - function _handleLinkClick(event) { - _progressWindow.open(event.target.getAttribute('href'), 'zotero-loaded-page', - 'menubar=yes,location=yes,toolbar=yes,personalbar=yes,resizable=yes,scrollbars=yes,status=yes'); - } }