Commit graph

7022 commits

Author SHA1 Message Date
Dan Stillman
8f2356f7c3 Delete test directory on exit when using -c 2015-05-27 21:42:37 -04:00
Dan Stillman
7eaa57562f Fix Zotero.ItemFields.getBaseIDFromTypeAndField()
Closes #741
2015-05-27 05:01:48 -04:00
Dan Stillman
80d5b74cf3 Merge 4.0 up to 28301ea45f
Conflicts:
	chrome/content/zotero/preferences/preferences_export.js
	chrome/content/zotero/xpcom/proxy.js
2015-05-26 17:48:22 -04:00
Dan Stillman
8c64d8b410 Fixes #739, Item added to "My Publications" despite choosing cancel 2015-05-26 17:20:42 -04:00
Dan Stillman
f71140da64 Remove Zotero.Item.prototype.addTags
Can use addTag() or setTags()

Addresses #735
2015-05-26 12:13:27 -04:00
Dan Stillman
8a0b4d92a6 Fix PDF tools installation on Linux 2015-05-26 04:44:02 -04:00
Dan Stillman
3d3b817724 Allow data to be set after save() on a new object without load() calls
After saving a new object and reloading primary data and any changed
data (which we can maybe reconsider at some point), mark all other data
types as loaded, since there's no other data we don't have. For example,
this allows for item.save() to be followed by item.setField() without
needing to call item.loadItemData() first.
2015-05-26 04:08:47 -04:00
Dan Stillman
5d530e4173 Don't load item data and collections for all items in the middle pane 2015-05-26 03:19:44 -04:00
Dan Stillman
41a68af1ae Remove debug line when loading collections 2015-05-26 03:19:44 -04:00
Dan Stillman
ea1573e1c3 Don't log warning when localized string for search condition not found
Falls back to item field strings, so not sure why I added logging for
this.
2015-05-26 03:19:30 -04:00
Dan Stillman
9f4b128c14 Remove header and footer from stack trace display 2015-05-26 03:15:04 -04:00
Dan Stillman
28301ea45f Center the site-specific Quick Copy and proxy editing windows
On OS X these show up as sheets, but on Windows without this flag they
appear in the top-left of the screen.
2015-05-25 23:36:24 -04:00
Dan Stillman
c152e81bed Merge pull request #732 from rmzelle/edit-button-quickcopy
Add Edit button for site-specific Quick Copy settings
2015-05-25 23:31:44 -04:00
rmzelle
5833d87169 Add Edit button for site-specific Quick Copy settings 2015-05-25 23:21:50 -04:00
Dan Stillman
ab3b0367ef Merge locales from Transifex 2015-05-25 22:26:50 -04:00
Dan Stillman
6e4eb61694 Merge pull request #673 from sendecomp/optional-proxy-redirect-notification
Add an option to not show the proxy redirection notification
2015-05-25 21:57:16 -04:00
Dan Stillman
96f5bab3a1 Cancel relatedbox loading if binding disappears 2015-05-25 21:48:47 -04:00
Dan Stillman
31af26af08 Fix selection of new items 2015-05-25 21:48:47 -04:00
Dan Stillman
2bd246e2ea Fixes #728, Tag selector refreshing 2015-05-25 21:48:46 -04:00
LinuxMercedes
34c0e746f5 Add an option to not show the proxy redirection notification 2015-05-25 17:38:24 -05:00
Dan Stillman
cbbdebc5b7 Fix hang in collectionsTreeView::selectWait() if row is already selected 2015-05-25 01:43:07 -04:00
Dan Stillman
43762248a4 Fix trash emptying, and do it in batches of 50 2015-05-25 00:14:49 -04:00
Dan Stillman
87fa51849f Accept promise-yielding generators directly in forEachChunkAsync() 2015-05-24 22:56:44 -04:00
Dan Stillman
bf1ee0d52b Move getLibraryAndKeyFromID() tests to dataObjectsTest.js 2015-05-24 22:14:52 -04:00
Dan Stillman
6933f64616 Fix reselection of trash after restart 2015-05-24 22:04:40 -04:00
Dan Stillman
dd52206b37 Don't show "Loading item data" when data is cached 2015-05-24 21:34:11 -04:00
Dan Stillman
e35575e6fd If last viewed collection is set but not found, default to My Library 2015-05-24 20:00:10 -04:00
Dan Stillman
2ed04eca26 Speed up translator initialization in source installs
updateBundledStyles() already has the contents of a new/updated
translator when it copies it into the data dir, so there's no need for
Zotero.Translators.reinit() to read it again from the just-copied file.
This passes the metadata from updateBundledStyles() to reinit() to avoid
the extra file read.

