Add id and libraryID getters for all data objects

This commit is contained in:
Aurimas Vinckevicius 2014-11-14 02:38:31 -06:00
parent 4657c46d4b
commit 56f244a4bb

View File

@ -58,6 +58,12 @@ Zotero.DataObject.prototype._dataTypes = [];
Zotero.defineProperty(Zotero.DataObject.prototype, 'objectType', {
get: function() this._objectType
});
Zotero.defineProperty(Zotero.DataObject.prototype, 'id', {
get: function() this._id
});
Zotero.defineProperty(Zotero.DataObject.prototype, 'libraryID', {
get: function() this._libraryID
});
Zotero.defineProperty(Zotero.DataObject.prototype, 'libraryKey', {
get: function() this._libraryID + "/" + this._key
});