Commit graph

5914 commits

Author SHA1 Message Date
Dan Stillman
8933e3b586 Item.toJSON() should output unset mtime/md5 as null, not undefined 2015-12-22 01:49:45 -05:00
Adomas Venčkauskas
8e0e86e59c Closes #882
Hide password in debug output of key request
2015-12-20 13:46:58 +00:00
Dan Stillman
cfee7ea9d2 Merge pull request #879 from adomasven/feature/transparent-api-keygen
Restores the functionality of 4.0 for sync settings
2015-12-14 19:28:56 -05:00
Adomas Venčkauskas
ffd9a07164 Restores sync credential functionality of 4.0.
Improves UX of sync authentication.
The account is now linked and unlinked and an API key related to
the client is generated transparently in the background.
The API key is deleted on unlinking.
No sync options are allowed before linking an account.
2015-12-14 23:55:28 +00:00
Dan Stillman
faf3b94b64 Clear existing DB user values when reinitializing Users for tests 2015-12-10 20:34:41 -05:00
Dan Stillman
0673face28 Update submodules and maxVersion 2015-12-10 16:33:51 -05:00
Dan Stillman
177dac3fd2 Closes #805, Translation shouldn't create new item in My Publications
And in download overlay, save and switch to My Library if My
Publications is selected.
2015-12-10 01:11:41 -05:00
Dan Stillman
18349b2232 Restore certificate checking for API syncing errors
Closes #864

This adds a 'channel' property to Zotero.HTTP.UnexpectedStatusException,
because the 'channel' property of the XHR can be garbage-collected
before handling, and the channel's 'securityInfo' property is necessary
to detect certificate errors.
2015-12-09 04:11:27 -05:00
Dan Stillman
bad92a1d22 Quick update of recognizePDF from Q to Bluebird
This should be refactored further, but this is a start at swapping in
Bluebird. Unfortunately the process doesn't work correctly because of
issues in the translation framework, which will need to be addressed
separately -- right now a parent item is successfully created but the UI
still shows an error and the PDF isn't placed under the parent.
2015-12-07 17:23:10 -05:00
Dan Stillman
1d4dd9faac Fix double filename in progress popup when saving files
This appears to have started in a recent Fx version.
2015-11-28 19:12:36 -05:00
Adomas Venčkauskas
4b16210ac6 Remove tags on shift-drag
Closes #852

Currently shows a *+* icon for adding a tag and
a *link* icon for removing it.

There does not appear to be any way to have a custom mouse cursor,
which makes this interaction extremely unintuitive. It might be
possible to hack this in, but it does not really warrant the effort.
E.g. `window.setCursor` does not respond whilst dragging.
2015-11-20 16:51:48 +00:00
Dan Stillman
08cb63f66d Fix various cases of saving items to selected collection
This changes Zotero.Translate.Base.translate() to take an options object (in
order to take a 'collections' parameter, which is passed to the
Zotero.Translate.ItemSaver constructor). The old parameters are still supported
with a deprecation warning, and there may be other places that still need to be
updated.
2015-11-15 17:49:31 -05:00
Dan Stillman
6d64526648 Ignore unknown fields in Zotero.Item::fromJSON() 2015-11-12 17:24:03 -05:00
Dan Stillman
3025123cb8 Merge pull request #867 from adomasven/feature/dropbox-alert
Detect when data directory is in Dropbox
2015-11-12 15:45:00 -05:00
Adomas Venčkauskas
b75cc8f9d0 Closes #437, Detect when data directory is in Dropbox
Display a warning when choosing data directory
Or on opening Zotero Pane for existing users with data dir in dropbox

