www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit c00db272fade0d094fe19716724a8deb4442faa6
parent 4d56191f0cea1628579e219af74cacbd05cc3b9c
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 27 Jan 2017 21:05:41 -0500

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')

Diffstat:
Mchrome/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 @@ -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(); + } } /**