Skip to content

Commit

Permalink
Add option to Zotero.ProgressWindow to not close on click
Browse files Browse the repository at this point in the history
ProgressWindow now takes an options object instead of a window (which is now an
available option, along with 'closeOnClick')
  • Loading branch information
dstillman committed Jan 28, 2017
1 parent 4d56191 commit c00db27
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions chrome/content/zotero/xpcom/progressWindow.js
Expand Up @@ -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,
Expand Down Expand Up @@ -541,7 +543,9 @@ Zotero.ProgressWindow = function(_window = null) {
}

function _onMouseUp(e) {
self.close();
if (_closeOnClick) {
self.close();
}
}

/**
Expand Down

0 comments on commit c00db27

Please sign in to comment.