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')
This commit is contained in:
Dan Stillman 2017-01-27 21:05:41 -05:00
parent 4d56191f0c
commit c00db272fa

View file

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