Commit graph

3608 commits

Author SHA1 Message Date
Dan Stillman
a417c9ef59 Fix window height bug in Zotero preferences, and reorganize code
Prefpanes are now in separate overlays, which fixes the age-old resizing
bug when switching between panes (at least on OS X) that varied
depending on the initial pane. Code has also been moved into
pane-specific files and objects, with strict mode enabled. When calling
code from another pane (e.g., for a UI update in another pane), first
check whether the Zotero_Preferences.[Pane] object exists--if it doesn't
then nothing needs to be called.

This change breaks the word integration plugin pref overlays, which
hopefully can be rewritten to work with either overlay format.

There is a good chance that this breaks some other things in the
preferences too.

Fixes #243
2013-03-20 05:10:38 -04:00
Dan Stillman
41e2f3008e Sort empty titles last when title isn't primary sort
When sorting by Title, empty titles get sorted to the top of the items
list for visibility, but when sorting by another column and using the
title as a secondary/tertiary sort, empty titles should get sorted last
so that new empty items go to the end of the list rather than the
middle.

This is a little weird, and the alternative would be to just always sort
empty titles last even when sorting by Title, but this preserves the
current behavior for Title sorting. (Before f0f6772b01 titles weren't
used for secondary sorting at all, so there's no precedent for
title-sorting behavior when sorting by another column.)

Addresses #275
2013-03-19 15:59:40 -04:00
Dan Stillman
d69dc3d5a7 If Year column is visible and not Date, don't sort by full date
Otherwise use full date, even if Date column is hidden