Also:
Fix a bug where it won't use custom path if "Choose..." button is
pressed instead of radio button.
Change filepicker to show current data directory on display
2015-11-12 20:24:39 +00:00
Dan Stillman
cc9d1cc41d Merge pull request #871 from adomasven/fix/my-publications-linux
Fixes the finish button on my publication wizard on linux
2015-11-12 05:41:57 -05:00
Dan Stillman
62aeb1da32 Full-text syncing support via API [DB reupgrade] 2015-11-12 02:54:51 -05:00
Dan Stillman
cb81f3febd Set 'Content-Type: application/json' on object uploads 2015-11-12 02:51:48 -05:00
Dan Stillman
69e5c5ae05 Don't accept libraryVersion in syncAPIClient::getVersions()
Since /settings is always called first with If-Modified-Since-Version,
it's never necessary to include that in the versions request.
2015-11-12 02:50:24 -05:00
Dan Stillman
ae277391b6 Miscellaneous tweaks 2015-11-12 02:48:41 -05:00
Dan Stillman
614232754a Allow "Zotero.Fulltext" as "Zotero.FullText"
"Zotero.Fulltext" should be considered deprecated, though there's no
warning for it yet.
2015-11-12 02:42:20 -05:00
Dan Stillman
6d289797bf Retry API requests automatically after 5xx errors 2015-11-12 02:41:40 -05:00
Dan Stillman
790d6d3dd6 Fix "Save to Zotero" in download overlay 2015-11-10 15:52:09 -05:00
Adomas Venčkauskas
234c94be67 Fixes my publication wizard on linux, Closes #738
Also:
- Removes horizontal scrollbar in linux my publications wizard, Closes
  #740
2015-11-10 18:25:22 +00:00
Dan Stillman
32b7756898 Update locales from Transifex 2015-11-08 16:25:07 -05:00
Dan Stillman
ccd765ff74 Update versions and submodules 2015-11-08 16:21:20 -05:00
Philipp Zumstein
add3acbcd1 Relax condition in parseContextObject
Especially, allow rft.subject and rft.description in core OpenURL without Dublin Core declared as format. This fixes #851
2015-11-08 16:16:36 -05:00
Dan Stillman
8197fa4ce8 Fix LIKE binding error in Nightly loading duplicates 2015-11-08 16:16:05 -05:00
Philipp Zumstein
89a0f8910a Relax condition in parseContextObject
Especially, allow rft.subject and rft.description in core OpenURL without Dublin Core declared as format. This fixes #851
2015-11-08 11:21:45 +01:00
fbennett
4a475ff3aa Prevent duplicate items when copying citations to clipboard 2015-11-08 11:44:13 +09:00
Dan Stillman
1e6bb44e80 Show My Publications in Advanced Search and disable Save Search button
Closes #703 (unless I'm forgetting something)
2015-11-04 14:06:32 -05:00
Dan Stillman
3100f10396 Make Zotero.Libraries.getAll() return sorted Zotero.Library instances
My Library, My Publications, and then groups sorted by name
2015-11-04 14:04:21 -05:00
Dan Stillman
e8a887304e Move Zotero.CollectionTreeRow to separate file 2015-11-03 17:08:55 -05:00
Dan Stillman
41f5137e24 Update some attachmentMIMEType -> attachmentContentType 2015-11-03 17:08:55 -05:00
Dan Stillman
b8d00e2051 Fix error showing pages/modified in attachment box 2015-11-03 17:08:55 -05:00
Dan Stillman
b52cfae225 Show "Delete Permanently..." button in right-hand pane in trash 2015-11-03 17:08:54 -05:00
Dan Stillman
f2bef5998c Disable actions in My Publications and clean up trash item menu
Disallow everything other than adding a child note in My Publications,
since the wizard only shows on drag (currently, at least). Need to
disable translation separately.

Also show "Delete Item[s]..." in the trash context menu, and hide rather
than disable various menu options.

Addresses #703 -- still need to disable saved search saving
2015-11-03 17:08:10 -05:00
Dan Stillman
687ee6ba07 Fix sync error from items dragged between libraries before first sync
And fix bug in Zotero.URI.getURILibrary()
2015-11-02 20:36:47 -05:00
Dan Stillman
318528df4d Remove obsolete sync code 2015-11-02 03:23:15 -05:00
Dan Stillman
d07756d68d Store API key in login manager, and add temp field in prefs 2015-11-02 03:22:37 -05:00
Dan Stillman
e03cf637b6 Fix 412 handling 2015-11-02 03:20:29 -05:00
Dan Stillman
7f43ca9503 Merge branch '4.0' 2015-11-01 21:22:13 -05:00
Dan Stillman
e0b5111442 Update some outdated Zotero.Libraries.getType()/getName() calls 2015-11-01 18:29:02 -05:00
Dan Stillman
3ad6e78d98 "Use"->"Keep" existing rights field for clarity in My Publications 2015-11-01 18:21:48 -05:00
Dan Stillman
53478f4752 Allow 412 when uploading deletions 2015-11-01 13:28:03 -05:00
Dan Stillman
110f637d1e Don't default to Creative Commons license for My Publications
Just share on zotero.org by default, and let user choose CC if desired.
2015-11-01 03:59:01 -05:00
Dan Stillman
7e3ba7bc61 Misc. debug tweaks 2015-11-01 03:59:01 -05:00
Dan Stillman
1e6c29766f Add deletion uploading to API syncing [DB reupgrade]
Tags deletions are not currently synced, and maybe don't need to be.
2015-11-01 03:58:54 -05:00
Dan Stillman
6b8e5bafc6 Don't show deleted items outside of trash 2015-11-01 03:36:23 -05:00
Dan Stillman
3692536770 Fixes #862, Trash Looks Empty
Broken by 3ff1ff88a9
2015-10-31 17:13:51 -04:00
Dan Stillman
532d485793 Delete older versions of processed objects in cache
And recover from "Sync cache had later version than remote" error, which
shouldn't actually happen...
2015-10-31 15:19:50 -04:00
Dan Stillman
6ccfed2488 Don't show item context menu until it's ready
With async generation, an incorrect menu was showing first before the
correct version appeared.
2015-10-31 03:46:47 -04:00
Dan Stillman
b06d93be50 Fix error syncing items in unloaded library 2015-10-31 01:39:36 -04:00
Dan Stillman
37b6a14f17 Fix attachment pane loading 2015-10-31 01:36:49 -04:00
Dan Stillman
c2ad4ceb0a Output 'deleted' as 1 instead of true in item JSON
Good idea? Not sure, but that's what the API does.
2015-10-30 19:07:12 -04:00
Dan Stillman
6993ca252c Fix download-on-sync mode for ZFS 2015-10-30 17:08:38 -04:00
Dan Stillman
73f4d28ab2 ZFS file sync overhaul for API syncing
This mostly gets ZFS file syncing and file conflict resolution working
with the API sync process. WebDAV will need to be updated separately.

Known issues:

- File sync progress is temporarily gone
- File uploads can result in an unnecessary 412 loop on the next data
  sync
- This causes Firefox to crash on one of my computers during tests,
  which would be easier to debug if it produced a crash log.

Also:

- Adds httpd.js for use in tests when FakeXMLHttpRequest can't be used
  (e.g., saveURI()).
