Commit graph

5541 commits

Author SHA1 Message Date
Dan Stillman
0471a393eb Always return promise from Zotero.Attachments._postProcessFile() 2015-04-26 18:08:26 -04:00
Dan Stillman
1179d4c142 Fix Zotero.File.getBinaryContentsAsync() with no maxLength
And properly reject promise on failure
2015-04-26 18:08:25 -04:00
Dan Stillman
311ed7a71d Fix some old-style generators passed to executeTransaction()
And some missing yields
2015-04-26 18:08:25 -04:00
Dan Stillman
99dfc72a18 Fix collection saving 2015-04-26 18:08:25 -04:00
Dan Stillman
694896273a Properly detect group in Zotero.CollectionTreeRow::isWithinGroup()
More follow-up from 1c8abf384
2015-04-26 17:51:30 -04:00
Dan Stillman
1f00e99e71 Fix 'this' binding in ZoteroPane.selectItem(), but this time for real 2015-04-26 17:51:30 -04:00
Dan Stillman
a2b572665d Make libraryID optional for DataObjects, defaulting to user library 2015-04-26 17:51:29 -04:00
Dan Stillman
30535653a6 Fix error saving single attachment files from document 2015-04-26 17:51:29 -04:00
Dan Stillman
8ff258fe03 Don't require parent item to be loaded when setting item parent 2015-04-25 03:17:41 -04:00
Dan Stillman
6126a49fea Don't require non-identified items to have loaded data in getField()
This allows getField() on an unsaved item to work properly without a pointless
loadItemData() call.
2015-04-25 03:17:41 -04:00
Dan Stillman
5c8209da5c Fix 'this' binding in ZoteroPane.selectItem() 2015-04-25 03:17:41 -04:00
Dan Stillman
2f556d0da1 Adjust identifier registration on object save
Previously, object identifiers were registered in a commit callback, but that
meant that they wouldn't be available to getLibraryAndKeyFromID/
getIDFromLibraryAndKey within a transaction. Instead, register them before
saving and clear them in a tranasction rollback if necessary.

This changes Zotero.DataObject to call its own _finalizeSave() in addition to a
descendent one.
2015-04-25 03:17:41 -04:00
Dan Stillman
f8ac21d891 Return object instead of array from Zotero.DataObjects.getLibraryAndKeyFromID()
Object contains 'libraryID' and 'key' properties

This is due to changed array destructuring behavior in Firefox. Previously,
`var [foo, bar] = maybeArrayMaybeFalse()` always worked, leaving foo and bar
undefined if the function returned false. Now (with ES6, I assume), if the
function returns false it results in a "false[Symbol.iterator] is not a
function" error. But `var {libraryID, key} = false` works as expected, leaving
both values undefined, so instead we can just return an object with those
properties from getLibraryAndKeyFromID(). To assign to different variables, use
`var {libraryID, key: parentItemKey} = ...`.
2015-04-25 03:17:41 -04:00
Dan Stillman
9e3e680be8 Rework DB transaction handling
Rollback callbacks weren't being properly called, and some other things were in
the wrong place, particularly with nested transactions.
2015-04-25 03:17:41 -04:00
Dan Stillman
4cb5e7e4d5 Remove check for ES5 generators in Zotero.DB.executeTransaction()
This doesn't work properly in some contexts and can break things. There might
be a better test, but we probably don't need this anymore.
2015-04-25 03:17:40 -04:00
Dan Stillman
0e800f350c Throw errors instead of logging for some item load calls
Reverts a change in b83bc404, and changes one debug line introduced
there into an error
2015-04-25 03:17:40 -04:00
Dan Stillman
f68a595a2b Remove Zotero.DataObject._eraseRecoverFromFailure() 2015-04-25 03:17:40 -04:00
Dan Stillman
4b040c78a7 Fix various saved search bugs, and add tests
Search condition ids are now indexed from 0, and always saved
contiguously (no more 'fixGaps' option), since they're just in an array
in the API. (They're still returned as an object from
Zotero.Search.prototype.getConditions() because it's easier for the
advanced search window to not have to deal with shifting ids between
saves.)
2015-04-17 19:29:37 -04:00
Dan Stillman
d9c32a8e90 Fix search saving, and add some unit tests
Also:

- Return an object from `Zotero.Search.prototype.getConditions()`
  instead of an array.
- Add support function `getPromiseError(promise)` to return the error
  thrown from a chain of promises, or false if none. (We could make an
  `assert.throwsAsync()`, but this allows testing of various properties
  such as `.name`, which even the built-in `assert.throws()` can't
  test.)
- Clarify some search save errors
2015-04-17 00:25:09 -04:00
Dan Stillman
59773f3f6d Zotero.Search.getSearchCondition(s) -> getCondition(s) 2015-04-17 00:25:09 -04:00
Dan Stillman
1952fbccd4 Wait for Zotero.Searches initialization 2015-04-16 20:50:15 -04:00
Dan Stillman
51c7ae6e5c Add -b option to skip translator/style installation in tests
'b' for *b*undled files

Translators and styles take a long time to install and initialize in
source installations, and they're unnecessary for many tests.

