Commit graph

9879 commits

Author SHA1 Message Date
Abe Jellinek
8face792c0
fx-compat: Fix search dialogs (#2631) 2022-07-04 01:48:52 -04:00
Abe Jellinek
b78b9cad1f fx-compat: Duplicates: UI fixes
- Scroll vertically
- Restore margins between groupboxes
- Restore field version dropmarker
2022-06-30 12:32:11 -04:00
Abe Jellinek
97786bfa77 fx-compat: Fix multiline Add Item by Identifier
Now just one textarea instead of an input and a textarea.

Fixes #2677
2022-06-30 11:48:15 -04:00
Abe Jellinek
f81b4b071f fx-compat: Correct create[XUL]Element[NS]() calls
This fixes the dictionary manager and various other places where a XUL
element was being created with createElement(), and also simplifies a lot
of createElementNS(HTML_NS, ...) calls.

This might cause some minor regressions but everything tested has
worked. Not touching preferences (#2659) or bindings.
2022-06-29 11:14:40 -04:00
Abe Jellinek
8b7d959781 fx-compat: Fix column picker context menu 2022-06-29 09:27:11 -04:00
Dan Stillman
4fcde6c8c5 fx-compat: hiddenWindow.xul → hiddenWindow.xhtml 2022-06-29 06:17:21 -04:00
Dan Stillman
41f54624b1 fx-compat: Fix "Hide {-brand-shorter-name}" in Mac application menu 2022-06-29 03:38:16 -04:00
Abe Jellinek
1eb9718b6b Style editor: Light theme, leave selection if unchanged
Since onStyleModified() is called when a style is loaded.
2022-06-28 15:12:57 -04:00
Abe Jellinek
9c837b3361 Improve Monaco integration and use in csledit
And remove timedtextarea.xml. Fixes #2665.
2022-06-28 15:05:16 -04:00
Abe Jellinek
8681e8ffe9 fx-compat: Make macOS application menu shortcuts work
e.g. Cmd-H flashed the menu but didn't actually hide.
2022-06-28 12:15:11 -04:00
Abe Jellinek
00e46443a6 Add XULElementBase class for custom elements
https://github.com/zotero/zotero/pull/2631#discussion_r906723540
2022-06-28 11:52:11 -04:00
Abe Jellinek
6295050fa6
Restore platform edit menu behavior without #ifdef (#2674) 2022-06-27 23:06:01 -04:00
Abe Jellinek
f0aef79c7a fx-compat: Use permalink in comment 2022-06-27 14:26:00 -04:00
Abe Jellinek
a654ad291f fx-compat: Add comment explaining menubar change 2022-06-27 14:22:02 -04:00
Abe Jellinek
a8c4e0637b fx-compat: Restore Mac application menu
The stuff in hiddenWindow.xul doesn't seem to have been doing anything
in Fx102 anyway.
2022-06-27 14:15:11 -04:00
Abe Jellinek
89587e6b76 fx-compat: native="true" on more checkboxes/menulists 2022-06-24 09:11:38 -04:00
Dan Stillman
3805f901cf fx-compat: Fix centering of library pane progress bar 2022-06-23 04:17:08 -04:00
Dan Stillman
f827b9ef50 fx-compat: initKeyEvent()new KeyboardEvent()
Quick Format change is untested
2022-06-21 03:31:58 -04:00
Dan Stillman
587ae6ba7e fx-compat: Fix blurring of textarea fields in item box
And fix tests
2022-06-21 03:03:37 -04:00
Dan Stillman
3743c179e1 Add missing commonDialog.js from dictionary manager
Currently provides close-on-Esc functionality
2022-06-21 01:39:07 -04:00
Dan Stillman
20945f60c9 fx-compat: Remove nsIURI.clone() usage 2022-06-21 01:39:07 -04:00
Dan Stillman
6297d0862f fx-compat: Replace last use of getURLSpecFromFile()
Follow-up to 8f7a160ba1

Untested, since it's in the prefs -- we'll have to see if this works
after #2659
2022-06-21 01:39:00 -04:00
Dan Stillman
789a8a5fe9 fx-compat: Use new mozILocaleService API
Replace functions with arrays, as in https://phabricator.services.mozilla.com/D6339
2022-06-20 23:09:46 -04:00
Dan Stillman
96f6b871ce fx-compat: Fix sync error panel 2022-06-20 18:43:09 -04:00
Martynas Bagdonas
5b879f75c5 fx-compat: Avoid dead object errors in note-editor
Fixes #2663
2022-06-20 11:33:10 +03:00
Dan Stillman
b3077182d2 fx-compat: Fix Zotero.MIME.getMIMETypeFromURL()
Replace

```
Components.classes["@mozilla.org/network/standard-url;1"]
	.createInstance(Components.interfaces.nsIURL)
```

with

```
Services.io.newURI(url).QueryInterface(Ci.nsIURL);
```
2022-06-20 01:12:57 -04:00
Dan Stillman
30f636274b Update Notifier ids for itemBox/notesEditor custom elements 2022-06-20 00:47:50 -04:00
Dan Stillman
be3b245dbe Don't index PDF if fulltext.textMaxLength is 0
Follow-up to 13adfd131c
2022-06-19 19:03:41 -04:00
Dan Stillman
dfff86df72 fx-compat: Fix Zotero.File.download() 2022-06-19 18:58:25 -04:00
Dan Stillman
8f7a160ba1 fx-compat: getURLSpecFromFile()Zotero.File.pathToFileURI()
One remaining instance in the prefs that will need to be fixed
2022-06-19 15:20:54 -04:00
Abe Jellinek
9c69f73de5 Manually remove handler instead of using once
Since we only want to remove if the target matches.
2022-06-18 03:45:32 -04:00
Abe Jellinek
a48ebe2dd7 Show native menus from toolbar 2022-06-18 03:45:32 -04:00
Abe Jellinek
a60e46dd5c fx-compat: Fix toolbar 2022-06-18 03:45:32 -04:00
Abe Jellinek
dd3385ec67 Revert "fx-compat: Remove Mac toolbarbutton images"
This reverts commit 280a1265c8.
2022-06-18 03:45:32 -04:00
Dan Stillman
d90334e883 fx-compat: Initial nsIWebBrowserPersist.saveURI() fixes
Will need additional fixes for cookie handling, etc., but this at least
fixes the signature
2022-06-17 20:29:01 -04:00
Dan Stillman
2b41b0127c Get binary contents in Zotero.File.getSample()
And fix magic numbers for content-type sniffing, which wrongly used the
Unicode replacement character (which likely just meant we were falling
back to file-extension-based detection)
2022-06-17 20:29:01 -04:00
Dan Stillman
13adfd131c fx-compat: Update full-text indexing
Use the new PageData mechanism for character set detection, don't try to
index HTML files directly without properly detecting the charset, and
generally simplify the indexing code.

HTML files are now considered cached files that require indexing and
won't be indexed automatically in Zotero.FullText.findTextInItems(),
which breaks certain expectations, including in some tests. This will
need to be addressed.
2022-06-17 20:29:01 -04:00
Dan Stillman
1dd24f7082 Remove Zotero.File.getCharsetFromFile()/addCharsetListener()
Unused in over a decade, and now replaced by the PageData actor
2022-06-17 20:29:01 -04:00
Dan Stillman
6a2949be8a fx-compat: Add HiddenBrowser.jsm
Remove Zotero.Browser and add HiddenBrowser.jsm. Post-Fission, web/file
content loads in a separate process, so it's not possible (as best as I
can tell) to directly access the contents of a hidden browser -- it just
appears as about:blank in the parent process. We now use Mozilla's
JSWindowActor mechanism [1] to get page data, including character set
and body text for full-text indexing. We'll have to evaluate other uses
of hidden browsers to see how to handle them.

This also adds include.jsm for loading the Zotero object into a JSM.

[1] https://firefox-source-docs.mozilla.org/dom/ipc/jsactors.html
2022-06-17 20:28:58 -04:00
Dan Stillman
7f748b2620 Take path or nsIFile in Zotero.File.pathToFileURI() 2022-06-17 20:24:43 -04:00
Dan Stillman
730e86d661 fx-compat: Restore tests and test using actual Zotero executable
The test runner now uses the Zotero executable from
`zotero-standalone-build/staging` rather than the Firefox from
`zotero-standalone-build/xulrunner`. Along with testing the actual
program, this restores visible UI updates during tests, which should
make debugging various things easier. We can also now remove anything
related to Zotero being an extension.

Many tests are still broken, but this at least lets us start running
them.
2022-06-17 20:24:43 -04:00
Dan Stillman
3c9dcea46b Add comment explaining CSS rule to hide menuitem icons on macOS 2022-06-17 20:24:43 -04:00
Abe Jellinek
0e1a16b96b fx-compat: Show native field/creator transform popups
No longer anchored to the element, but instead to the cursor.
2022-06-17 18:49:07 -05:00
Abe Jellinek
c31df4ae6b fx-compat: Display item box using CSS grid
- Widths are now correct
- Rows are a little too tall
- Field value vertical alignment is off
- Platform styling isn't done and some styles might be redundant
- Still can't scroll vertically
- Creator name inputs still displayed wrong
2022-06-16 16:27:16 -05:00
Tom Najdek
cb3d4b1800
Fix tag selector menus not appearing on fx102 (#2654)
Also tweaked offset where a context menu appears to 1px from cursor
(was 2px) to match other context menus.
2022-06-14 18:28:02 -04:00
Abe Jellinek
cd17c90f2e fx-compat: Don't show hidden types in Item Type menu 2022-06-10 14:03:53 -05:00
Abe Jellinek
ac9e882bda fx-compat: Item box: Fix URL opening and field blurring 2022-06-10 13:59:01 -05:00
Martynas Bagdonas
097d423275 fx-compat: Fix spellchecker and dictionary manager 2022-06-10 12:57:27 +03:00
Martynas Bagdonas
5924753fd1 fx-compat: Fix unloaded tab loading 2022-06-09 16:30:34 +03:00
Martynas Bagdonas
64c652ea06 fx-compat: Replace eval with wrappedJSObject in PDF reader 2022-06-09 13:13:08 +03:00
Abe Jellinek
9a2e98360a fx-compat: Scaffold: Update Monaco
Now that we can. Quite a bit faster and more customizable.
2022-06-08 17:38:59 -05:00
Abe Jellinek
e537018e71 fx-compat: Initial fix for Scaffold
Not working:
- Web tests (hidden browser is broken)
- Test Updated status text
- Various platform menu things (code copied from ZP and will use whichever
  approach we settle on there)
2022-06-08 17:16:50 -05:00
Martynas Bagdonas
1b324f9bd1 fx-compat: Fix color rendering in annotation popup, use checkbox 2022-06-08 21:22:37 +03:00
Martynas Bagdonas
1e25e2ac4c fx-compat: Fix invisible caret issue in linksBox tags popup 2022-06-08 21:22:37 +03:00
Martynas Bagdonas
a7bc25b553 fx-compat: Fix PDF reader window 2022-06-08 18:57:26 +03:00
Martynas Bagdonas
08089d6120 fx-compat: Fix tooltip node to work in PDF reader tab 2022-06-08 18:57:26 +03:00
Martynas Bagdonas
2e5388af5b fx-compat: Implement tagsBox element 2022-06-07 17:13:48 +03:00
Abe Jellinek
7e55ea59bb fx-compat: Item box: Change creator type label correctly 2022-05-31 16:31:20 -07:00
Abe Jellinek
b9f3bea8c3 fx-compat: Attachment box: Only add listener once 2022-05-31 16:30:55 -07:00
Abe Jellinek
1b74befd64 fx-compat: Fix Item Type menu regression 2022-05-31 15:04:14 -07:00
Abe Jellinek
d3555228b2 fx-compat: Fix Duplicate Items merge view 2022-05-31 14:57:47 -07:00
Abe Jellinek
59d5013952 fx-compat: Item box: Fix menu actions, plus/minus buttons 2022-05-31 11:23:19 -07:00
Abe Jellinek
496f34117c fx-compat: Fix attachment rename, remove <links-box> observer
<links-box> doesn't actually have a notify() method, so an error was
being thrown on each notification.
2022-05-27 13:28:07 -06:00
Abe Jellinek
1ef40d9423 fx-compat: Fix attachment box 2022-05-27 12:56:13 -06:00
Martynas Bagdonas
307701788f fx-compat: Fix and extract notesBox into a separate element 2022-05-27 13:21:18 +03:00
Abe Jellinek
f05d6fe0e0 fx-compat: Fix basicViewer for http(s):// URLs
maychangeremoteness="true" is required to successfully load pages from
the web even though we never actually change remoteness.

https://searchfox.org/comm-central/rev/2cf3a09a0127fe73e932c5ee793986f3bed2ccd2/mail/base/content/aboutMessage.xhtml#118
2022-05-26 10:45:57 -06:00
Abe Jellinek
e26fd18450 fx-compat: Change autocomplete-input load method 2022-05-26 09:39:30 -06:00
Martynas Bagdonas
0079fbdb08 fx-compat: Fix relatedBox 'Add' button visibility 2022-05-26 18:31:07 +03:00
Martynas Bagdonas
db0ac723fa fx-compat: Note editor and links box fixes:
- Add links-box component (inside noteEditor.js).
- Add related-box component and fix related pane.
- Use tagsBox.jsx instead of tagsbox.xml in note editor links box popup.
- Remove CSS styles and bindings for noteeditor, relatedbox and tagsbox.
2022-05-26 18:23:31 +03:00
Martynas Bagdonas
4a1812e5ba fx-compat: Fix selectItemsDialog 2022-05-26 18:23:31 +03:00
Abe Jellinek
4a856b94cc fx-compat: Item box: Fix abstract expander 2022-05-25 13:22:52 -06:00
Abe Jellinek
3566d1fc1f fx-compat: Item box: Fix item type menulist
- Use IDs as list item values
- Use addEventListener() so events are actually received
- Put menulist inside <td>
    * This causes a small appearance regression at the moment because
      <td> margins/padding are a bit off, but that issue is visible on
      all other fields already.
2022-05-25 12:51:15 -06:00
Abe Jellinek
c2ce5c7596 fx-compat: Remove duplicate menulistItemTypes.js 2022-05-24 15:56:09 -06:00
Abe Jellinek
5d96f9960a fx-compat: Item box: Fix unstyled menulists 2022-05-24 15:48:10 -06:00
Abe Jellinek
fdd73d4ada fx-compat: Item box: Fix multiline fields & autocomplete 2022-05-24 15:42:54 -06:00
Abe Jellinek
02bcb1712c fx-compat: Fix content shrinking to half of window height
On my system, this would always happen after adding a new attachment.
2022-05-24 13:59:12 -06:00
Abe Jellinek
29b270e761 fx-compat: Fix progress queue / Find Available PDFs 2022-05-24 13:52:52 -06:00
Abe Jellinek
195dd379d9 fx-compat: Fix context menu icons showing on Mac
Why does :is match when a regular selector doesn't? I have absolutely no
idea, but it's more concise anyway.

Fixes #2620
2022-05-24 13:37:20 -06:00
Abe Jellinek
87decd0f8d fx-compat: Fix _getExtensionFromURL() 2022-05-24 12:07:30 -06:00
Abe Jellinek
300af4477f fx-compat: Fix Attach Link dialog 2022-05-24 12:02:37 -06:00
Abe Jellinek
a2215cb8f6 fx-compat: Fix hard confirmation dialog
ID changed to commonDialog so we get commonDialog.css styling for free.
2022-05-24 11:43:45 -06:00
Dan Stillman
1a1a5924da fx-compat: Simplify Zotero.File.download()
`NetUtil.newChannel()` can take a string spec, so don't bother parsing
to an nsIURI first

Follow-up to 7adb8fd150
2022-05-24 03:03:36 -04:00
Abe Jellinek
7adb8fd150 fx-compat: Fix Zotero.File.download() 2022-05-24 00:47:22 -06:00
Abe Jellinek
eae9a4447d fx-compat: Mostly fix locateManager
Still many selectors to update in preferences.css, but how we do that
depends on what our <prefwindow>/<prefpane> replacement looks like.
2022-05-24 00:46:39 -06:00
Martynas Bagdonas
7b4c4e528c fx-compat: Fix context pane:
- Stacked view.
- Item pane tabs.
- Note list search box.
2022-05-19 14:10:51 +03:00
Martynas Bagdonas
e99a0d4515 fx-compat: Partial fixes for note editor 2022-05-19 14:10:51 +03:00
Dan Stillman
29bc36c02a fx-compat: Tweak styling of Create Bibligraphy window
And generalize CSS rules for richlistitem and groupbox headers (using
HTML H2s for the latter, as Mozilla does)

Follow-up to 547311ff26
2022-05-19 02:06:42 -04:00
Dan Stillman
9bf61f9914 fx-compat: Update CSL Edit window 2022-05-18 23:45:51 -04:00
Dan Stillman
d6e0c90baa Revert "fx-compat: Fix item box CSS link casing"
This reverts commit 4c21a42b53.

itemBox.css is correct
2022-05-18 23:45:51 -04:00
Abe Jellinek
948b09a27f fx-compat: Remove uses of defunct DOM constructors
This fixes feed translation. Getting a lot of '[object Object]' fields
from that, but I don't think it's related to these changes.
2022-05-18 20:03:37 -07:00
Abe Jellinek
09ec5b1fde fx-compat: Fix ProgressWindow
popup -> alwaysontop because popup removes the background.
2022-05-18 19:52:59 -07:00
Abe Jellinek
547311ff26 Fix Create Bibliography
listbox is gone, but richlistbox is still here as a custom element and
works fine for cases where we don't need virtualization.

groupbox label and richlistitem styles should probably be copied to
somewhere global once tuned a bit.
2022-05-18 19:32:39 -07:00
Abe Jellinek
4c21a42b53 fx-compat: Fix item box CSS link casing 2022-05-17 10:03:29 -07:00
Abe Jellinek
5f24b2dc98 Fix Create Parent dialog 2022-05-17 09:47:19 -07:00
Abe Jellinek
49a9c2dba9 fx-compat: Fix Export dialog
RDF isn't working yet, but CSV works well.
2022-05-16 14:27:23 -07:00
Abe Jellinek
60606a8528 fx-compat: Fix Add to Collection menu
Document.createXULElement is handy.
2022-05-16 13:18:16 -07:00
Martynas Bagdonas
9e93007355 fx-compat: Initial fixes for PDF reader, tabs and contextPane 2022-05-13 18:50:19 +03:00
Dan Stillman
4eb405d405 Update utilities submodule 2022-05-13 04:28:57 -04:00
Dan Stillman
da9154d811 fx-compat: Get basicViewer working for debug output
Doesn't work with, e.g., zotero://timeline/library
2022-05-13 04:28:57 -04:00
Dan Stillman
d6875e1182 fx-compat: Switch to Mozilla's method of loading window scripts 2022-05-13 04:28:57 -04:00