Commit graph

5065 commits

Author SHA1 Message Date
Dan Stillman
f795240bbf Fix display of Duplicate/Unfiled Items rows 2016-03-11 09:25:33 -05:00
Dan Stillman
394aa8dded Update display title after item edit 2016-03-11 09:25:33 -05:00
Dan Stillman
f310c39162 Remove Item::copy()
Instead of creating a duplicate copy of the item with the same primary
data and saving that, it's safer just to use clone() (which doesn't
preserve ids) and apply changes to the main object.
2016-03-11 07:48:24 -05:00
Dan Stillman
ae6d560a66 Fix Item::multiDiff() 2016-03-11 07:48:24 -05:00
Dan Stillman
277ddc39f8 Don't include dateAdded/dateModified in item JSON if not set 2016-03-11 07:48:24 -05:00
Dan Stillman
7a03b1e527 Accept ISO dates in Item::setField() 2016-03-11 07:48:24 -05:00
Dan Stillman
28eaaaf2bf Don't try to parse non-SQL dates in Date.sqlToDate() 2016-03-11 07:48:24 -05:00
Dan Stillman
edcd2a16d2 Replace obsolete collectionTreeView::getLastViewedRow() call 2016-03-11 07:48:24 -05:00
Dan Stillman
b9b769db51 Trim repotime before passing to sqlToDate() 2016-03-11 07:48:24 -05:00
Dan Stillman
39f7d0f333 Don't require objects to be saved before calling toJSON() 2016-03-11 07:48:19 -05:00
Dan Stillman
ffb3823b4c Properly include creators of last item when looking for duplicates 2016-03-11 03:08:40 -05:00
Dan Stillman
daf4a8fe4d Deasyncification 🔙 😢
While trying to get translation and citing working with asynchronously
generated data, we realized that drag-and-drop support was going to
be...problematic. Firefox only supports synchronous methods for
providing drag data (unlike, it seems, the DataTransferItem interface
supported by Chrome), which means that we'd need to preload all relevant
data on item selection (bounded by export.quickCopy.dragLimit) and keep
the translate/cite methods synchronous (or maintain two separate
versions).

What we're trying instead is doing what I said in #518 we weren't going
to do: loading most object data on startup and leaving many more
functions synchronous. Essentially, this takes the various load*()
methods described in #518, moves them to startup, and makes them operate
on entire libraries rather than individual objects.

The obvious downside here (other than undoing much of the work of the
last many months) is that it increases startup time, potentially quite a
lot for larger libraries. On my laptop, with a 3,000-item library, this
adds about 3 seconds to startup time. I haven't yet tested with larger
libraries. But I'm hoping that we can optimize this further to reduce
that delay. Among other things, this is loading data for all libraries,
when it should be able to load data only for the library being viewed.
But this is also fundamentally just doing some SELECT queries and
storing the results, so it really shouldn't need to be that slow (though
performance may be bounded a bit here by XPCOM overhead).

If we can make this fast enough, it means that third-party plugins
should be able to remain much closer to their current designs. (Some
things, including saving, will still need to be made asynchronous.)
2016-03-07 17:03:58 -05:00
Dan Stillman
d871e2540b Revert "Make citing work via right-click"
This reverts commit f95832d4a9.

No longer necessary with deasyncification.
2016-03-07 07:33:37 -05:00
Dan Stillman
285dac425c Fix proxy saving/deleting for async DB 2016-03-06 16:48:00 -05:00
Dan Stillman
244a52ad22 Merge branch '4.0' 2016-03-06 01:20:51 -05:00
Dan Stillman
cdac94f8f9 Update citeproc-js to 1.1.71 2016-03-05 22:39:44 -05:00
Simon Kornblith
f95832d4a9 Make citing work via right-click
Drag and drop and WP integration are still TODO
2016-03-05 19:29:24 -05:00
Simon Kornblith
22026e5cfb Fix sandbox permissions issue with .length on nested translators
Addresses #520
2016-03-05 17:41:15 -05:00
Dan Stillman
685954a487 Fix translation breakage in Firefox 45
"new" now required before XMLHttpRequest() in chrome code
2016-03-05 01:51:28 -05:00
Dan Stillman
612504f441 Properly select items created via Attachments.importFromURL() 2016-03-05 01:25:42 -05:00
Dan Stillman
4190412ee4 Allow PDF saving via connectors
If 'pdf' flag is included in object POSTed to saveSnapshot, import the
PDF directly and save as top-level item. Currently the PDF is
redownloaded -- there might be a better way to get the PDF data over
without redownloading. (It uses passed cookies, though, so gated PDFs
should still work.)
2016-03-05 01:20:42 -05:00
Dan Stillman
ee1e8578ce Update submodules 2016-03-01 01:25:48 -05:00
Dan Stillman
2b0aaf6314 Fix potential crash when dragging collection to another library
Fixes #141, Error dragging collection containing standalone note to library
where note isn't standalone
2016-03-01 01:18:52 -05:00
Dan Stillman
d102e32f7d Fix potential crash when dragging in files on some systems
This might fix https://forums.zotero.org/discussion/57031
2016-02-24 04:03:05 -05:00
Dan Stillman
72302c8e24 Make selected, onfocused tree row highlight color on Linux more distinct
By default it's very close to the alternating row color (even in Places)

