www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 08b3eed7da0ca03b806e204edff86b451435ad98
parent ee5a62b9f4dbb2ece6912177174440a17db40f2e
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 15 Apr 2016 04:17:17 -0400

Zotero.DataObject._loadDataType() -> .loadDataType()

It's generally not necessary to call this, but it can be useful if
specific data needs to be loaded in an unloaded library (e.g., an item's
creators for RTF Scan)

Diffstat:
Mchrome/content/zotero/xpcom/data/collection.js | 4++--
Mchrome/content/zotero/xpcom/data/dataObject.js | 8++++----
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/chrome/content/zotero/xpcom/data/collection.js b/chrome/content/zotero/xpcom/data/collection.js @@ -390,7 +390,7 @@ Zotero.Collection.prototype.addItems = Zotero.Promise.coroutine(function* (itemI }); } - yield this._loadDataType('childItems'); + yield this.loadDataType('childItems'); }); /** @@ -435,7 +435,7 @@ Zotero.Collection.prototype.removeItems = Zotero.Promise.coroutine(function* (it } }.bind(this)); - yield this._loadDataType('childItems'); + yield this.loadDataType('childItems'); }); diff --git a/chrome/content/zotero/xpcom/data/dataObject.js b/chrome/content/zotero/xpcom/data/dataObject.js @@ -554,7 +554,7 @@ Zotero.DataObject.prototype._addLinkedObject = Zotero.Promise.coroutine(function // // Bulk data loading functions // -// These are called by Zotero.DataObjects.prototype._loadDataType(). +// These are called by Zotero.DataObjects.prototype.loadDataType(). // Zotero.DataObject.prototype.loadPrimaryData = Zotero.Promise.coroutine(function* (reload, failOnMissing) { if (this._loaded.primaryData && !reload) return; @@ -638,7 +638,7 @@ Zotero.DataObject.prototype.reload = Zotero.Promise.coroutine(function* (dataTyp || (!reloadUnchanged && !this._changed[dataType])) { continue; } - yield this._loadDataType(dataType, true); + yield this.loadDataType(dataType, true); } } }); @@ -678,7 +678,7 @@ Zotero.DataObject.prototype._requireData = function (dataType) { * @param {Boolean} reload * @param {Promise} */ -Zotero.DataObject.prototype._loadDataType = function (dataType, reload) { +Zotero.DataObject.prototype.loadDataType = function (dataType, reload) { return this._ObjectsClass._loadDataType(dataType, this.libraryID, [this.id]); } @@ -686,7 +686,7 @@ Zotero.DataObject.prototype.loadAllData = Zotero.Promise.coroutine(function* (re for (let i=0; i<this._dataTypes.length; i++) { let type = this._dataTypes[i]; if (!this._skipDataTypeLoad[type]) { - yield this._loadDataType(type, reload); + yield this.loadDataType(type, reload); } } });