Commit graph

57 commits

Author SHA1 Message Date
Rash419
b717be603e implement document migration
- updated protocol.txt

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I67a0515580979e15223ea084c835f5ed801ceb5e
2023-06-29 18:21:33 +02:00
Rash419
ca5517cc24 indirecton:request again if we get 202 status
- also send 'App_LoadingStatus' postMessage with 'Loading_Progress'
  Status to notify integrator

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ie754955c53d4d361d8dfaf083f7734382954d3f9
2023-06-29 18:21:33 +02:00
Szymon Kłos
9102357ee5 color palette: send the theme data in compact mode
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib4d77cea3ec3759841fa9c9d5e70f1cfd852fc16
2023-06-27 15:12:56 +02:00
Tomaž Vajngerl
3c38d78a5e color palette: send the theme data through UNO (when present)
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I245d34e323681add3552e808eee471821bd72a0c
2023-06-27 15:12:56 +02:00
Szymon Kłos
713bd070eb color palette: trigger callback with theme data
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Icce3ca11e9224f2bd8920e5ce9ff92e6d5ef5536
2023-06-27 15:12:56 +02:00
Szymon Kłos
d26a78495a color palette: show selector only in Writer
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ifdf07cac131d4a1afdf758fd31af3d49b28ba3a6
2023-06-27 15:12:56 +02:00
Szymon Kłos
3372ea093c color palette: add palette selector
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ie09715afbdbc50d783d6e50ce27dac2e2a06596a
2023-06-27 15:12:56 +02:00
Szymon Kłos
b32e3f1c9c color palette: use always the latest data
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4fee6c3fc9e7e91d3e737f8ab93350cca8a2ecd0
2023-06-27 15:12:56 +02:00
Szymon Kłos
a44e2b1a37 color palette: convert core format to w2ui
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id8980b0f7d34c011cc051f682299169952467b43
2023-06-27 15:12:56 +02:00
Szymon Kłos
e21925c65f color palette: move w2ui colors to docstate
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I037dd353ee143ecd5fd6182fa7aa3441588c0eb5
2023-06-27 15:12:56 +02:00
Henry Castro
3b7026c0e9 browser: add 'lang' property to get the current ...
browser language locale

Change-Id: Ia23d9710a0af97b4838f189e97cc0169d2294045
Signed-off-by: Henry Castro <hcastro@collabora.com>
2023-06-15 18:03:04 -04: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
Marco Cecchetti
b9f9cef60a a11y: populating editable area with focused paragraph
We handle notification from core about currently focused paragraph:
content, caret position, text selection start/end.
Notifications are sent on any text changes, even when the text has
been modified in another view.
Moreover we can request such info to core at any time.
That allows AT software to read focused paragraph and selected text.
All that keeping editing still working.
A set of new cypress tests for checking clipboard content has been
developed.

failing cpp unit test:
- HTTPWSTest::testInactiveClient
'unexpected message' assertion was failing since an idle client can
receive an a11yfocuschanged message when the same paragraph has focus
in both view and the active view is editing the paragraph.

failing cypress tests:
desktop
- calc/autofilter_spec.js
  - added more wait time before performing clickOnFirstCell
- impress/undo_redo_spec.js
  - Repair Document was broken
    - we need to select 'Hello world' in order to overwrite it

mobile
- impress/spellchecking_spec.js
  - Apply suggestion
    - better use selectTextOfShape instead of Ctrl-A

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I070d390543fa66fe786c4a0661fa09f891b9883e
2023-05-31 22:43:51 +02:00
Darshan-upadhyay1110
5548d062c8 Added image path for icons when toggle to dark theme
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I14a99df7cf10bf73f898f15d3aaa5a32c9cd51af
2023-05-25 11:13:18 +02:00
Darshan-upadhyay1110
fcfacd5081 removed An unknown button appears on top right of a document in android
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I6c0f1d62a19ecb55228012bef48373b97991461a
2023-05-24 14:00:20 +02:00
Ashod Nakashian
7d2f736084 browser: catch failure to get localization files
When we fail to download the localizaion javascript
file, for whatever reason, we end up failing to load
the document. This is far from ideal.
Instead, we simply log the error and move on.
The end result in such a failure scenario is that
the document loads, but the UI is only available
in English.

Change-Id: I5d29ff68870d0cd84d86658ccfd4e3185cc62562
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-03 06:52:25 -04:00
Gülşah Köse
f1e9ee72fe Fix wrong device detection logic.
window.screen.width/height returns the width/height
of the screen in CSS pixels. window.innerWidth/innerHeight
returns the interior width/height of the window in pixels.
This includes the width of the vertical scroll bar, if one is present.

