Commit graph

118 commits

Author SHA1 Message Date
Florin Ciornei
eb332fdde0 android: Move window.ThisIsAMobileApp etc before they are used in global.js
It was causing the code to connect to a real socket instead of the
FakeWebSocket.

Change-Id: I0d08277e7138317ac06a13022eaba7ec672e0429
Reviewed-on: https://gerrit.libreoffice.org/69500
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-03-21 14:05:23 +01:00
Jan Holesovsky
e5ecc92659 Revert "loleaflet: execute l10n.js script after html parsing"
This reverts commit e512924544.

Change-Id: I9b322b45cd13b69c4438d48227237dd8062aee05
2019-03-15 18:24:25 +01:00
Jan Holesovsky
117bb3a837 Revert "loleaflet: expand l10n files"
This reverts commit 70bdc4660e.
2019-03-15 18:24:25 +01:00
Jan Holesovsky
869dd93851 Revert "loleaflet: remove 'link rel="localizations"' tags"
This reverts commit a5536109af.
2019-03-15 18:24:25 +01:00
Jan Holesovsky
3f95b81535 Revert "wsd: use a tiny parser, variable substitution"
This reverts commit ed89931ae8.
2019-03-15 18:24:25 +01:00
Jan Holesovsky
7bd54ab677 Revert "No FileServer involved for the mobile apps, can't use <%FOO%> things"
This reverts commit c8aedbc218.
2019-03-15 18:24:25 +01:00
Jan Holesovsky
6d32ee8e61 Revert "loleaflet: add LANG variable parameter"
This reverts commit d3e8385fbb.
2019-03-15 17:27:17 +01:00
Jan Holesovsky
5fe925f18f Revert "loleaflet: remove client side L10n"
This reverts commit c9685387b9.

Change-Id: Ie11c04ffad8260c3c1d6357f18dd9f2a42912859
2019-03-15 17:25:41 +01:00
Jan Holesovsky
9a7a753b06 Revert "Define window.ThisIsAMobileApp etc before they are used in global.js"
This reverts commit 97970bc081.
2019-03-15 17:24:21 +01:00
Szymon Kłos
a533fad1f2 Don't wrap menubar
Change-Id: I5283a20d50dceb945378b47fc5678798dfa52608
Reviewed-on: https://gerrit.libreoffice.org/69159
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-03-13 16:41:30 +01:00
Tor Lillqvist
97970bc081 Define window.ThisIsAMobileApp etc before they are used in global.js
Change-Id: I7ae2687019575fc27e4c5dff128c8a97595676ea
2019-03-06 13:36:25 +02:00
Tor Lillqvist
c8aedbc218 No FileServer involved for the mobile apps, can't use <%FOO%> things
Move the <%FOO%> things to the non-mobileapp branches of the MOBILEAPP
m4 conditionals.

Change-Id: I3d6e51083f7926bb0c90b48367f284e99d64c3b4
2019-03-06 12:39:18 +02:00
Henry Castro
c9685387b9 loleaflet: remove client side L10n
Change-Id: I4bd40e569441c22b902b5bac2cb21705a4565384
2019-03-05 22:38:13 -04:00
Henry Castro
d3e8385fbb loleaflet: add LANG variable parameter
Change-Id: Ie822d1d0edb80884752196fd5fe210ab95de5d74
2019-03-05 18:16:57 -04:00
Henry Castro
ed89931ae8 wsd: use a tiny parser, variable substitution
Change-Id: I821d27ef504a01d0b040f2b7ae7f66e75b16eb96
2019-03-05 16:31:51 -04:00
Henry Castro
a5536109af loleaflet: remove 'link rel="localizations"' tags
Change-Id: I4887f36344d70b3c3a1c9e28d1486673199ab169
2019-03-05 15:04:59 -04:00
Henry Castro
70bdc4660e loleaflet: expand l10n files
Change-Id: I091cfefb57c7c5aad7a8256ae2192d62606c773f
2019-03-05 14:56:19 -04:00
Henry Castro
e512924544 loleaflet: execute l10n.js script after html parsing
Change-Id: Ia2be65348aae5ce68a96cbd0ce3ea029062ff48d
2019-03-05 14:32:28 -04:00
Henry Castro
d529a40731 loleaflet: add javascript websocket bootstrap that...
is executed after parsing html

Change-Id: Ib62de3db2449bbe9dc474469c299036259f8f2de
2019-03-05 13:55:25 -04:00
Henry Castro
70d9923ea9 loleaflet: expand inline bundle.css style into html
Change-Id: Id26180777a1b9838c3a9b5dc1e541023d0299595
2019-03-05 11:56:02 -04:00
Henry Castro
20d781130a loleaflet: add defer attribute to the script tag
A script that will not run until after the page has loaded

