Commit graph

5068 commits

Author SHA1 Message Date
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
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
Aurimas Vinckevicius
74863843f4 Tweak varDump to not use object property getter unnecessarily 2015-09-21 02:28:09 -05:00
Aurimas Vinckevicius
0320b08b05 Do not return lastInsertRowID for INSERT, REPLACE, and CREATE
Unreliable for async queries
2015-09-21 02:28:09 -05:00
Aurimas Vinckevicius
6cef123662 Don't allow trashing items in read-only or "no trash" libraries 2015-09-21 02:27:53 -05:00
Aurimas Vinckevicius
e5a5a8d303 Don't allow erasing objects from read-only libraries 2015-09-21 02:27:53 -05:00
Aurimas Vinckevicius
1621f5772b Fix deleting collection with items 2015-09-18 03:34:04 -05:00
Aurimas Vinckevicius
07ca00edd5 Use _canHaveParent property to determine if object can have parent 2015-09-18 03:34:04 -05:00
Dan Stillman
a547db134e Update locales and submodules 2015-09-13 23:38:42 -04:00
Dan Stillman
2a9119801c Merge pull request #834 from Juris-M/z4.0-bib-export-fix
Fix bug in Create Bibliography from Item w/Notes
2015-09-13 23:26:41 -04:00
Dan Stillman
d3c4689973 Add a couple comments 2015-08-27 18:00:16 +01:00
fbennett
47ff4e79dc Fix bug in Create Bibliography from Item w/Notes 2015-08-27 08:18:22 +09:00
simpzan
6051ef09d0 make items tree column focused when select a item by running
zotero://select/items/xxx.
2015-08-18 19:31:30 +08:00
Dan Stillman
4d354027b5 Fix Cmd/Ctrl-Down in Quick Format
Broken in f3daf6b4bc
2015-08-17 01:35:26 -04:00
Simon Kornblith
f3daf6b4bc Always capture up/down when QuickFormat reference panel is open
It was annoying if you pressed the up key too many times and the cursor
moved.
2015-08-13 19:48:23 -04:00
Simon Kornblith
21e51f771c Fix QuickFormat bubble updating when editing citation properties 2015-08-13 19:45:03 -04:00
Simon Kornblith
b62b479ae4 Silence some warnings in QuickFormat 2015-08-13 19:39:13 -04:00
Simon Kornblith
570e628679 Another non-Retina QuickFormat tweak 2015-08-13 19:25:08 -04:00
Simon Kornblith
547a5eea10 Tweak QuickFormat for non-retina 2015-08-13 19:21:07 -04:00
Simon Kornblith
8e40bde671 Make QuickFormat text bigger and border smaller on OS X 2015-08-13 19:14:53 -04:00
Dan Stillman
bb785df49f Merge pull request #828 from gracile-fr/fixedCol
Forbid "Attachments" column to be resized
2015-08-13 18:35:31 -04:00
gracile-fr
2920d9ff5e Forbid "Attachments" column to be resized 2015-08-12 21:15:18 +02:00
Dan Stillman
b53892fe54 Fix various collection-dragging UI bugs
Fixes #823, hopefully
2015-08-08 17:26:42 -04:00
Dan Stillman
9fa53439ef Update hasChildCollections() when child moved to another collection 2015-08-08 16:45:51 -04:00
Simon Kornblith
50f695f298 Disable spell checking in quickformat
It basically underlines all the names, which is not useful
2015-08-08 16:38:39 -04:00
Simon Kornblith
668ca94f9e Make quickformat non-resizable 2015-08-08 16:38:17 -04:00
Simon Kornblith
6bce6b1d30 Alter quick format dialog appearance on OS X
Firefox no longer supports transparent windows because it made them do
extra preprocessing on a file to restore the drop shadow when the
Developer Edition theme was active:
https://bugzilla.mozilla.org/show_bug.cgi?id=1162649
2015-08-07 19:45:49 -04:00
Dan Stillman
5a61ac4871 Don't try to select unselectable row on library tree row removal
(If deleting a group, don't select the header or separator before it.)
2015-08-07 16:36:53 -04:00
Dan Stillman
cbf4876173 Fix attachment renaming
Fixes #822
2015-08-07 15:36:46 -04:00
Dan Stillman
06867d886e Fix note loading 2015-08-06 22:49:21 -04:00
Dan Stillman
1ecc53b099 Merge pull request #820 from aurimasv/csl-json
Fix issues with computerProgram citations
2015-08-06 18:29:06 -04:00
Dan Stillman
536cd867d7 Fix toJSON for attachment items 2015-08-06 15:55:37 -04:00
Dan Stillman
f963413170 Handle conflict resolution for remote item deletions 2015-08-06 06:03:45 -04:00
Dan Stillman
51253fb933 Delete from sync cache when deleting object 2015-08-06 05:25:45 -04:00
Dan Stillman
b5b99672db Remove some obsolete sync code 2015-08-06 04:19:53 -04:00
Dan Stillman
0aecaad761 Update conflict resolution for API syncing
This will appear much less frequently, since non-conflicting field changes on
both sides can be resolved automatically, but genuine field conflicts still
require manual conflict resolution.

The merge pane is no longer editable, since the itembox code to do that is
async and can't run in a modal window, but it's not really necessary,
particularly with conflicts happening less frequently.

TODO:

- Remote item deletions
- File conflicts
- Maybe handle some edge cases where the conflicted items fail to save
2015-08-06 04:14:49 -04:00
Dan Stillman
7b0c34a3ab Update submodules 2015-08-05 15:11:24 -04:00
Aurimas Vinckevicius
711b823552 Add tests for itemFromCSLJSON and make sure data round-trips 2015-08-04 15:22:35 -05:00
Aurimas Vinckevicius
c4cd7ce3e0 Fix import of computerProgram exported as CSL JSON 2015-08-04 15:19:33 -05:00
Aurimas Vinckevicius
bb15336fdb Fix season export in CSL JSON 2015-08-04 14:19:39 -05:00
Aurimas Vinckevicius
0fbae77456 Don't use for-in to iterate over arrays in itemFromCSLJSON 2015-08-03 16:15:24 -05:00
Dan Stillman
7075300a17 Fix hasChanged() bug related to 'synced' 2015-08-02 05:26:02 -04:00
Dan Stillman
f02a9aa95e Check remote delete log during full sync
If an object is marked as synced locally and doesn't exist remotely but
is in the remote delete log, delete it locally
2015-08-02 03:44:14 -04:00
Dan Stillman
67f4a467ea Consolidate object erase methods into DataObjects::erase() 2015-08-02 03:40:14 -04:00
Dan Stillman
4600318ad7 Support 'successful' property in upload response
Save uploaded data to cache, and update local object if necessary (which
it mostly shouldn't be except for invalid characters and HTML filtering
in notes)

Also add some upload and JSON tests
2015-08-01 05:28:42 -04:00
Dan Stillman
70d9b9870c Fix a few small data layer bugs, and tidy up a little
I don't think these were triggered by any client code, but I found them while
porting code to the server.
2015-07-31 04:09:24 -04:00
Dan Stillman
fc2574f7bf Update citeproc-js to 1.1.46 2015-07-30 15:52:26 -04:00
Aurimas Vinckevicius
fdd91affd9 Debugging code for checking manually modified citations
Re https://forums.zotero.org/discussion/50701/cant-insert-citationzotero-asks-to-modify-all-my-citations/
2015-07-28 22:59:32 -05:00
Aurimas Vinckevicius
1cbd7f71cf Parse author names in itemToCSLJSON 2015-07-27 18:37:45 -05:00
Dan Stillman
4e92b313c6 Update citeproc-js to 1.1.45 2015-07-26 19:11:04 -04:00
Dan Stillman
fb9109e837 Update versions and submodules 2015-07-26 18:33:04 -04:00
Simon Kornblith
125ad50698 Merge pull request #811 from zotero/sjk/810
Fix #810, memory leak
2015-07-26 17:59:17 -04:00
Simon Kornblith
954e60a83a Don't leak memory when showing the select dialog
Again, I'm pretty sure this shouldn't be necessary.
2015-07-26 14:07:04 -04:00
Simon Kornblith
51bcd2409d Fix #810, memory leak
I'm still not really sure what the problem was. But this seems to
eliminate the leak for me.
2015-07-25 14:38:27 -04:00
Dan Stillman
9000c9dcc7 Fix error saving PDF if Zotero pane hasn't been opened in window 2015-07-23 01:26:14 -04:00
Andrew Dunning
e6d1f31e46 Supply missing Œ/œ in diacriticsRemovalMap. 2015-07-21 18:08:16 -04:00
Dan Stillman
5fc2dd4d44 Fix a probably rare case of a file's not being uploaded
If a file existed locally but somehow ended up marked as to-download without
existing on the server, it was never uploaded. I'm not sure when this can
happen, but I saw it while messing around. Maybe switching between ZFS and
WebDAV?

This will still only check and upload if there's another computer syncing files
to the same library, but we'll check all files in 5.0.
2015-07-21 03:10:59 -04:00
Dan Stillman
33334d9c01 Fix excessive file sync mtime updates/checks, but for real this time 2015-07-21 02:59:12 -04:00
Dan Stillman
1fadf1150e Remove <=Fx24 file sync code 2015-07-21 02:53:17 -04:00
Dan Stillman
a452af6c3a Sort descendant collections alphabetically in advanced search window
https://forums.zotero.org/discussion/50679/
2015-07-21 00:45:30 -04:00
Dan Stillman
984789d304 API syncing megacommit
There's a lot more to do, and this isn't ready for actual usage, but the
basic functionality is mostly in place and has decent test coverage. It
can successfully upgrade a library last used with classic syncing and
pull down changes via the API. Uploading mostly works but is currently
disabled for safety until it has better test coverage.

Downloaded JSON is first saved to a cache table, which is then used to
populate other tables and later for generating PATCH requests and
automatically resolving conflicts (since it shows what was changed
locally and what was changed remotely). Objects with unmet dependencies
or unknown fields are skipped for now but don't block the rest of the
sync.

Some of the bigger remaining to-dos:

- Tests for uploading
- Re-do the preferences to get an API key
- File sync integration
- Full-text syncing integration
- Manual conflict resolution (though this already includes much smarter
  conflict handling that automatically resolves many conflicts)
2015-07-20 18:16:57 -04:00
Dan Stillman
b4a8083f2f Throw specific errors for missing objects or unknown fields
And add a bit more debugging info to other messages
2015-07-20 17:31:27 -04:00
Dan Stillman
258b70b455 Throw an error saving an empty item with no item type 2015-07-20 04:15:27 -04:00
Dan Stillman
cd4d084dd9 Support for automatically merging collections and searches 2015-07-20 02:12:14 -04:00
Dan Stillman
9d0d79c9c2 Take a promise-returning function in Utilities.Internal.forEachChunkAsync()
Instead of a promise-yielding generator
2015-07-20 02:12:14 -04:00
Dan Stillman
4f55f28e7d Honor .synced on data objects in all cases
Previously, if .synced was already true, setting it to true and saving
would result in .synced == false unless skipSyncedUpdate was passed. Now
the value assigned to .synced is always used on the next save. If the
value hasn't changed and no other values have changed, a save will be a
no-op.
2015-07-20 02:12:14 -04:00
Dan Stillman
93b5694420 Make editable/filesEditable required in Zotero.Libraries.add() 2015-07-20 02:12:14 -04:00
Dan Stillman
6c536fc784 Don't create Quick Start Guide item for new libraries
The default items cause problems with conflict resolution for existing
users (and not syncing them or ignoring conflicts for them is kind of
weird), and they require remote changes for new databases. I do like
there not being a completely empty library, but I think it's probably
better just to display a virtual welcome message with a link to the
Quick Start Guide somewhere else, such as in the right-hand pane. (A new
installation also opens the start page on zotero.org.)
2015-07-20 02:12:13 -04:00
Dan Stillman
d868f007e9 Don't select new groups in collections pane 2015-07-20 02:12:01 -04:00
Dan Stillman
da5e1272f7 Fix updating local files with long filenames via sync on Linux
6a687e8c40 was actually only OS X
2015-07-19 22:42:44 -04:00
Dan Stillman
5c523d8694 Merge branch '4.0' 2015-07-18 07:09:53 -04:00
Dan Stillman
7c9d25dad8 Fix excessive file sync mtime updates/checks?
Same as 1c2b2575f, but this time in code we actually still run
2015-07-18 04:58:10 -04:00
Dan Stillman
6a687e8c40 Fix "filename too long" sync error for missing files on OS X/Linux 2015-07-17 18:23:59 -04:00
Dan Stillman
a97e27a9f2 Fix CSS in snapshots of Reader View
Allow saving of CSS links over chrome://. We can scope this to
chrome://global/skin/aboutReader.css if anyone thinks of a reason why
this was disabled to begin with, but I'm not sure in what other
situations CSS it would apply.
2015-07-17 16:22:15 -04:00
rmzelle
d3ab296cf5 Check single items in selection window 2015-07-15 21:21:51 -04:00
Simon Kornblith
2c5bfd5d5a Disable disabling by reverse lookup on non-Mac/Windows/Linux
If this is the case, it's probably a BSD derivative, but I can't
guarantee the code won't segfault.
2015-07-13 19:28:37 -04:00
Simon Kornblith
f856df5222 Fix #460 using OS APIs 2015-07-13 19:24:26 -04:00
Simon Kornblith
7d87d70e92 Expose more integration pipe handling code
This should eventually reduce the amount of duplicated code needed to
handle Word 2016 for Mac
2015-07-12 13:46:55 -04:00
Aurimas Vinckevicius
d3bc1703c3 Update citeproc-js to 1.1.39
Re https://github.com/zotero/zotero/pull/794#issuecomment-120564983
2015-07-11 13:35:03 -05:00
Dan Stillman
bcef4819e8 Merge pull request #794 from aurimasv/citeproc-js-update
Update citeproc-js to 1.1.25
2015-07-10 19:53:09 -04:00
Dan Stillman
c72b112afd Use export.lastLocale before UI locale if none specified
This allows existing documents created before 4.0.27 with a
bibliographyLocale set to continue to use that value by default.

More details:

https://github.com/zotero/zotero/pull/795#issuecomment-120227051
2015-07-10 17:48:44 -04:00
Dan Stillman
b40c1d7e2e Remove redundant "Suppress Author" string
Refs #796
2015-07-10 15:56:25 -04:00
Aurimas Vinckevicius
9fcb87ca93 Remember style and locale when explicitly selected by the user 2015-07-09 23:38:25 -05:00
Aurimas Vinckevicius
b6c7ba6ea2 Fix saving style locale in documents 2015-07-09 23:38:25 -05:00
Dan Stillman
507ef011d8 Restore "without snapshot" option in Fx connector
Will be supported in upcoming Standalone release
2015-07-09 19:10:32 -04:00
Simon Kornblith
e92a54966c Restore ZoteroPane.destroy() on close
Seems like a good thing to do, if only because it ensures we persist
changes
2015-07-09 18:05:08 -04:00
Simon Kornblith
b931ca37d2 Undo accidental subproject commit change from 3420b4874a 2015-07-09 18:02:11 -04:00
Simon Kornblith
3420b4874a Tweaks for application menu on OS X
- Restore About Zotero item
- Fix Quit item
- Close Standalone when Standalone window is closed (we did this before,
  but apparently having our own hidden window breaks that mechanism)
2015-07-09 18:00:15 -04:00
Aurimas Vinckevicius
bf58de7e62 Update citeproc-js to 1.1.25
And split off Zotero additions
2015-07-09 16:31:57 -05:00
Simon Kornblith
b69e6fc3ab Fix Zotero menu on OS X, part 1
Create a hidden window with a menu bar, since it loads first
2015-07-09 16:52:04 -04:00
Aurimas Vinckevicius
3ca45be2c7 Add more debug logging for Recognize PDF 2015-07-08 12:50:10 -05:00
Dan Stillman
2a5b026f65 Wait for schema update before updating save icon
Technically rather than waiting for the schema update we should wait for
translator initialization, which should wait for the schema update
itself, but the schema update also needs to initialize the translators,
so avoiding a hang is tricky, particularly with the use of Zotero.lazy()
for Zotero.Translators.init(). For now, just wait for the schema update.
2015-07-07 17:39:06 -04:00
Dan Stillman
c590aa0eb4 Fix documentation for Zotero.DataObjects.getAsync() 2015-07-07 14:40:14 -04:00
Dan Stillman
5d9d8ae953 Fix passed 'window' property in Zotero.ProgressWindow
Though not currently used anywhere
2015-07-06 19:15:11 -04:00
Dan Stillman
b19cce1963 Fix issues with toolbar icons in multiple windows
Clicking the separate buttons would trigger actions in the first window
opened, and other things might not have been updating properly across
multiple windows.
2015-07-06 15:41:28 -04:00
Dan Stillman
238183a3fa Fix collapse library ("-") for collections
Broken in f5ce2d238e
2015-07-06 04:38:53 -04:00
Dan Stillman
41b772da4d Show the save button guidance panel again, now that it doesn't hide too easily 2015-07-06 00:49:35 -04:00
Dan Stillman
db991743cd Trigger forward action with click anywhere on guidance panel
Previously, clicking directly on a noautohide guidance panel closed it, even if
there was a forward nav button. (In the case of the main and save button
guidance panels, the save button would appear on the next Firefox restart, but
this ensures that the save guidance panel will be shown to new users even if
they click on the panel instead of the not-particularly-noticeable forward
button.)
2015-07-06 00:46:36 -04:00
Dan Stillman
41fc082f6d Fix too-large icons in secondary toolbars on Linux
Plus a few other icon tweaks
2015-07-05 15:37:11 -04:00
Dan Stillman
01716183d7 Prevent erroneous hiding of hideonpagechange guidance panels on complex pages 2015-07-04 17:09:26 -04:00
Dan Stillman
ebe08836e8 A little more Quick Copy safety 2015-07-03 23:53:43 -04:00
Dan Stillman
f07fe7184d Ignore trailing period in domain for Quick Copy
From @aurimasv
2015-07-03 23:46:39 -04:00
Dan Stillman
242581a270 Fix Quick Copy in tab mode, but for real 2015-07-03 22:06:12 -04:00
Dan Stillman
20f279043b Update submodules 2015-07-03 02:09:27 -04:00
Dan Stillman
9d2b097605 Fix toolbar icons in non-nav-bar toolbars on OS X and Windows
...which only required redoing the entire styling.

Not yet done on Linux
2015-07-02 05:50:57 -04:00
Simon Kornblith
50ee61545a Kill code to ensure that our pipe is open before we write to the other
In practice, this appears to be both unnecessary and harmful. Although
the first write happens effectively instantaneously, we can take
several hundred milliseconds to read the second write, and Standalone
can decide we are dead.

This apparently fixes #783 for @dstillman, although I was never able to
reproduce locally.
2015-07-01 20:40:28 -04:00
Simon Kornblith
d104e4b106 More debugging for #783 2015-07-01 20:01:00 -04:00
Dan Stillman
15a0a33ac1 Fix Quick Copy in tab mode 2015-07-01 19:36:16 -04:00
Simon Kornblith
9574de752d Debugging for #783 2015-07-01 14:46:06 -04:00
Dan Stillman
7ccc48b4ae Don't show "without snapshot" save option in Fx connector for now
Option requires a new Standalone build with ba53f256d
2015-07-01 02:38:15 -04:00
Dan Stillman
ba53f256d6 Quick hack to fix "without snapshot" save option in Z4Fx via Standalone
(I don't see any obvious reason I can't do this. We should probably clean this
up later, not call the endpoint "saveSnapshot", etc. Also, is there a reason it
doesn't follow the snapshot pref by default?)
2015-07-01 01:03:04 -04:00
Dan Stillman
39f2021576 Include web page save option in toolbar menu on every page
Closes #644 and #775
2015-06-30 23:41:47 -04:00
Simon Kornblith
43e1c5c123 Fix setCookiesThenSaveItems in Firefox connector 2015-06-30 19:20:16 -04:00
Dan Stillman
796fb87a9b Fix some toolbar icon issues on HiDPI Linux 2015-06-30 17:58:32 -04:00
Dan Stillman
6841be09a1 Fix large save icon on HiDPI Windows, hopefully 2015-06-30 17:08:45 -04:00
Aurimas Vinckevicius
5334a09ee0 Fix institutional author export to CiteProcJS 2015-06-29 23:22:09 -05:00
Simon Kornblith
48e6eb93de Merge pull request #779 from aurimasv/proper-to-proxy
Fix properToProxy converter functions
2015-06-29 22:27:15 -04:00
Aurimas Vinckevicius
b03dcd3686 Fix properToProxy converter functions
Regression from 82998e986e and 9450d0797f
2015-06-29 17:55:10 -05:00
Simon Kornblith
64ff0e8b4e Fix #774 2015-06-29 18:03:09 -04:00
Dan Stillman
6c416e7ad2 Get rid of middle border radius in combo button on Windows 2015-06-29 07:06:20 -04:00
Dan Stillman
a9c6feb380 Additional toolbar overflow tweaks for Linux
Follow-up from 1d6483e68
2015-06-29 06:35:23 -04:00
Dan Stillman
1d6483e68a Fix #773, Zotero combo icons dispersed under more tools
And fix save button hover height on Windows, which somehow got out of
whack again.

Might need further tweaking on Linux

Need to find a better way to do these buttons...
2015-06-29 05:59:19 -04:00
Dan Stillman
ddf3ff9ba9 Don't try to set lastLocale pref in doc prefs unless locale was changed 2015-06-28 17:16:33 -04:00
Dan Stillman
99dd1c0697 Merge branch '4.0'
Since modal windows (e.g., the Create Bib window and the Quick Copy site
editor window) can't use yield, style retrieval
(Zotero.Styles.getVisible()/getAll()) is now synchronous, depending on a
previous async Zotero.Styles.init(). The translator list is generated in
the prefs window and passed into the Quick Copy site editor, but it's
possible the translators API should be changed to make getTranslators()
synchronous with a prior init() as well.
2015-06-27 16:59:58 -04:00
Dan Stillman
3a5854f49f Update versions and submodules 2015-06-26 02:40:18 -04:00
Dan Stillman
4868095820 Guidance panel for new save icon
For new installations, a panel will show for the Z icon with a ">"
button to go to a second panel for the save icon. For existing
installations, a panel will show just for the save icon. In both cases,
the panels are non-auto-hiding but are dismissed if clicked on or when a
new content page is loaded.

There's also a new close button, but it's not enabled currently. Might
be useful for panels with embedded links where an accidental click on
the panel alone shouldn't close the panel (like the Firefox customize
mode wizard).
2015-06-25 22:51:05 -04:00
Dan Stillman
233b9991f5 Merge pull request #623 from rmzelle/locale-selector
Add drop-down menu for bibliographyLocale
2015-06-24 14:34:47 -04:00
Aurimas Vinckevicius
6ac0403049 Reorganize and improve locale drop-down code 2015-06-24 14:10:33 -04:00
Dan Stillman
dfb28ff3f6 File Issues: Greatest Hits, 2006-2015
- When relinking a missing stored file, copy it into the attachment's
  storage directory automatically
  - Previously, selecting a file outside the attachment subdir would
    just result in a missing attachment, since it only looks for stored
    files within the subdir
- Display an error message if a Windows shortcut (.lnk) is added via
  drag-and-drop or via a file dialog on non-Windows systems, until we
  can figure out how to determine the original file
  - Shortcuts can cause errors during syncing, for unclear reasons
  - Neither nsIFile::copyToFollowingLinks() nor nsIFile::target work for
    me to get the original file, even when nsIFile::isSymlink() returns
    true
  - Windows file dialogs seem to automatically resolve shortcuts, so
    it's only an issue there for drag-and-drop
- Disallow hidden files from being selected in relink dialog
  - I think some people on Windows with hidden files shown relink the
    .zotero* files that show up when they click Locate, which causes
    file sync errors. Which brings us to...
- Fix file sync errors for *.lnk and .zotero* files
- Ignore existing .zotero* attachment files, treating the files as
  missing instead to encourage relinking
- Strip leading period in getValidFileName() to prevent added files from
  being hidden
    - This allows hidden files to be added explicitly; they just won't
      stay that way in the storage directory

(These things should have tests, but that will have to happen on the 5.0
branch.)
2015-06-24 06:10:48 -04:00
Dan Stillman
0d1d4ee5cb Don't change selection unnecessarily when creating trashed item 2015-06-23 16:56:10 -04:00
Dan Stillman
27f6f018d3 Remove Zotero.suppressUIUpdates
Now handled by notifier flags
2015-06-23 16:31:40 -04:00
Dan Stillman
12bea4b7ea Notifier observer time logging 2015-06-23 16:03:05 -04:00
Dan Stillman
3ff1ff88a9 A couple search query optimizations
...which make very little difference, but they look better in the SQLite
query plan view.
2015-06-23 15:07:57 -04:00
Dan Stillman
33dedd1753 Tags overhaul [DB reupgrade]
- Simplified schema
- Tags are now added without reloading entire tag selector
  - On my system, adding 400 tags to an item (separately, with the tag
    selector updating each time) went from 59 seconds to 42. (Given that
    it takes only 13 seconds with the tag selector closed, though,
    there's clearly more work to be done.)
- Tag selector now uses HTML flexbox (in identical fashion, for now, but
  with the possibility of fancier changes later, and with streamlined
  logic thanks to the flexbox 'order' property)
- Various async fixes
- Tests
2015-06-23 05:21:58 -04:00
Dan Stillman
0511d37b07 Replace multiple spaces in platform names for full-text searches
Closes #770
2015-06-22 11:51:20 -04:00
Dan Stillman
a5403b7499 Always include 'note' property in item JSON for notes in 'new' mode 2015-06-19 16:00:51 -04:00
Dan Stillman
3f475f25b6 Include remotely added properties in relations diffs 2015-06-19 04:07:46 -04:00
Dan Stillman
2e76fd6584 Add Zotero.DataObjectUtilities.getTypes() 2015-06-19 04:04:56 -04:00
Dan Stillman
7ba54886a6 Add toJSON() for searches and make Collection::toJSON() async 2015-06-19 04:04:33 -04:00
Dan Stillman
79733c75f1 Throw error in Item::fromJSON() if itemType not provided and not set 2015-06-17 01:57:57 -04:00
Dan Stillman
e45aabd03c Special handling of objects class for SyncedSettings
(Though maybe it should just be renamed Zotero.Settings, since
non-synced settings aren't used much and are just handled via DB
queries.)
2015-06-17 01:57:42 -04:00
Dan Stillman
78d62b5c7c '@params' -> '@param' in comment 2015-06-17 01:57:41 -04:00
Dan Stillman
b491ea6516 Additional async updates to colored tag handling 2015-06-17 01:57:32 -04:00
Dan Stillman
b3067ac5c0 Add skipDeleteLog option when erasing objects
To be used by updated deletion listener in new sync code

Also adds explicit Zotero.SyncedSettings.clear() in place of
Zotero.SyncSettings.set() without a value
2015-06-17 01:57:31 -04:00
Dan Stillman
0d59bde186 Clean up DataObject erasing, and fix search unloading 2015-06-16 19:51:21 -04:00
Dan Stillman
4f155e3432 Fix group.fromJSON() with no 'admins' or 'members' arrays 2015-06-16 19:51:21 -04:00
Simon Kornblith
5cbb8de96b Re-enable import progress indicator 2015-06-12 17:06:07 -04:00
Simon Kornblith
6db380b132 Fix importing files and add a basic test
Still need to make the progress indicator work again. Also there may be
some performance to be gained by pooling item saves into a transaction
if one is already open.
2015-06-12 16:58:57 -04:00
Dan Stillman
526c5f8112 Don't break Dan Cohen's library
(Though if you think about it, all of our publications may indeed become
Dan Cohen's eventually.)
2015-06-12 03:30:08 -04:00
Dan Stillman
f7216298b4 Update character set handling
Restore prepopulated charset table, but this time with just the
encodings from the WHATWG Encoding Standard. Assigning a charset to
Zotero.Item::attachmentCharset runs the value through
Zotero.CharacterSets.toCanonical() automatically.

This migrates attachment charsets to the new canonical values, clearing any
that are unsupported.

Other legacy mappings could still be added back, as disussed in #760.
2015-06-12 02:46:02 -04:00
Aurimas Vinckevicius
5817a2d654 Store UTF-8 as charset for all snapshots 2015-06-11 18:30:57 -05:00
Aurimas Vinckevicius
1374cc911a Always save snapshots in UTF-8 encoding
Re https://forums.zotero.org/discussion/49897/thecreate-web-page-item-from-current-pageis-sometimes-not-working-correctly/
There is something wrong with the way nsIScriptableUnicodeConverter converts to gbk (maybe other formats too). The HTML of http://www.cmiw.cn/forum.php is truncated in the middle of an em tag. In general, ConvertFromUnicode is supposed to return an ACString (not AString), which is not something that JavaScript can handle well.
2015-06-11 18:27:13 -05:00
Aurimas Vinckevicius
16ab576a1c Add toCanonical and toLabel for Zotero.CharacterSets 2015-06-11 17:17:28 -05:00
Dan Stillman
c407675d6a Fix more Travis timeouts, hopefully 2015-06-11 16:06:00 -04:00