Commit graph

136 commits

Author SHA1 Message Date
Szymon Kłos
a091d1970c remove-w2ui: reuse user list from notebookbar
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id3bb9615385e9951dd53d591f71389975fa8ace9
2024-03-29 01:40:29 +01:00
Szymon Kłos
9923e69595 jsdialog: move helpers for scrollable bars to separate file
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I33454bc7d6a8f0c7e2346e36364fa39ba97f826c
2024-03-27 11:15:05 +01:00
Szymon Kłos
fcd431f3e2 jsdialog: move container widgets to own file
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ice18e1d861140b20c1b161032fb89d0e107ca18e
2024-03-27 11:15:05 +01:00
Gökay Şatır
c402ecd41a Introduce docdispatcher.js.
In order to handle commands in a more structured way.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: If7e2aed089cda1df59b2bf2b454b540d36391df0
2024-03-23 18:46:16 +01:00
Andras Timar
6686aaa01a Remove unused viamapi-client.js file
It was part of the removed Vereign document signing feature.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibe8a31102eaefcfba1898ad2f31226c24e12f330
2024-03-21 10:09:29 +00:00
Szymon Kłos
bde997dfa8 remove-w2ui: use JSDialog for formulabar
- remove w2toolbar
- use JSDialog instead
- remove Leaflet class, use ES6 class

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I94fd17983cd727eefdd5b43f5b93d4319f15f3b0
2024-03-19 17:39:24 +01:00
Szymon Kłos
4ef8fb4c9c jsdialog: allow to press dropdown arrow using keyboard in MenuButton
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I5a4c0e482fc632334a8041797368be3e6cf2e4e4
2024-03-19 10:51:42 +01:00
Skyler Grey
34ece47362 Convert ColorPicker.js to ColorPicker.ts
I did the things necessary for TypeScript to stop complaining, as well
as additional modernizing things such as formatting and removing
L.Class.extend

Here's the full list:
- Update browser/Makefile.am with the new filename
- Fix any typescript errors that prevented compile
- Remove L.Class
- Factor out repeated types
- Tighten types to avoid functions leaking anys

Though not all of those steps are necessary, they are all useful, as
along the way TypeScript helped me to find and fix several times when I
had incorrectly inferred what the type should be

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I20d6580c53337909788b0517353c5852365b871d
2024-03-18 18:07:30 +01:00
Szymon Kłos
361039c528 remove-w2ui: reuse MenuButton for color picker button
- reuse MenuButton as base for colorControl
- add only last color indicator and activation on left side button
- make possible to clreate split button from unotoolbutton

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I8cd20149cc5bc25bedf4e0b0c56fc93d53339f4b
2024-03-18 12:58:02 +01:00
Henry Castro
5ac45caea0 browser: fix prettier wrong parameters
Change-Id: I40cece8d48b01b8a6dc1cbf91699a5ef436b3631
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-03-12 13:49:38 -04:00
Henry Castro
db8fee7d9b browser: create 'prettier-write' rule
Change-Id: I3f326da9428e4c8c5558912004446725f6b32772
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-03-12 13:49:38 -04:00
Henry Castro
20462e576f browser: create prettier rule
Change-Id: I8ea727458c450a14880b06971d48c58edd0961c2
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-03-12 13:49:38 -04:00
Henry Castro
71023d9ba7 browser: simplify 'prettier' call
Change-Id: I0e2af38d70e30dea42187fa2fb960da5328af857
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-03-12 13:49:38 -04:00
Henry Castro
e2103b241a browser: create eslint rule
Change-Id: I65766ffdebf5c3148cf13507f6ee9c1980c4bb79
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-03-12 13:49:38 -04:00
Henry Castro
5d8e9983a9 browser: simplify eslint call
Change-Id: Ic88985555934f0d6274b9b87a298cf4769594cd1
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-03-12 13:49:38 -04:00
Henry Castro
76d33f1182 config: add 'prettier' command before bundeling process
Execute the 'prettier' command to check format code style.

Change-Id: I93e4a57e03d26627caa3b2c52ae44669a8723267
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-03-12 13:49:38 -04:00
Henry Castro
ec40680f9a browser: admin: ignore eslint transpilation code
The *.ts files in admin are transpiled typescript to *.js
so ignore the file to eslint again.

Change-Id: Icb5edbcc9d782562886c17453921979fd2dbdd2e
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-03-12 13:49:38 -04:00
Henry Castro
f6895dcddf config: fix eslint 'prettier' package extension
config setup: builddir != srcdir

------------------------------------------------------------

Oops! Something went wrong! :(

ESLint: 7.0.0

Error: Cannot read config file: ../browser/.eslintrc
Error: ENOENT: no such file or directory, open '../browser/.eslintrc'

Change-Id: I7900d9715b9a918c2f978aae63522a8c62956278
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-03-12 13:49:38 -04:00
Szymon Kłos
668fcfac0b jsdialog: make Dropdown submenu code more generic
- automatically handle html content
- fix dropdown cropped when close to the screen edge
  and content is custom html (fixes #7578)
- automatically handle focus

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I3187971f47295d699a18dbf5b8dd129e3a809991
2024-03-11 15:21:45 +01:00
Szymon Kłos
98ac4ccd22 remove-w2ui: reuse JSDialog menus for LanugageMenu
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ica44237bb054d0e1a16eed1f9f062b948497181c
2024-03-11 15:21:45 +01:00
Szymon Kłos
73553cdd26 remove-w2ui: move menu definitions to separate file
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I478fffd6b533909016e3af89e4e08fd793f5ab48
2024-03-11 15:21:45 +01:00
Gökay Şatır
8d1d34d48f Add docstateFunctions.
Simplify readonly document checks.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I8884ba8cc3fec56817d8e3e02c775a9c891dfba0
2024-03-06 14:03:02 +01:00
Pranam Lashkari
bfe0c5e7de annotation: remove obsolete mobile wizard popup code
it was introduced in 13bc532
and it was removed from use in 2f77b3a

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Iec401a9505491fe69196cdb1e7192fa499d3d38f
2024-03-04 07:41:16 +01:00
Szymon Kłos
3d56af0ab5 Add KeyboardShortcuts and disable multi-sheet selection
This will be a class for storing keyboard shortcuts in
a unified way. We can easily define shortcuts for different
languages so we don't have to write long if-statements
which can cause problems if done not very carefully.

Added tests protecting from regressions.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4dfa2d757eab4ecc1f21279e68d1ee97ae261dc5
2024-03-01 08:59:36 +01:00
Skyler Grey
97a86549a7 Convert Control.UserList.js to typescript
I'm working on a set of patches to improve the userlist/following UI in
Collabora Online. Using typescript will allow me to be more certain
about the code I'm writing and make my code easier for other people to
understand.

Additionally, as I'm about to make significant changes to this file,
updating it to typescript now won't even damage the ability to blame too
much!

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Iccf64a01a465d895cbc1c24ad107f85665b5fbf3
2024-02-28 16:07:22 +01:00
Patrick Luby
22e341b656 Revert "Remove unused file."
This reverts commit c69e14a5dd.

The above commits causes document loading in the iOS app to
always fail. Even the animated loading graphic never appears.

I don't know why removing that .js file causes this behavior,
but I did see the following in the trace messages in Xcode.

  To Online: load url=null accessibilityState=false lang=en-US

It appears that the JS code is sending a null URL to load.

Signed-off-by: Patrick Luby <guibomacdev@gmail.com>
Change-Id: I7af391c4a4fb0d3d363b7023a27d4fcf92f7a4b5
2024-02-26 10:49:31 -05:00
Andras Timar
cbc32dc38e fix unconditional install-data-hook
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I3236d8ebb323b7d682e58c01da4ad8ec01ee943d
2024-02-22 00:26:23 +10:30
Gökay Şatır
c69e14a5dd Remove unused file.
This was added for IE11 compatibility.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I4be5d3199c1354e2e36ac31734c3ed4ffb46cd54
2024-02-16 15:13:33 +01:00
Szymon Kłos
e05881b15d jsdialog: added Util.StateChange
- move listener watching disabled state to separate file
- use also for listboxes, comboboxes, spinfields
- handle state in menubutton

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I841413f17abd6398a7e82496c3f20bdc52ab9514
2024-02-14 13:16:58 +01:00
Michael Meeks
6c9fb23081 refactor: inline CRS.Simple into CRS.
Cleanup un-used wrapping.

Change-Id: I510f8244e51f2d6f56fdb0aee4046ebfd894c9e1
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-02-07 17:13:48 +00:00
Hubert Figuière
adbe12783f Fix warning for unocommands.py
This resolves the following Python warning.
unocommands.py:319: SyntaxWarning: invalid escape sequence '\('
  f.write('''};

Also make sure the output depends on the script

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I11f1e028c9c132f4afc66f9b5a6137b478f00774
2024-02-06 17:50:09 -05:00
Méven Car
b3f487b5d9 widgets: Add a time field
Signed-off-by: Méven Car <meven.car@collabora.com>
Change-Id: I9e3e280db4a0b1f3e3a9df5fe8b6e0bfd97ddaa5
2024-01-30 21:24:49 +01:00
Neil Guertin
c4e7693ed3 Extract debug tools to new file Debug.js
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I20f42d24a6af91bdcf79dc7fe19e1cf25f90bd89
2024-01-26 11:55:17 -05:00
Rash419
1fbbae0934 admin: add about page for indirection server
- show full license

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ia51012b5277e6666733fc83441754276a79759da
2024-01-18 16:15:42 +05:30
Andras Timar
efb34a3c5e src/map/handler/Map.SlideShow.js contains localisable strings
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Id97b3f6e2f049e7a8075f3b7e8fde2894ca58de1
2024-01-17 14:32:36 +01:00
Michael Meeks
df5cf10002 drop pako dependency.
Unused in the package since:

    commit 2def6dc3d5
    Date:   Sat Aug 27 17:49:50 2022 +0100

    Switch to zstd image compression.

Change-Id: I785ad2c1522721ed34cf89a1922ee06d5e2507e4
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-01-16 22:28:10 -04:00
Caolán McNamara
d32785cdbb tsc can report an error but create js output, so 2nd make's 'succeed'
so on failure remove the output so a second attempt doesn't appear
to succeed

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ibc1f7d46c2946cdc6a4dbcd6181872fb12e19fb6
2024-01-15 16:20:00 +00:00
Szymon Kłos
bfc4b1599d IdleHandler: move message strings inside
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I91da2fda73967d11673f59a4c29fb94f2e12f5a0
2024-01-09 15:28:35 +01:00
Andras Timar
93e937fd51 Add src/control/Control.UIManager.js to list of localizable files
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ifb6795647332b6f2dfb208e9b426f788759e325a
2024-01-05 13:03:55 +01:00
Michael Meeks
b3a2d55194 remove unused code.
Change-Id: I328cf6783deae0a9be3aab10634b8d76e7efe965
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-01-04 09:26:55 +01:00
Andras Timar
b9153c63ef js/global.js contains localizable strings
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I3c4317a7766ad179cf38e4d0d972e6a5c4adab11
2023-12-13 13:03:29 +01:00
Caolán McNamara
9daba64dc1 use of gseparate-dwarf can block some optimizations
with in in place the sizes are

-Os for core and online
  du -h online.wasm 155M

-Oz for core and online
  du -h online.wasm 145M

and a warning of:

em++: warning: running limited binaryen optimizations because DWARF info requested (or indirectly required) [-Wlimited-postlink-optimizations]

without gseparate-dwarf the sizes are:

-Os for core and online without -gseparate-dwarf
  du -h online.wasm 133M

-Oz for core and online without -gseparate-dwarf
  du -h online.wasm 119M

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I91586abe0e52f6de20d0f04636bb5a2be93d92be
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-06 12:39:46 +01:00
Michael Meeks
2b3088ee52 wasm: don't try to package obsolete and/or renamed online.data
presumably a regression from 158fe2f93:

    Trying to init LOKit cause mysterious runtime error...

Change-Id: I28603a98a7c9015afc76d46a302a23ccf4ece261
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-11-16 19:30:48 +00:00
Andras Timar
ee48dc7451 src/docstate.js contains localizable UI strings
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I3a09891900ff0c22e9f133d9032a2625ef47e6a8
2023-11-09 13:19:44 +01:00
Ashod Nakashian
8728cd5ea1 wsd: config cleanup and warning fixes
Change-Id: Idb66227d98f8fcca35307c3598a1fcc6b69e38c6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-10-26 20:31:45 -04:00
Szymon Kłos
4c98fe54f0 jsdialog: move dropdown to separate util
so it can be reused

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I9f7940bd9f25a837d673dce20b5ded3a70d134ad
2023-10-26 09:19:24 +02:00
Szymon Kłos
bde5ee533f Enable duplicate checker
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: If08ceb5dd6ca83b6c1bd5e8bd1d8028a61f4296f
2023-10-18 11:47:02 +02:00
Andras Timar
41fce2572b restore the original install-data-hook in case of debug builds
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I45dc86b7473babba723a873e4a21c8021797fb07
2023-10-16 17:21:56 +02:00
Szymon Kłos
1b4883877c jsdialog: move mobile border selector to separate file
to make main JSDialogBuilder shorter and easier to read.
And move handler to mobile builder as control exists only
on mobile.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I9a14c7050711658638d22f0fd7b47e038b5952a1
2023-10-16 10:52:14 +02:00
Szymon Kłos
b35c4f5a1d jsdialog: move frame handler to separate file
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I36640680eb2e0594eb336353deba6c34d1d933e7
2023-10-15 11:43:07 +02:00