- Hide error from progress window when saving from translators

- Don't open page twice when clicking link from progress window
This commit is contained in:
Dan Stillman 2010-03-23 19:40:31 +00:00
parent 1ddae811eb
commit fece9cf2ce

View file

@ -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() {
// 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');
}
}