Use Zotero.extendClass for inheritance

This commit is contained in:
Aurimas Vinckevicius 2014-11-14 03:02:27 -06:00
parent a56e800d7c
commit 9f535e0e91
2 changed files with 2 additions and 6 deletions

View File

@ -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([

View File

@ -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([