Commit graph

88 commits

Author SHA1 Message Date
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
Tor Lillqvist
b248787bfa We do want to temporarily use the idea that a "WASM app" is a separate thing
Only once we have that working will we go back to having a COOL client
that on the fly can switch from a normal COOL server to using local
online and core code in WASM.

Note that the --with-wasm-fallback configure option now then
temporarily is a no-op, and the ENABLE_WASM_FALLBACK Automake
conditional and WASM_BUILDDIR Autoconf macro are not used anywhere.

Once we have something that barely works as a proof of concept, we can
go back to working towards what we really want.

(Yeah, yeah, I know that "temporary" solutions have a tendency to
become more permanent than you expect...)

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I2f01acd418686e672fd9d2e12cbbd688b128dfa5
2023-01-15 19:46:37 +01:00
Tor Lillqvist
ee157c0810 Clean up WASM-related stuff in configury and the cool HTML page
There is no "Emscripten app", but a COOL client that additionally can
fall back to using in-client WASM code instead of a COOL server.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I86517c6a8f6e0397f6c466278c7be19db001e6d8
2023-01-15 19:46:37 +01:00
Tor Lillqvist
99afb66870 Add FIXME: We don't want a separate HTML file for a "WASM app"
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I3ce8d34e987350a82e9d86dcc0877bc12952c522
2023-01-11 09:27:36 +02:00
Tor Lillqvist
28ca327640 Need to pass strings to C++ with allocateUTF8()
Also need to free them afterwards. Later.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ie09f268132d01fb51a7126fc3c97272f1e11246c
2023-01-11 09:27:36 +02:00
Tor Lillqvist
8cc1c1baa5 Preparations for a "WASM app"
The WASM C++ bits (in wasm/wasmapp.cpp) will have to export functions
hande_cool_message(), handle_error_message(), and
handle_debug_message() to receive the calls from JS.

