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:
parent
4d56191f0c
commit
c00db272fa
1 changed files with 6 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue