Commit graph

5829 commits

Author SHA1 Message Date
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