Commit graph

5271 commits

Author SHA1 Message Date
Dan Stillman
e2cbfbd0fe Deasyncify Zotero.Tags.getID()/getAsync(), and add Zotero.Tags.create() 2016-04-21 11:07:16 -04:00
Dan Stillman
bf416e56c2 Tweak sync error logging 2016-04-20 02:32:12 -04:00
Dan Stillman
3dabd63a0a Close #930, [API Syncing] Sync synced settings 2016-04-19 05:22:16 -04:00
Dan Stillman
97f3854662 Include 400 response in logged sync errors 2016-04-19 05:21:45 -04:00
Dan Stillman
716ba66032 Replace deprecated function call in sync code 2016-04-19 05:20:53 -04:00
Dan Stillman
2ee6886cf1 Update citeproc-js to 1.1.98 2016-04-17 04:16:25 -04:00
Dan Stillman
67f358df4b Fix error trying to load old snapshot annotations 2016-04-16 16:49:48 -04:00
Dan Stillman
d8850b25c2 Fix buttons in proxy redirect notification box 2016-04-16 14:22:11 -04:00
Dan Stillman
5e6b763623 Update citeproc-js to 1.1.96 2016-04-16 02:44:33 -04:00
Dan Stillman
c5716a395f Various RTF Scan fixes
- Firefox 46 compatibility
- Async DB
- Stretched progress meters
2016-04-15 04:45:50 -04:00
Dan Stillman
08b3eed7da Zotero.DataObject._loadDataType() -> .loadDataType()
It's generally not necessary to call this, but it can be useful if
specific data needs to be loaded in an unloaded library (e.g., an item's
creators for RTF Scan)
2016-04-15 04:45:50 -04:00
Dan Stillman
8e932ce73f Remove debugging lines 2016-04-15 04:23:03 -04:00
Dan Stillman
62f4586eb0 Properly disable download-mode menulist for groups in Sync pref pane 2016-04-15 01:33:28 -04:00
Dan Stillman
045554dd8e Fix #926 again with async DB 2016-04-13 01:59:27 -04:00
Dan Stillman
79504df5f8 Remove "/report.html" in report URLs
Firefox saves as Zotero Report.html (localized) without it, which is
fine.
2016-04-12 18:59:46 -04:00
Dan Stillman
ba1f69b4d5 Merge branch '4.0' 2016-04-12 16:09:10 -04:00
Joscha Legewie
f4e4f27279 Bug fix progressWindow.js: nArcs undefined
`nArcs` is undefined in `this.ItemProgress.prototype.setProgress()`. This has been the case for a long time but never came up because the progress indicator isn't used in Zotero, I believe. I think it's a nice UI element though and could be used for non-disruptive progress indicators.
2016-04-12 14:23:59 -05:00
Dan Stillman
9330b9cd40 Update submodules 2016-04-12 04:52:52 -04:00
Dan Stillman
560eb37d0b Schema update step to fix invalid item relations
As corrected in d0a110072
2016-04-11 16:29:48 -04:00
Dan Stillman
d0a110072b Fix relation migration
The schema update step was generating invalid relations for related
items, resulting in sync errors on upload.
2016-04-11 14:48:26 -04:00
Dan Stillman
49d85dbe0f My Publications wizard changes
- Only show first pane (without Sharing pane) if no files or files
  aren't included
- Update authorship checkbox to reflect file include setting to avoid
  confusion
- Clarify in intro text that license applies to files, not notes --
  notes here are no different than notes in any public library, so it's
  sort of up to the user to clarify those if they're substantial enough
  for it to matter