https://forums.zotero.org/discussion/56942/
2016-02-20 17:33:53 -05:00
Dan Stillman
c813df84dd Show proper error message on Firefox login manager service failure
If the XPCOM service can't even be retrieved, show the same message as
when there's an error finding logins.
2016-02-15 01:47:11 -05:00
Dan Stillman
45c2265c1e Update DB query return value check in Collection::getChildItems() 2016-02-11 15:07:41 -05:00
Dan Stillman
4d85866ade Fix translation breakage after 7c41618a4 2016-02-11 15:06:17 -05:00
Dan Stillman
7c41618a42 Asyncify Zotero.Translate.ItemGetter.prototype.setCollection()/setAll()
And some of the calling functions, but there's a lot more to do.

Addresses #520 and #734
2016-02-11 04:25:44 -05:00
Dan Stillman
ad0d6765d7 Fix Zotero.Attachments.linkFromDocument() 2016-02-11 02:54:52 -05:00
Dan Stillman
e137a05201 Merge branch '4.0' 2016-02-11 02:33:16 -05:00
Dan Stillman
5f3313d132 Restore proper sizing of toolbar icons on HiDPI Windows/Linux
I guess the idea that switching to PNGs obviated the need for this was wishful
thinking (though it doesn't seem to be necessary for the single buttons anymore
on Linux, and it's no longer necessary on OS X, which has generally saner
styling in Firefox).
2016-02-10 05:21:27 -05:00
Dan Stillman
88f1636d08 Toolbar icon tweaks
- Fix spacing on Windows and Linux in latest Firefox versions
- Tweak icon colors on Windows and OS X
- Adjust Z SVG to take up full height, so Z is a full 16px instead of
  14px with slight anti-aliasing
- Use generated PNGs instead of SVG for Z toolbar icons, to remove the
  need for complicated size rules
- Add separate platform-specific .svg files that are used by a
  zotero-build script, make-z-icons, to generate the Z PNGs; the main
  SVG is still used directly in the menu panel and customization
  palette, with platform media queries to determine the coloring
2016-02-10 03:33:01 -05:00
Dan Stillman
24e8c2e8cb Closes #758, Replace tab icon
Switch to red Z alone. Only 16px for now, since that's what we have in the red
Z.
2016-02-08 02:18:48 -05:00
Dan Stillman
64e7738bd3 Fix switching into tab mode 2016-02-08 01:37:48 -05:00
Dan Stillman
092a0b5560 Log some additional Standalone startup errors 2016-02-08 00:57:09 -05:00
Dan Stillman
99007af1f9 Fix Standalone startup 2016-02-07 01:51:07 -05:00
Dan Stillman
a20a6c86bc Closes #899, Setting max chars to 0 should disable full-text indexing 2016-02-07 01:01:26 -05:00
Dan Stillman
892708d071 Include path in debug output when nsIFile is passed to getContentsAsync() 2016-02-06 15:20:17 -05:00
Dan Stillman
bbdfebf8f6 Avoid repeated search when clearing quick search bar 2016-02-06 15:20:02 -05:00
Dan Stillman
b05f1d29aa Backport better incompatible-DB-version handling from 2177a000ea
Implements #891 for 4.0
2016-02-06 04:59:15 -05:00
Dan Stillman
3b402c564c Closes #900, Change fields order for cases in system.sql 2016-02-06 04:12:07 -05:00
Dan Stillman
49068d1d35 Initialize styles in Cite prefpane if not yet loaded
Fixes #904
2016-02-06 03:30:54 -05:00
Dan Stillman
27de351615 Fix middle pane status messages while using quick search 2016-02-06 03:26:31 -05:00
Dan Stillman
47e9f82927 Avoid repeated file existence checks for some files in getImageSrc() 2016-02-06 03:26:01 -05:00
Dan Stillman
1855b5e1f9 A couple better error messages 2016-02-04 04:05:58 -05:00
Dan Stillman
72c927c840 Fix Zotero.Utilities tests, which were being skipped accidentally
Unfortunately this will need to be partly redone, since retrieveItem(), and
therefore itemToCSLJSON(), and therefore itemToExportFormat(), need to be
synchronous. The item data load statements in itemToExportFormat() will
probably need to be performed earlier, when they can be async, and made
available to the session for retrieval by retrieveItem(), but I'll let someone
more familiar with the citation infrastructure do that.

This restores some code in retrieveItem() that may have been accidentally
removed in a merge, though it probably won't be useful anymore anyway.

Addresses #529
2016-02-04 04:05:46 -05:00
Dan Stillman
d2d7f2368c Remove 'version' workaround now that field is named 'versionNumber' 2016-02-04 03:53:04 -05:00
Dan Stillman
9765d06d1d Use "new" with File constructor, which now requires it 2016-02-03 12:30:24 -05:00
Dan Stillman
7474b31e96 Don't hang if Zotero.debug() is called on a window 2016-02-03 01:19:44 -05:00