Remove unused toResponseJSON() overrides for Collection/Search
This commit is contained in:
parent
8e0e69332e
commit
451c12513e
2 changed files with 0 additions and 29 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue