From 56f244a4bb96d4d9a31b642755d494d8ce4a60a7 Mon Sep 17 00:00:00 2001 From: Aurimas Vinckevicius Date: Fri, 14 Nov 2014 02:38:31 -0600 Subject: [PATCH] Add id and libraryID getters for all data objects --- chrome/content/zotero/xpcom/data/dataObject.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chrome/content/zotero/xpcom/data/dataObject.js b/chrome/content/zotero/xpcom/data/dataObject.js index 092f55461..d7d928548 100644 --- a/chrome/content/zotero/xpcom/data/dataObject.js +++ b/chrome/content/zotero/xpcom/data/dataObject.js @@ -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 });