Change-Id: I7a835138ba22e70150db4345629231c59b84973b
2019-03-05 10:28:41 -04:00
Ashod Nakashian
dce675a961 leaflet: add class to the logo div to allow for customization
This restores the class, which was lost at some point.

To customize the logo, users need to define new logo properties
in branding.css for the document-logo class (or id) and
set them as !important to override the default values.

For example:

.document-logo {
    width: 125px !important;
    height: 39px !important;
    background-image: url('images/logo.png') !important;
    background-position: left !important;
    background-repeat: no-repeat !important;
    background-size: 125px 39px !important;
}

Change-Id: If93c53987915eb54fac1018443178d331f418470
Reviewed-on: https://gerrit.libreoffice.org/68187
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-03-01 15:02:33 +01:00
Jan Holesovsky
4f5e262344 Revert "android: Various fixes to make the sending from the core to JS..."
Lets leave this optimization for later, this is incomplete, and does not
fix the problem which it was originally supposed to address.

This reverts commit bce922e8fd.

Change-Id: I5d2ee19058261c7612d36014181f509604c8acde
2019-02-20 00:38:16 +01:00
Jan Holesovsky
bce922e8fd android: Various fixes to make the sending from the core to JS working.
Change-Id: Idc22ccbae1effac9e2db5293703a768e033fd7e9
2019-02-19 10:56:58 +01:00
Tor Lillqvist
b83ca07306 Fix editing glitch
Change-Id: I344e94914396b4404b913db606dd6ed5d9dbc86e
2019-02-14 10:06:04 +02:00
Jan Holesovsky
7604f9b218 android: Pass the messages from JS to the MainActivity.
Change-Id: Id2d5bac0f67668305ed47276614fde590d461901
2019-02-13 21:18:57 +01:00
Jan Holesovsky
e79f5f7ec6 android: Create the html, js and css and copy it to the right place.
Change-Id: I3efbba0ae369387796e2d08b3003e4f469610dda
2019-02-13 13:22:25 +01:00
Szymon Kłos
93796fa86c Start with readonly UI, then extend
Change-Id: I96352890e9a76107aa1c1df9cf4f5979688a1969
2019-01-29 20:55:46 +01:00
Henry Castro
1e9be7972a loleaflet: ensure to not show the elements when request main html
Remove all CSS files from server and requests loleaflet.html,
it should load a blank page, but some elements still rendered

Change-Id: I025c93d9c674be22279dc87f440d321dcf00b79d
2019-01-22 14:52:40 +01:00
Andras Timar
68228fe506 loleaflet: add framework to override localizations coming from core + es and de fixes
Change-Id: I97ad332c543f120e01563d19607c404b41aaa364
Reviewed-on: https://gerrit.libreoffice.org/66624
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-01-18 16:41:54 +01:00
Andras Timar
9539c212ef loleaflet: enable l10n of Signing Identities dialog
Change-Id: I4b6f5c998c649c6bfe89fc6af1e1f32f39053cbe
2018-12-09 21:53:49 +01:00
Jan Holesovsky
867ca0129c mobile view mode: Don't show the 'edit' button on the desktop.
Change-Id: Ia7f3fa5036c0f47fb9da51042b5cfe673871e432
2018-12-07 12:39:28 +01:00
Jan Holesovsky
ca6437f417 mobile view mode: More screen space for Writer and Calc.
Change-Id: Ia754aad59d09254d538480619aec1020f4eb4943
2018-12-07 12:39:28 +01:00
Jan Holesovsky
a710a8fafd mobile view mode: Add the floating action button.
The icon comes from the Material Design pages: https://material.io

Change-Id: I59acf7bfb6c65030721605ead057c8854f529a3b
2018-12-07 12:39:28 +01:00
Tamás Zolnai
1fcf34ecf5 Make the presentation toolbar completely hidden
Change-Id: I7f70fbc86f6e38f952c65d14e43da6ac45e25bb9
2018-12-07 12:39:28 +01:00
Jan Holesovsky
b15c81087d toolbar: Make the spreadsheet toolbars completely hidden (Writer, Impress).
Change-Id: I5ee3955d3cc4883153b9811b05e61d3c78dd8884
2018-12-07 12:39:28 +01:00
Szymon Kłos
b95bd06505 Updates related to the close button.
Change-Id: Ied1effd99ae7ae2c57ab2659b1851bf4ba81e9d8
2018-12-07 12:39:27 +01:00
Szymon Kłos
64170351af ui: move menu to the top
Change-Id: I0d2aa53efef34455e90f2eb721f482a1aadca0aa
2018-12-07 12:39:27 +01:00
Henry Castro
21fafe1e58 loleaflet: add a document type logo
Change-Id: Id02191e5070c10affb9157fdafa1a6fe8905517c
2018-12-07 12:39:27 +01:00
Henry Castro
556959dbc8 loleaflet: change the position of the document name label
Change-Id: Ibae74062d79d7ec08a996f927e168c44ad3cf5a3
2018-12-07 12:39:27 +01:00
Tomaž Vajngerl
2861299c77 make vereign server configurable, dynamically show sign. infobar
document_signing_url in loolwsd now accepts a vereign server URL
endpoint. If not provided, the signing functionallity won't be
available.

