Commit graph

10601 commits

Author SHA1 Message Date
Abe Jellinek
60f8d11c2d Persist EPUB CFI with setAttachmentLastPageIndex() 2023-08-07 16:07:52 -04:00
Martynas Bagdonas
52e698fdbc Add missing reader strings 2023-08-07 16:07:52 -04:00
Martynas Bagdonas
3105bb9ff3 Fix add to note 2023-08-07 16:07:52 -04:00
Martynas Bagdonas
110f29b766 Save reader state into .zotero-reader-state file 2023-08-07 16:07:52 -04:00
Martynas Bagdonas
572cd3655e Fix reader context menu positioning in RTL mode 2023-08-07 16:07:51 -04:00
Abe Jellinek
f5381403c0 Add ebook font to preferences
Choose from a list of preset font stacks, or any font on your system.
2023-08-07 16:07:51 -04:00
Abe Jellinek
378277206a Add Reset Zoom to EPUB/snapshot reader View menu 2023-08-07 16:07:51 -04:00
Abe Jellinek
3be3d8ebef Zotero.Items: Support EPUB and snapshot annotations 2023-08-07 16:07:51 -04:00
Martynas Bagdonas
681cdd809f Reader 2.0 2023-08-07 16:07:51 -04:00
Tom Najdek
19382a061f
Remove unnecessary code in getFileBaseNameFromItem 2023-08-07 17:03:27 +02:00
Dan Stillman
88d39ec04a Update locales from Transifex 2023-08-06 18:31:05 -04:00
Dan Stillman
4e3977e9ce Update file-renaming prefs (#3228)
- Move file-renaming prefs to separate prefs section
- Fix template preview not updating on paste
- Update documentation URL
- Tweak text, styling, and ids
- Change "Automatically rename attachment files using parent metadata"
  to "Automatically rename locally added files" to reflect that
  downloaded files are always renamed, and add an intro saying so
2023-08-06 17:50:13 -04:00
Tom Najdek
d32b061c95 Add UI for editing attachment rename format pref (#3228) 2023-08-06 17:48:56 -04:00
Dan Stillman
af91173734 Look up PubMed IDs in batches of 200
https://forums.zotero.org/discussion/comment/440245/#Comment_440245
2023-08-05 00:01:55 -04:00
Dan Stillman
fcc68d6d80 Serialize lookup requests
These were switched to parallel in 86b77cc45, resulting in blocks:

https://forums.zotero.org/discussion/106658/limited-amount-of-articles-that-can-be-added-through-pmid
2023-08-04 23:21:35 -04:00
Abe Jellinek
251da0a148 Add SCSS styles to note.xhtml
Fixes #3193
2023-08-04 10:08:30 -04:00
Dan Stillman
3a43a98f10 Add IOUtils and PathUtils to plugin sandbox 2023-08-04 06:18:52 -04:00
Dan Stillman
9b0ce9558c
attachmentRenameFormatStringattachmentRenameTemplate (#3249) 2023-08-04 05:58:15 -04:00
windingwind
e44e3edef9
Fix itemBox.js eslint errors (#3244) 2023-08-04 04:15:08 -04:00
Dan Stillman
07309d7c25
Add Zotero.getMainWindows() 2023-08-03 05:11:26 -04:00
windingwind
1ca34261d3 Update ItemTreeManager.unregisterColumns example 2023-08-03 11:08:55 +08:00
Dan Stillman
fb4f55e809 Restore Word → LibreOffice order in Cite prefpane 2023-08-02 06:36:38 -04:00
Adomas Venčkauskas
b261d10b89 Fix Return not accepting citation dialog after pasting. Closes #3240 2023-08-01 09:47:42 +03:00
Adomas Venčkauskas
4b16269b7f Prefs: Add an event on pane switch
Fixes an issue with incomplete Style Manager tree rendering when
switching panes. Closes #3239
2023-08-01 09:18:30 +03:00
windingwind
836c8718b0 Fix itemTreeManager typo 2023-07-31 21:48:20 +08:00
windingwind
76c1db33e9 Fix itemTreeManager typo 2023-07-31 21:47:38 +08:00
Abe Jellinek
345bbcf50c Scaffold: Prompt to save before resetting
Now that Scaffold remembers and automatically loads the last edited translator
(65048fd624), it needs to be easier to create a
new translator without saving (and bumping the lastModified date on) the
translator you had open.
2023-07-31 09:44:20 -04:00
windingwind
ef7916b320
Add main window hooks for plugins (#3238) 2023-07-31 05:09:33 -04:00
Abe Jellinek
6dcc70f531 Zotero.PreferencePanes.register: Set default values for scripts/stylesheets
Without this, the calls to .map() below throw when one or both of those options
aren't set.
2023-07-29 22:28:10 -04:00
Abe Jellinek
8a7f3645bc
Item box: Add DOI menu listeners once, disable when DOI is invalid (#3237)
Fixes #3221

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2023-07-29 04:25:34 -04:00
Dan Stillman
02198b12fe Fix dragging to My Publications
Also:

  - Don't show file options if only linked files
  - Don't set Rights field to "All Rights Reserved" if no files
2023-07-29 02:22:20 -04:00
Abe Jellinek
cbece42fb9 Fix merge pane overflow behavior
The item box CE can't be the scroll container, so it needs a wrapper element.

Fixes #3233
2023-07-28 15:06:02 -04:00
Abe Jellinek
7036073ed1
Resolve plugin-provided URIs relative to rootURI (#3235) 2023-07-28 00:16:58 -04:00
Abe Jellinek
e271b4e494 copyToUnique: Fail if source contains destination
To prevent unbounded recursion as in 16547f64c2.
2023-07-27 12:24:51 -04:00
Abe Jellinek
16547f64c2 renameAttachmentFile: Check rename() return value
And actually return -1 if it returns false.

Before this fix, attempting to rename an attachment file to a name that already
exists on disk would never return -1 as the docs say it should. Instead:

1. rename() would fail and return false
2. newName would be set to false
3. renameAttachmentFile() would pass false as the second argument to
   OS.Path.join()
4. OS.Path.join() would ignore it because it was falsy and return the attachment
   directory path without any modification
5. relinkAttachmentFile() would be called with path set to the attachment
   directory
6. relinkAttachmentFile() would notice that path's dirname wasn't the attachment
   directory - it was the attachment directory's parent - and attempt to copy it
   and its contents, recursively, into itself, using copyToFollowingLinks()

...which created a directory structure on disk over 100 directories deep -
not deeper only because the OS started returning errors due to paths exceeding
32,767 characters (the limit on my filesystem).
2023-07-27 12:24:32 -04:00
Dan Stillman
00683732d8 Make XMLSerializer available in plugins
https://groups.google.com/g/zotero-dev/c/ZKoDSBniSXs/m/VDhPpjNqAAAJ
2023-07-26 23:01:23 -04:00
Dan Stillman
0d70925816 Fix error loading plugin scope after 6a2fcd6898
`AddonManager.getActiveAddons(["extension"])` doesn't return fully
loaded addon objects if `getAllAddons()` hasn't been called
2023-07-26 23:01:17 -04:00
Dan Stillman
6a2fcd6898 Remove loadExtensionDefaults() in prefs.js
We now handle this in prefs.js.
2023-07-26 07:25:21 -04:00
Dan Stillman
a1f49e11d5 Fix low-res webpage icon 2023-07-25 07:35:03 -04:00
Adomas Venčkauskas
d96afa4499 Fix split-menu-button dropmarker triggering the button click event
Regression in fa31956d
2023-07-25 14:23:34 +03:00
Dan Stillman
630c6d0d97 Fix tags not being saved in item tags box when pressing Enter
SyntaxError: Element.querySelector: '[ztabindex=1]' is not a valid selector

https://forums.zotero.org/discussion/106405/zotero-7-changes-to-item-tag-do-not-persist
2023-07-25 05:51:41 -04:00
Dan Stillman
fb59345637 Fix "Check for Update" buttons in error dialogs
Fixes #3213
2023-07-25 01:53:22 -04:00
Dan Stillman
ed2cae9236 Adjust attachment-title handling on Rename File from Parent Metadata
Don't change the attachment title on a manual rename from metadata if it
doesn't match the current filename, with or without the extension

Closes #3220
2023-07-25 01:48:23 -04:00
windingwind
c89590c7b7
Add ItemTree column API (#3186) 2023-07-25 00:47:12 -04:00
Abe Jellinek
676f820f87
Strip bidi control characters in filenames and elsewhere (#3208)
Passing unformatted = true to Item#getField() now returns a bidi control
character-less result, and we use that in Reader#updateTitle() and
getFileBaseNameFromItem() to prevent bidi control characters from showing up in
filenames and window titles (the former everywhere, the latter on Windows only).

We also strip bidi control characters in getValidFileName() to be extra safe.
2023-07-22 03:30:28 -04:00
Abe Jellinek
1217710234 PDFWorker manager: OS.File -> IOUtils 2023-07-21 18:36:38 +03:00
Abe Jellinek
5aaf368149 Use pdf-worker for hasEmbeddedAnnotations() 2023-07-21 18:36:38 +03:00
Dan Stillman
2fad3d89ff Use getDisplayTitle() for titles in timelines
https://forums.zotero.org/discussion/106290/zotero-timeline-does-not-display-email-subject
2023-07-21 06:23:02 -04:00
windingwind
97235d2dea
Fix selectitems.xhtml persist bug (#3219)
See https://groups.google.com/g/zotero-dev/c/OscDKuO9Rao
2023-07-21 04:43:52 -04:00
Tom Najdek
0ba766f2e0
Customizable renaming rules #1413 (#2297) 2023-07-20 06:50:34 -04:00
Dan Stillman
96e2510165 Fix missing return in previous commit 2023-07-20 06:42:32 -04:00
Dan Stillman
590460cea4 Add Zotero.Prefs.prefHasUserValue(pref, global) 2023-07-20 06:41:23 -04:00
Dan Stillman
51c70eb925 Use system temp directory by default
Might help for something like
https://forums.zotero.org/discussion/106337/zotero-7-sync-error
2023-07-20 05:43:39 -04:00
Adomas Venčkauskas
75c46e1e5c Enable FAYT in document preferences. Closes #3214 2023-07-20 11:10:14 +03:00
Dan Stillman
d968e8ec33 Update locales from Transifex 2023-07-18 07:55:41 -04:00
Adomas Venčkauskas
1b30c8b2b5 Add a comment for bib style caching. Closes #3211 2023-07-18 10:58:12 +03:00
Adomas Venčkauskas
f61826281b Revert "Merge pull request #3195 from CommonLoon102/cl102/fix-bib-indent"
This reverts commit aca86967bf, reversing
changes made to 1a850d58c4.
2023-07-18 10:55:14 +03:00
abaevbog
9599d1712c
disable file > close for library if 1+ tabs open (#3210)
When there are multiple tabs opened, menuitem File > Close is disabled for the library tab.

Fixes: #3198
2023-07-18 03:40:19 -04:00
Martynas Bagdonas
e37eaac8d1 Fix panes overflowing in stacked view mode
Fixes #3180
2023-07-17 17:07:38 +03:00
Dan Stillman
c425f71ac4 fx-compat: Fix error passing cookieSandbox to Zotero.HTTP.request()
https://groups.google.com/g/zotero-dev/c/UgP_kZvrEjA/m/KjimYREGAgAJ

getInterface() seems to exist on XHR and nsIWBP without QIing to
nsIInterfaceRequestor, and XHR no longer has QueryInterface().
2023-07-17 06:42:14 -04:00
Dan Stillman
65fe50d11f Clear startup cache when uninstalling/upgrading plugins
https://groups.google.com/g/zotero-dev/c/0nfU-F2q1uI/m/1jBVmMZxBAAJ

Removed by Mozilla in
https://bugzilla.mozilla.org/show_bug.cgi?id=1445739, since
WebExtensions don't put anything in the startup cache
2023-07-15 18:39:59 -04:00
Dan Stillman
838152155e Log warning when not setting createdByUser/lastModifiedByUser
(I encountered this in a test when trying to set createdByUserID without
`Zotero.Users.setName()`.)
2023-07-14 05:48:48 -04:00
Dan Stillman
dc321ce643 Fix startup error on Windows
Regression from 8d3f874e64, which included this unfinished code by mistake.

Fixes #3196
2023-07-14 05:48:48 -04:00
abaevbog
0cd94555d5
prevent incorrect jumpback (#3204)
Fixes: #3152
2023-07-14 05:29:43 -04:00
Dan Stillman
d7449b4d78 Fix merging of group attachments with annotations created by another user
https://forums.zotero.org/discussion/106197/merge-in-group-library-fails-despite-having-edit-permissions
2023-07-13 19:58:47 -04:00
Adomas Venčkauskas
e5d25f3d66 Fix /connector/saveSnapshot still not including info about snapshots 2023-07-12 10:21:46 +03:00
Abe Jellinek
2aa34a6346 Merge: Remove spacing from annotation regex, delete external annotation items
- `/Subtype` isn't necessarily preceded or followed by a space
- Annotation items with `isExternal: true` are for display only and should be
  deleted on merge

https://forums.zotero.org/discussion/105960/external-annotations-ignored-when-merging
2023-07-11 11:12:58 -04:00
Adomas Venčkauskas
a0cdf11096 Fix failing test from 02ba9ca7 2023-07-11 15:57:35 +03:00
Adomas Venčkauskas
02ba9ca7f0 Include information about saved snapshots in /saveSnapshot 2023-07-11 15:45:51 +03:00
Martynas Bagdonas
5928147f26 Fix middle-click selecting tab that is being closed 2023-07-11 14:02:12 +03:00
Dan Stillman
8d3f874e64 Remove all uses of Zotero.isStandalone
(View diff with -w)
2023-07-11 05:35:32 -04:00
Dan Stillman
b98efe0b67 Remove ZoteroPane.updateTagsBoxSize()
Disabled several years ago in bb5075e8b8
2023-07-11 05:35:32 -04:00
Dan Stillman
071162f914 Remove styled-textbox XBL binding 2023-07-11 05:35:32 -04:00
Dan Stillman
af892e5cbd Make annotation sortIndex more flexible 2023-07-11 05:35:32 -04:00
Abe Jellinek
b6d0ad3e05 Accept non-integer attachmentLastPageIndex 2023-07-11 05:35:32 -04:00
Martynas Bagdonas
89adf56eed Add support for text annotations 2023-07-11 05:35:32 -04:00
Martynas Bagdonas
cb14034c46 Add support for underline annotations 2023-07-11 05:35:32 -04:00
Dan Stillman
81ec8287f8 Disable attachmentContentType check to prevent sync errors 2023-07-11 05:35:32 -04:00
Dan Stillman
4a8935eefd Guidance panel fixes
- Fix missing styling in Quick Format dialog
- Fix Book Section panel being immediately hidden
- Remove low-res Zotero icon
- Increase font size and tweak padding
2023-07-11 05:35:32 -04:00
Dan Stillman
fb3466b392 Fix Ctrl-Q on Linux
Fixes #3199
2023-07-06 19:21:52 -04:00
windingwind
a2e8be2af5
Fix extremely slow binary to base64 (#3201) 2023-07-06 01:56:38 -04:00
Martynas Bagdonas
8017b2ab1b Fix extremely slow note editor image ArrayBuffer to data URL conversion 2023-07-05 19:41:32 +03:00
abaevbog
04496fadcd
only save username to prefs on successful login (#3192)
Failing to login does not update the username in prefs.

Fixes #2901
2023-07-05 04:11:56 -04:00
abaevbog
13571f9fd2
making toolbar accessible to the keyboard - initial conversion (#3188)
Port of d866a10a2b

Fixes #3001
2023-07-05 03:17:07 -04:00
Adomas Ven
aca86967bf
Merge pull request #3195 from CommonLoon102/cl102/fix-bib-indent
Fix indentation in bibliography
2023-07-03 15:19:01 +03:00
Adomas Venčkauskas
1a850d58c4 Fix the column picker not working outside of zotero pane. Closes #3162 2023-07-03 14:54:50 +03:00
CommonLoon102
b60fb28313
Fix indentation in bibliography
Fix indentation in bibliography when a new item is added and therefore the recalculation of indents are needed.

https://forums.zotero.org/discussion/23689/bibliography-indentation
2023-07-01 13:15:44 +02:00
Dan Stillman
1766f8bb53 Plugin lifecycle fixes
- Call `shutdown()`/`uninstall()` with `ADDON_UPGRADE`/`ADDON_DOWNGRADE`
  during plugin upgrade/downgrade
- Actually call new version's bootstrap.js, not cached old version
- Create new scope for new version
- Don't call `shutdown()` on uninstall if not active

Fixes #3159
2023-07-01 06:19:04 -04:00
Martynas Bagdonas
fcb30b5e5d Fix not working context menu options to create note from annotations 2023-06-30 10:54:52 +03:00
Adomas Venčkauskas
1274f5f602 Fix citation reordering by dragging in the citation dialog. Closes #3183 2023-06-28 13:36:38 +03:00
Martynas Bagdonas
abfe96fcaa Temporary fix for context-pane item deck selection when closing a tab
Fixes #3175
Related to bb85e11a
2023-06-27 18:34:15 +03:00
Abe Jellinek
65048fd624 Scaffold: Automatically load last opened translator 2023-06-24 15:00:57 -07:00
Abe Jellinek
9b6d6c109c RemoteTranslate: Support cross-origin XMLHttpRequest
By creating our Sandbox under the system principal and giving it privileged XHR.
Bonus: no more `wrappedJSObject` required because sandbox code and actor code
are at the same privilege level now.

Fixes #3176
2023-06-23 22:19:46 -07:00
Dan Stillman
3454c321e7 Fix sw_vers call on older macOS versions
Apparently it didn't used to allow two hyphens before flags
2023-06-23 02:01:27 -04:00
Dan Stillman
f8d8fb5e11 Fix item-type-menu breakage after canceling item-type change on Windows
https://forums.zotero.org/discussion/105739/zotero-7-beta-bug-changing-item-type
2023-06-22 14:18:23 -04:00
Dan Stillman
4b581ad07b Don't call plugin startup() on upgrade if disabled
Fixes #3177

https://forums.zotero.org/discussion/105692/z7-beta-disabled-add-on-suddenly-active
2023-06-22 05:05:05 -04:00
Dan Stillman
d868143fc9 Update locales from Transifex and merge new English strings 2023-06-19 04:34:29 -04:00
Dan Stillman
f62cef9c12 Remove DOMLocalization from plugin sandbox
That can just be retrieved directly from document.l10n on the
appropriate window, and Mozilla doesn't use it directly.
2023-06-18 16:55:30 -04:00
Dan Stillman
c7304b9fb0 Fix plugin localization handling
Pass Localization and DOMLocalization to plugins and fix locale
registration so that it occurs before startup() is called.
2023-06-18 16:50:04 -04:00
Abe Jellinek
0a94e8fdf0
fx-compat: Make color picker CE accessible via keyboard and VoiceOver (#2933) 2023-06-17 02:43:24 -04:00
Abe Jellinek
c37e327330 Fix clicky sizing and appearance
- Set min-width and min-height to width and height so buttons never shrink
- Remove defunct .zotero-clicky-* styles from 2x block in zotero.css
- Include zotero-platform/content/zotero.css in searchDialog.xhtml
   - It seems only the defunct 2x styles from zotero.css were being applied, so
     the buttons would have been unstyled on a non-hiDPI display
2023-06-17 02:33:59 -04:00
Abe Jellinek
1a2950ae34 Automatically adjust height of multiline/long fields in edit mode
Fixes #3170
2023-06-16 12:17:29 -07:00
Adomas Venčkauskas
9668270017 Fix the integration template check for unknown agents 2023-06-16 12:40:13 +03:00
Adomas Venčkauskas
6efa55ffdf Update Word for Mac submodule. Update template version check 2023-06-16 03:24:03 -04:00
Adomas Venčkauskas
e3e607a6d4 Add support for macWord transaction initialization via HTTP 2023-06-16 03:24:03 -04:00
Abe Jellinek
c124ca9738 Scaffold: Fix test creation
Fixes #3167
2023-06-15 16:18:57 -07:00
Dan Stillman
4273448b5d Add preferences.ftl files for all locales 2023-06-15 06:07:29 -04:00
Abe Jellinek
2639981dda
Block remote content when indexing HTML file (#3157) 2023-06-12 23:43:18 -04:00
Abe Jellinek
30624c6aba Preferences: Remove extraDTD pane option
Include FTL localizations directly in your pane XHTML fragment:

    <linkset>
        <html:link rel="localization" href="make-it-red.ftl"/>
    </linkset>

Fixes #3161
2023-06-12 13:25:20 -04:00
Abe Jellinek
75df7bcbdd Item Pane: Allow "long" fields to wrap
Aligns with Z6 behavior.

Fixes #3163
2023-06-12 12:38:30 -04:00
Dan Stillman
ffd6a988e1 Await plugin bootstrap methods 2023-06-12 01:39:57 -04:00
Dan Stillman
027060ba86 Log reason when calling bootstrap methods 2023-06-07 01:58:18 -04:00
Abe Jellinek
6106e379c9 Plugins: Uninstall immediately but allow undo
When you uninstall a plugin through the UI, XPIInstall:
1. Sets the plugin's `pendingUninstall` to true
2. Calls our onUninstalling() method
3. Waits for the Add-ons window to be closed
4. Actually uninstalls the plugin
5. Calls our onUninstalled() method

If you undo the uninstallation between steps 2 and 3, the remaining steps
instead look like:
3. Sets the plugin's `pendingUninstall` to false
4. Calls our onOperationCancelled() method

This commit changes our implementation of the bootstrapped plugin lifecycle so
that the shutdown and uninstall hooks are called from onUninstalling() (step 2).
If you close the Add-ons window without undoing, nothing more happens. The
plugin remains uninstalled. If you undo before closing, though, we call the
plugin's lifestyle hooks just as if it had been newly installed (unless it was
disabled before uninstallation, in which case we call install but not startup).

This mirrors the behavior of Firefox WebExtensions and makes things work more
like you'd expect: uninstalling a plugin immediately deactivates it, and undoing
activates it again.
2023-06-06 16:14:33 -04:00
Abe Jellinek
a28b949dc1 Preferences: Attach preferences to all added nodes in tree
mutation.addedNodes only contains the top-level nodes, so we need to query for
all nodes with preference attributes in their trees.
2023-06-06 14:00:57 -04:00
Martynas Bagdonas
bb85e11a92 Fix tab selection when closing a tab nearby
Fixes #3151
2023-06-06 19:42:34 +03:00
Martynas Bagdonas
785dcb30c3 Ensure that note is created when inserting an image
Fixes #3155
2023-06-06 16:22:19 +03:00
Abe Jellinek
5e41b3ab4d Place word processor plugin installers under heading and fix spacing
Fixes #3147
2023-06-05 10:52:04 -04:00
Abe Jellinek
d077388616 Fix WebDAV settings
- Fix mistaken reference to event.target (instead of currentTarget) in sync
  function
- Move sync functions to fields for easier debugging - can't set a breakpoint
  inside an inner function in the Firefox debugger

Fixes #3142
2023-06-05 10:32:37 -04:00
Dan Stillman
ea1e28c7b7 Update translate submodule 2023-06-01 06:08:40 -04:00
Dan Stillman
fd7cf71043 fx-compat: Fix Page textbox in classic citation dialog 2023-05-30 17:32:21 -04:00
Tom Najdek
afaf0b4968 Add scripts to convert ftl to/from Transifex JSON (#3058) 2023-05-29 22:46:24 -04:00
Dan Stillman
d5a584c28b Don't close window with Cmd-W on first tab if other tabs are open
Closes #2572
2023-05-29 06:00:31 -04:00
Dan Stillman
7c902d40a9 Timer updates
- Switch to Mozilla's Timer.jsm for timer functions in XPCOM scope
- Add setInterval/clearInterval/requestIdleCallback/cancelIdleCallback
- Add all timer functions to plugins sandbox
2023-05-28 04:51:21 -04:00
Dan Stillman
f966662911 "Preferences" → "Settings" on all platforms
Firefox has switched on all platforms, Chrome and Edge on Windows use
"Settings", and we really don't want to have to say different things for
different platforms
2023-05-27 07:30:32 -04:00
Dan Stillman
773a89b0f3 Fix title of import wizard 2023-05-27 06:42:11 -04:00
Dan Stillman
77241d1c71 Fix test in collection tree selectLibrary()
getRowIndexByID() can only return an integer or false
2023-05-27 02:34:03 -04:00
Dan Stillman
cd20df8d74 Fix sw_vers being run repeatedly in View Output window on macOS
Fixes #3136
2023-05-26 06:45:23 -04:00
Dan Stillman
febcf2568e Update locales from Transifex and merge new English strings 2023-05-25 21:56:32 -04:00
Dan Stillman
3f739fc1b4 "Capitalize" → "Fix Case" for creator context menu
https://forums.zotero.org/discussion/105117/zotero-7-thank-you-for-adding-right-click-case-change-for-author-names
2023-05-25 21:56:31 -04:00
Dan Stillman
b2b768cd4b Fix fileQuitItemUnix is null error in PDF reader window 2023-05-25 21:56:31 -04:00
Abe Jellinek
4cfe682367
Remove outdated startup error messages (#3138) 2023-05-25 21:38:12 -04:00
Abe Jellinek
42572efca9 Fix error when adding link attachment with unparseable URL
https://forums.zotero.org/discussion/105158/zotero-7-beta-attach-link-to-uri-logosres-does-not-work-any-longer
2023-05-25 18:45:48 +03:00
Abe Jellinek
a4c3f5267b Fix ScienceDirect PDF downloads
ScienceDirect sometimes puts the `name` directive at the end of the Content-Type
header instead of in Content-Disposition. That isn't strictly spec-approved, but
there are other directives (`charset` and `boundary`) that can also be appended
to Content-Type per the spec. We want to strip them before looking for handlers.

https://forums.zotero.org/discussion/105194/sciencedirect-pdf-downloads-not-working-zotero-7
2023-05-25 17:57:32 +03:00
Dan Stillman
6e2ec2300d Fix checking for Firefox profiles high up in filesystem
This was triggering an erroneous warning dialog about a failure to check
for Firefox profiles during Linux tests (where the profile is at
something like /tmp/tmp.l5phnqSxBH/Zotero), but it could also affect a
custom profile directory location.
2023-05-25 03:37:06 -04:00
Abe Jellinek
6405997723 Use Zotero.appName in window title 2023-05-25 09:13:42 +03:00
Abe Jellinek
91fec9024c Bidi: Fix control characters appearing in reader window titles on Windows
Fix in 6d5ce578e4 only affected tabs.

Fixes #3135
2023-05-25 09:05:36 +03:00
Abe Jellinek
087a9859b4 Fix preference binding issues and "Include Zotero Links" checkboxes
- Set zotero-noteQuickCopy-menu's preference attribute to the correct key
- Warn about all ID-ish preference attribute values
  - zotero-noteQuickCopy-menu's preference attribute was being set to the ID of
    a now-nonexistent <preference> element. preference attribute values should
    be preference keys now, but we were only warning if the associated
    <preference> element was actually there
  - We can't warn in all cases where the preference doesn't yet exist, because
    some preferences don't have default values, and we shouldn't limit to
    preferences that don't exist, because then the warning will stop showing
    after the preference is persisted once
- When a <preference> ID is replaced by the associated key, update the
  preference attribute so future syncFromPref() and syncToPrefOnModify() calls
  will set the correct preference
- Listen to a range of events on all bound nodes, no matter their type
- Don't resolve _firstPaneLoadDeferred until actually done loading

Fixes #3131.
2023-05-24 20:46:00 +03:00
Martynas Bagdonas
26068a855c Make note editor iframe an XUL element to avoid focus anomalies
Fixes #3128
2023-05-24 17:38:15 +01:00
Dan Stillman
0b1d958a86 Fix erroneous warning if Firefox profile directory can't be found
`Zotero.File.getContentsAsync()` now uses IOUtils rather than OS.File
2023-05-24 06:53:23 -04:00
Dan Stillman
f5433f04e6 Update searchfox link to permalink 2023-05-24 02:25:20 -04:00
Abe Jellinek
caa1036da2 Remote translation: Don't use wantGlobalProperties
Not necessary - just use the properties we inherit from contentWindow. This
fixes the DOMParser constructor, which fails if called without a window context
from a non-system principal.

https://forums.zotero.org/discussion/105163/zotero-7-doi-translator-broken-in-scaffold
2023-05-23 22:30:24 +03:00
Abe Jellinek
fd6ea99967 Item box: Always save current item when switching items
Fixes #3125
2023-05-23 19:40:09 +03:00
Abe Jellinek
61749d39a6 Item box: Populate both fields on creator autocomplete click
Fixes #3129
2023-05-23 19:06:56 +03:00
Dan Stillman
8440501ad2 Remove unused Zotero.isBigSurOrLater property 2023-05-23 01:55:31 -04:00
Dan Stillman
f9dab9b041 Show correct OS info in error reports 2023-05-23 01:55:31 -04:00
Dan Stillman
478dcc4f0f Add Zotero.Utilities.Internal.subprocess(command, args)
To run a short-lived command and return stdout

The Subprocess module can also start long-running process and
communicate with them, but we'll implement something different for that
if we need it.
2023-05-23 01:46:25 -04:00
Dan Stillman
522de4ad92 Add 32/64-bit info after version number in about dialog on Windows/Linux 2023-05-22 23:58:00 -04:00
Dan Stillman
66623b945e Temporary fix for context-menu options getting triggered on Windows
https://forums.zotero.org/discussion/105103/right-click-on-collections-or-items-not-functioning-properly-in-zotero-7
2023-05-22 06:16:53 -04:00
Dan Stillman
55fe6f33f5 fx-compat: Fix XMLSerializer calls
https://forums.zotero.org/discussion/105118/zotero-7-error-upon-exporting-in-mods-format
2023-05-22 01:34:41 -04:00
Dan Stillman
c653449cc0 Increase active tabs count from 2 to 3 on <=8 GB systems
To match current Zotero 6 behavior on non-Windows systems
2023-05-20 19:12:19 -04:00
Abe Jellinek
db4a79838b Preferences: Resync menulists when their subtrees change 2023-05-19 16:54:32 +03:00
Abe Jellinek
ff43d1877e Focus preferences window if already open on Cmd-Comma 2023-05-19 16:46:24 +03:00
Abe Jellinek
eecd85a1c2 Disable window dragging inside toolbar controls
And enable in the context pane toolbar extension.
2023-05-17 16:52:50 +03:00
Abe Jellinek
f299692de7 Allow window dragging from PDF reader toolbar
Fixes #2713
2023-05-16 16:23:32 +03:00
Dan Stillman
3ba6fbf0f7 Avoid warnings in console due to duplicated brand.ftl
zoteroPane.xhtml includes base.js via customElements.js, and base.js
inserts brand.ftl, so we don't need to include brand.ftl as a link.
2023-05-10 07:12:24 -04:00
Dan Stillman
05fd1601ad Update locales from Transifex
This removes some newlines due to processing changes in our script.
2023-05-10 06:25:05 -04:00
Dan Stillman
b8c9bfcc34 Update non-English Mozilla locale files
Mostly just minor whitespace changes due to changes in our processing
script
2023-05-10 06:25:05 -04:00
Dan Stillman
8cf7993af5 Add non-English updates.properties
(And update the en-US version with some strings that we don't use but
might if we updated to a slightly newer version of the updater before
they got rid of the dedicated update window)
2023-05-10 06:25:05 -04:00
Dan Stillman
08a508b750 fx-compat: Fix collections-containing-an-item highlight 2023-05-09 17:49:18 -04:00
Abe Jellinek
fa31956d28
fx-compat: Fix feed button appearance/overflow behavior (#3114) 2023-05-09 16:38:33 -04:00
Abe Jellinek
942986c6b6 fx-compat: Use native checkboxes for Quick Copy options 2023-05-09 16:01:52 +03:00
Abe Jellinek
508cd0a64c
Hide About window in Window menu (Mac) (#3113) 2023-05-08 20:35:40 -04:00
Abe Jellinek
8c37865c07 Fix add-on install error message when file is entirely invalid
If the file wasn't an XPI at all, or it didn't contain valid metadata for fx102,
the error message would previously show "%S" where the add-on name should be.
Now we fall back to the file path.
2023-05-08 20:13:47 +03:00
Abe Jellinek
b30f97dad5 fx-compat: Allow file drop on Add-ons window
Fixes #3099
2023-05-08 20:06:47 +03:00
Abe Jellinek
ddbcc32bd8 fx-compat: Basic viewer: Add necessary FTL 2023-05-08 19:51:31 +03:00
Dan Stillman
371bcfea81 "Zotero Preferences" → "Zotero Settings" on macOS
Fixes #3105
2023-05-07 23:56:16 -04:00
Dan Stillman
87c71f74a0 Move -app-name variable to brand.ftl
So a custom build doesn't have to modify each .ftl file

`app-name` is redundant with the Firefox strings, but it's what we used
previously and is easier to remember.
2023-05-07 23:55:34 -04:00
Dan Stillman
43373b77ec Remove connectorTypeSchemaData.js and update build_typeSchemaData.js
We now use zoteroTypeSchemaData.js in the connector, so update the
build script to generate that.
2023-05-06 02:01:03 -04:00
Dan Stillman
2dc08a0dfb Fix React key warning after 4c283d88c7 2023-05-05 06:48:49 -04:00
Dan Stillman
2e0f7062c3 Don't log error at startup if session.json doesn't exist 2023-05-05 06:42:31 -04:00
Dan Stillman
4974532276 Z7: Fix Mark as Read/Unread button in feeds not working
Fixes #3092, but overflow in non-English locales needs to be addressed
in #3110
2023-05-05 06:34:43 -04:00
Dan Stillman
5a75c59bf2 Z7: Style improvements in update dialog 2023-05-05 05:20:33 -04:00
Dan Stillman
fc48025629 Reindent updates.css 2023-05-05 05:15:41 -04:00
Dan Stillman
00703c0b8f Z7: Fix conflict resolution merge window styling
Closes #3090
2023-05-05 04:28:07 -04:00
Dan Stillman
4c283d88c7 Remove key hack for setting innerHTML in item tree
Results in a segfault during tests due to a null pointer deference
2023-05-04 08:40:06 -04:00
Dan Stillman
febc2fcc7d fx-compat: Wait until request completion in WebProgressFinishListener
`nsIWebProgressListener.onStateChange()` gets called twice at the end of
requests, once with `stateFlags` set to `327696` and once with it set to
`262160`, which corresponds to `STATE_STOP + STATE_IS_NETWORK +
STATE_IS_REQUEST` and `STATE_STOP + STATE_IS_NETWORK`. httpd.js debug
logging shows that the connection is closed between the two calls. In
WebProgressFinishListener, we were previously calling `onFinish` after
the first one, but in Zotero 7, at least on Linux (or maybe just on
slower machines due to a race condition), the file from `saveURI()`
doesn't appear to be reliably written after the first call, causing
`Attachments.downloadFile()` to fail in `_enforcePDF()` due to an empty
file.

This changes WebProgressFinishListener to wait until the second
`STATE_STOP` call. We'll have to confirm whether this is the
state-change pattern for all requests, but it fixes our Find Available
PDF tests in CI.
2023-05-01 02:52:37 -04:00
Dan Stillman
296c0142f2 fx-compat: OS.File.read()IOUtils.read() in getContentsAsync()
https://firefox-source-docs.mozilla.org/dom/ioutils_migration.html

This also fixes a bug when `getContentsAsync()` is passed an
`nsIInputStream` or `nsIChannel` where raw bytes were returned instead
of a string. Not sure if we're doing that anywhere. If we are, this
would presumably break that code, but the function is supposed to return
a decoded string.
2023-04-30 05:23:41 -04:00
Dan Stillman
2f6f2feade for…infor…of in sniffForMIMEType() 2023-04-29 18:50:39 -04:00
Dan Stillman
4ec357bb26 Use pdf-worker to extract text for item.attachmentContent if no cache 2023-04-29 17:38:14 -04:00
Dan Stillman
c326a6c971 Fix more files for combined repos 2023-04-29 07:50:54 -04:00
Dan Stillman
e46ae13a5a Remove resizabledialog.xml binding 2023-04-29 03:15:39 -04:00
Dan Stillman
4a77bc4be0 fx-compat: Update conflict resolution merge window (#3090)
Tests passing, but not yet styled properly
2023-04-29 03:13:53 -04:00
Dan Stillman
ed224dce34 Z7: Update relatedbox tests 2023-04-28 01:54:00 -04:00
Dan Stillman
07acfb444a Z7: Fix Add Item by Identifier tests (and rename textbox)
Now only one textbox, so no need to call it 'multiline'
2023-04-28 01:54:00 -04:00
Dan Stillman
42f87597cf Add missing debug line for notifier registration 2023-04-27 03:39:25 -04:00
Dan Stillman
59ca0731b8 Fix note editor not being properly unregistered from notifier 2023-04-27 03:37:31 -04:00
Tom Najdek
a8c30362a1
Remove shadow root from PublicationsLicenseInfo #3082
* Fix legacy css path
 * Rename license-info.scss -> publicationsLicenseInfo.scss to match element name
2023-04-26 15:23:49 +02:00
Tom Najdek
842f474939
Remove shadow root from StyleConfigurator #3082
Also renamed style-configurator.scss -> styleConfigurator.scss
2023-04-26 15:23:49 +02:00
Dan Stillman
947fa2b558 Ignore numeric values for Type: lines in Extra
https://forums.zotero.org/discussion/comment/433334/#Comment_433334
2023-04-26 04:55:43 -04:00
Dan Stillman
eaef035062 Update non-en-US updates.dtd based on en-US file
Now that the localizer has been updated to handle Mozilla
.dtd/.properties files
2023-04-26 04:40:22 -04:00
Dan Stillman
144dbf8af0 Add Mozilla updates.dtd for non-English locales
From some 2017-era langpacks I had downloaded. These strings aren't in
current langpacks, which use a different update mechanism, but we're
bundling a modified version of updates.xhtml from Firefox.
2023-04-26 04:40:22 -04:00
Dan Stillman
15151acb3e Add Mozilla locale strings for Breton 2023-04-26 04:40:22 -04:00
Dan Stillman
3d0896f1b6 Update menubar.ftl and textActions.ftl from current Mozilla langpacks 2023-04-26 04:40:22 -04:00
Dan Stillman
9236d65215 Add Mozilla wizard.ftl 2023-04-26 04:40:22 -04:00
Dan Stillman
3693674fc9 Fix Fluent localization for non-English locales
All declared Fluent files need to exist for a locale to be used (in a
window?). Since Mozilla code tries to load Fluent files, we need to copy
non-English Mozilla .ftl files to their default effective path (just in
the app omni.ja instead of the toolkit omni.ja).

Fixes #3094
2023-04-26 04:40:22 -04:00
Abe Jellinek
c07eccb468 Scaffold: Improve perceived translation speed
When translators do a lot of logging.

https://github.com/zotero/translators/pull/3022#issuecomment-1517291971
2023-04-21 13:38:42 -04:00
Dan Stillman
fb2d35c765 Better logging for changes to deleted property 2023-04-21 06:51:41 -04:00
Dan Stillman
4a30dd2e4f Fix potential sync error after Replace Online Library in group
https://forums.zotero.org/discussion/104431/syncing-problem

Replace Online Library can upload annotations created by others in a
group library, so if the upload resulted in a local write, "Cannot edit
item in library" was thrown, since annotations by others aren't
writable. This should've only been a problem if the uploaded data was
actually modified by the server, but we were also checking whether
objects were editable before checking if they had actually changed, so
it would happen for any upload of another person's annotation.

This fixes the order of checks when saving objects and makes an
edit-check exception for saving uploaded data for group annotations.
2023-04-21 06:51:25 -04:00
Abe Jellinek
c7d30ebde4
Allow disabling JavaScript in basic viewer (#3089)
And:
- Prevent JavaScript inside notes from executing in reports
- Update calls to openInViewer() to pass an options object
2023-04-20 15:50:57 -04:00
Dan Stillman
78a81f321a Update utilities and translate submodules 2023-04-20 05:48:10 -04:00