Change-Id: Ic7f2cffdeb4408a9f726ad70a8ceb8db372787dd
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2023-01-11 09:27:36 +02:00
Tor Lillqvist
29ac04159f Fix the iOS app: Can't use %THINGIES% in cool.html.m4
There is no "file server" in the mobile apps that would expand such
percent sequences. The generated cool.html file is used as is.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I046c23c13ade6195f3f4a8b395ede7c42fc46bd2
2022-11-03 12:47:01 +02:00
Gökay Şatır
cf1074b640 Hide "Translate" menu button if deepL is not configured
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I52a02ab8380468b5dc56cb90a4d8edf2fab56c06
2022-11-02 08:56:25 +03:00
Rash419
6cc2dc2c98 overriding checkfileinfo using hidden input field
wopi host can add following input field to their html to override checkfileinfo, right now only
DownloadAsPostMessage is supported
<input name="checkfileinfo_override" value="DownloadAsPostMessage=true" type="hidden"/>
This can be usefull when same html is used to load collabora online in both desktop browser and mobile webview

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I8ff122f2824694d451724a832d992e08161fb448
2022-10-11 11:34:29 +02:00
Henry Castro
b991e6a017 wsd: add buyProductURL
Change-Id: I5ca0a84e7a927496bfe0b314967a2b11b20bd60d
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-09-29 10:28:18 +03:00
Rash419
d13d430b58 writer: introducing new mention feature
now you can insert a mention just by starting to type with @
integrator needs to implement UI_Mention postmessage api endpoint on which
online will send request of initial character what user is typing on the basis of
that integrator should send the list of user using Action_Mention postmessage api call
object where each object contains { username: '<username>', profile: '<username profile link> }
for example you can check framed.doc.html

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I38387cd05f1654b0bdb2b4f31cbac633eece5722
2022-09-27 14:43:16 +05:30
Pedro Pinto Silva
e1345de673 Fix Online help: buttons are no buttons, also decrease vertical space
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I766076d7819dfb2034134d3cb2a3f67ed0110b2c
2022-09-23 12:24:12 +02:00
Andras Timar
b755a175df Embed images to exported HTML
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I0e42bf2efcc2aa6ecf3f6705aab621cc1ea18774
2022-09-08 16:21:22 +02:00
Tor Lillqvist
93b4d0db81 Use the name "lok" for the iOS app Webkit message handler here, too
Follow-up to 616e9200d1.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I4d9a77d34c3ae3f45df6bce9afad5c99b2142358
2022-09-07 11:14:25 +02:00
Michael Meeks
80079f708c perf-test: cleanup un-expanded variables.
Change-Id: If2c7c055558a96c401e2be2ce031cd288bbc747e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-07-19 20:01:08 +01:00
Henry Castro
c9178b0223 Add home mode option - enabling more configurability for CODE.
Requested by several users and partners - defaults to off/un-changed.
When set it allows optional disabling of welcome/feedback when used
in a homely environment.

Also bump default max doc/conneciton limits in configure to 10k.

Change-Id: I3c917901e02445d45f6f86b554d47a60aa4e575d
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-07-14 18:24:43 +01:00
Andras Timar
fb25b7d806 If integration theme does not exits, fall back to default theme
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9939ee243aa81b50969168df2e8bb5c8cbf2a34c
2022-07-11 12:59:05 +02:00
Henry Castro
a3d0920e18 wsd: infobar: clean up unused code
No longer used.

Change-Id: Ifdaaabc49df1b9af0fb4d436ffe2437446f5926a
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-12 18:25:10 +01:00
Ashod Nakashian
40839e8019 wsd: browser: Reset_Access_Token API to update access-tokens
Change-Id: I92cc424c30824232eaf156ddfe49104932b2ba81
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-05-06 11:13:35 +01:00
Ashod Nakashian
623bcb2948 browser: reuse post helper in framed.doc.html
Change-Id: Iabc310a59a7c4e0522558ea0a15e260d2bf141bd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-05-06 11:13:35 +01:00
Rash419
0945c4d48b config,UI: change classic -> compact and notebookbar -> tabbed
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I633a13927245ee6b4d750cd84c2b4577dca06d68
2022-04-25 13:56:10 +05:30
Mert Tumer
4d55ec5f30 fix firefox zooms in whole page on mobile
textarea focus makes firefox zoom in without
specifying viewport scale properties

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Iea5c0e61af14dc8f05319570f84681ca2b76aed1
2022-04-19 12:00:16 +03:00
Rash419
9679c36432 jsdialog: in debug build added button in about dialog to open WidgetTestDialog
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ib525515f27640114f5d8bc83314b63f006893d37
2022-04-15 15:18:31 +02:00
Henry Castro
c550a206e8 Remove the old vex-based welcome dialog code
... and make Welcome dialog optional for COOL

config: add welome url parameter

Signed-off-by: Henry Castro <hcastro@collabora.com>

config: add feedback url parameter

Signed-off-by: Henry Castro <hcastro@collabora.com>

config: add infobar-url parameter

Signed-off-by: Henry Castro <hcastro@collabora.com>

welcome: fix unhandled exceptions

Signed-off-by: Henry Castro <hcastro@collabora.com>

welcome: preprocess welcome file

added welcome-message.html

Signed-off-by: Henry Castro <hcastro@collabora.com>

welcome: clean up code related to vex welcome

Signed-off-by: Henry Castro <hcastro@collabora.com>

--enable-welcome-message is not necessary, when we specify a welcome URL, then it is enabled, otherwise it's user configurable

Signed-off-by: Andras Timar <andras.timar@collabora.com>

remove the unused welcome config settings

Signed-off-by: Andras Timar <andras.timar@collabora.com>

remove unused define ENABLE_FEEDBACK

Signed-off-by: Andras Timar <andras.timar@collabora.com>

do not install/package fallback welcome dialog, when welcome feature is not configured

Signed-off-by: Andras Timar <andras.timar@collabora.com>

remove welcome-message.html

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I20aa6220362018b63aaebd114b2b661561823fbb
2022-04-04 10:53:07 +02:00
Michael Meeks
45f29fd773 Allow debug.html to be passed a WOPISrc for easier debugging.
Change-Id: I3e618dbb9aa6363974e0759e955dfe73e8787824
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-03-26 23:27:00 +00:00
Andras Timar
1db0251dff welcome: fix translation of string with version number variable
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia8d5e89b15017c68fe18ea88b5f29dc79de2e06c
2022-03-12 19:31:34 +01:00
andreas kainz
f2aeb8e042 Use Var colors
shortcut dialog
- use var colors

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: Ibaa0a3166971378186aeb684ee250340c85df3ad
2022-03-10 09:06:29 +01:00
Alexandru Vlăduţu
dc0b02da4c browser: add option for grouping the download as icons
Signed-off-by: Alexandru Vlăduţu <alexandru.vladutu@1and1.ro>
Change-Id: I3c8c1964879bec8c4e31a85baefb7b442ceae29f
2022-02-24 15:22:22 +01:00
Mert Tumer
9d1b4e95ca android: fix uncaught exception documentSigningUrl
use empty string in mobile app since it is not used

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I699c348c01ad06b7e720499a615e2c9a27bbf630
2022-02-18 17:41:15 +03:00
Pedro Pinto Silva
6a4f634630 PostMessage examples: Improve form formatting
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I3bc508600c1ad6531cd88bf5c4ef972d21f10fae
2022-02-18 14:34:46 +01:00