The document signing infobar is now shown dynamically so by
default it is not shown, but when the users clicks in menu the
"sign document", the infobar is shown (the document-content is
css "top" value is adjusted via JQuery).

Change-Id: I9d5f6b68ba3612eeeb9de28c9c0333b4d1bf41d8
Reviewed-on: https://gerrit.libreoffice.org/64298
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 22:46:07 +01:00
Tomaž Vajngerl
15b8f96009 Vereign login logic and dialogs
This adds various Vereign login dialogs:
- pin code dialog
- QR dialog
- email/sms dialog

Change-Id: I2400c76a7dbbb44ead10f6baaac561a71d3acd7f
Reviewed-on: https://gerrit.libreoffice.org/63837
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 21:47:23 +01:00
Samuel Mehrbrodt
40f80ea149 Change url to work in any version
Change-Id: Ie11c91d36d39b3a3ecc8eda01f556d25d3ef847a
2018-11-29 09:34:37 +01:00
Samuel Mehrbrodt
1dd1865286 framed.html: Use better defaults for URL
so that only the hash code needs to be changed (in normal setups)

Change-Id: Idde78ecc030573612128f0ee8d50ad95333fa72b
2018-11-28 16:46:24 +01:00
Tor Lillqvist
ab67cb58f9 Fix m4 problem introduced by me a month ago
MOBILEAPP does of course not expand to empty if it is not defined as
an m4 macro, it stays as is.

Thanks to samuel_m for noticing.

Change-Id: Ia76062b347627289adab0c1d6635f03850a0f2b3
2018-11-27 13:28:58 +02:00
Tor Lillqvist
fe3832f3c6 Use --with-iosapp-name to set the name displayed in the Help>About dialog
Change-Id: I04b0e7c152ee69b038ec30549c203a54eecf4780
2018-11-27 00:35:57 +02:00
Tor Lillqvist
e7523c9888 Factor out tile pixel size to a global setting
For now the same as before, 256, for both normal Online and mobile
app. If you want to experiment with another value, you only need to
change it in loleaflet.html.m4. I hope.

Note the FIXME in loleaflet/src/core/Socket.js.

Change-Id: Ic881758d7fa70bbfebcf932b7ed6a1da352e375d
2018-11-21 19:42:27 +02:00
Miklos Vajna
a514abff88 document signing: fix disabled case for Calc/Impress
If the document-container has an explicit style attribute, then this
breaks Calc (only Writer was tested before). This restores the correct
Writer/Calc/Impress behavior when the setting is false and keeps correct
behavior with Writer when the setting is true.

Change-Id: I310660e88af4407e521529ec41b5dcb604108bd9
2018-11-12 11:53:42 +01:00
Tor Lillqvist
e0bfd8271b Fix MOBILEAPP fallout from c74c9e39c8
In the mobile app, we don't run loleaflet.html through any filter that
would replace strings like <!--%DOCUMENT_CONTAINER_TOP%-->. We need to
produce a proper loleaflet.html at build time, using m4 for MOBILEAPP
conditionals.

Without this small fix, the loleaflet.html page ended up looking
extremely weird (all white document area), with nothing working.
2018-11-10 00:04:28 +02:00
Tor Lillqvist
4a6120d69b Bin dead code
In a script snippet that is inside an m4 ifdef for the non-MOBILEAPP
case the window.ThisIsTheiOSApp can never be true.
2018-11-09 19:05:33 +02:00
Miklos Vajna
c74c9e39c8 Disable document signing via config setting
It's not too easy to customize CSS, so move the top position of the
document container to loleaflet.html, where it's convenient to handle
this.

JS can dynamically query if the menu item should be there, similar to
the about dialog.