That gives better result. eg: responsive mode

Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: Ibecb9614224cb3bfd6d5d8dc9ad5febe6aa7673b
2023-05-03 12:30:28 +02:00
Michael Meeks
29d7937a46 proxy: get the length right for messages with content outside ASCII.
Interestingly, we've been sending the wrong length, resulting in

[ docbroker_003 ] ERR  #-1: Missing final newline| wsd/ProxyProtocol.cpp:158

type errors, as we read that back in coolwsd.

Change-Id: Iff7d1d38b0ed3e99c1d6903e2663c4335a36aaa3
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-04-06 11:40:18 +02:00
Andras Timar
b0ff00961b handle Uncaught TypeError: Cannot read properties of null
sheets[i].href can be null. Seen with proxy.php.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I3d774ace869d141973a92abab8ef9ac83e1e0018
2023-04-05 20:57:16 +02:00
Gökay Şatır
6ddabcb792 Update sanitizeurl function calls.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I07c12c072240307ea67d4f8f9ade8c1a9f63d1b8
2023-04-01 17:49:56 +03:00
Gökay Şatır
5bf2db45f9 Update sanitize-url package.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Iab936fbf2e743dc1908cc978c2c4e5380f4ca47e
2023-04-01 17:49:56 +03:00
Gökay Şatır
aa47a9f0a9 Remove json-js and stylelint-config-standart packages.
We don't need the first one and we don't use the latter one.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I1f48ff5487621781eb38dd8e4e8e2a389a3059d6
2023-04-01 11:30:07 +03:00
Gökay Şatır
260cbed5d3 Remove vex from code.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I054977b5c71364c59c7f1fdd1f5d691380951ebb
2023-03-25 07:03:05 +03:00
Rash419
d221de8969 fix: date picker always in norwegian
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Id03cccad6964e7555de6300b0eac619bf521802b
2023-03-24 13:53:39 +01:00
Rash419
f335d08e09 fix: renaming doesnot work when indirection_endpoint is enabled
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ic79a0436f87d4ab4697597d15fd60fa148050270
2023-03-13 08:07:16 +01:00
Ashod Nakashian
0f9dc9460b wsd: support per-user timezone
Change-Id: I5e2318a34cb39d8d56ec3cf4977ebd75588a7627
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-01-31 15:38:08 +01:00
Rash419
7e06860ddf js: get full uri from indirection server
instead of just routeToken

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I3755fc2536d4358d2c63effdc9e9f9e5da246504
2023-01-31 15:32:30 +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
cee9bf493a Change hardcoded sample document name and verify that we get it
You now must pass --with-wasm-additional-files=<path> where path
contains a file called sample.docx.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I21e62feb6282833a5d60b31db26328eda63cdaea
2023-01-29 06:56:08 +02:00
Tor Lillqvist
84963dafd1 Temporarily hardcode the document URL and UI lang for WASM in more places
(Note that the existence of a window.ThisIsTheEmscriptenApp property
is also a temporary hack; the eventual goal is for a one same Online
webpage to be able to switch automatically from server-based to
WASM-based and back based on connectivity to the server.)

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ia5e3f4008eaaf1543c08482418635dca0d3983e5
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2023-01-28 10:30:26 +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
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
0a85ca0c2a Some initial thoughts how to handle messaging when WASM fallback is active
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I4146c5b93a3f5988b16836231e529640e9126392
2023-01-15 19:46:37 +01:00
Dennis Francis
cb85497cdd Revert "share css-url renamer with branding"
This reverts commit 089b6d235a0e38d5b1d021fab024becc2def0ada.

Reason for revert: For packaging builds the global.js is in minified
form hence marker comments are not present and it is difficult to
extract the css url renamer function without js-language analysis tools
or packages - this needs more thought.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I86755cd74c8f92105b157477f7da8f6e439f1f99
2023-01-11 11:49:36 +01:00
Dennis Francis
a0d86c8a6f share css-url renamer with branding
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I849948c69e9cc656c410513f9f95db2e7fb07e03
2023-01-10 11:40:50 +01:00
Tor Lillqvist
4fd6279f6b sendCounter is unused
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ie6f713f062e9c89ed3679d709394089413184d0d
2022-12-06 10:38:39 +02:00
Pedro Pinto Silva
1a29f1004a Don't use vex btn default btn CSS classes (rename)
By Renaming .vex-dialog-button-primary -> .button-primary and
.vex-dialog-button-secondary -> .button-secondary