Addresses #275
2013-03-19 15:42:39 -04:00
Dan Stillman
1647f28135 Fix error selecting separator above Group Libraries
This is super annoying, but I can't seem to stop the separator row from
being selected in seltype="single" mode (where isSelectable() isn't
called). Until we have a better solution, at least clear the items list
and avoid an error.
2013-03-19 06:53:48 -04:00
Dan Stillman
78618ff88b Fix collections-containing-an-item highlighting in Fx22+ 2013-03-19 06:16:11 -04:00
Dan Stillman
b1f80a3615 Use dateAdded rather than dateModified for final fallback sort
Addresses #275
2013-03-19 06:00:11 -04:00
Dan Stillman
f0f6772b01 Sort by title after creator and date, if not primary sort
Addresses #275
2013-03-19 05:16:31 -04:00
Dan Stillman
8bd7536c2c Remove reference to missing .dtd file 2013-03-19 02:25:58 -04:00
Dan Stillman
4717e3497f Fix missing "Deleted" in CR window
Addresses #273
2013-03-19 02:25:25 -04:00
Dan Stillman
cf54a5da34 Fix code style
Refs #274
2013-03-19 02:22:33 -04:00
Aurimas Vinckevicius
cc93a0c7b8 Unbreak adding new items. Broken by dbf6bc0ee1. 2013-03-19 01:05:53 -05:00
Simon Kornblith
67bccfc9fe Only show annotation toolbar on pages that already have annotations 2013-03-18 20:37:27 -04:00
Dan Stillman
22f9fc04a8 Fix update marking for uploaded file versions that exist remotely
If a file version existed on the server, the uploaded attachment wasn't
marked as updated until the next sync.
2013-03-18 20:28:16 -04:00
Dan Stillman
47299c9e85 Remove debug line and update error message 2013-03-18 20:27:54 -04:00
Dan Stillman
8e1b8022ad Download locally existing remotely modified files in on-demand mode
If a file doesn't exist locally it won't be downloaded until opened, but
if a file does exist locally and has been modified remotely the latest
version will be downloaded at sync time regardless of the file sync
mode. (If a locally existing file has been updated remotely, just
opening it won't currently download the latest version. You have to
sync. This may change in the future.)
2013-03-18 20:21:48 -04:00
Dan Stillman
0853dbc070 Fix problem with items list scrollbar size between views
Caused by 2cd45be191, though not sure why it's happening.
2013-03-17 16:12:46 -04:00
Simon Kornblith
c457139573 Merge pull request #270 from aurimasv/RDFimport
Fix RDF import for large notes
2013-03-17 13:05:14 -07:00
Dan Stillman
9796e60617 Don't update item when tabbing through empty Date field 2013-03-17 03:49:31 -04:00
aurimasv
f3bda1643d Normalize DOM nodes after parsing 2013-03-17 02:43:41 -05:00
aurimasv
d974c78cef Add $rdf.log.error for rdflib.js 2013-03-17 02:43:41 -05:00
aurimasv
dbf6bc0ee1 Don't attempt to mark changes when creating new item. 2013-03-17 02:43:41 -05:00
Dan Stillman
36eae6ad00 Update child attachment order when renaming attachment
Also show "1" next to child attachments with embedded notes
2013-03-17 03:14:29 -04:00
Dan Stillman
9bddef21b7 Fix collection row selection issue on Windows 2013-03-17 02:41:43 -04:00
Dan Stillman
5a863d97c8 Context-menu string cleanup
- Remove all "Selected" from "Selected Item", because that's how a context menu works
- Change "Remove Selected Item" to "Remove Item from Collection" (fixes #122)
- Change "Delete Selected Item from Library" to "Move Item to Trash")
- Change "Remove" on Duplicate/Unfiled Items to "Hide" (fixes #122)
- Change "Create Parent Item from Selected Item" to "Create Parent Item"
2013-03-17 01:22:47 -04:00
Simon Kornblith
3c6728e30f Remove unnecessary version checking code 2013-03-16 23:51:34 -04:00
Dan Stillman
022ee4481b Add "Delete Collection and Items..." context-menu option
Also update collection/search deletion dialogs with better button text and no more "[JavaScript Application]"
2013-03-16 22:55:50 -04:00
Dan Stillman
5f283a6b7f Fix tag selector glitch after removing last tag, again
Better fix than 4e1fbf9747
2013-03-16 16:25:58 -04:00
Dan Stillman
0f87772b97 Fix broken checkboxes in tag selector context menu (OS X only?)
On OS X, the checked state of <menuitem type="checkbox"/> still doesn't
work right if set before the menu is opened. To get around this, the
state is now set manually in onpopupshown(). There's an annoying delay
before the UI update, but this is better than nothing.
2013-03-16 16:25:58 -04:00
Dan Stillman
fec159f969 Fix error on tag change without a selected item (from 1e59c5ab7) 2013-03-16 16:25:58 -04:00
Dan Stillman
6dbe1d1e19 Show colored tags in tag selector in all views
Always show colored tags at the top of the tag selector, regardless of
whether they're in the current scope. If not, they're shown with reduced
opacity (as an equivalent to the gray style for out-of-scope tags in
Display All Tags mode). As a corollary, colored tags are now shown even
if they have no associated items and will remain until they're
explicitly deleted.

Also:

- Don't show outline on out-of-scope tags in "Display All Tags" mode
2013-03-16 16:25:51 -04:00
Dan Stillman
2b7d7ebfbf Don't rely on object property order to sort tags
It works, but in theory it's not guaranteed in JS.
2013-03-15 17:44:07 -04:00
Dan Stillman
2b4f2e3a0f Merge branch '3.0' into 4.0 2013-03-15 17:01:44 -04:00
Dan Stillman
d726ce41fa Fixes incorrect post-edit scrolling
Fixes #268, broken in 2cd45be191

Post-edit scrolling can probably be smarter, but this fixes the brokenness.
2013-03-15 16:56:55 -04:00
Dan Stillman
a1197883bb Disable key navigation on 1-6 keys if any tag colors are assigned
Previously any unused numbers were still available for key navigation, but I
think it's too easy hit the wrong key that way, and getting moved to another
part of the items list is annoying.
2013-03-15 14:09:31 -04:00
Dan Stillman
3faa8949ef Fix glitch entering tag with whitespace
If an existing colored tag was added to an item with whitespace around it, the
tag didn't immediately show up with a color.
2013-03-15 04:39:57 -04:00
Dan Stillman
1e59c5ab7e More tags box fixes (follow-up to f932f312eb)
Use the Notifier for all tags box updates to ensure that it always updates.

Also fix the tag count and some other things.

Post-tab focus still isn't 100% correct in all situations, but it's real close.
2013-03-15 04:13:14 -04:00
Dan Stillman
4e1fbf9747 Fix clearing selected tag when removed from last item in view
I somehow broke this in d2f028d797, though
I'm not sure how.
2013-03-14 20:06:34 -04:00
Dan Stillman
d60b0221db Fix error trying to toggle colored tag with no tag
(This should be fixed so that the setting is always removed, though.)
2013-03-14 19:03:20 -04:00
Dan Stillman
e20bd35756 Don't clear other tag colors when rename colored tag 2013-03-14 19:00:52 -04:00
Dan Stillman
0f85b07aad 3.1 is now 4.0 2013-03-14 01:27:54 -04:00
Dan Stillman
0191601f9f Fix items tree styling (context rows, attachment pies) in Fx22+ 2013-03-13 00:00:27 -04:00
Dan Stillman
d5bfed1c96 Missed changed from 0cd3a34e14 2013-03-12 21:10:11 -04:00
Dan Stillman
487ce7183b Make tag color chooser window wider
Follow-up to d2f028d79
2013-03-12 20:54:53 -04:00
Dan Stillman
0cd3a34e14 Properly handle sync errors thrown from Zotero.HTTP.promise() 2013-03-12 19:58:31 -04:00
Dan Stillman
fe3ad1883d Use API version 2 2013-03-12 19:57:47 -04:00
Dan Stillman
1217a5409e Fix Control (and Alt) key shortcuts in items pane on Windows
Follow-up to d2f028d and 0a7cc4448
2013-03-12 02:13:35 -04:00
Dan Stillman
65488b56b6 Remove debug output 2013-03-11 21:42:47 -04:00
Dan Stillman
c270766540 Skip repeated file syncs for libraries with no uploaded files 2013-03-11 21:41:51 -04:00
Simon Kornblith
d25d49de66 Extract PMCID from extra field 2013-03-10 16:58:34 -04:00
Simon Kornblith
687997e963 Parse PMIDs from extra field 2013-03-10 16:17:54 -04:00
Simon Kornblith
2f8f18c957 Ensure that arrays are not strings 2013-03-10 16:17:54 -04:00
Dan Stillman
b7c0427167 Fix various file sync issues
- Clear per-library error icon on new sync
- Pass upload errors through to end
- Don't make WebDAV verification error a global failure
- Some other things
2013-03-10 01:49:14 -05:00
Dan Stillman
c8386fb40b Merge pull request #260 from aurimasv/duplicates
Duplicates
2013-03-09 10:29:45 -08:00
Dan Stillman
a921c57d5d Remove old tags box code from itembox.xml 2013-03-09 03:15:01 -05:00
Dan Stillman
f932f312eb Overhaul tags box
- Improvements to #20, with the tags box switching to a multiline
  textbox in the style of #164 on a multiline paste or Shift-Return. In
  the multiline box, Return is a newline and Shift-Return saves
- Allow tabbing through tags via keyboard (and keep the last empty
  textbox open on tab, so you can hold down the tab key to get all the
  way to the end)
- Fix various post-update focusing issues (though the wrong textbox is
  still selected for some multiline updates via Tab/Shift-Tab)
- Make (single-line) tag entering much faster by not reloading the whole
  tags list and just placing the new tag in the correct sorted position.
  This could be made even faster with tag selector optimizations.
- Allow the Add button to focus when switching to the Tags pane (and the
  same for the Related pane, for good measure)
2013-03-09 03:05:29 -05:00
Aurimas Vinckevicius
d30ab9cc4f [duplicates] DOIs are not case sensitive 2013-03-07 19:38:24 -06:00
Simon Kornblith
d291084af6 Escape backslash 2013-03-07 19:47:57 -05:00
Simon Kornblith
acd6d38a1e Don't break when DOI is not a string 2013-03-07 19:46:37 -05:00
Dan Stillman
5f4bb73564 Always return order property from strToDate()
Broken in merge 995091d0
2013-03-07 18:35:54 -05:00
Dan Stillman
7f25572e49 Update submodules 2013-03-07 18:17:13 -05:00
Dan Stillman
995091d0a1 Merge branch '3.0' into 3.1
Conflicts:
	chrome/content/zotero/xpcom/date.js
2013-03-07 18:15:03 -05:00
Dan Stillman
dec5af4d6a Fix file sync error 2013-03-07 16:05:14 -05:00
Simon Kornblith
b5d07e1951 Use hostPort for debug messages 2013-03-07 15:59:21 -05:00
Dan Stillman
3c0e4a2ce4 Don't sync updated settings more than once 2013-03-07 15:23:15 -05:00
Dan Stillman
6ea38df873 Don't sort Year column by full date 2013-03-06 16:41:02 -05:00
Dan Stillman
398cf765f5 Zotero.File.getBinaryContentsAsync()
Currently unused, but we might need it at some point
2013-03-06 15:48:00 -05:00
Dan Stillman
b3cb1dbe5e Fix tag colors in the items pane in XPI builds 2013-03-06 15:35:46 -05:00
Dan Stillman
d9197235d5 Fix whitespace (from 53322e6e) 2013-03-06 14:32:31 -05:00
Dan Stillman
ca0ad42a6a Fix Z pane brokenness with no titled items (from 53322e6e) 2013-03-06 14:32:02 -05:00
Dan Stillman
de1983bf9f Fix hover effect on unedited item tags (broken in 59913cc5) 2013-03-06 06:22:14 -05:00
Dan Stillman
fc104e345b Remove color swatch for last-removed tag color 2013-03-06 05:28:43 -05:00
Dan Stillman
0a7cc44481 Fix Select-All on Windows (broken by d2f028d) 2013-03-06 04:52:27 -05:00
Simon Kornblith
578ba29cc5 Merge pull request #242 from aurimasv/date
Always return year as number in strToDate
2013-03-05 15:40:53 -08:00
Dan Stillman
490a176dcd Remove whitespace from localized strings
Follow-up to #264
2013-03-05 18:08:26 -05:00
Dan Stillman
61aef48381 Add LTR/RTL toggle in notes
Initialize the note editor with the default directionality based on the current locale, and add a single button for the opposite direction that functions as a toggle. This avoids needing two buttons.

We should also add locales to TinyMCE, but we can do that separately.

Closes #157
2013-03-05 17:51:30 -05:00
Dan Stillman
5b367b6ac1 Tweaks to name-swapping menu
- Don't show menu if item isn't editable
- Make DOM access more robust
- Fix whitespace
2013-03-05 15:35:15 -05:00
Dan Stillman
c6afb86ba6 Put "Swap first/last names" in creator context menu root
And remove "Transform Name Form" menu for now

Discussed in #132
2013-03-05 15:03:01 -05:00
Dan Stillman
c68196e7b5 Merge 'gracile/fbennett-patch-authors' 2013-03-05 14:58:31 -05:00
Dan Stillman
4496c8d9e9 Merge remote-tracking branch 'aurimasv/multipleLookup'
Conflicts:
	chrome/locale/en-US/zotero/zotero.dtd
2013-03-05 14:46:31 -05:00
Dan Stillman
8333c68f77 Fix trailing whitespace from #264 2013-03-05 03:43:50 -05:00
Dan Stillman
0c60911fd1 Tweaks to @gracile-fr's localization changes
Addresses #264
2013-03-05 03:43:46 -05:00
Dan Stillman
30f5679ec8 Merge remote-tracking branch 'gracile/3.1-l10n' into 3.1-l10n 2013-03-05 03:06:43 -05:00
Dan Stillman
4b46f252fd Fix error on column header click 2013-03-04 18:25:44 -05:00
Dan Stillman
9d03697591 Merge branch '3.0' into 3.1 2013-03-04 17:02:58 -05:00
gracile-fr
eb7b301073 Localizes most of the strings marked "todo: localize" 2013-03-04 03:44:37 +01:00
Simon Kornblith
ebd8dfeb65 Don't show "undefined" in attachment progress window 2013-03-03 18:59:29 -05:00
Simon Kornblith
b2a7050dea Fix PDF recognition 2013-03-03 17:04:37 -05:00
Dan Stillman
b0a71467ea Fix sorting of top-level attachments in attachments column
Also hide the attachments column by default in the select-items dialog
2013-03-03 06:23:43 -05:00
Dan Stillman
98f62c6d3f Switch notes column back to counts, and hide by default
While the attachment icon helps with on-demand download, a count is
probably more useful for notes, and between tag colors and the two
dot columns things were getting a little Dance Dance Revolution.
2013-03-03 06:23:43 -05:00
Dan Stillman
d2f028d797 Tag colors, synced settings, and (stopgap) silent DB upgrades
- New tag colors support, with the ability to assign colors to up to 6
  tags per library. Tags with colors assigned will show up at the top of
  the tag selector and can be added to (and removed from) selected items
  by pressing the 1-6 keys on the keyboard. The tags will show up as
  color swatches before an item's title in the items list.
- Synced settings, with Notifier triggers when they change and
  accessible via the API (currently restricted on the server to
  'tagColors', but available for other things upon request)
- Silent DB upgrades for backwards-compatible changes. We'll do
  something fancier with async DB queries in 4.0, but this will work for
  changes that can be made without breaking compatibility with older
  clients, like the creation of new tables. The 'userdata' value is
  capped at 76, while further increments go to 'userdata2'.

TODO:

- Try to avoid jitter when redrawing swatches
- Optimize tag color images for retina displays
- Redo attachment dots in flat style?
- Clear all colors from an item with 0 (as in Thunderbird), but I don't
  think we can do this without undo
2013-03-03 06:23:25 -05:00
Aurimas Vinckevicius
f64d087926 Don't set unknown mimeTypes to "application/octet-stream" 2013-03-02 19:15:43 -06:00
Aurimas Vinckevicius
cf8a2c2635 Make sure that year is always returned as string 2013-03-02 19:08:36 -06:00
Aurimas Vinckevicius
6dd94f0a3a When mimeType is not supplied, try to fetch it from server and redo checks for automatic snapshots. 2013-03-02 18:45:38 -06:00
Dan Stillman
aa458dcd63 Merge pull request #261 from gracile-fr/3.1-quickSearch-date
Include dateDecided, dateEnacted, issueDate in "Title, Creator, Year"
2013-03-01 16:31:02 -08:00
gracile-fr
58e6f5e07e Allow searching for dateDecided (case), dateEnacted (statute), issueDate (patent) in the "Title, Creator, Year" quicksearch mode. 2013-03-02 00:29:49 +01:00
gracile-fr
d69ffd2ad8 localize sync.js 2013-03-01 18:37:25 +01:00
Simon Kornblith
68f5202eb6 Merge pull request #218 from aurimasv/mutation
Allow translators to re-trigger detectWeb on DOM changes
2013-03-01 09:24:32 -08:00
Simon Kornblith
42d15bf2db Merge pull request #250 from aurimasv/parentTranslator
parentTranslator in detect calls
2013-03-01 09:24:19 -08:00
aurimasv
c4f008a97d Keep track of currently loaded translator 2013-03-01 03:29:11 -06:00
gracile-fr
217929a3ea more localization 2013-02-28 23:31:07 +01:00
gracile-fr
cc2f7836f8 localization preferences pane 2013-02-27 17:13:48 +01:00
Dan Stillman
cc39ee8144 Show the startup error in the alert 2013-02-27 04:50:51 -05:00
Dan Stillman
25563d2e04 Merge branch '3.0' into 3.1 2013-02-25 12:49:26 -05:00
Dan Stillman
f92ed125b6 Merge branch '3.0' into 3.1
Conflicts:
	chrome/content/zotero/tinymce/note.html
	chrome/content/zotero/tinymce/noteview.html
	chrome/content/zotero/xpcom/zotero.js
	install.rdf
	update.rdf
2013-02-25 12:46:43 -05:00
aurimasv
53322e6ea0 Duplicate detection tweaks (take 2) 2013-02-24 05:48:11 -06:00
Simon Kornblith
4d2cee7824 Support journal abbreviations
Currently disabled by default
2013-02-24 05:57:28 -05:00
Dan Stillman
475b290600 Revert "Merge pull request #252 from aurimasv/patch-1"
This reverts commit d2e42bda29, reversing
changes made to 8f263d0fd9.
2013-02-24 03:39:14 -05:00
Aurimas Vinckevicius
42f9aaa8a1 Tweaks to duplicate detection 2013-02-24 02:17:49 -06:00
Dan Stillman
e4afbbfcea Unprefix some CSS properties 2013-02-22 18:48:59 -05:00
Dan Stillman
937c0a3a3a Fix error in in Error Conosle when clicking on some items 2013-02-22 18:41:49 -05:00
Dan Stillman
d68d510547 Move relative paths pref code into its own object 2013-02-21 06:24:46 -05:00
Dan Stillman
ed94d84a93 Code style/consistency updates for relative path changes 2013-02-21 06:24:46 -05:00
Dan Stillman
27a2a9c1f7 More relative path changes
- If attachment exists at same relative path in new base directory,
  leave it alone so that it continues to work.
- If attachment doesn't exist in new base directory, revert it to an
  absolute path.
- If new base directory is an ancestor or descendant of the previous
  base directory, adjust relative paths below the new directory so that
  they keep working.
- More dialog changes
- Select current base directory in file picker when changing directory
- Always use .persistentDescriptor instead of initWithPath(), though it
  probably doesn't matter, and wrap in try/catch in case the old setting
  is broken in some way.
- New function Zotero.File.directoryContains(dir, file), since
  nsIFile.contains() isn't recursive
- Don't use a private Zotero.Item property from outside to force path changes.
2013-02-21 06:24:46 -05:00
Dan Stillman
f1eb356c19 Relative path support changes
- Changed placeholder to just "attachments:" for consistency with "storage:"
- Reworked dialog text
- Use a fancier (and undocumented) filefield XUL element for path
- A few small code tweaks
2013-02-21 06:24:46 -05:00
Dan Stillman
69cb928d6c Move zotero.org version header pref to Advanced
Translator updates and broken translator reporting both make automatic
requests to zotero.org, but the version pref is just adding a header
with the Zotero version on existing requests.
2013-02-21 06:24:46 -05:00
Dan Stillman
7bc19c0cd3 Separate "Advanced" prefpane into "General" and "Files and Folders" 2013-02-21 06:24:46 -05:00
Will S
b224c5cf66 Relative path support for linked files 2013-02-21 06:24:46 -05:00
Dan Stillman
d4771c5f0d Focus preferences window if already showing
Previously, if the prefwindow was behind another window, nothing would
happen when opening the preferences.
2013-02-19 16:27:16 -05:00
Dan Stillman
6e9167aef1 Fix cancel button in WebDAV verification 2013-02-19 06:10:57 -05:00
Dan Stillman
6c28e61032 More file sync fixes 2013-02-19 05:55:42 -05:00
Dan Stillman
918cb2ef1b Fix focusing of WebDAV password field on verification auth failure 2013-02-19 05:01:37 -05:00
Dan Stillman
dba00c7cea Don't Base64-encode filenames in ZIP files
Existing encoded filenames will still be read correctly
2013-02-18 23:47:49 -05:00
Dan Stillman
80e7f1c6c1 Various file sync fixes 2013-02-18 22:41:44 -05:00
Dan Stillman
bc800ddc30 Fix WebDAV verification feedback 2013-02-18 22:41:44 -05:00
Simon Kornblith
d14c3fcc92 Avoid importing Q into page scope 2013-02-18 21:40:36 -05:00
Simon Kornblith
ab2cbb0808 Avoid some unnecessary citation updates 2013-02-18 17:21:06 -05:00
Simon Kornblith
6d095b5025 Revert "Load as JS 1.8, to avoid throwing on "for each" for now"
This reverts commit b938ce5fdd.

Not necessary since Mozilla bug 830665 is fixed
2013-02-18 16:16:18 -05:00
Simon Kornblith
d1225c44f7 Revert "Add type="application/javascript;version=1.8" to all JS script tags (for now)"
This reverts commit 35b1c16858.

Not necessary since Mozilla bug 830665 is fixed
2013-02-18 16:15:44 -05:00
Simon Kornblith
6b2bbf80e1 Fix things so that they (hopefully) don't break under latest Q 2013-02-18 16:06:31 -05:00
Dan Stillman
8f5145f555 Version bump 2013-02-18 05:02:25 -05:00
Dan Stillman
82a8d9e2ae Fix items list freezing in some situations 2013-02-18 04:59:16 -05:00
Dan Stillman
81f67d0ef9 Fix Firefox charset warning displaying note editor 2013-02-18 03:50:24 -05:00
aurimasv
63b9c9fd36 And also don't leave behind unnecessary properties. 2013-02-18 01:47:45 -06:00
aurimasv
db8b8a9662 Do not overwrite set translators 2013-02-18 01:42:08 -06:00
Dan Stillman
ccbccef597 Update versions 2013-02-18 02:37:03 -05:00
Dan Stillman
51365924a3 Accept HTTP headers in Zotero.HTTP.promise() 'options' object 2013-02-18 02:33:13 -05:00
aurimasv
72d3b8b711 Set this.translator for "detect" calls so that parentTranslator is set correctly 2013-02-18 00:16:44 -06:00
Simon Kornblith
e63364c788 Merge branch '3.0' 2013-02-18 01:03:15 -05:00
Simon Kornblith
376db8d9f0 Ensure that we treat 403 as a failure code 2013-02-18 01:02:54 -05:00
Simon Kornblith
755f2bf6f9 Set reasonable min-width and min-height for Standalone 2013-02-17 16:44:56 -05:00
Dan Stillman
ee16d96f92 Merge branch '3.0'
Conflicts:
	chrome/content/zotero/preferences/preferences.xul
	chrome/content/zotero/xpcom/storage/webdav.js
	chrome/locale/gl-ES/zotero/zotero.dtd
	chrome/locale/gl-ES/zotero/zotero.properties
	chrome/locale/zh-CN/zotero/zotero.dtd
	chrome/locale/zh-CN/zotero/zotero.properties
	install.rdf
	update.rdf
2013-02-16 05:07:59 -05:00
aurimasv
c279aef6cd Store username and url inside correct preference keys 2013-02-10 03:17:12 -06:00
Dan Stillman
331a7cef7e Fix child item duplication (UI-only) when dragging between parents 2013-02-08 02:20:53 -05:00
Dan Stillman
f941c8b6bc Update repotime, submodules, and versions 2013-02-08 01:49:31 -05:00
Dan Stillman
be48ce06b6 Allow Verify Server to pass if uploaded file doesn't exist
With any storage service backed by S3 or another eventually consistent
storage service, there will be a short delay between when files
are uploaded and when they're available, so show a more helpful message
and allow the verification to pass. (Any IIS servers configured not to
serve extensionless files will also fail, but that's probably much
rarer at this point.)

We should also just retry the request on a 404, but that will have to
happen on master.

Addresses #115
2013-02-08 00:57:20 -05:00
Dan Stillman
54af603989 Fix copying of title between book and bookTitle 2013-02-08 00:42:45 -05:00
Dan Stillman
e157d8bc57 Fix sync error downloading new item with related item 2013-02-07 17:37:04 -05:00
Dan Stillman
38cee7e625 Update repotime and submodules 2013-02-07 01:07:03 -05:00
Simon Kornblith
548a6db761 Merge pull request #237 from aurimasv/web-title
Consider type-specific "title" alternatives for validating web translations
2013-02-06 18:12:30 -08:00
gracile-fr
81186be076 -Display the Year for types which don't have a proper "date" field (case, patent, statute) in the item description box and in the bubble. (includeBaseMapped set to true in item.getField).
-Display the Title for types which don't have a proper "title" field  (case, email, statute) in the bubble (use getDisplayTitle).
2013-02-07 00:10:49 +01:00
Simon Kornblith
951ea82cb6 Update to citeproc-js 1.0.425 2013-02-06 01:51:07 -05:00
Simon Kornblith
5afeb9d721 Update to citeproc-js 1.0.425 2013-02-06 01:50:38 -05:00
Dan Stillman
0061ff3ca5 Merge branch '3.0'
Conflicts:
	chrome/content/zotero/preferences/preferences.xul
	chrome/content/zotero/xpcom/data/item.js
	chrome/content/zotero/xpcom/utilities_translate.js
2013-02-04 07:02:38 -05:00
Dan Stillman
e2ea7532ba Fixes #47, Dragging attachment to item removes search results 2013-02-04 04:08:34 -05:00
Dan Stillman
194343cb0f Don't update item when leaving an empty field
It looks like this has been happening for at least all of 3.0, including
when tabbing between empty fields.
2013-02-04 03:40:57 -05:00
Dan Stillman
1b1df60725 Make X-Zotero-Version and RIS/Refer prefs Firefox-only 2013-02-04 02:05:04 -05:00
Dan Stillman
650c393507 Expose launchNonNativeFiles hidden pref in Firefox
"Open PDFs and other files within Firefox when possible"
2013-02-04 01:56:29 -05:00
Dan Stillman
2cd45be191 Avoid unnecessary UI updates in various situations
beginUpdateBatch() doesn't suppress select events, so various batch
operations were triggering lots of extra selects.

This hopefully fixes the long hang some people were seeing when making
changes with an open quick search (which I was only able to reproduce in
Standalone).
2013-02-04 00:06:27 -05:00
Dan Stillman
dfdfbf1258 Properly clear temp DB tables from items list generation 2013-02-03 06:12:23 -05:00
Dan Stillman
2a0c95d0ad Cache list of an item's child attachments/notes 2013-02-03 06:10:58 -05:00
Dan Stillman
190fe8ba05 Don't leak a hidden browser for every single imported text/HTML file
It is possible we have been doing this for a very long time.

(Only local imports were affected, not snapshot saving.)
2013-02-03 02:55:30 -05:00
gracile-fr
f0ad251097 Localization of hardcoded "Quick Format Citation" dialog title 2013-02-02 15:31:41 +01:00
Dan Stillman
1a0849e489 Fix and change extraData for item change notifications
- Some item changes were putting data in the wrong form into extraData,
  which was keeping it from being passed through in notifications.
- For item modifications, set a 'changed' object, keyed by itemID, with
  just the fields that changed as keys and their old values. For
  deletes, keep the 'old' object for now, since sync relies on it.
- Remove item.serialize() for all item changes except deletions, which
  should speed up writes (and which will leave extraData empty for some
  changes).
- Currently only item fields, creators, related items ('related'), and
  'parentItem' are added to 'changed'.

Closes #220
2013-02-02 05:55:38 -05:00
Simon Kornblith
b08e52363b Merge pull request #229 from aurimasv/args
Add a way for translators to pass arguments to callbacks for HTTP requests
2013-01-31 20:00:53 -08:00
Aurimas Vinckevicius
6b878ba9f1 Delete hidden browser even if processDocuments exception handler does not fail. 2013-01-31 19:53:28 -06:00
aurimasv
eed6d2f22c Pass responseCharset to subsequent doGet calls 2013-01-31 19:42:06 -06:00
Dan Stillman
13a2bb99e1 Tweak patch from 41de387 to keep file style consistent 2013-01-31 17:45:55 -05:00
Aurimas Vinckevicius
41de3876d8 Fall back to link attachments for opening item 2013-01-31 16:17:53 -06:00
Dan Stillman
0eb4db7c33 Merge pull request #235 from aurimasv/webdav
Tweaks to WebDAV preferences
2013-01-30 23:37:45 -08:00
Simon Kornblith
6de5cb4ab1 Merge branch '3.0'
Conflicts:
	chrome/content/zotero/recognizePDF.js
	chrome/content/zotero/zoteroPane.js
2013-01-31 01:51:54 -05:00
Simon Kornblith
6dd420458f Detect CAPTCHA 2013-01-29 17:45:57 -05:00
aurimasv
b919d27d1e Allow web translators to monitor DOM nodes for changes in order to re-trigger detectWeb 2013-01-29 03:25:05 -06:00
Dan Stillman
7cd3479094 Use eraseByURI() instead of eraseByURIPrefix(), and fix params 2013-01-29 04:03:56 -05:00
Dan Stillman
56bb5b17ad Better MIME type detection of Office files
For at least one Windows user, a .docx file was being interpreted as
text/plain. Instead of relying entirely on the system, hard-code some
extensions we know. (More can be added.)

Also:

- Determine MIME type when opening files instead of using stored type,
  since we might have gotten smarter
2013-01-28 22:44:02 -05:00
Simon Kornblith
64a40cda69 Fix first run (broken by d64379290c) 2013-01-28 18:41:32 -05:00
Simon Kornblith
2c04b62a9e Increase use of _translatorInfo to avoid breaking translation-server 2013-01-28 16:24:29 -05:00
Simon Kornblith
a0f1bbf8a6 Fix code for determining whether to use defaultView as sandbox scope 2013-01-28 15:58:35 -05:00
Simon Kornblith
6520a71788 Merge pull request #236 from aurimasv/generateDiff
[Zotero_TranslatorTester] Move _generateDiff  and _compare out of prototype
2013-01-27 22:33:50 -08:00
aurimasv
9c7d3c3c4e Consider type-specific "title" alternatives for validating web translations 2013-01-27 05:27:36 -06:00
aurimasv
baf772741b [Zotero_TranslatorTester] Move _generateDiff and _compare out of prototype 2013-01-27 02:34:08 -06:00
aurimasv
7e808b9997 Tweaks to WebDAV preferences 2013-01-27 01:40:02 -06:00
Simon Kornblith
0417a1910d Detect CAPTCHA and stop trying to hit Google Scholar 2013-01-26 02:36:23 -05:00
Simon Kornblith
6f31a3d31a Limit Google Scholar queries to one per 1.5 seconds
Hopefully, this will stop our users from getting locked out.
2013-01-26 02:06:00 -05:00
Simon Kornblith
f9978e8f02 Update citeproc-js to 1.0.422 2013-01-26 01:49:20 -05:00
Simon Kornblith
1c3890e837 Merge branch '3.0' 2013-01-26 00:29:08 -05:00
Simon Kornblith
22eea572e2 Merge pull request #234 from aurimasv/cleanISSN
[Utilities] add cleanISSN
2013-01-25 19:47:25 -08:00
Simon Kornblith
5465c885e5 Tweaks to getHiddenPref()
- Remove references to configOptions, displayOptions, and hiddenPrefs
  from connector/translator.js. We can't rely on them to be set in
  Zotero.Translator since https://repo.zotero.org/repo/metadata doesn't
  provide them, but we shouldn't need them until we get the translator
  code anyway.
- Don't serve configOptions, displayOptions, and hiddenPrefs from Zotero
  Standalone server. There's no point in serving anything that
  https://repo.zotero.org/repo/metadata doesn't.
- Alias the translator metadata loaded into the sandbox as
  Zotero.Translate._translatorInfo. Use this to get configOptions and
  hiddenPrefs.
- "v" browserSupport indicates that a translator can be run through
  translation-server, not that translation-server is required.

This obviates the need for zotero/zotero-connectors#4.
2013-01-25 22:40:14 -05:00
aurimasv
0c38ce03ac Allow translators to define translator-specific hidden preferences. 2013-01-25 22:40:14 -05:00
Aurimas Vinckevicius
1f08592d0e [Utilities] add cleanISSN 2013-01-25 21:25:04 -06:00
Simon Kornblith
bd688f333c Merge branch '3.0' 2013-01-22 23:05:15 -05:00
Dan Stillman
5b34dce40f Remove "Try to override conflicting shortcuts" pref
I probably should have removed this years ago in 292c357e when I made
the shortcut keys only work within the Zotero pane.
2013-01-22 18:38:00 -05:00
Simon Kornblith
39e8b226cb Revert "Don't refresh item list upon tag selector actions unless the action changes the item list."
This reverts commit 7f732f56df.
2013-01-22 17:25:50 -05:00
Simon Kornblith
b3640a8ae1 Recognize multiple items properly 2013-01-21 23:31:52 -05:00
Simon Kornblith
0e79cf247c Only set timeout to 50 if undefined 2013-01-21 13:29:26 -05:00
Simon Kornblith
502f814fc4 Use Zotero.wait() to move progress indicator
This may help with #230
2013-01-21 04:07:07 -05:00
Simon Kornblith
7c24c27fb3 Merge pull request #231 from aurimasv/defaultHandlers
Set default handlers if they are not set
2013-01-20 23:20:46 -08:00
aurimasv
ee33da22e8 Set default handlers if they are not set (even if some other handlers are set). 2013-01-21 01:11:58 -06:00
Simon Kornblith
93cdb72e61 Merge branch '3.0' 2013-01-21 02:10:39 -05:00
Simon Kornblith
99e7235fe1 Fix source files to be UTF-8 2013-01-21 02:10:02 -05:00
Simon Kornblith
dbf2bc265f Merge branch '3.0'
Conflicts:
	chrome/content/zotero/recognizePDF.js
	chrome/content/zotero/xpcom/utilities.js
2013-01-21 02:01:08 -05:00