From c00db272fade0d094fe19716724a8deb4442faa6 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 27 Jan 2017 21:05:41 -0500 Subject: [PATCH] Add option to Zotero.ProgressWindow to not close on click ProgressWindow now takes an options object instead of a window (which is now an available option, along with 'closeOnClick') --- chrome/content/zotero/xpcom/progressWindow.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/progressWindow.js b/chrome/content/zotero/xpcom/progressWindow.js index ed2156d57e..101b1adf29 100644 --- a/chrome/content/zotero/xpcom/progressWindow.js +++ b/chrome/content/zotero/xpcom/progressWindow.js @@ -111,7 +111,9 @@ Zotero.ProgressWindowSet = new function() { * * Pass the active window into the constructor */ -Zotero.ProgressWindow = function(_window = null) { +Zotero.ProgressWindow = function(options = {}) { + var _window = options.window || null; + var _closeOnClick = typeof options.closeOnClick == 'undefined' ? true : options.closeOnClick; var self = this, _progressWindow = null, _windowLoaded = false, @@ -541,7 +543,9 @@ Zotero.ProgressWindow = function(_window = null) { } function _onMouseUp(e) { - self.close(); + if (_closeOnClick) { + self.close(); + } } /**