zotero/chrome
Aurimas Vinckevicius e02945b591 Add a centralized, modular .save() method to DataObject
.save calls ._initSave(), _saveData(), _finalizeSave() internally passing `env` object to each to act as an environment for passing around variables
* _initSave should determine if the save is possible and return a promise for either `true` or `false`. It should also set up the environment, e.g. determine if this `isNew`
* _saveData performs the actual saving to the database, but should not do any terminal steps in the save process so that any extending classes could extend this method to write additional data to the database
* _finalizeSave should perform any finalization before the data is committed to the database.

_recoverFromSaveError is called with `env` and an error that occurred. This method should perform any recovery steps, e.g. discarding the save and reloading the item from the database into the cache.
2015-01-19 10:36:42 -06:00
..
content Add a centralized, modular .save() method to DataObject 2015-01-19 10:36:42 -06:00
locale Async DB megacommit 2014-08-06 22:59:37 -04:00
skin/default/zotero Update zotero:// extensions (report, timeline, etc.) for async DB, and more 2014-09-09 00:36:29 -04:00