Commit graph

133 commits

Author SHA1 Message Date
Michael Meeks
87eac2079b ProxyPrefix: allow the user to specify a custom prefix.
This allows us to re-direct web traffic via a proxy quite simply
during fetch, instead of changing the service root.

Change-Id: I28d348467e48394d581fca4da4c199348a2ca8e0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92804
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-24 12:48:11 +02:00
Muhammet Kara
f507302993 Welcome: Add config for enabling the dismiss button
Change-Id: Ia2fbf066493d91a2b10866e66d11332b5cfc10fa
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92593
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-04-20 20:35:08 +02:00
Muhammet Kara
aaf1fa4fc6 Welcome: Pass welcome value from loolwsd.xml to the JS side
Now we have window.enableWelcomeMessage on the JS side to avoid any
queries at all when the feature is disabled.

Change-Id: I8420089f775bfbf5bcd557c7c720172fbce8c22e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92338
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-16 11:37:08 +02:00
gokaysatir
9e0594ee2d add pretty name - Android patch
Change-Id: If0de49884954cde26bfbe8ba1dce8844af5b30bf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91831
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-04-11 13:43:31 +02:00
Tor Lillqvist
a161902406 No %OS_INFO% needed in the mobile apps
Besides, the loleaflet.html isn't passed through any file server that
would replace it anyway.

Change-Id: Ie8c4a58d83e697d441b9a34236092fe3240a7e25
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91931
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-08 17:56:21 +02:00
Tor Lillqvist
ab44bfaf5f In the iOS app we have the branding files in the Branding folder
(So that it is easier to copy them freshly in the configure script.)

Change-Id: Ib8210850abcb259cb6be7ff0d708de0cf05c135d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91838
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-07 17:56:05 +02:00
Jan Holesovsky
f3ac1bf297 mobile: Load a device-form-specific branding-*.css too.
Change-Id: Iac94c6993d036a10b3f4764e79f38721482acc87
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91800
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-07 11:05:52 +02:00
gokaysatir
a486bad79b tdf#130568 - Add server os pretty name to help->about
Change-Id: Id6de533dfb8e34a05d348f8ae701bf3c524c9b95
2020-04-01 20:45:32 +01:00
Jan Holesovsky
9978752258 mobile detection: Create a separate device-*.css for the phone/tablet/desktop.
The problem is that the @media-based detection often disagrees with the
JS-based detection which then leads to many problems - most notably that
part of the UI behaves as if it was a tablet, and the other part as if
was a mobile phone, leading to a terrible user experience.

This commit changes it so that there is only one way how to detect if
we are on mobile phone, tablet or desktop: using the JavaScript, and we
will load the appropriate css accordingly.

Only one @media-based rule is converted as an example, the rest will
follow.

Change-Id: Id7bfb58ca12264904b3329db1542ae6b54893f11
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91416
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-03-31 20:31:49 +02:00
Jan Holesovsky
47d6d9eae6 mobile detection: Load the bundle.css dynamically.
So that the browser can cache the large css, instead of loading it anew
each time we are loading loleaflet.html.

Change-Id: I322bf9d62e4c899dbeffbca52aca83b6cd427ce4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91415
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-03-31 20:31:15 +02:00
Jan Holesovsky
117dddea3c mobile detection: Simplify the macro to write down the css files.
Shouldn't affect functionality.

Change-Id: Iff2292403297a1ed88d781d3eb8ebe44c46f32fe
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91414
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-03-31 20:30:03 +02:00
Tor Lillqvist
7e992e4d4f Hopefully better fix for the missing w2ui-scroll-right in iOS app on iPad
Revert more of b62dcc0255, and also
revert 418181411f.

Now I seem to get a visualViewport with scale 1 and width 768
consistently, which is a relief.

Change-Id: Ia619a51047dd2a05ba32d6a203c3095198d3b4d5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91436
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-03-31 19:35:20 +02:00
Tor Lillqvist
418181411f Add maximum-scale=1.0, minimum-scale=1.0 to the viewport meta tag
This seems to make the w2ui-scroll-right button appear every time, as
expected, on my 9.7" iPad Pro running the latest iPadOS. I don't fully
understand why and how, though... (It used to appear only maybe a
third of the times when one opened a text document.)

