Dan Stillman
9d353b4e25
Use Zotero.DB.MAX_BOUND_PARAMETERS instead of hard-coded number
2015-02-27 23:58:49 -05:00
Dan Stillman
b478d8f204
Fix some errors if pane is opened during initialization
2015-02-24 22:07:30 -05:00
Dan Stillman
93e3f68be8
Center align and pad error paragraphs on center pane crash
2015-02-24 22:07:30 -05:00
Dan Stillman
0b21c4c682
Still show proper line number when no message is thrown
2015-02-05 19:01:55 -05:00
Dan Stillman
c322eaa1bc
Restore Error workaround in Bluebird to produce proper line numbers
...
I didn't really investigate this, but errors from the outside world seem
to not pass the "obj instanceof Error" test due to some weirdness that
Bluebird is doing. (When I took this out recently I thought we just were
throwing some custom errors that didn't properly extend Error, but that
isn't the issue.) This restores the earlier workaround.
2015-02-05 18:39:43 -05:00
Dan Stillman
3aaf9e341c
Fix NO_INTERFACE error after entering tag in tags box
2015-02-03 15:36:01 -05:00
Dan Stillman
91d14fc04c
Use 'self' instead of 'global' as global object in Bluebird
...
This fixes an error when other errors occur in recent versions of Bluebird.
2015-02-03 15:36:01 -05:00
Dan Stillman
d660a84f47
Update Bluebird to 2.9.6
2015-02-03 15:36:01 -05:00
Dan Stillman
66a6272adc
Merge pull request #621 from aurimasv/api_syncing-bugfix
...
[API syncing] Minor bugfixes
2015-01-30 00:45:24 -05:00
Aurimas Vinckevicius
ab7fc1614d
Fix bug in collectionTreeView that caused tree row loss
...
...when collapsing/expanding group libraries
2015-01-29 19:31:55 -06:00
Aurimas Vinckevicius
d98a79c33f
Fix typo in item field caching code
2015-01-29 19:31:54 -06:00
Aurimas Vinckevicius
9574e56ad6
Convert itemType to itemTypeID in itemTreeView.js, not items.js
...
itemType comes from the column name in the tree view, so it makes most sense to do it there. Otherwise, Zotero was complaining about invalid field somewhere
2015-01-29 19:31:54 -06:00
Dan Stillman
276cd82fe4
Fix NO_INTERFACE error tabbing between fields
...
Not sure why this is throwing, but I'm also not sure why it was
necessary in the first place
2015-01-28 18:28:44 -05:00
Dan Stillman
84d1be4c03
ConcurrentCaller tweaks
2015-01-28 17:28:38 -05:00
Dan Stillman
8499ec6211
Allow extra data for single-object notifications to be passed directly
...
Previous it had to be keyed by id (and still can be, but if there's only
a single id the notifier will now key it automatically)
2015-01-28 17:25:17 -05:00
Dan Stillman
b785a3bfce
Dynamically populate charsets table
...
Instead of limiting charsets to a fixed list, dynamically populate it
with any charset name of less than 50 ASCII characters. Previously,
unknown charsets were discarded.
Zotero.Item.prototype.attachmentCharset now always returns a charset
name. It can be set with either a name or a charsetID.
Also:
- Remove the unused 'originalPath' column in itemAttachments
2015-01-28 17:15:16 -05:00
Dan Stillman
b670084925
Use 'version' for groups instead of 'etag'
...
APIv3 uses 'version'
2015-01-28 17:05:25 -05:00
Dan Stillman
58c062dd06
Add per-library lastsync times and synced flags for sync delete logs
2015-01-28 15:56:46 -05:00
Dan Stillman
6199742986
Make attempt to read from an invalid DB column a fatal error
2015-01-28 15:56:46 -05:00
Dan Stillman
30b5c4686e
Update Bluebird to 2.9.3
...
...with fewer modifications, since one (better debug info on an invalid
yield value) was implemented in Bluebird and the other (detecting a
thrown error that doesn't properly extend Error) we should just fix in
our code.
2015-01-28 15:19:29 -05:00
Dan Stillman
66a04a39db
Merge pull request #576 from aurimasv/async_db-av2
...
[Async DB] Modularize Zotero.DataObject.save()
2015-01-28 15:07:32 -05:00
Aurimas Vinckevicius
5db52ac1c3
Add 'year' as a gettable field for Zotero.Item
2015-01-26 15:46:56 -06:00
Aurimas Vinckevicius
a0a656eac0
Allow setting a specific dateModified on item
...
To be used in feed items to set the last _remote_ modification date
2015-01-26 15:46:49 -06:00
Aurimas Vinckevicius
7f5555aab6
Inheritance-based Zotero.DataObjects
2015-01-26 15:46:49 -06:00
Aurimas Vinckevicius
707a65c63e
Remove deprecated Zotero.Items.add
2015-01-26 15:46:49 -06:00
Aurimas Vinckevicius
20444eceb7
Sanitize primary fields in setField before comparing to current value
2015-01-19 11:16:17 -06:00
Aurimas Vinckevicius
f0aae549c5
Allow bypassing library edit check when saving data objects
...
Pass {skipEditCheck: true} option to .save()
2015-01-19 11:16:17 -06:00
Aurimas Vinckevicius
efdc6f1230
Add loadAllData to Zotero.dataObject
...
Useful when trying to duplicate items, which requires access to all data
2015-01-19 11:16:17 -06:00
Aurimas Vinckevicius
84d8c17d6e
Move erase to DataObject and make it modular
2015-01-19 11:16:16 -06:00
Aurimas Vinckevicius
cb56b9607d
Move loadPrimaryData to Zotero.DataObject
2015-01-19 11:16:16 -06:00
Aurimas Vinckevicius
b83bc40426
Various fixes for Zotero.Item
2015-01-19 11:16:16 -06:00
Aurimas Vinckevicius
83187eaa35
Validate numeric field IDs
2015-01-19 11:16:16 -06:00
Aurimas Vinckevicius
adab8e45a7
Additional tweaks to DataObject & descendents to support inheritance
2015-01-19 11:16:15 -06:00
Aurimas Vinckevicius
442388304b
Add Zotero.Libraries.isGroupLibrary
2015-01-19 10:37:22 -06:00
Aurimas Vinckevicius
9f535e0e91
Use Zotero.extendClass for inheritance
2015-01-19 10:37:22 -06:00
Aurimas Vinckevicius
a56e800d7c
Add Zotero.localeCompare
...
Can be used directly in Array.sort() as the sorting function.
Uses LocaleCollateion.compareString internally
2015-01-19 10:37:21 -06:00
Aurimas Vinckevicius
9700cdde38
Add Zotero.extendClass
2015-01-19 10:37:21 -06:00
Aurimas Vinckevicius
f7220378dd
Pass fixGaps to Zotero.Search.save() in an options object
2015-01-19 10:36:42 -06:00
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
Aurimas Vinckevicius
56f244a4bb
Add id and libraryID getters for all data objects
2015-01-19 10:36:42 -06:00
Aurimas Vinckevicius
4657c46d4b
getClassForObjectType => getObjectsClassForObjectType
2015-01-19 10:36:41 -06:00
Aurimas Vinckevicius
c222a3248a
Transition __defineGetter/Setter__ to Zotero.defineProperty
2015-01-19 10:36:41 -06:00
Aurimas Vinckevicius
f7d5ebc357
Default to "configurable: true" in defineProperty
2015-01-19 10:36:41 -06:00
Aurimas Vinckevicius
29e9946123
Allow to define properties for late initialization via defineProperty
2015-01-19 10:35:33 -06:00
Aurimas Vinckevicius
d4bd0ee811
Move defineProperty from ZU.Internal to Zotero
2015-01-19 10:31:39 -06:00
Aurimas Vinckevicius
aca15c0d2d
Fix deleting saved searches
2014-11-14 01:50:02 -06:00
Aurimas Vinckevicius
0e31e7ca01
Wait for the item pane to initialize before focusing first field
2014-11-14 01:50:02 -06:00
Dan Stillman
e4451d9002
Merge pull request #575 from aurimasv/async_db-av
...
Async DB tweaks (attempt 2)
2014-10-30 01:47:49 -04:00
Dan Stillman
efa8346d37
Create user library row in libraries table when initializing DB
2014-10-30 01:22:58 -04:00
Aurimas Vinckevicius
3f85ee73b3
Don't count on 0 being the user libraryID in Zotero.Libraries
...
Some other minor tweaks
2014-10-29 23:52:21 -05:00