From 6b2bbf80e13f85157539be1b269dabc2bdb6a4f2 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 18 Feb 2013 16:05:58 -0500 Subject: [PATCH] Fix things so that they (hopefully) don't break under latest Q --- chrome/content/zotero/integration/addCitationDialog.js | 2 +- chrome/content/zotero/integration/quickFormat.js | 2 +- chrome/content/zotero/recognizePDF.js | 2 +- chrome/content/zotero/xpcom/integration.js | 8 ++++---- chrome/content/zotero/xpcom/storage/queue.js | 2 +- chrome/content/zotero/zoteroPane.js | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/chrome/content/zotero/integration/addCitationDialog.js b/chrome/content/zotero/integration/addCitationDialog.js index 99115a227..3b45a3656 100644 --- a/chrome/content/zotero/integration/addCitationDialog.js +++ b/chrome/content/zotero/integration/addCitationDialog.js @@ -568,7 +568,7 @@ var Zotero_Citation_Dialog = new function () { io.preview().then(function(preview) { _originalHTML = preview; editor.value = text; - }).end(); + }).done(); } else { _updatePreview(); } diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index ff1af9bb7..1371cacc3 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -312,7 +312,7 @@ var Zotero_QuickFormat = new function () { } _updateItemList(citedItems, citedItemsMatchingSearch, searchResultIDs, isAsync); - }).end(); + }).done(); if(!completed) { // We are going to have to wait until items have been retrieved from the document. diff --git a/chrome/content/zotero/recognizePDF.js b/chrome/content/zotero/recognizePDF.js index 0e244fce7..1392ef2bd 100644 --- a/chrome/content/zotero/recognizePDF.js +++ b/chrome/content/zotero/recognizePDF.js @@ -493,7 +493,7 @@ Zotero_RecognizePDF.ItemRecognizer.prototype._recognizeItem = function() { }).fin(function() { // scroll to this item me._progressWindow.document.getElementById("tree").treeBoxObject.scrollToRow(Math.max(0, me._itemTotal-me._items.length-5)); - }).end(); + }).done(); } /** diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 83f541086..51dbfb8d6 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -301,7 +301,7 @@ Zotero.Integration = new function() { } inProgress = Zotero.Integration.currentWindow = false; - }).end(); + }).done(); }; }; @@ -1833,7 +1833,7 @@ Zotero.Integration.CitationEditInterface.prototype = { */ "_updateSession":function _updateSession(resolveErrors) { var me = this; - if(this._sessionUpdatePromise && this._sessionUpdatePromise.isResolved()) { + if(this._sessionUpdatePromise && this._sessionUpdatePromise.isFulfilled()) { // Session has already been updated. If we were deferring resolving an error, // and we are supposed to resolve it now, then do that if(this._sessionUpdateError) { @@ -1881,7 +1881,7 @@ Zotero.Integration.CitationEditInterface.prototype = { me._sessionUpdateDeferreds[i].reject(err); } throw err; - }).end(); + }).done(); } return deferred.promise; @@ -1916,7 +1916,7 @@ Zotero.Integration.CitationEditInterface.prototype = { * Receives a number from 0 to 100 indicating current status. */ "accept":function(progressCallback) { - if(!this._acceptDeferred.promise.isResolved()) { + if(!this._acceptDeferred.promise.isFulfilled()) { this._acceptDeferred.resolve(progressCallback); } }, diff --git a/chrome/content/zotero/xpcom/storage/queue.js b/chrome/content/zotero/xpcom/storage/queue.js index 21956a009..e2ab45190 100644 --- a/chrome/content/zotero/xpcom/storage/queue.js +++ b/chrome/content/zotero/xpcom/storage/queue.js @@ -212,7 +212,7 @@ Zotero.Sync.Storage.Queue.prototype.addRequest = function (request, highPriority Zotero.Sync.Storage.Queue.prototype.start = function () { - if (!this._deferred || this._deferred.promise.isResolved()) { + if (!this._deferred || this._deferred.promise.isFulfilled()) { Zotero.debug("Creating deferred for queue " + this.name); this._deferred = Q.defer(); } diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 3cbc1f603..d632ff839 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -3433,7 +3433,7 @@ var ZoteroPane = new function() Zotero.debug(e, 1); ZoteroPane_Local.syncAlert(e); }) - .end(); + .done(); } } }