My naïve expectation would have been that having maximum-scale=1.0,
minimum-scale=1.0 in the viewport meta tag would have caused the
visualViewport object's scale attribute to be 1, and its width x height
to be 768 x 1024, i.e. exactly the same as the CSS pixel size,
screen.width x screen.height. Or at least that visualViewport.width
would have been 768. But no. visualViewport.scale is now *either*
0.9481481313705444 or 0.9733840227127075, with width x height being
correspondingly either 810 x 1059 or 789 x 1031.

Note that scale * width in both cases *does* equal the CSS pixel
width, 768. Presumably in the height direction it excludes the status
bar (the one with time, date, mobile data, WiFi, and battery state).

This change fixes the problem only in the iOS app on iPad, though, not
in Safari on iPad, against a "make run". (No idea whether the issue
with the missing w2ui-scroll-right button is even reproducible in the
Android app or in an Android browser on an Android tablet.)

Change-Id: I0735d0a79bdfe31775f694e11b3215e784ebd798
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91410
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-03-31 13:11:02 +02:00
Andras Timar
6c6521c264 help: Apply suggestions from Mihail Balabanov and Steen Rønnow from Weblate
Change-Id: I896237ae28a841058deae57a3ba70c9248cfee40
2020-03-15 22:16:47 +01:00
Henry Castro
c58b8dfdfc loleaflet: makefile: prefix m4_ builtin functions
Change-Id: I3605da8b44cec9855be39846de7f10feaf075f7d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89890
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Henry Castro <hcastro@collabora.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-03-04 13:30:41 +01:00
Jan Holesovsky
ceec4f0505 android: Actually override window.open to always send the HYPERLINK on mobile.
To cover potential future developers adding window.open without knowing
it might break mobile...

Change-Id: Iadad985ac6fad9b9f068f224fd8fb21f073bead6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88732
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-14 18:27:51 +01:00
Michael Meeks
875b4c37d3 Framed sample - add frame_ancestors instructions.
Change-Id: I2b503be31268616c39485cb102dc90a3427a1e45
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88417
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-10 23:23:31 +01:00
Andras Timar
2185595629 make iframe load in http:// case, too
Change-Id: I22d8cfde29bac3db24dc3906c69fe119e5d40464
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88409
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-02-10 21:32:27 +01:00
Michael Meeks
1c754d5b11 Revert "Serve a decidedly unpretty clipboard download page"
This reverts parts of commit da455c486a.

Unfinished; also stream size calculation cannot have worked.

Change-Id: I39635fe5165b82dd36095d58cfefff4920ce3a35
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86845
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-16 17:21:38 +01:00
Michael Meeks
e18fe5e5ef postMessage harness - extend to catch CSS issues.
Change-Id: I0731ae72ba1937916b055882171785ee268e16c4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86795
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-01-15 11:03:24 +01:00
Michael Meeks
6305cc70fa postMessage tests - advertise them, and do some cleaning.
Set the iframe's src in a script so we can pass on a filename cleanly.
add a postMessage: sample URI at the end of 'make run'
Move some of the more obvious pieces into framed.doc.html.

Change-Id: I2bd8215f083bcb16369421ed88acb198808c1fdb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86787
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-01-15 11:01:41 +01:00
Michael Meeks
b5f58fbe8c postMessage CSS checking improvements.
Ironically our attempts to double-check message origin against our
parent was blowing a security exception.

Instead send the list of origins we will accept from WSD, and
check them ourselves (as well as the browser check).

Why make it so hard to check that a postMessage comes from an
ancestor frame ?

Change-Id: I1311be3e1d68a31cfdc96b45a5eb5dd7f26e7ea9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86788
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Alexandru Vlăduţu <alexandru.vladutu@1and1.ro>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-01-15 10:56:27 +01:00
Tor Lillqvist
8c4bff2b22 tdf#129327: Ignore all keydown events at the outermost level for iOS
Possibly a good idea for Android, too? See bug report for description
of what this fixes.

