commit 9f535e0e91e7707719cbe64ebf03dd147dfe6f85 parent a56e800d7cf0a2c8487a425455a6f13697f97a7d Author: Aurimas Vinckevicius <aurimas.dev@gmail.com> Date: Fri, 14 Nov 2014 03:02:27 -0600 Use Zotero.extendClass for inheritance Diffstat:
| M | chrome/content/zotero/xpcom/data/item.js | | | 4 | +--- |
| M | chrome/content/zotero/xpcom/search.js | | | 4 | +--- |
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -89,9 +89,7 @@ Zotero.Item = function(itemTypeOrID) { } } -Zotero.Item._super = Zotero.DataObject; -Zotero.Item.prototype = Object.create(Zotero.Item._super.prototype); -Zotero.Item.constructor = Zotero.Item; +Zotero.extendClass(Zotero.DataObject, Zotero.Item); Zotero.Item.prototype._objectType = 'item'; Zotero.Item.prototype._dataTypes = Zotero.Item._super.prototype._dataTypes.concat([ diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js @@ -37,9 +37,7 @@ Zotero.Search = function() { this._hasPrimaryConditions = false; } -Zotero.Search._super = Zotero.DataObject; -Zotero.Search.prototype = Object.create(Zotero.Search._super.prototype); -Zotero.Search.constructor = Zotero.Search; +Zotero.extendClass(Zotero.DataObject, Zotero.Search); Zotero.Search.prototype._objectType = 'search'; Zotero.Search.prototype._dataTypes = Zotero.Search._super.prototype._dataTypes.concat([