- Adds some additional test data files for attachment tests
2015-10-29 04:38:27 -04:00
Dan Stillman
6d46b06617 Better debugging/errors in Zotero.DataObjects 2015-10-29 03:57:09 -04:00
Dan Stillman
1ce4cda384 Don't change 0 to null in Zotero.DataObjectUtilities.checkKey()
Not totally sure this function should allow falsy values to begin with,
but it does.
2015-10-29 03:57:08 -04:00
Dan Stillman
0803bb84e3 Don't set collections: "" in PATCH JSON when changing item to child 2015-10-29 03:57:08 -04:00
Dan Stillman
62e586073d concurrent-caller.js -> concurrentCaller.js 2015-10-29 02:49:31 -04:00
Dan Stillman
2b00a53e02 Accept headers and string path in Zotero.Utilities.Internal.saveURI() 2015-10-29 02:42:44 -04:00
Dan Stillman
3ff6626c12 Zotero.Attachments tweaks
Accept a file path from some functions and skip charset detection if
item already has a charset set
2015-10-29 02:41:01 -04:00
Dan Stillman
55c1f0d508 Zotero.HTTP.request() tweaks 2015-10-29 02:37:56 -04:00
Dan Stillman
7cfa857887 Make Zotero.Item::attachmentFilename work without file
And have getFilePath() return false instead of failing on unsaved items
2015-10-29 02:33:25 -04:00
Dan Stillman
90286d2a50 Make Zotero.Item::attachmentHash getter asynchronous 2015-10-29 02:30:27 -04:00
Dan Stillman
3fca0644ee Disable debug output from Notifier 2015-10-29 02:25:02 -04:00
Dan Stillman
d70e9cf41b Add Zotero.File::zipDirectory() 2015-10-29 02:22:06 -04:00
Dan Stillman
7d8a1b2573 Make Zotero.DataObject#fromJSON() synchronous
When called on an identified object (i.e., one with an id or
library/key), loadAllData() must be called first. When called on a new
object (which is more common anyway), fromJSON() can be called
immediately.
2015-10-29 01:19:14 -04:00
Dan Stillman
5d8670db1d Fix additional causes of high CPU use from items list 2015-10-13 00:33:58 -04:00
Dan Stillman
493d37d1c7 Fix 100% CPU usage with pane open (since 9e356a7e6)
And make Zotero.Item.prototype.fileExists() check the file regardless of
whether there's a cached state.
2015-10-12 23:08:02 -04:00
Dan Stillman
8997ba06c1 Update citeproc-js to 1.1.60
Closes #854
2015-10-05 20:06:51 -04:00
Dan Stillman
488c4eb72b Fix menubar/titlebar-less Standalone window issue in El Capitan
If Standalone is closed in full-screen mode in 10.11, 'sizemode' on the main
window is persisted as 'fullscreen'. On reopen, the window doesn't go into
full-screen mode, but it still lacks menubar or titlebar. This patch forces the
window into 'normal' mode if it was left in 'fullscreen'.