- Adjust alignment of authorship checkbox if more than one line
2016-04-11 03:41:32 -04:00
Dan Stillman
aee214ed44 Update collection context menu once items have loaded
Otherwise, when right-clicking on a collection that's not currently
selected, some of the menu items appear gray at first, and a second
right-click is necessary after the items have loaded. This way the menu
items turn black once the items have loaded.
2016-04-11 02:52:09 -04:00
Dan Stillman
bb4db297c4 Fix "this.selection is undefined" switching away from loading collection 2016-04-11 02:29:25 -04:00
Dan Stillman
7c3a134107 Show loading message in middle pane if items loaded after startup 2016-04-11 02:29:08 -04:00
Dan Stillman
5e614e2787 Fix a few protocol handler bugs 2016-04-11 02:22:13 -04:00
Dan Stillman
46997bd3e4 Fix "cannot access dead object" error at startup
This could happen if a second page was loaded quickly at startup, before
translators finished loading and detection ran on the first page.
2016-04-11 02:20:10 -04:00
Dan Stillman
a1ef16a0a6 Add .library to Zotero.DataObject
This should replace uses of Zotero.Libraries.get(item.libraryID).
2016-04-10 19:46:10 -04:00
Dan Stillman
0469d6506a Show toolbar icon and collections pane while items are loading
Items in a library are now loaded only when a library is clicked on and
at sync time. There might be some other areas where they need to be
loaded or where this causes problems (e.g., drag and drop, word
processor integration).
2016-04-10 19:01:36 -04:00
Dan Stillman
2bdb818988 Fix large toolbar icons on HiDPI Linux
Fixes #943
2016-04-10 16:05:33 -04:00
Dan Stillman
85c0c086d5 Disable Restore to/from Zotero Server and add back Full Sync
Restore to/from will need to be reimplemented for API syncing (#914)

Closes #916
2016-04-10 05:19:51 -04:00
Dan Stillman
c9c5e40e95 Don't log relations-upgrade messages as errors 2016-04-10 04:32:23 -04:00
Dan Stillman
23e01fcefd Fix saving to My Library if Zotero pane hasn't been opened 2016-04-09 18:34:54 -04:00
Dan Stillman
9c53fe893c Skip collectionTreeView::notify() actions if no selection
I think this only happens if the Zotero pane hasn't yet been opened, which also
means an initial refresh() hasn't been done, which means that updates aren't
necessary.
2016-04-09 18:30:45 -04:00
Dan Stillman
1c19fe8d81 Use proper on-detect handler rather than pageshow in browser tests
Otherwise the test could run scrapeThisPage() before translators were ready. It
would be good to make scrapeThisPage wait for detection to complete so that an
early press still uses a translator for saving, but this way tests can also
test for the proper icon (though they don't now).
2016-04-09 18:26:13 -04:00
Dan Stillman
b650263d66 "Sync with Zotero Server" -> "Sync with zotero.org" 2016-04-08 17:03:29 -04:00
Dan Stillman
d2a5181637 Clarify/correct a couple Zotero.Item file method comments 2016-04-07 21:18:44 -04:00
Dan Stillman
14341ca16c Clear item creators when calling setCreators() with an empty array 2016-04-07 21:10:11 -04:00
Dan Stillman
79748b9132 Fix #940, UI not updating when dragging child item between parents 2016-04-07 21:10:11 -04:00
Dan Stillman
d78089d4b9 Properly update parent isOpen flag when removing child item at end of list 2016-04-07 21:10:10 -04:00
Dan Stillman
afaaf20c90 Allow click on menu title to select feed item add target
Instead of requiring a click on the menuitem at the top of the submenu, allow
a click on the menu itself.

This is a hack that, among other things, replicates the flash effect on
menuitems on OS X. Unfortunately, <menu> elements can't have checkboxes, so
only the menuitem in the submenu will be checked. (Otherwise I'd remove the
redundant menuitem in the submenu.)
2016-04-07 06:16:06 -04:00
Dan Stillman
a360494724 Backport Zotero.ID changes (fabc2ba6a) to 4.0 2016-04-07 04:43:54 -04:00
Dan Stillman
4bc4acb923 Hide empty fields in item pane when not editable (e.g., feeds)
A stopgap measure until we have a better design for the item pane
2016-04-06 05:14:29 -04:00
Dan Stillman
df1cdb9754 Abstract field tweaks
- Allow clicking on non-editable abstract field to expand/collapse it
- Change cursor when hovering over abstract to show it can be toggled
- Default abstracts to expanded
2016-04-06 02:04:06 -04:00
Dan Stillman
0f5b277c91 Fix error on missing files when searching full-text content 2016-04-06 01:10:42 -04:00
Dan Stillman
d7309ca64e Use hi-res attachment file bullets 2016-04-06 01:10:01 -04:00
Dan Stillman
d6064cfeba Add Zotero.hiDPISuffix to avoid "@2x" logic each time
Can use Zotero.hiDPISuffix directly in URLs to automatically substitute
"@2x" on HiDPI displays.
2016-04-06 01:09:14 -04:00
Dan Stillman
71d79e1f08 Make sure info pane is selected for feed items 2016-04-05 15:08:11 -04:00
Dan Stillman
1e8b74d9b9 Tweak item pane padding
The item pane scrollbox was actually padded on the outside. This removes
that padding, which slightly increases the viewable content in the pane.
2016-04-05 15:07:49 -04:00
Dan Stillman
f70c2bfa0a Feed item button tweaks
- Fix persistence of last translation target
- Add checkbox to menuitem of selected target
- Remove unnecessary flex attributes

Also:

- Move collectionTreeView row id (e.g., "L1", "C123") and image
  generation to Zotero.Library and Zotero.Collection properaties,
  .collectionTreeViewID and .collectionTreeViewImage -- currently used
  only for the feed add-to button, but could be expanded for use in
  collectionTreeView
2016-04-05 02:24:58 -04:00
Dan Stillman
8714816cec Fix feed item add-to button appearance on OS X 2016-04-05 02:24:36 -04:00
Dan Stillman
aa266c11f4 Add quotes around feed button target 2016-04-04 23:24:19 -04:00
Dan Stillman
cf212e2b70 Initialize feed button only when necessary
And without extra init() call

This fixes the button being initialized before Zotero.hiDPI is set, resulting
in a low-res icon until the target is changed.
2016-04-04 23:18:29 -04:00
Adomas Venčkauskas
5b8d3c178f Add a menu option to add feeds found on a page
Closes #adomasven/zotero/10
2016-04-04 17:36:51 -04:00
Dan Stillman
0f7d1c7061 Fix various connector-mode issues for 5.0
Still more to fix
2016-04-04 06:33:15 -04:00
Dan Stillman
7a449e8deb Clearer parameter name for autocomplete select handler
Refs #926
2016-04-02 04:16:35 -04:00
Dan Stillman
eecd625298 Populate both creator fields on Tab autocomplete select
Closes #926
2016-04-02 04:11:35 -04:00
fbennett
55bfe54af2 Bugfixes for new styled-textbox code 2016-04-02 12:02:53 +09:00
Dan Stillman
cdedbaccac Add some missing empty platform-specific CSS files 2016-04-01 06:05:59 -04:00
Dan Stillman
c8affb49ee Add empty Mac/Windows itemPane.css to avoid CSS load error 2016-04-01 05:51:49 -04:00
Dan Stillman
943b2c1ddf Don't auto-sync on feed library changes, and add Zotero.Library::syncable 2016-04-01 05:47:43 -04:00
Dan Stillman
7aa6d98f35 Use library icon for New Library button, and add more HiDPI icons
Includes HiDPI icons for feed rows, which weren't showing up before
2016-04-01 05:37:25 -04:00
Dan Stillman
129b8113b9 Don't try to show secondary sort menu in feeds
(Feeds don't have a visible primary sort column.)
2016-04-01 05:33:14 -04:00
Dan Stillman
842dea973b Remove references to removed Zotero.Items.cacheFields() 2016-04-01 05:33:14 -04:00
Dan Stillman
4cccf27bb1 A few debug message tweaks 2016-04-01 05:33:14 -04:00
Adomas Venčkauskas
3dc0ad3745 Add feed menu buttons. Close adomasven/zotero#9. 2016-04-01 12:25:37 +03:00
Dan Stillman
8a57183e0b Remove unused version table rows 2016-04-01 02:38:36 -04:00
Dan Stillman
514547ab3b Reinstate auto-sync, and remove lots of old sync code
The on-change auto-sync now syncs only the modified library, and does so
quite efficiently (and should be able to be made more efficient), so we
might be able to reduce the timeout below 15 seconds.
2016-04-01 02:30:17 -04:00
Dan Stillman
9b231169b2 Return the new item from ZoteroPane.duplicateSelectedItem() 2016-04-01 02:00:30 -04:00
fbennett
9431e0de53 HTML/RTF and RTF/HTML conversion for styled textbox 2016-04-01 09:24:02 +09:00
Adomas Venčkauskas
2b41f7af1d Close #934. Remove feed item read state syncing 2016-03-31 12:37:01 +03:00
Dan Stillman
70c41e8a51 Update citeproc-js to 1.1.91 2016-03-30 23:24:34 -04:00
Dan Stillman
fabc2ba6a2 Always start at MAX() + 1 for Zotero.ID.get(), and deasyncify
Instead of getting batches of unused primary key ids, even if they're lower
than other ids, which for some reason seemed like a good idea in 2008, just do
a `MAX()` on the table at startup and return the next available id on each call
to `Zotero.ID.get()`. This is much simpler, and not reusing ids allows them to
be used as a chronological sort field.

While SQLite's `SELECT last_insert_rowid()` could return auto-increment values,
it's unsafe with async DB access, since a second `INSERT` can come in before
the first `last_insert_rowid()` is called. This is true even in a transaction
unless a function that calls it is never called in parallel (e.g., with
`Zotero.Promise.all()`, which can be faster than sequential `yield`s).

Note that the next id is always initialized as MAX() + 1, so if an object is
added and then deleted, after a restart the same id will be given. (This is
equivalent to (though unrelated to) SQLite's `INTEGER PRIMARY KEY` behavior,
as opposed to its `INTEGER PRIMARY KEY AUTOINCREMENT` behavior.)

Closes #993, Feed items out of order
2016-03-30 01:39:43 -04:00
Dan Stillman
87acdce81b Pass query options to logQuery for DB.(value/column)Query
Allows, e.g., `debug: false` to work for those methods.
2016-03-28 17:53:03 -04:00
Dan Stillman
cebf2a3125 Throw an error from queryAsync() if onRow throws an error
If onRow throws StopIteration, the query will stop gracefully.
2016-03-28 17:47:25 -04:00
Dan Stillman
0c5eacbd0f Follow existing pref for gzip-compressed uploads 2016-03-28 05:19:32 -04:00
Dan Stillman
f906b4226d Fix loading of Edit Bibliography window in Firefox 45
Edit textbox is still broken, at least for some items.
2016-03-28 03:14:09 -04:00
Dan Stillman
35530af1fb Gzip-compress API uploads larger than 1000 characters 2016-03-28 02:38:28 -04:00
Dan Stillman
92f2e38325 Remove Zotero.UnresponsiveScriptIndicator
If import/export can still trigger the warning (which hopefully they
can't), we should just asyncify those further.
2016-03-27 03:34:40 -04:00
Dan Stillman
8b1f10aee0 Properly delete library version for full-text sync on library delete 2016-03-27 03:19:39 -04:00
Dan Stillman
b5adb084f2 Don't reload last folder on items pane crash, in case it's the problem
Otherwise you have to edit the prefs to continue using Zotero if, say, a saved
search causes a crash.
2016-03-26 04:16:23 -04:00
Dan Stillman
b7b246e741 Saved search fixes
- Fix saved search editing
- Refresh items list on search change
- Generate correct conditions array for search JSON
2016-03-26 04:14:56 -04:00
Dan Stillman
62f3177d36 Speed up expanding of items in items tree 2016-03-26 01:33:26 -04:00
Dan Stillman
6e0ef7b625 Don't send notification for 'user' library change 2016-03-25 18:46:13 -04:00
Dan Stillman
15a9fd5494 Make various collection methods synchronous
- Collection::getDescendents()
- Collections.getByLibrary()
- Collections.getByParent()

And various things that depend on those. (View with -w.)
2016-03-25 18:44:24 -04:00
Dan Stillman
234127e65a Update toolbar icons on group editability change
And trigger 'group' 'modify' notifier event for inherited Zotero.Library
properties
2016-03-25 16:49:26 -04:00
Dan Stillman
a61c99843b Fix error switching to COinS in export dialog
Or other export translators without options
2016-03-25 02:33:55 -04:00
Dan Stillman
afee1d16ad Fix saving an item with a child note into a collection 2016-03-25 02:24:22 -04:00
Dan Stillman
c5702abb7b Don't include 'filename' in linked_file attachment JSON 2016-03-24 22:26:50 -04:00
Dan Stillman
fc6c113f25 Show intro text for My Publications in middle pane when no items
ZoteroPane.setItemsPaneMessage() and setItemPaneMessage() can now
optionally take a DOM node instead of a string.

Closes #705
2016-03-24 09:03:59 -04:00
Dan Stillman
db33163a99 Fix Advanced Search window 2016-03-23 20:45:02 -04:00
Dan Stillman
0d343458a3 Normalize Unicode in new filenames 2016-03-23 04:29:38 -04:00
Dan Stillman
002dd66e03 Restore proper error for Show File on missing file 2016-03-23 04:29:38 -04:00
Dan Stillman
a1ce85decb Overhaul object downloading/processing during data syncs
Previously, objects were first downloaded and saved to the sync cache,
which was then processed separately to create/update local objects. This
meant that a server bug could result in invalid data in the sync cache
that would never be processed. Now, objects are saved as they're
downloaded and only added to the sync cache after being successfully
saved. The keys of objects that fail are added to a queue, and those
objects are refetched and retried on a backoff schedule or when a new
client version is installed (in case of a client bug or a client with
outdated data model support).

An alternative would be to save to the sync cache first and evict
objects that fail and add them to the queue, but that requires more
complicated logic, and it probably makes more sense just to buffer a few
downloads ahead so that processing is never waiting for downloads to
finish.
2016-03-23 04:29:04 -04:00
Dan Stillman
6ac35c75c1 Fix display of sync error icon on error 2016-03-22 22:44:02 -04:00
Dan Stillman
aab4fca3ad Don't override 'options' objects going through syncAPIClient 2016-03-22 22:44:02 -04:00
Dan Stillman
dcb7c88ebd Misc. debug output cleanup 2016-03-22 22:44:02 -04:00
Dan Stillman
63e169c139 Only show empty-response-from-server error for 0 or 200 status codes 2016-03-22 22:44:02 -04:00
Dan Stillman
af8865f3f3 Fix behavior of Zotero.Utilities.Internal.delayGenerator and add tests
Also convert to an ES6 generator
2016-03-22 22:44:02 -04:00
Dan Stillman
c099bd432a Handle multi-collection/search add in collectionTreeView::notify() 2016-03-22 22:44:00 -04:00
Dan Stillman
6c43e75d26 Merge pull request #902 from adomasven/feature/feed-reader-UI
Feed Reader UI

(I squashed a bunch of commits from the PR.)
2016-03-22 07:31:03 -04:00