From f4e4f27279a4346c465c22adc84566c242282563 Mon Sep 17 00:00:00 2001 From: Joscha Legewie Date: Tue, 12 Apr 2016 14:23:59 -0500 Subject: [PATCH] Bug fix progressWindow.js: nArcs undefined `nArcs` is undefined in `this.ItemProgress.prototype.setProgress()`. This has been the case for a long time but never came up because the progress indicator isn't used in Zotero, I believe. I think it's a nice UI element though and could be used for non-disruptive progress indicators. --- chrome/content/zotero/xpcom/progressWindow.js | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/content/zotero/xpcom/progressWindow.js b/chrome/content/zotero/xpcom/progressWindow.js index 8a4860d18..a23ab2e5f 100644 --- a/chrome/content/zotero/xpcom/progressWindow.js +++ b/chrome/content/zotero/xpcom/progressWindow.js @@ -332,6 +332,7 @@ Zotero.ProgressWindow = function(_window = null) { this.ItemProgress.prototype.setProgress = _deferUntilWindowLoad(function(percent) { if(percent != 0 && percent != 100) { // Indication of partial progress, so we will use the circular indicator + var nArcs = 20; this._image.style.backgroundImage = "url('chrome://zotero/skin/progress_arcs.png')"; this._image.style.backgroundPosition = "-"+(Math.round(percent/100*nArcs)*16)+"px 0"; this._hbox.style.opacity = percent/200+.5;