Change-Id: I6b70f431ced09044756c2edc3fcc2542428b62e1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86484
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-01-09 13:56:19 +01:00
Pranam Lashkari
57257c868e resolved: HELP > Online Help clicking internal links closes the Help
Change-Id: If64f397680ed5977e025e398a8efd044566f278b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/85773
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2020-01-03 14:18:20 +01:00
Andras Timar
5eb462078b Fixed a typo in Online Help
Change-Id: Ibd88edd48db16e4bd96ec60d545f50905ea06d25
2019-12-15 17:51:57 +01:00
Andras Timar
21102496b7 remove screenshot dimensions from help in order to avoid distorsions with updated/translated images
Change-Id: I9aae794531b6e89ef463723c5c1b3202b37678d4
2019-12-13 13:19:36 +01:00
Pedro Pinto Silva
bbc6b44dd3 Fix help text and add updated screenshots
Change-Id: Ie7fe56ae1a9db2de04706712a3a16a70bcf394f0
Reviewed-on: https://gerrit.libreoffice.org/85103
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
2019-12-13 12:56:49 +01:00
Marco Cecchetti
f4dd7ef0dc fixing 2 minor console errors
Change-Id: Ie2449e33dd47511b2d8a65e1f929e69fece8a567
Reviewed-on: https://gerrit.libreoffice.org/84901
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Tested-by: Marco Cecchetti <marco.cecchetti@collabora.com>
2019-12-10 22:08:01 +01:00
Ashod Nakashian
7c4ba459ff Encode the ExtendedData to make it safer while embedding in messages
Change-Id: I1d4bdb2775d89e9a52a96d833228ca8577ee3561
Reviewed-on: https://gerrit.libreoffice.org/83044
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-22 01:51:11 +01:00
Michael Meeks
98617e40e2 Enable protocol debugging by default in debug mode.
Also add a config option for logging.protocol - to help catch early
protocol issues during startup.

Change-Id: I6f0cc6dcf14b2797bc6b2bd36c44750d74eb0608
2019-11-15 18:01:02 +00:00
Michael Meeks
946cc5d8e6 Rename misleading ClipboardContainer -> TextInput
Change-Id: Idb5ccb9959e0c77dfcdbb2793330bb048db0f0f8
2019-11-15 16:28:34 +00:00
Henry Castro
504f6c17ef loleaflet: mobile: block the user from zooming on a page by setting
user-scalable=no in the viewport

Change-Id: Ibbe07d088800e65e649e549625441d114511e45e
2019-11-12 08:51:44 +00:00
Andras Timar
d86626c926 Online Help: update Copy & Paste section
Change-Id: I96b7171b1b144093ea1762b3c96a6b2a2ec22bc0
2019-11-07 13:03:07 +01:00
Ashod Nakashian
887ecdb8d3 wsd: leaflet: Insert background
This adds support for .uno:SelectBackground
which inserts slide background image.

(cherry picked from commit 30a77e7e490e4e83bb6423f41388ee9adbccfae3)

Change-Id: I587b31f67d518aba348ae7e8d058ada23a61e858
Reviewed-on: https://gerrit.libreoffice.org/67500
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-06 03:43:02 +01:00
Andras Timar
d8992b8056 Online Help: more formatting and grammar fixes
Change-Id: Iff9dd62ef907d89392134558c864ed5e51f9010b
2019-11-04 21:53:40 +01:00
Andras Timar
e1413be3b3 Online Help: clarification
Change-Id: I883c87ba5bacb79b67dcf07c419dcc3cc7ddf1f7
2019-11-04 13:18:17 +01:00
Andras Timar
cd2a4cdc99 Add some more formatting to Online Help
Change-Id: I59f4840d2bd274c42c9c0ddd5a1a59def5adcb28
2019-11-04 12:37:24 +01:00
Andras Timar
1049b769ff loleaflet: Help -> Online Help
Change-Id: I673faae329013f0292afb9f517608a4eb90860d8
Reviewed-on: https://gerrit.libreoffice.org/81954
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-11-04 10:42:59 +01:00
Jan Holesovsky
2ddd8d7c81 android: Fix 'Uncaught ReferenceError: reuseCookies is not defined' on mobile
Change-Id: I9b1f0be023d41c4f3a63373d2fe892c800e5e466
Reviewed-on: https://gerrit.libreoffice.org/81784
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-10-30 15:57:39 +01:00
Andras Timar
b813ed61b6 add copyright notice to About Box
Change-Id: I51c2c5e7c2b0cf232b8a2f2dbcb3b9f3f04737ea
Reviewed-on: https://gerrit.libreoffice.org/70205
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-29 13:24:33 +01:00
Ashod Nakashian
8c4edb5087 Reuse cookies from the browser
Reviewed-on: https://gerrit.libreoffice.org/78195
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 8deecf4ea6966c059458bdc71e365be426238e09)

