Collections data layer cleanup
Get rid of data_access.js, at long last. Existing calls to Zotero.getCollections() will need to be replaced with Zotero.Collections.getByLibrary() or .getByParent(). Also removes Zotero.Collection::getCollections(), which is redundant with Zotero.Collections.getByLibrary(), and Zotero.Collections.add(). The latter didn't didn't include a libraryID anyway, so code might as well just use 'new Zotero.Collection' instead.
This commit is contained in:
parent
ef57b4e016
commit
ff7919553c
11 changed files with 109 additions and 187 deletions
|
@ -160,12 +160,12 @@ function createUnsavedDataObject(objectType, params) {
|
|||
obj.name = params.name !== undefined ? params.name : "Test";
|
||||
break;
|
||||
}
|
||||
if (params.version !== undefined) {
|
||||
obj.version = params.version
|
||||
}
|
||||
if (params.synced !== undefined) {
|
||||
obj.synced = params.synced
|
||||
}
|
||||
var allowedParams = ['parentID', 'parentKey', 'synced', 'version'];
|
||||
allowedParams.forEach(function (param) {
|
||||
if (params[param] !== undefined) {
|
||||
obj[param] = params[param];
|
||||
}
|
||||
})
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue