Commit graph

117 commits

Author SHA1 Message Date
Andras Timar
890cda88a7 do not display 'Go Offline' button when WASM is not enabled
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I02bde8b9f6ca5cfadc036ae930e7f6eeb23c2587
2024-01-06 19:03:13 +01:00
Andras Timar
00278bc5a9 Set window.savedUIState to false in Android app, too
Similarly to the iOS case seen in #7908 the %SAVED_STATE_UI%
does not get replaced. In mobile apps there is no fileserver
that can replace these variables.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Icb7f9d7550b0990cc0ad1d65253773b49ff97795
2024-01-04 09:13:33 +01:00
Andras Timar
bd649e2d40 Enable grouped 'download as' for mobile apps to save space on notebookbar
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib2388139e0214c9f244796546a362b56cca986ed
2024-01-04 09:13:33 +01:00
Hubert Figuière
738505c4de framed.doc: Added postmessage for Get_User_State
This was introduced in https://github.com/CollaboraOnline/online/pull/7514

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I98b9b5b04742541904afa2361ac961498a54c29d
2024-01-03 15:55:37 +01:00
Patrick Luby
bb6fea0bea Set window.savedUIState to false in iOS app
When building the iOS app, the %SAVED_UI_STATE% does not get
replaced with a quoted string during the build and the resulting
unquoted string causes document loading to stop.

Also, eliminate warnings when running in Xcode by adding missing
CFBundleTypeRole entries in the iOS app's Info.plist.

Signed-off-by: Patrick Luby <guibomacdev@gmail.com>
Change-Id: Ie398955241a078be45af28e54c49387ff673870b
2024-01-01 09:59:40 +01:00
Hubert Figuière
85e36b3bb7 postmessage: Added Action_Fullscreen and Action_FullscreenPresentation
They allow respectively to switch to fullscreen, or to start the
presentation in impress in fullscreen
Action_FullscreenPresentation can get the following arguments:
- StartSlideNumber: the slide to start at
- CurrentSlide: start at the current slide
The options are exclusive to each other. StartSlideNumber takes precedence

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I4d97eadf8c119e70e5738df4063d209feb5db793
2023-12-15 09:47:54 -05:00
codewithvk
367f618689 Fix: Many Icons Not Inverting Color In Dark mode cool-help
Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: I3015e6a40030d40fe11d2db85703b8be1eefbed1
2023-12-14 15:16:34 +01:00
Hubert Figuière
fa268b8e0e framed.doc: if entering bad message data, recover
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I6337029fe1eeffb7f20acaa100602ea44a0dbc63
2023-12-06 08:53:29 +00:00
Hubert Figuière
3fc8bdffe3 framed.doc: Allow switching app on the fly
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Idad883f566a02b1e777c8c7af6b9b52da3a62e69
2023-12-04 11:10:15 -05:00
Hubert Figuière
44b92e18af postmessage: don't send ready message unecessarily
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Ia57d19298615fe4cd5b95c60c6b097631d54e4b4
2023-11-30 11:49:39 -05:00
Hubert Figuière
2afa6db0ca postmessage: Added Show_StatusBar and Hide_StatusBar
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I86d507f6aad7f3acbc69e82f366e14b4ea78824a
2023-11-29 09:27:52 +00:00
Hubert Figuière
c1f9da92a1 framed.doc postmessage: Hide/Show the ruler
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I1b2f7c4ee0e4faebad4050167ce7aabb6adce275
2023-11-29 09:27:52 +00:00
Hubert Figuière
1ef0ffeb76 framed.doc postmessage: Hide/Show Save work with the notebookbar
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Ie0b58528d1545948fbf50d095093fd837ef913cd
2023-11-28 16:03:33 +00:00
Hubert Figuière
79e33ab76c framed.doc: Relayout the post message test harness
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Idbd1b5d89ea53d4f9925b727e8db2854ac23b17f
2023-11-28 16:03:33 +00:00
Caolán McNamara
afc28b9e69 we want %ACCESS_TOKEN%, etc to exist for wasm
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I58f187c28c158e80fbe97290bb802b3481a44de9
2023-11-27 10:48:44 +00:00
Andras Timar
70e960b564 disable spell check for document name input field
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I23e03ba381aa320511aacf24196aba1ff934fc52
2023-11-23 14:32:13 +01:00
Hubert Figuière
1114af585a default-ui: Allow skipping the UI state saved in local storage.
Pass SavedUIState=false to the ui_defaults

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I2cceffed338440d1fee5b0818e072ecc02379468
2023-11-08 10:12:42 -05:00
Skyler Grey
0bf054c9a3 Stop onscreen keyboard when panning calc on tablet
Before this change, panning a calc spreadsheet would cause the onscreen
keyboard to pop up when in tablet mode. Dismissing the keyboard would
not stop it from being popped up the next time you panned around. This
made it very difficult to pan around spreadsheets in calc without either
using an external keyboard, the mobile app or another device altogether.

This commit introduces a known regression: when you are on a tablet and
have a physical external keyboard, you could previously select the cell
and start typing. Now you must tap into the cell in the same way you
would if you have an onscreen keyboard. This matches the behavior on
mobile devices. I consider this regression a reasonable tradeoff, so
notwithstanding I believe this should be merged.

Additionally, this commit adds 2 POST messages, "Hint_OnscreenKeyboard"
and "Hint_NoOnscreenKeyboard". These can be used to override our guess
if you know more about whether the device has an onscreen keyboard than
we do.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I8f3683ccb9e57f0c4a5bf8e415f9aabef917dd78
2023-10-31 16:32:33 -04:00
Hubert Figuière
8ca2adcb16 postmessage: added message to collapse / extend notebookbar
The new messages are: Collapse_Notebookbar and Extend_Notebookbar
As a side effect they also hide the classic toolbar the same way

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Ic9d04876acb06f2885a6be1e171df7f87e513ed8
2023-10-30 11:40:52 -04:00
Hubert Figuière
fd329c353c postmessage: Add field to allow sending arbitrary postmessages
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I13976c21ebea018150469dd56f93b3b1ab2105cc
2023-10-25 10:31:04 +02:00
Ashod Nakashian
f978b0146c browser: add wasm.html to load documents via wasm
This is of course for testing locally and as a demo.

This expects the wasm build browser/dist to be located
inside at browser/dist/wasm (which currently is done
manually).

Change-Id: I285177b4f08591cffe772acba531cf1a3434178b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-10-24 21:33:02 -04:00
Szymon Kłos
7df4101713 postmessage: add more logging for debugging issues
Without that integrator doesn't know what happened.
We were silently ignoring messages.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I897a95b343a1b436745816ccbef7656f30981112
2023-10-19 10:43:40 +02:00
Andras Timar
4aff3d8be2 remove signing-identities.html
it belonged to the removed unused document signing code

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Idf57b30a508381e02c8d62196de38c828cd77f2f
2023-10-05 15:07:24 +02:00
Szymon Kłos
e81f795abe Add test button for Get_Export_Formats PostMessage
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I07bec21cce481d72f628d860937953a9e4bd1e91
2023-09-26 16:45:16 +02:00
Gökay Şatır
d6d64b38d7 Resolve id conflicts between contents and the buttons.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Id55c56e65cf27dd67bf6c88488b5f29b6e5dade8
2023-09-11 17:00:35 +03:00
Darshan-upadhyay1110
7db8d225ff Add access-key functionality to open userlist.
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I7787aaa11e673f8701b9b94f85ce225c254e2ac6
2023-08-31 12:03:15 +03:00
Darshan-upadhyay1110
1626281940 Update shortcut information for calc sheet
Added information in help tab (keyboard shortcuts)
 - About moving back and forth in between calc sheets using keyboard shortcuts
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>

Change-Id: I7ccbc194fe67fb36f9d68827dfa7c5636c9bc7e8
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
2023-08-22 10:08:02 +02:00
Rash419
5dcce1965e android: enable dark mode in documents
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I108601f78f4d7bbf704b5f5f89b20c8f8a597355
2023-08-09 17:37:16 +02:00
Pranam Lashkari
fb5909bc40 theme: use integration theme value from the interation message
problem:
till now we used values from DOM elements which were unreliable,
sometimes they are not discoverable due to nested iframs.
That threw some 404 due to incorrect theming path.

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ibc291ce9f64db799095e1edcb14c598bdd085de7
2023-07-24 10:06:35 +02:00
Marco Cecchetti
abca8e5dd3 Adding support for enabling/disabling a11y support from the ui
Added toggle button/menu entry for enable/disable accessibility support.
This ui feature is available for Online Writer only.
The button/menu entry is added only when accessibility is enabled at
server level.
That allows to enable/disable accessibility per view.
By default, the accessibility support is disabled.
Anyway the accessibility support state is saved to local storage
if available.

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: If5968a47f17922038b9da3d320cbed84ebb7688b
2023-07-10 16:02:18 +02:00
Marco Cecchetti
d01bedc09c a11y: add config for enable/disable accessibility in general
A new section about accessibility has been appended to coolwsd.xml
config file

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I086abdf73646639283eb655ae60f200fb64e495a
2023-06-08 00:00:51 +02:00
Rash419
81834bc466 added serverId and routeToken in about dialog
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I498dd2a9f1fb08d9af116ac27ac645b31b87ed57
2023-06-05 21:27:50 +05:30
Julius Härtl
752cde163e feat: Add UITheme option for light/dark to ui_defaults
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Change-Id: Ief028dcec0daa2ae448f83df993e0e5ade594a7c
2023-06-01 09:49:08 +02:00
Gökay Şatır
3a30875368 Add shortcuts to help popup.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I57e715f71bf3f485e8fd66495ab378688010a26b
2023-05-31 15:11:21 +02:00
Gülşah Köse
51dba6c293 Make dialog button style to specific that dialog #6275
In tabbed view when we open help or keyboard shortcts dialog
"button" style of cool-help.html overrides the button.ui-tab.notebookbar.
So all buttons (even in notebook bar) uses dialog buttons'
text-decoration: underline ans pad padding:0

Here we make the dialog's button style to specific that dialogs.

Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: Iacaab42efa527fc5c6ada21fd007e4a352912b60
2023-05-23 08:43:51 +02:00
Gökay Şatır
9d6296e4b3 Remove unused document signing code.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I30cf381d1fa282cf222ab5abc676374ab7eefb6c
2023-05-08 21:51:47 +03:00
Pouya Mozaffar Magham
75219b57d3 Feature add Send_UNO_Command postMessage
Signed-off-by: Pouya Mozaffar Magham <pouya.mozafar@gmail.com>
Change-Id: I465293b1d2d4bdc25b237a8a7054bf428543464b
2023-04-03 08:56:43 +02:00
Gökay Şatır
50d447cb7e Loop focus inside about dialog.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I48e3d8ebef4e79f2bfb2330ec044105a3b40eb5e
2023-03-23 17:35:12 +01:00
Gökay Şatır
51bb1d3aa7 Remove unused vex definitions.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I16a5df46bced608952c22bf979808bc735645366
2023-03-22 07:49:07 +03:00
Patrick Luby
7dd1e505e6 Fix issue #5841 welcome, feedback, and buy product URLs are empty on mobile
Mobile apps don't substitute these values so set them to zero length
strings.

Also, the iOS app sets the base text direction via the "dir" parameter
so add handling of that parameter in cool.html. TODO: check if the
Android and GTK apps need to implement the "dir" parameter to handle
RTL layout.

Signed-off-by: Patrick Luby <patrick.luby@collabora.com>
Change-Id: Ied8268ec256011281961ef610d53baeee0efe9cd
2023-03-15 09:29:56 +01:00
Rash419
b9914a3042 js: added routeToken as parameter in wopisrc
fetch route_token from indirectionurl and add them in wopisrc
parameter

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I6e724d0c59e12d4f7f6c125ec076e90d20b9b3c8
2023-01-31 15:32:30 +01:00
Tor Lillqvist
81c4adb199 Use branding.css also in the EMSCRIPTENAPP case
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I832414864130b9baa1ce7577b3006c7c37dc14eb
2023-01-29 12:45:28 +02:00
Tor Lillqvist
38171388c8 Make the temporary "WASM app" work
Now I hope things are initialised in the right order and the plumbing
gets set up so that messages are passed as expected. It seems to work
most of the time.

Main changes are:

  - The online WASM executable is built using the -s MODULARIZE -s
    EXPORT_NAME=createOnlineModule options. This means that the WASM
    runtime is not automatically initialized and the main() function
    is not automatically started. Only when the createOnlineModule()
    function is called is that done. Calling exported C/C++ functions
    is a little bit more complicated.

  - Code to actually Base64-encode strings to be executed as
    JavaScript when expected is now present in wasmapp.cpp. (After
    being passed through the Base64ToArrayBuffer function on the JS
    side.) Whether this is actually necessary is not fully clear, but
    to keep the code similar to that in the GTK, iOS, and Android
    apps, this is kept as such for now. It would probably work fine to
    just directly create the ArrayBuffer in the C++ (using the EM_ASM
    magic).

  - The COOLWSD::run() function is now run in a separate thread so
    that main() can return.

  - The FakeWebSocket's onopen() function is now called from
    innerMain(), where the HULLO message is sent. It remains a bit
    unclear if this really is the ideal place.

    In the mobile apps the HULLO message is sent and the onopen()
    function is called in the window.socket.onopen() function in
    global.js.

    But note that despite that the WASM app and the mobile apps are
    largely quite similarly constructed and the FakeSocket and
    FakeWebSocket plumbing is the same, there is an important
    difference. In a mobile app the C++ code is what runs first, and
    that then loads the HTML page into WebKit, in which the JS
    runs. In the WASM app it is the other way around. The web page is
    naturaly the one that is loaded and the JS code then starts
    running the C++ code as WASM.

Finally, note that the whole concept that there is a separate "WASM
app" is temporary.

What we eventually want to achieve is that the COOL webpage upon
loading will connect a COOL server. As it does currently. The COOL
server runs the online and core C++ code to load a document, and
renders document tiles and sends those to the client JS code to
dispay.

The new thing will be that, if enabled, in addition to the HTML and JS
resources, the client will also download the WASM code and data
resources. Also, the document and updates to it will be downloaded
while being edited so that a copy can be kept in client memory. But
the WASM code and the downloaded document will remain unused most of
the time. Only if the connection to the COOL server breaks will the JS
start running the WASM code and the JS will talk to online code
running locally as WASM instead of to a COOL server. Obviously there
are still lots of things hanging in the air here regarding how exactly
this will work.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ib1786a0b485d51797b0f2302d4296aa1ff9df5c1
2023-01-28 22:04:39 +02:00
Tor Lillqvist
6514e01da2 Hardcode window.userInterfaceMode to notebookbar for EMSCRIPTENAPP for now
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I79611e982de2d49b125d7c887081385c6597a028
2023-01-27 22:56:56 +02:00
Tor Lillqvist
9e81cdefde Stop using Qt
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Icb7c280c20ed02ef5840272a0e979e1446af2b56
2023-01-26 10:02:29 +02:00
Hannah Meeks
401f76ed11 Dialogs: Help Page - Spelling Fix
Signed-off-by: Hannah Meeks <hmeeks4135@gmail.com>
Change-Id: I87c3f9aab49dd32e6d897cadaf0f2945b82e0d4a
2023-01-18 23:44:46 +01:00
Tor Lillqvist
3c39657ae5 Add debug output and simplify use of QtLoader
Also, don't load online.js. It seems that it will be loaded into the
JS "web worker" for each thread automatically by
online.worker.js. (But hmm, what loads online.worker.js? I am probably
completely confused here. Probably getting rid of Qt things
(qtloader.js) and using only JS that Emscripten produces (modified if
necessary) will make things simpler to understand.)

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I050a20a553b7c0f6ebe9db0e7cb9cab2f9829f9e
2023-01-16 18:43:21 +02:00
Tor Lillqvist
7978e74434 Try to send the HULLO message only after the WASM runting has been initialised
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ida3e01482db0e18d17e8e6db0c75667c39adae59
2023-01-16 18:43:21 +02:00
Tor Lillqvist
40f53c6696 Initial attempt to load the WASM using code from Qt
Obviously just this is not a good reason to involve Qt, but we want
now initially to get something to even show up, so let's start by
using HTML and from the Qt-based WASM-LibreOffice. Let's see.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I7841fce8e5680a983cc00d516c3fca3a6747e9dc
2023-01-16 18:43:21 +02:00
Szymon Kłos
5269851595 Zotero: handle disabled state in config
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id65ec60a9832872cf24dd7f295ffb90ad9b377d3
2023-01-16 10:18:04 +01:00