This shaves about 10 seconds off each test run for me on one system (and
that's with some help from filesystem caching).
2015-04-16 20:50:15 -04:00
Dan Stillman
0154e44c2f Mark all data as loaded when loading primary data for nonexistent object 2015-04-16 20:49:18 -04:00
Dan Stillman
293f7c6dd4 Zotero.Search.prototype.addCondition() doesn't need to be async 2015-04-16 20:48:59 -04:00
Dan Stillman
a2b6df1014 Include both DB version numbers in "newer than SQL file" dialog 2015-04-15 16:03:47 -04:00
Dan Stillman
384a547693 Merge branch '4.0' into api_syncing
Conflicts:
	chrome/content/zotero/lookup.js
2015-04-15 00:56:25 -04:00
Dan Stillman
a8d1080cd6 Unpromisify a couple Zotero.Translator.get() calls
More to be done to fix translation
2015-04-15 00:50:22 -04:00
Dan Stillman
e8b7b38290 Remove some obsolete synchronous DB code 2015-04-15 00:45:59 -04:00
Dan Stillman
4f9366749c Add Zotero.alert() method
This is just a wrapper around nsIPromptService.alert() that takes
Zotero.noUserInput into consideration, which avoids long timeouts during
testing (e.g., for lookup failures).
2015-04-14 16:09:55 -04:00
Dan Stillman
7b72d47070 Zotero.File.putContentsAsync() fixes
Breakage from e6ccca3230
2015-04-13 03:45:25 -04:00
Dan Stillman
915542e696 Throw Error, not Exception 2015-04-13 03:45:25 -04:00
Dan Stillman
2a3af13ddf Automatically return local user URI from Zotero.URI.getLibraryURI()
Previously, getItemURI and getCollectionURI had to check the libraryID
to determine whether to return a local URI, and were doing so using an
obsolete check.
2015-04-13 03:45:25 -04:00
Dan Stillman
a91151756b Fix test running after schema updates
Tests still need to be updated for Bluebird/promisification
2015-04-13 02:25:34 -04:00
Dan Stillman
fec43f1f62 Merge branch '4.0' into api_syncing 2015-04-13 02:01:43 -04:00
Dan Stillman
1c2b2575f7 Fix excessive file sync mtime updates/checks (probably?) 2015-04-09 03:47:43 -04:00
Dan Stillman
f5ce2d238e Fixes #546, Advanced search : match "any" is broken 2015-04-09 02:57:29 -04:00
Dan Stillman
c1a581168a Merge locales from Transifex 2015-04-09 00:26:12 -04:00
Dan Stillman
1e2346eba1 Revert to modified 3.02 binaries on Windows
To deal with issues running .vbs scripts on some systems. If the 3.02
binaries haven't been reinstalled since this version, reinstall them as
3.02a automatically or on manual upgrade to fix corrupted binaries from
previous gzip issue.

Other platforms unchanged
2015-04-09 00:22:32 -04:00
Dan Stillman
b2d5612526 Fix sync and debug output submission in Nightly
(sendAsBinary() removal)
2015-04-07 16:59:33 -04:00
Dan Stillman
2afebc79d0 Set tree image height to 16px everywhere
Windows maybe also doesn't handle HiDPI tree images correctly otherwise
2015-04-07 14:37:13 -04:00
Dan Stillman
c398353d5d Remove obsolete CSS include 2015-04-07 14:26:49 -04:00
Dan Stillman
fe79954b96 Fix HiDPI icons in trees on Linux 2015-04-07 14:25:24 -04:00
Dan Stillman
152b1c0d83 Merge pull request #692 from aurimasv/test-beta_build
Add Firefox Beta for Travis-CI testing
2015-04-07 03:13:19 -04:00
Dan Stillman
61e11f9afa Fix main toolbar icons in 2x mode on Win/Linux 2015-04-07 03:06:25 -04:00
Dan Stillman
adadc9e03a Accept a string path in Zotero.Utilities.Internal.exec() 2015-04-07 01:16:17 -04:00
Dan Stillman
31941c0798 Fix flashing console window for Retrieve Metadata on Windows 2015-04-07 01:14:18 -04:00
Aurimas Vinckevicius
f6510419cb Skip test for "recognizePDF without DOI" on Travis-CI
Breaks due to CAPTCHA when tests are run frequently
2015-04-06 23:17:41 -05:00
Dan Stillman
796a1a2898 Use firstCreator instead of creators[0] for QuickFormat sort
Previously, if an editor was entered before an author, it would sort by
the editor. Now, as long as there's an author, it will sort by that
first (and, with 2f3d865f, favor left-bound matches).

Addresses the second issue on
https://forums.zotero.org/discussion/48047/
2015-04-06 23:32:15 -04:00
Dan Stillman
2f3d865f11 Favor left-bound name matches in QuickFormat bar
https://forums.zotero.org/discussion/48047/
2015-04-06 23:14:32 -04:00
Dan Stillman
bfbf3d871c Fix display of sync error icon (2x and spacing) 2015-04-06 17:39:21 -04:00
Dan Stillman
af871a3fd5 Add 2x versions of many icons
Courtesy of Pastel SVG (2x famfamfam)

I didn't add 2x versions for any composite icons or any Fugue icons.

Also:

- Removed some unused/redundant images
- Switched to shadowless versions for a couple Fugue icons
2015-04-06 17:24:55 -04:00
Dan Stillman
58b56abbc7 Fix file sync errors with symlinked files/directories
nsIFile seems to have figured out symlinks since Firefox 3.0.1
2015-04-04 00:09:24 -04:00
Dan Stillman
788f92bc8b Fix sync error panel positioning (at least on OS X)
After 88be88661
2015-04-03 23:54:37 -04:00
Dan Stillman
4613f9593c Don't update pdfinfo unnecesarily 2015-04-01 16:43:37 -04:00
Dan Stillman
e567ad25aa More PDF tools tweaks
- If one tool is missing, reinstall it automatically during translator
  update check
- Account for pdfinfo 3.02pl1 on Linux
2015-04-01 16:35:13 -04:00
Dan Stillman
1a47d79716 Restore support for modified pdfinfo 3.02 2015-04-01 13:20:34 -04:00
Dan Stillman
a9ca6e0857 Support unmodified Xpdf binaries
Use stdout redirection scripts for pdfinfo and, on Windows, a script to
run pdftotext hidden, which together allow for all unmodified binaries
(including, probably, symlinked system ones, though I didn't test that).

On Windows, using a .vbs does cause a brief wait cursor. The stock
pdfinfo needs the redirection script anyway, so that's unavoidable, but
on the async branch I think we'll be able to switch to pdf.js for the
page count, at which point maybe I'll try to remember how I modified the
Windows binaries to be hidden and use a modified version of pdftotext to
avoid VBScript. (We use the stock pdftotext elsewhere already.)
2015-04-01 04:36:21 -04:00
Aurimas Vinckevicius
49a0b02b06 Log a list of translators that were found during detect* 2015-03-31 14:29:32 -05:00
Aurimas Vinckevicius
c05025f4b1 Log translatorID and lastUpdated timestamp when parsing translators 2015-03-31 14:29:32 -05:00
Dan Stillman
e1c1803ce2 Add DB version info to newer-DB-version error 2015-03-30 14:45:53 -04:00
Dan Stillman
aab21f68ad Blacklist "bad script XDR magic number" message 2015-03-29 15:22:07 -04:00
Dan Stillman
d6e19a9f25 Automatic PDF tool upgrading
If automatic translator/style updates are enabled, at least one of the
PDF tools is installed, and the repo returns a more recent version
number than what's installed, automatically upgrade the tools. (Version
3.02 counts as lower, since Poppler's version numbers are lower.)

If an error occurs, wait increasing amounts of time to try the downloads
again, up to one week.
2015-03-28 18:50:06 -04:00
Dan Stillman
40b349edca Handle gzip encoding via saveURI() 2015-03-27 18:43:39 -04:00
Dan Stillman
c9a787c7bd Maybe show some sync errors that weren't being shown
(This might end up showing some twice, but better than not at all.)
2015-03-26 20:34:31 -04:00
Dan Stillman
52e735b035 Merge locales from Transifex 2015-03-26 20:34:23 -04:00
Dan Stillman
4625b7081e Add checkbox to use one side for all remaining conflicts
This should be rewritten in a way that allows it to be unit tested, but
it seems to work.
2015-03-26 20:34:23 -04:00
Dan Stillman
21ad09112c Merge pull request #683 from aurimasv/setValue-base_fields
Allow setting item field value via base field
2015-03-26 20:33:54 -04:00
Aurimas Vinckevicius
48810f23e0 Tweak cleanISBN, cleanISSN, toISBN13 to match tests
Fixes regression from 37921b0910
cleanISBN/ISSN now return first valid ISBN/ISSN from a list of valid/invalid ISBNs/ISSNs, even if invalid ISBN/ISSN comes first
toISBN13 now corrects the check digit for ISBN13 input
2015-03-25 21:25:38 -05:00
Dan Stillman
d1ca5e2729 Restore use of dump() on Windows if debug pref is enabled
It turns out that the Cygwin console, unlike -console, is actually
usable, so developers on Windows can use that. Since we sometimes need
real-time debug output from end users (who won't have Cygwin installed),
keep logging to the Browser Console if only the -ZoteroDebug flag is
passed.
2015-03-24 03:44:16 -04:00
Aurimas Vinckevicius
e732d6350b Allow setting item field value via base field 2015-03-24 02:16:32 -05:00
Dan Stillman
b042973751 Merge branch '4.0' into api_syncing 2015-03-22 19:51:29 -04:00
Dan Stillman
b8fe15ed63 Properly reinitialize styles after repo update 2015-03-22 16:20:53 -04:00
Dan Stillman
a2d7dfd206 More bundled files fixes 2015-03-22 16:05:17 -04:00
Dan Stillman
e6ccca3230 Take either nsIFile or string path in Zotero.File.putContentsAsync()
And throw an OS.File.Error directly instead of catching it
2015-03-22 16:04:56 -04:00
Dan Stillman
d8f3be4bee updateBundledStyles() asyncification and related changes
- Use async DB and OS.File for bundled file updates
- Remove support for translator/style ZIP files -- the two options are
  now non-unpacked XPIs with subfolders or unpacked source installations
- Now that we have async file access, don't store translator code in
  database cache -- just store metadata so that it's available without
  reading each translator file
- Change the (previously partially asyncified) Zotero.Styles/Translators
  APIs a bit -- while the getAll/getVisible methods are asynchronous and
  will wait for loading, the get() methods are synchronous and require
  styles/translators to be initialized before they're called. Most
  places that end up calling get() probably call getAll/getVisible first
  and should therefore be async, but if there's any way to trigger a
  get() first, that will need to be adjusted.
- Asyncify various other style/translator-related code

XPI support is untested, as is style/translator usage, so there are
almost certainly bugs. The latter depends on updated export format
support (#659), since toArray() no longer exists on this branch.

Addresses #529 and #520
2015-03-22 04:27:25 -04:00
Dan Stillman
842082f818 Simplify options checking in Zotero.HTTP.request() 2015-03-22 02:49:19 -04:00
Dan Stillman
b437826bd0 Include HTTP headers in output in Zotero.HTTP.request() debug mode 2015-03-22 02:44:24 -04:00
Dan Stillman
32a4604481 Rename Zotero.HTTP.promise() to Zotero.HTTP.request() 2015-03-22 02:42:21 -04:00
Dan Stillman
9c0dc327e0 Fix library upgrade with trashed user library items (from 1c8abf384) 2015-03-21 22:56:31 -04:00
rmzelle
0df26d1d2d No prompt for remove if no top-level items are selected
As requested at
https://github.com/zotero/zotero/pull/668#issuecomment-84090670
2015-03-21 20:28:29 -04:00
Dan Stillman
ab25a306fd Add libraries table support to Zotero.ID.getNext() 2015-03-18 22:58:06 -04:00
Dan Stillman
304f46c8cc Update Zotero.Sync.Storage.QueueManager.start() for async item.clone()
Via _reconcileConflicts()
2015-03-18 22:58:06 -04:00
Dan Stillman
44a9b84891 Additional safety check when checking for persisted item pane state
I don't think there's any way for this to happen short of manual
preference editing, and the pane width would have to be exactly 250px,
and it's pretty harmless anyway, but might as well be safe.
2015-03-18 19:07:45 -04:00
Dan Stillman
935fb90bed Reopen collapsed item pane on restart, for now
Until we find a solution that confuses people less (#678), don't persist the
collapsed state across restarts.
2015-03-18 16:13:19 -04:00
Dan Stillman
68b0fb0368 Merge locales from Transifex 2015-03-17 18:35:21 -04:00
Dan Stillman
faed7cd7dd Replace some 'for each..in' instances
There are hundreds more, but these are all the ones that generate warnings in
the console at startup. XPCOM/XBL ones don't seem to do so, so we can ignore
those for now (and hopefully not bother with them on 4.0). Instances in
translators do generate warnings.

Addresses #656
2015-03-17 15:19:45 -04:00
Dan Stillman
4d8471afac Merge pull request #674 from gracile-fr/localize-wordproc-prefs
Localize Word Processors tab in Preferences
2015-03-17 01:12:27 -04:00
Dan Stillman
bb3496dfa8 Fix item duplication 2015-03-17 01:08:18 -04:00
Dan Stillman
828f3f5024 Fix report generation 2015-03-17 00:05:08 -04:00
Dan Stillman
417335baf2 Some libraryID follow-ups 2015-03-17 00:04:41 -04:00
Dan Stillman
d50b6667f0 Fix moving items to trash (from bf36a988e4) 2015-03-16 23:50:24 -04:00
Dan Stillman
bdd69d0a53 Merge branch '4.0' into api_syncing 2015-03-16 23:41:10 -04:00
Dan Stillman
a03772cae7 Merge branch 'master' into api_syncing
Note that this loses conflicting changes to translate_item.js from 849803473a,
so those will need to be reapplied if applicable. /cc @aurimasv, @mtd91429
2015-03-16 15:23:07 -04:00
Dan Stillman
bf36a988e4 Initial My Publications support
Adds a "My Publications" source after "My Library", implemented as a
separate library. Top-level items can be dragged in and removed.

(This doesn't currently work without disabling Quick Copy.)

Also:

- Make "Group Libraries" an unselectable header instead of a container,
  and don't indent group libraries
- Fix relation purging, which maybe never worked
- Pass only libraryID/key on deletes (which should speed them up)
- Fix async item cloning/copying
- Fix miscellaneous other bugs

To-do:

- Confirmation dialog on drag
- API support
2015-03-16 12:18:54 -04:00
Dan Stillman
a9f010d547 Update Quick Start Guide URL to HTTPS 2015-03-16 12:17:51 -04:00
Dan Stillman
94accba8a0 Fix error creating new item with tags 2015-03-16 12:17:50 -04:00
Dan Stillman
1c8abf3841 Change user library from 0 to 1
0 allowed for some accidental behavior due to old code expecting NULL,
and it prevented easy checks (``if (!libraryID)``) for a passed
libraryID. Code now uses Zotero.Libraries.userLibraryID instead of a
hard-coded value (except in schema.js). Functions can still make
libraryID optional, but they should then use
Zotero.Libraries.userLibraryID if that's to mean the user library.

There might be some code that still expects 0 that I missed.
2015-03-16 12:16:05 -04:00
Dan Stillman
072ced347c Merge locales from Transifex 2015-03-16 12:11:33 -04:00
Simon Kornblith
b4142342a5 Merge remote-tracking branch 'origin/connector' into 4.0 2015-03-14 18:32:54 -04:00
Simon Kornblith
48f6de7ad1 Move Safari items to root images directory, part 1 2015-03-14 18:28:05 -04:00
gracile-fr
5e9f6ff502 Localize Word Processors tab in Preferences
Fixes #426: this allows the localization of the Word Processors Add-in
button and messages displayed in the Prefs, under the "Word Processors"
tab. These strings were previously hardcoded in the integration plugins.
2015-03-12 21:25:50 +01:00
Dan Stillman
532c95e13e Fix placeholder in word processor document version message
Noted in #426
2015-03-12 15:31:45 -04:00
gracile-fr
7fb8f162c5 Add localized locator labels
Fixes #557
2015-03-12 15:30:05 +01:00
Simon Kornblith
3583793571 Wait for bundled file updates to complete before running tests 2015-03-11 13:32:25 -04:00
Simon Kornblith
608da632f3 E4X is gone 2015-03-11 12:04:54 -04:00
Dan Stillman
3672d2a895 Merge pull request #668 from rmzelle/confirm-remove-from-collection
Add prompt for Remove Item(s) from Collection
2015-03-09 22:27:12 -04:00
rmzelle
c5a40d503b Add prompt for Remove Item(s) from Collection 2015-03-09 21:45:39 -04:00
Simon Kornblith
d5f3e6d8f7 Merge pull request #580 from aurimasv/relative-urls
Resolve protocol-relative URLs outside of document context
2015-03-09 20:41:18 -04:00
Simon Kornblith
f2fb6e2e9c Merge pull request #640 from aurimasv/trans-tester-redundant-tags
Discard redundant tags in translator tester
2015-03-09 20:25:03 -04:00
Simon Kornblith
3415cefa71 Merge pull request #601 from aurimasv/defer
Allow meta redirects when running web translator tests
2015-03-09 20:10:19 -04:00
Simon Kornblith
181d852b72 Merge pull request #665 from zotero/unit-testing
Unit testing infrastructure
2015-03-09 19:13:25 -04:00
Dan Stillman
0aaa0540d9 Delete syncedSettings for deleted libraries on sync error
Not sure how this is possible, but fix it for now. It'll be prevented with a FK
check in 5.0.
2015-03-09 19:11:36 -04:00
Dan Stillman
cd358977f3 Update locales from Transifex
(Unfortunately this wipes out "Shortcuts" in all locales, but pushing
non-English locales to Transifex scares me too much. Sorry, localizers!
I think Transifex makes it easy to use previously used translations, at
least.)
2015-03-09 18:58:01 -04:00
Dan Stillman
2681a508b4 Merge pull request #664 from gracile-fr/prefs-pane
Move shortcut keys prefpane to tab of Advanced (#646)
2015-03-09 18:54:39 -04:00
Simon Kornblith
c2d32c2e27 Just give up on trying to automate the panel itself 2015-03-09 16:49:50 -04:00
Simon Kornblith
c7c58f8343 Add support function to reset the DB and a test that it works. 2015-03-09 14:25:49 -04:00
gracile-fr
0a4fcc90ac Move shortcut keys prefpane to tab of Advanced
[and delete unused "#zotero-prefpane-keys checkbox" (there used to be a checkbox to "Try to override conflicting shortcuts", which has been definely removed by 5b34dce40f )]
2015-03-09 12:08:31 +01:00
gracile-fr
1ac54c4b13 Move "#styleManager-updated" under "Cite Pane" code
It was lost under "Shortcut Keys pane" code.
2015-03-09 12:06:55 +01:00
Dan Stillman
3194f4629f Fix size of separate Z toolbar icon on Windows and Linux
Fixes #667
2015-03-09 03:37:40 -04:00
Dan Stillman
98263fb485 Fix padding of single save button in palette
(At least on OS X. This might need to be added back for Windows/Linux.)
2015-03-08 01:43:12 -07:00
Dan Stillman
806259d187 When dropping combo buttons into panel, add two separate buttons instead
And move combo button to customization palette
2015-03-08 00:13:19 -07:00
Philipp Zumstein
e9e9527e60 Add stopPropagation to menuitem of new icon
This should solve 658
2015-03-03 00:00:36 +01:00
Aurimas Vinckevicius
efa269d382 Regression from f0bd1e77ff
Re https://forums.zotero.org/discussion/47176/beta-item-fields-mapping-to-weird-csl-variables/
2015-02-28 15:57:27 -06:00
Dan Stillman
9d353b4e25 Use Zotero.DB.MAX_BOUND_PARAMETERS instead of hard-coded number 2015-02-27 23:58:49 -05:00
Dan Stillman
126d55b3c3 Remove extra overlay.css import
(Though possibly we just want to merge zotero.css and overlay.css, since
the distinction has been mostly lost.)
2015-02-27 03:39:35 -05:00
Dan Stillman
a1bed8b5ad More icon tweaks
- New dedicated Zotero button, available in the Customize palette
- Remove "16px" Z SVG and just render "32px" one at the smaller size
  (there's a slight difference at the edges, but we should probably redo
  it anyway so that dark lines reach all the way to the bottom)
- Change "Open Zotero" back to just "Zotero", since 1) it's for closing
  too, 2) it can also just bring Standalone to the front, and 3) "Open
  Zotero" looks weird and inconsistent in the menu panel next to things
  like "Preferences"
- For now, show single large Z for combo buttons in customization
  palette with "Zotero (Combo)", though we can probably do something
  better.
- Fix some HiDPI bugs when moving items between areas

Still need a layout for the panel for the combo buttons
2015-02-27 03:35:18 -05:00
Klaus Flittner
1990240733 Restore settings to server
If the local data is to be resotres to the zotero server,
the settings like tag colors also need to be synced again.
2015-02-26 21:57:16 +01:00
Aurimas Vinckevicius
3918adf21a Hyphenate ISBN when writing to DB
Only hyphenate if we're very confident that it's a list of unhyphenated ISBNs
2015-02-24 22:42:41 -06:00
Aurimas Vinckevicius
68e7849fcf Add Zotero.Utilities.Internal.hyphenateISBN
Hyphenates ISBN-10 or ISBN-13 according to data from https://www.isbn-international.org
2015-02-24 22:42:29 -06:00
Aurimas Vinckevicius
37921b0910 Add dontValidate parameter to ZU.cleanISBN
Don't validate check digit
2015-02-24 22:40:40 -06:00
Aurimas Vinckevicius
c809dfcbc4 Use only the first ISBN for CSL JSON 2015-02-24 22:40:40 -06:00
Aurimas Vinckevicius
f0bd1e77ff Use Zotero.Utilities.itemToCSLJSON when sending items to citeproc 2015-02-24 22:40:39 -06:00
Aurimas Vinckevicius
7f52e00341 Cleanup ISBNs when importing from web/search translators
Validate, convert to ISBN-13, and list in a space-separated format
2015-02-24 22:40:39 -06:00
Dan Stillman
b478d8f204 Fix some errors if pane is opened during initialization 2015-02-24 22:07:30 -05:00
Dan Stillman
93e3f68be8 Center align and pad error paragraphs on center pane crash 2015-02-24 22:07:30 -05:00
Dan Stillman
395d596105 Don't try to add child items to collections dragging cross-library
Previously, if you dragged a standalone attachment to a collection in another
library where the item already existed as a child item, it would crash Zotero
on a collection-item constraint.
2015-02-24 15:54:34 -05:00
Dan Stillman
0ab38f1d43 Add borders to collapsed collections/items splitters
We can think about making them more wider, etc., but this makes them ever so
slightly more visible.
2015-02-23 19:48:28 -05:00
Dan Stillman
b80d4cd369 Update locales from Transifex 2015-02-23 03:43:35 -05:00
Dan Stillman
a61157f8e3 Change "Zotero" button tooltip to "Open Zotero" 2015-02-23 03:33:34 -05:00
Dan Stillman
8371749bd1 Add Zotero.clientName, set to "Zotero" by default
We should eventually replace all hard-coded uses of "Zotero" with this
for use by unofficial versions (which legally can't be called "Zotero").
2015-02-23 03:31:52 -05:00
Dan Stillman
003db7c894 Toolbar icon tweaks on OS X 2015-02-23 02:38:48 -05:00
Dan Stillman
46bed210a1 Toolbar icon tweaks on Windows 2015-02-22 19:30:16 -05:00
Dan Stillman
0f402295be Toolbar icon tweaks on Linux 2015-02-22 18:56:39 -05:00
Dan Stillman
00d9bd41b3 Fix HiDPI save icon on Linux, maybe 2015-02-22 14:11:54 -05:00
Dan Stillman
7607e49ae7 Don't color gray webpage on hover 2015-02-22 06:46:07 -05:00
Dan Stillman
1abee72233 Fix toolbar buttons on Windows
Known issues:

- Hover doesn't work on the dropmarker alone, so instead of showing the
  hover effect for each segment individually, the menu-button parts are
  highlighted together, which at least looks like a choice
- When the menu-button is disabled, it still has some hover/active
  effects.
- Tested only on Windows 7
2015-02-22 06:46:07 -05:00
Dan Stillman
a85a9a632e Decrease right-padding of middle button by 1px on OS X 2015-02-22 06:46:07 -05:00
Dan Stillman
1069b483cc Fix toolbar buttons on Linux
Known issues:

- The dropmarker segment doesn't get a background highlight color on
  hover. And now you'll notice. Sorry.
2015-02-22 06:46:07 -05:00
Aurimas Vinckevicius
7e67a34444 [WebPageDump] Fix regression from 5f8b56ef86 2015-02-21 21:51:01 -05:00
Aurimas Vinckevicius
7d70cc5886 [WebPageDump] Fix regression from 5f8b56ef86 2015-02-21 20:35:39 -06:00
Aurimas Vinckevicius
66eb40da32 [WebPageDump] More verbose log messages
Log full error stack
2015-02-21 20:32:45 -06:00
Dan Stillman
3089685b33 Fix display of some startup errors in toolbar icon tooltip 2015-02-21 20:34:25 -05:00
Dan Stillman
9a87f15956 Toolbar button overhaul
The address bar icon now lives in a new combo buttonset containing the main Z, "Save to Zotero", and a dropmarker for the former save-icon right-click menu (which we could conceivably use more heavily going forward now that it's more accessible). There's also a separate dedicated Save to Zotero (+ dropmarker) button, not shown by default, that can be swapped in for people who don't want the Z.

The tooltip for the save icon also now shows the keyboard shortcut (though that unfortunately makes for a lot of parentheses).

Known issues:

- Untested on ESR
- Untested on Linux
- Might need refinement on Windows
- Weird 1px horizontal area at bottom of save button that highlights dropmarker (at least on OS X)
- Probably needs a third button option with just the Z icon so that the main button and the save button can be placed separately (e.g., save button in toolbar, Z in panel)
- Combo buttonset needs an inactive single-icon state for the palette and either needs a state for the panel (which might need to span all three columns?) or if possible should just move the other two icons in and put itself back in the palette
- The absurd amount of time and CSS it took to get the toolbar icons looking right on OS X, since apparently no one has put a menu-button inside a combined toolbar button before
2015-02-21 04:16:34 -05:00
Dan Stillman
20d4ab2d0a Merge locales from Transifex 2015-02-19 18:08:13 -05:00
Dan Stillman
ba2a16531b Add "Show Item in Library" button to note-too-long window
TODO: other too-long errors
2015-02-19 17:44:35 -05:00
Dan Stillman
110bf42e5f Click a button in the sync error panel should close the panel 2015-02-19 17:07:48 -05:00
Dan Stillman
629f4b3cc5 Make Zotero.Error instanceof Error, and give a less ugly name 2015-02-19 17:06:59 -05:00
Dan Stillman
88be886612 Sync error icon is too close to sync icon (at least on OS X)
Might need to restore this on Windows/Linux where the button styles are
different
2015-02-19 15:42:36 -05:00
Dan Stillman
88d22601d7 Fix error saving from translator context menu (from aaeb2cec) 2015-02-19 01:29:06 -05:00
Aurimas Vinckevicius
f5cd54620b Discard redundant tags in translator tester
Zotero would discard these anyway when writing to DB. So this makes for more appropriate test cases
2015-02-18 22:39:04 -06:00
Dan Stillman
424ee72f58 Additional icon changes
- Add high-res webpage icon
- Show webpage icon in grayscale when no translator (except on hover, for fun)
- Remove pre-Australis icons
- Switch to CustomizableUI API for toolbar icon
- Move icon generation code to separate file
- Add Zotero.hiRes flag for Retina/etc. displays (available only after a window
  has loaded)

Known issues:

- While the gray is mostly to be less distracting, the gray/color distinction
  will probably be lost on most people. A separate guidance panel for the gray
  icon might help.
- On pages with frames, the webpage icon appears first and then is replaced
  with a translator icon.
2015-02-18 17:10:19 -05:00
Dan Stillman
0eefd24d92 Fix color of Z icon on OS X for current Firefox theme
The Firefox theme changed at some point since Australis to use darker,
non-gradient icons. (Sorry ESR users.)

Not sure if this needs to change on Win/Linux too.
2015-02-18 05:39:29 -05:00
Aurimas Vinckevicius
7b621420f7 Fix possible infinite loops 2015-02-17 22:12:52 -06:00
Dan Stillman
aaeb2cec9d Show address bar icon on all web pages in Firefox
The icon now will save using a translator if possible and otherwise fall back
to creating a web page item. This also removes the "Create Web Page Item from
Current Page" button.

Let's see how this feels. (Pushing it to the beta so more people can try it.) I
think we ultimately should do this, but my main concern with this
implementation is that it's just too distracting, since the icon disappears and
reappears on every page. A persistent, possibly monochrome icon that was just
sometimes disabled (as is the case for the Firefox bookmark toolbar icon) might
be better.

Regardless of the approach, there are some follow-up tweaks that should be made:

- The same thing in the connectors
- Context-menu options
- Different icons and descriptions for different file types (PDF, image)?
- Adjust guidance text? Have separate guidance panels for web vs. translation?
2015-02-17 03:43:45 -05:00
Dan Stillman
47a062c9a8 Fix potential infinite loop dragging large HTML notes 2015-02-17 01:39:40 -05:00
Dan Stillman
42c55ee5f3 Fix file sync error with filenames containing slashes
These shouldn't exist, but something either didn't used to or still isn't
protecting against them, so strip them in getFile().
2015-02-16 17:26:51 -05:00
Simon Kornblith
64f7710877 Merge pull request #409 from aurimasv/cookies
Manage cookies received from other hosts.
2015-02-14 13:24:58 -05:00
Dan Stillman
161733b207 Merge pull request #630 from aurimasv/attach-url
Don't try to parse path if it looks like a web URL
2015-02-11 01:22:39 -05:00
Dan Stillman
884132ac8b Merge pull request #629 from aurimasv/varDump-exception
Handle XPCOM Exceptions in varDump
2015-02-11 01:18:48 -05:00
Dan Stillman
62aa5acc0d Fix NO_INTERFACE console error after itembox/tagsbox edit in Fx36
In Fx36+, QIing the scrollbox to nsIScrollBoxObject throws NO_INTERFACE,
presumably because https://bugzilla.mozilla.org/show_bug.cgi?id=364612
was implemented in some other ticket.
2015-02-10 22:45:51 -05:00
Aurimas Vinckevicius
cae9a89b9d Fix syntax error in varDump 2015-02-10 21:26:50 -06:00
Simon Kornblith
aeada8032c Fix XML-based import, export, and search translators on Firefox 36 2015-02-10 22:01:52 -05:00
Aurimas Vinckevicius
264e1f8835 Don't try to parse path if it looks like a web URL
Also, cleaner parsing messages
2015-02-10 20:50:08 -06:00
Aurimas Vinckevicius
8e25a4bdf3 Handle XPCOM Exceptions in varDump 2015-02-10 20:49:16 -06:00
Dan Stillman
1afa1ffea6 Update submodules, repotime, and versions 2015-02-10 00:13:42 -05:00
Dan Stillman
a98e6ab4fb Merge pull request #627 from aurimasv/connector-double-proxy
Don't proxify proxied hosts
2015-02-09 04:57:47 -05:00
Dan Stillman
f7a2ef6698 Merge pull request #614 from aurimasv/file-attachments
Allow file paths to be specified in attachment.url
2015-02-09 04:49:42 -05:00
Aurimas Vinckevicius
82998e986e Don't proxify proxied hosts 2015-02-09 00:57:56 -06:00
Dan Stillman
f04ae4ce47 Update "Swap First/Last Names" case, in preparation for #605 2015-02-07 05:31:51 -05:00
Aurimas Vinckevicius
ed2b6ccec3 Don't promote attachment.url to attachment.path
...but allow demoting from path to url if necessary.
2015-02-04 03:20:11 -06:00
Aurimas Vinckevicius
cf9ec26eb4 Disallow attachment.path in web/search translators 2015-02-04 02:54:13 -06:00
Dan Stillman
424af025b3 Merge pull request #608 from COV-Steve/4.0
Fix for OpenURL 0.1 resolver detection
2015-02-03 22:28:17 -05:00
Aurimas Vinckevicius
27502a60b2 Disable expand/collapse shortcuts in coll. tree when in-line editing 2015-02-03 14:43:52 -06:00
Dan Stillman
3aaf9e341c Fix NO_INTERFACE error after entering tag in tags box 2015-02-03 15:36:01 -05:00
Dan Stillman
6f811cbbd0 Update submodules 2015-02-03 00:51:46 -05:00
Simon Kornblith
449086672c Fix #619, Retrieve metadata via Google Scholar broken in Firefox 31-34 2015-02-02 23:28:59 -05:00
Dan Stillman
496d4c5e77 Properly show saveURI errors in Zotero.Attachments.importFromURL() 2015-02-01 21:09:13 -05:00
Dan Stillman
f5c173b1e5 Fix saving files from translators
(More breakage from 5f8b56ef8)
2015-02-01 21:07:24 -05:00
Dan Stillman
fb8149e6db Clarify icon comment 2015-01-31 16:01:53 -05:00
Dan Stillman
bcacb79489 Fix remote file saving
5f8b56ef8 was so many different kinds of broken
2015-01-31 15:23:58 -05:00
Frank Bennett
5cfe4db098 Use nav-bar as target ID for Zotero nav bar icon
The statusBarIcon pref is retained to maintain state across
starts.
2015-01-30 22:42:34 +09:00
Dan Stillman
9232dd5247 Merge locales from Transifex, though it's all Greek to me 2015-01-30 04:45:41 -05:00
Dan Stillman
7aff743da6 Remove trailing space 2015-01-30 04:45:40 -05:00
Dan Stillman
f04b641f3c Merge pull request #617 from aurimasv/content-handler
Content handlers
2015-01-30 04:09:03 -05:00
Dan Stillman
d8f2d4b268 Merge branch 'fx36-saveURI' into 4.0 2015-01-30 03:56:58 -05:00
mizu
5f8b56ef86 Fix saveURI() in Firefox 36+ 2015-01-30 03:55:35 -05:00
Dan Stillman
783ba4a0b7 Merge pull request #618 from aurimasv/prefs-unicode
Retrieve unmangled unicode strings from preferences
2015-01-30 03:42:34 -05:00
Aurimas Vinckevicius
ab7fc1614d Fix bug in collectionTreeView that caused tree row loss
...when collapsing/expanding group libraries
2015-01-29 19:31:55 -06:00
Aurimas Vinckevicius
d98a79c33f Fix typo in item field caching code 2015-01-29 19:31:54 -06:00
Aurimas Vinckevicius
9574e56ad6 Convert itemType to itemTypeID in itemTreeView.js, not items.js
itemType comes from the column name in the tree view, so it makes most sense to do it there. Otherwise, Zotero was complaining about invalid field somewhere
2015-01-29 19:31:54 -06:00