- So we can remove duplicity on CSS buttons
- Easier to set vex primary and secondary button to use our css classes
- This way there is no need to hunt those specific cases down.
- Update cypress tests

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I82f4b33560367805eeeeb5aec9af8d1abd313788
2022-09-06 17:01:21 +02:00
Bayram Çiçek
336f7c1664 Add outline to color indicator for classic mode
- In classic mode, toolbar color indicators weren't visible when no
  text is selected. The reason is that color indicators didn't have
  border(outline) color.
- In fact, color indicators were just a box-shadow property. So,
  it was not possible(?) to add properties like border and
  border-radius.
- No need to use box-shadow property. A <div> tag can represent
  color indicators.
- Removed box-shadow property.
- Added <div> tag that has class="selected-color-classic".
- Added UI specifications for mobile. (#toolbar-down)

Signed-off-by: Bayram Çiçek <bayram.cicek@libreoffice.org>
Change-Id: I1b1b68fdc015fd3719d1c59ef7f782036a5934a5
2022-08-16 15:49:49 +02:00
Andras Timar
dcae5fa613 proxy.php: Special case for the remote image
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I98da25735a3b889824a72c2134c495abd26b3a05
2022-06-28 22:03:28 +02:00
Gökay Şatır
df17064597 Add a comment for window.app definition into global.js file.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I111eda6182235a307b40a297466a1fb4a74ad5bf
2022-04-15 16:37:51 +03:00
Gökay Şatır
4f4c11a886 Moved window.app variable into its own file.
"socket" and "console" variables are used at initialization, so they are left in global.js file.

Debugging of window.app object's variables is now easier.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ic2811ff45ce845cb32d15018eaa2fa9e140202d7
2022-04-15 16:37:51 +03:00
Jan Holesovsky
4bef530844 Escape some parameters for a good measure
Signed-off-by: Jan Holesovsky <kendy@collabora.com>
Change-Id: Ie5d2017ed6ce9f38623b42b336c5261be322b025
2022-03-21 21:35:27 +01:00
Mert Tumer
85310c888c fix sidebar can be visible on pdf
it appears that sidebar callback can arrive before
docloaded message when it is already loaded in the background
Also app.file.fileBasedView parameter is set after docloaded
so it wasnt a correct fix. perm: message arrives before document
initialization and we can hide sidebar unless the arrived messsage is
not 'edit'. if the user have edit mode, it will be up to the users preference

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ifb220d8bb8baad0078bcd32f71ee6853d31adfb8
2022-02-16 15:27:14 +03:00
Alexandru Vlăduţu
04b50d5b3b browser: add missing error method for logging
Signed-off-by: Alexandru Vlăduţu <alexandru.vladutu@1and1.ro>
Change-Id: Id4aa67e98779dd0d5c92172425baa753fcaca27c
2022-02-14 15:57:52 +00:00
Michael Meeks
d2d1615b13 Allow protocol logging to be enabled from debug overlay.
Change-Id: Ica0765242b82a2da86722da0b40b6ecdf401d383
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-02-12 16:23:19 +00:00
Alexandru Vlăduţu
65f8476818 browser: add optional function to process the URLs (internal and user
generated)

Signed-off-by: Alexandru Vlăduţu <alexandru.vladutu@1and1.ro>
Change-Id: If83611cc17d00dd049093de0a35caa7739f10400
2022-01-28 11:40:40 +01:00
Alexandru Vlăduţu
eac3201c05 browser: improve logging by using custom logging methods instead of console ones directly
Signed-off-by: Alexandru Vlăduţu <alexandru.vladutu@1and1.ro>
Change-Id: Id4ad5711c85998ce71ba0849fca5fe6dc580f395
2022-01-24 21:06:42 +00:00
Andras Timar
0752cf0bad Enable localization of label 'Recent' on color palette
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Id9f3ca5e0979977f7e269331996c483df0a3992f
2022-01-13 22:22:41 +01:00
Mert Tumer
e683cf26d1 notebookbar: use more advanced optioned Conditional Formatting control
Home tab's contitional formatting control is old and is not the same
as Format's tabs control. Now they are the same except for addition to iconset overlay

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I9a08cda3a2ff98a18e711ba4a17bd8ebb8b4027b
2022-01-04 11:36:35 +03:00
Tor Lillqvist
ed32beef5c Prefer "(no message)" etc to "[object Object]"
At least for me, whenever I have seen the result of that code logged
in Xcode when debugging the iOS app, the lines for the "description"
and "stack" have said just "[object Object]". It is unclear whether
that is because the code explicitly assigns the empty object {} to the
desc and stack variables here, or because err.message and/or err.stack
do exist but are objects, not strings.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I08a2fa361baf20814a40249d30ff49ba39292aa6
2021-12-20 14:46:21 +01:00