(Firefox appears to ignore 'fullscreen' without actually changing the value,
but I didn't find the code that handles that.)
2015-10-02 16:46:34 -04:00
Dan Stillman
7f8cf293d0 Fix child item drag on Windows in Firefox 41 2015-10-02 03:50:01 -04:00
Dan Stillman
3703bf0423 Move lastStorageSync to shared accessor code
And fix variable spelling
2015-09-29 13:06:58 -04:00
Dan Stillman
ba3d90eaf9 Make sure Zotero.Libraries.userLibrary doesn't get out of sync
b976c84a29 (commitcomment-13492424)
2015-09-29 13:06:58 -04:00
Dan Stillman
1b333be23f Add Zotero.Library.prototype.lastStorageSync 2015-09-29 04:42:13 -04:00
Dan Stillman
b976c84a29 Add Zotero.Libraries.userLibrary 2015-09-29 04:42:13 -04:00
Dan Stillman
691819bd32 Add Zotero.Library.prototype.libraryTypeID
Get the library-type-specific id for the library (e.g., userID for user
library, groupID for group library)
2015-09-29 04:42:13 -04:00
Dan Stillman
88627adcdb Update linked attachment base directory code
- Replace nsIFile and persistent descriptors with OS.File and string paths
- Add tests for base dir settings
2015-09-29 04:42:12 -04:00
Dan Stillman
9e356a7e63 Migrate relative/persistent descriptors to string paths [DB reupgrade]
Absolute paths have been stored as strings on all platforms for a while,
but old Mac persistent descriptors (Base64-encoded opaque alias records)
could still exist in the DB. Additionally, relative paths for stored
files were stored as Mozilla-specific opaque strings rather than UTF-8
strings.

This adds a schema step to convert those to strings paths in the DB.
Since Mac persistent descriptors aren't converted if the file isn't
found, we still handle and (convert) old-style persistent descriptors if
necessary when reading paths from the DB.

This also moves path string handling -- converting a path to a prefixed
string for stored or base-dir-relative files -- to the
Zotero.Item#attachmentPath setter instead of save() so that reading it
back immediately returns the correct value. One consequence is that the
attachment link mode must now be set before setting the path.

Zotero.Item#getFile() is now deprecated in favor of getFilePath() and
getFilePathAsync() (which checks file existence).

Zotero.File.directoryContains() now takes string paths instead of files.
2015-09-29 04:42:08 -04:00
Dan Stillman
80008fd13d Pass tabIndex param to pref window to select tab within specified pane 2015-09-29 04:11:21 -04:00
Simon Kornblith
310ff1cf53 Merge branch 'connector' into 4.0 2015-09-28 20:28:38 -04:00
Dan Stillman
ce72b450bf Fix missing colored tag swatches on Windows/Linux
In Firefox 41, file: URIs can no longer be loaded (at least via Image)
from the hidden window on Windows/Linux, but chrome: URIs still work.
Not sure why I was using a file: URI to begin with.
2015-09-24 23:59:48 -04:00
Simon Kornblith
974a07bf73 Add addEditCitation command to Zotero 2015-09-24 23:44:19 -04:00
Dan Stillman
ec66d15a5f Update version and submodules 2015-09-24 22:13:35 -04:00
Dan Stillman
d79570341c Update locales from Transifex 2015-09-24 22:09:38 -04:00
Dan Stillman
e4c5d86bc6 Update citeproc-js to 1.1.58
Closes #850
2015-09-24 22:02:35 -04:00
Dan Stillman
f60ded11e8 Fix additional login manager issues (after b55e6536) 2015-09-24 18:15:12 -04:00
Dan Stillman
2c25257e2b Don't scroll to containing collection if one is already visible
If multiple collections are highlighted and none are in view, scroll to
the first one in the list.

The logic could be improved here a little more to scroll to the closest
collection instead of the first one, and also to scroll to a few rows
above or below the target.

This also fixes what was probably an incorrect highlight if there were
multiple collections and some had to be expanded first.
2015-09-24 07:11:12 -04:00
Dan Stillman
a5eb5a5af5 Scroll collection into view on collection-containing-an-item 2015-09-24 06:46:02 -04:00
Dan Stillman
b55e6536ec Fix login manager (and syncing) breakage in Firefox 41 2015-09-23 05:02:40 -04:00
Dan Stillman
d9b5e17c9c Asyncify Zotero.Attachments.getNumFiles() and add hasMultipleFiles()
Latter is probably all that's needed
2015-09-22 04:11:31 -04:00
Dan Stillman
fc1137b769 Asyncify Zotero.Attachments.getTotalFileSize() 2015-09-22 04:11:30 -04:00
Dan Stillman
2df630e83c Fix hang in sync tests from library version changes 2015-09-22 04:11:30 -04:00
Dan Stillman
0965079842 Use correct property in Zotero.Libraries.getVersion/setVersion() 2015-09-22 03:52:46 -04:00
Dan Stillman
add9481c63 Adjust error and feed tests for access error on read-only libraries 2015-09-22 03:52:31 -04:00
Aurimas Vinckevicius
0a88032715 ZU.capitalize should not throw for empty string 2015-09-21 17:08:23 -05:00
Aurimas Vinckevicius
d122323dbf Fix fullText tests on Windows 2015-09-21 17:08:22 -05:00
Aurimas Vinckevicius
88ab129ffb Add Feed and FeedItem
Also:
* _finalizeErase in Zotero.DataObject is now inheritable
* Call _initErase before starting a DB transaction
* removes Zotero.Libraries.add and Zotero.Libraries.remove (doesn't seem like this is used any more)
2015-09-21 17:08:21 -05:00