Change-Id: I4b2799a41f8ad31e3a9b4983fd1947d2e0363a2b
2018-11-09 13:56:02 +01:00
Tomaž Vajngerl
1a954fa44d add sign infobar below the toolbar
Change-Id: I7def928b0cacf54f008c9402a9df229423042f48
Reviewed-on: https://gerrit.libreoffice.org/63153
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-09 09:06:23 +01:00
Henry Castro
c0643e1421 loleaflet: mobile: move button (hamburger/x icon)
Change-Id: If552c5f77cb56818f6762b77f34498eabc267d1a
2018-10-21 12:53:16 -04:00
Tor Lillqvist
61e0d72982 Move framed.doc.html so that it doesn't get removed by 'make clean' 2018-10-17 23:44:59 +03:00
Tor Lillqvist
15bd1dc48c Fix typo 2018-10-17 11:00:28 +03:00
Tor Lillqvist
e15dc044d7 Handle the GTKAPP case, too, in loleaflet
In loleaflet.html.m4, define a macro MOBILEAPP as true if either
IOSAPP or GTKAPP is true.

Set a window.ThisIsAMobileApp property in either case, and
window.ThisIsTheGtkApp in the GTKAPP case.

The checks for ThisIsTheiOSApp in the JS could in fact all be changed
to check for ThisIsAMobileApp instead, as they were all equally valid
for the gtk+ testbed app. For instance, sending WebKit messages to the
app code works the same way in JavaScript both for iOS and
webkit-gtk+. Which is not surprising, I guess, as the underlying
WebKit is the same.
2018-10-17 02:10:14 +03:00
Henry Castro
f94c5e25f6 loleaflet: mobile: fix scrolling the menu bar
Change-Id: Ic0bdbfb825507ab3b09f56627e0218a40fd95172
2018-10-15 12:20:36 -04:00
Tor Lillqvist
7159fcb54d Add Base64ToArrayBuffer() JavaScript function
Used for use sending tiles from the iOS app code to the JavaScript.
2018-09-19 01:06:41 +03:00
Tor Lillqvist
e1978621f3 No need for WOPI stuff in iOS app 2018-09-18 18:07:59 +03:00
Tor Lillqvist
b636098cae Some minor iOS (or mobile in general) app tweaks 2018-09-12 13:34:27 +03:00
Jan Holesovsky
c5259eb7b6 ServiceRoot: Add the serviceRoot to various html and js files.
Change-Id: Ibd9093afa3d1f014c70328446ee42189dd0c2117
2018-09-08 00:12:20 +02:00
Jan Holesovsky
9d07230f8a ServiceRoot: Allow prefixing all the URI paths with a given prefix.
For instances that has to run in a deeper path like
https://server/something/blah/loleaflet/HASH/loleaflet.html.

Change-Id: Idacdaf9087d682fd527c3af2ea45d6b51a33908e
2018-09-08 00:12:15 +02:00
Tor Lillqvist
fb7cc57b0f Work in Progress: Check window.ThisIsTheiOSApp and behave accordingly
First steps to modify behaviour in the app case. No query parameters
or WebSocket messages in that case.

Change-Id: I170d46830bb940c5164af3f62b873672373d8f17
2018-09-07 17:37:54 +03:00
Tor Lillqvist
1ae4a32067 Factor out loleaflet/dist construction for iOS app building
The idea is that on a Linux box you have a tree of online that you
configure with --enable-iosapp. Then running 'make' there will only
create the stuff in loleaflet/dist. That loleaflet/dist can then be
copied to the Mac where you build the iOS app.

(To me, this approach seemed for now simpler than to get all the
PKG_CONFIG etc stuff working that running configure normally requires,
and run all the node, npm, and associated crack, on a Mac.)

Change-Id: Id2e495d0521922d0666fdab5fdcb5fcd460136f1
2018-09-03 17:10:19 +03:00
Andras Timar
199b32fc0f loleaflet: fix Keyboard Shortcuts help localization
Change-Id: I1bbe88a37127fb13cba7c065ce03cb6799c6b7fa
2018-07-31 09:24:50 +02:00
Andras Timar
3984206b69 No need to load l10n framework for a page that appears for fragment of a second
Change-Id: Id23ab66fadb714316cdf73e93501b0cea870880d
Reviewed-on: https://gerrit.libreoffice.org/55850
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2018-06-15 12:34:16 +02:00
Henry Castro
9f456079e1 loleaflet: remove the script tags that they already were bundled them
Change-Id: I791c6c6850b39d5327c5c3c521138531f3a6f148
2018-05-27 09:19:36 -04:00
Henry Castro
8618885b31 use Makefile to build loleaflet
Concatenate and minify all javascript files in the release build but not
in the debug build. Also, it is enabled to use a build directory

Change-Id: Ia120447a827cfe236241ddf188bf43a088f877a7
Reviewed-on: https://gerrit.libreoffice.org/52802
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2018-05-10 20:30:16 +02:00