(Alas, this appears to make essentially zero difference on an OS X
system with an SSD, but maybe it will help elsewhere.)
2015-05-24 20:00:10 -04:00
Dan Stillman
bd9c53b29c Fix tag selector loading (broken by 6b87c641) 2015-05-24 20:00:10 -04:00
Dan Stillman
8a93250ca1 Fix "comment.split is not a function" in item box 2015-05-24 04:56:19 -04:00
Dan Stillman
19b8db590f Fixes #727, Duplicated items lose their creators 2015-05-24 04:55:54 -04:00
Dan Stillman
ff7919553c 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.
2015-05-24 04:37:34 -04:00
Dan Stillman
ef57b4e016 Relations fixes and cleanup
Relations need a complete overhaul, but this makes them generally work
again.
2015-05-24 03:08:22 -04:00
Dan Stillman
b21e07d700 Fix group saving and copying attachments between libraries 2015-05-23 21:10:07 -04:00
Dan Stillman
5e1c25f4b5 Async Zotero.File.copyDirectory() 2015-05-23 21:08:11 -04:00
Dan Stillman
e1355cef2f Show only "Export Files..." in context menu for My Publications 2015-05-23 19:07:14 -04:00
Dan Stillman
0f519dc757 Post-merge cleanup in fileInterface.js
(Though not enough to actually get it working)
2015-05-23 18:35:28 -04:00
Dan Stillman
aa730bb3bd Merge branch '4.0'
Conflicts:
	chrome/content/zotero/fileInterface.js
	chrome/content/zotero/xpcom/translation/translate_item.js
	chrome/content/zotero/xpcom/utilities_internal.js
	chrome/content/zotero/zoteroPane.js
2015-05-23 18:26:32 -04:00
Dan Stillman
ebe41ac51a Fixes #724, PDF indexing binaries not downloading
And adds Zotero.File.download(uri, path)
2015-05-23 18:03:25 -04:00
Dan Stillman
6b87c641d9 Experimental approach to cancelling unnecessary promises
If a view or other resources are destroyed while a promise is being
resolved, subsequent code can fail. This is generally harmless, but it
results in unnecessary errors being logged to the console.

To address this, promises can use a new function,
Zotero.Promise.check(), to test whether a value is truthy or 0 and
automatically throw a specific error that's ignored by the unhandled
rejection handler if not.

Example usage:

getAsync().tap(() => Zotero.Promise.check(this.win));

If this.win is cleaned up while getAsync() is being resolved, subsequent
lines won't be run, and nothing will be logged to the console.
2015-05-23 04:43:37 -04:00
Dan Stillman
3fc09add3a Attachment fixes
Change all attachment functions to take parameter objects, including a
'collections' property to assign collections. (Previously, calling code
assigned collections separately, which required a nested transaction,
which is no longer possible.)

Fixes #723, Can't attach files by dragging
2015-05-23 04:43:37 -04:00
Simon Kornblith
6e2d1f683a Get translation at least partly working
I'm pretty sure I've only scratched the surface here, but at least
basic things work.
2015-05-22 22:24:46 -04:00
Dan Stillman
61cb01b7c2 Collection/item tree selection improvements
Wait for the pane's collectionSelected() to finish before returning from
collectionTreeView select methods (e.g., selectLibrary()), and wait for
previous items view to finish loading before creating a new one in
collectionSelected(). This ensures that the items view has been created (though
not loaded) before returning from a select. The tree can still get a bit
confused switching between collections, but I think we're getting closer to
fixing that.

Also switch the items tree to use the same pattern.

This also fixes dragging items to collections (#731).
2015-05-22 19:22:00 -04:00
Dan Stillman
a2d4b05064 Add group test 2015-05-22 16:04:40 -04:00
Dan Stillman
23e4e54c29 Add extra newline between lines in error reports 2015-05-22 16:03:06 -04:00
Dan Stillman
f164fef3d2 Skip Quick Copy until #520 is done 2015-05-22 16:00:22 -04:00
Dan Stillman
22e0ba3a22 Fix hangs related to data object purging 2015-05-22 15:59:15 -04:00
Dan Stillman
cf010d7748 Fix collection collapse/expand issues
Fixes #722, Everything disappears
2015-05-22 14:43:09 -04:00
Dan Stillman
432d89af24 Group data layer fixes 2015-05-22 14:41:59 -04:00
Dan Stillman
32abbe7c25 Load groups at startup, and make Zotero.Groups functions synchronous
Groups were already being loaded for the collections list, so we might
as well just store them initially and let Zotero.Libraries.getName() be
a synchronous call.
2015-05-22 04:52:05 -04:00