Remove unused toResponseJSON() overrides for Collection/Search

This commit is contained in:
Dan Stillman 2016-06-20 01:21:24 -05:00
parent 8e0e69332e
commit 451c12513e
2 changed files with 0 additions and 29 deletions

View file

@ -668,30 +668,6 @@ Zotero.Collection.prototype.fromJSON = function (json) {
}
Zotero.Collection.prototype.toResponseJSON = function (options = {}) {
var json = this.constructor._super.prototype.toResponseJSON.apply(this, options);
// TODO: library block?
// creatorSummary
var firstCreator = this.getField('firstCreator');
if (firstCreator) {
json.meta.creatorSummary = firstCreator;
}
// parsedDate
var parsedDate = Zotero.Date.multipartToSQL(this.getField('date', true, true));
if (parsedDate) {
// 0000?
json.meta.parsedDate = parsedDate;
}
// numChildren
if (this.isRegularItem()) {
json.meta.numChildren = this.numChildren();
}
return json;
};
Zotero.Collection.prototype.toJSON = function (options = {}) {
var env = this._preToJSON(options);
var mode = env.mode;

View file

@ -836,11 +836,6 @@ Zotero.Search.prototype.fromJSON = function (json) {
}
}
Zotero.Search.prototype.toResponseJSON = function (options = {}) {
var json = this.constructor._super.prototype.toResponseJSON.apply(this, options);
return json;
};
Zotero.Search.prototype.toJSON = function (options = {}) {
var env = this._preToJSON(options);