Change-Id: I96bbdd3e71bc9d0ecfddea7debc0ebcc303a49ae
Reviewed-on: https://gerrit.libreoffice.org/81558
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-28 10:45:14 +01:00
Marco Cecchetti
1309cdea7d loleaflet: search-bar for mobile device
Change-Id: I5acb79d5bb81470aa76ce51b3e81c44909ae80e5
2019-10-21 12:41:05 +02:00
Tamás Zolnai
a4fb071ecf menu-to-mobile-wizard: Show a blue overlay on "active" main menu button
Change-Id: Ief09e5352a404ad8da486198c3f03b4e4cfce92f
2019-10-14 20:22:25 +02:00
Szymon Kłos
5036ddd66d jsdialogs: move tabs into titlebar
Change-Id: I56ebec8c12164771c4da85954d43c600030e65dc
2019-10-09 14:06:20 +02:00
Szymon Kłos
5fba4dc231 jsdialogs: move tabs to a separate container
Change-Id: I08723d02f47553644c29780f41a0a74470995d8c
2019-10-08 16:42:45 +02:00
Ashod Nakashian
a93d8f1e1c leaflet: check that we are ready to render
On some mobile devices we can start rendering
when we don't fully have all our variables
initialized. The result is that we send to WSD
'NaN' and 'Infinity' coordinates and other
values.

To avoid this, we try to check that we have downloaded
and loaded all the JS files and that we have the bare
minimal map members in valid state before we proceed
with rendering. If not, we retry with a small delay.

Change-Id: I0c57da8829a830acf4e06ff6206c73debb54bfe6
Reviewed-on: https://gerrit.libreoffice.org/79920
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-01 10:13:05 +02:00
Szymon Kłos
e3a01b7561 jsdialogs: Mobile Wizard
Change-Id: Ida2dc48d86ea4f28b08ec24a7638f27ad8633dbf
Reviewed-on: https://gerrit.libreoffice.org/79723
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-09-27 17:03:06 +02:00
Ashod Nakashian
8f312862ca leaflet: fire Doc_ModifiedStatus with modified state of the document
When .uno:ModifiedStatus is received, now Doc_ModifiedStatus
is fired to inform the client of the modified state of the document.

This is useful in case the integration needs to prompt the user to save
before closing the document (which they can catch with the onunload or
onbeforeunload events in the browser, as well as with our
UI_Close when the default handler is disabled).

Includes working sample and documentation.

Change-Id: Ief30483e2f078b0aa9f3c006a1ecb4093375174c
Reviewed-on: https://gerrit.libreoffice.org/74891
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
3dcc68e6f1 Pass Extended Data in Action_Save from the client to the WOPI host
Clients often need to communicate with their wopi hosts when
invoking Action_Save to provide more context when storing the
document in question. Action_Save now support passing arbitrary
string as ExtendedData entry that can be used by client to
pass any context or otherwise flags to the WOPI host, which
will receive it via the X-LOOL-WOPI-ExtendedData custom header.

See reference.html for more details.

Change-Id: I1814d1f3d984a553ffa60cec13d23b014ba59eb3
Reviewed-on: https://gerrit.libreoffice.org/74135
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
4dc312f549 Cleanup framed.doc.html sample
Now Host_PostmessageReady is automatically issued
upon loading and the postMessage calls are more modular,
allowing for expansion with more functionality.

Change-Id: I22b50f7228e0fd32c4cb880f4981c1a455038d48
Reviewed-on: https://gerrit.libreoffice.org/74129
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-03 01:53:12 -04:00