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>
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>
The less special-case code/logic/UI, the better the world is.
It had weird unintended side effects anyway. (In the iOS app, which
was the only place where it was used.) For instance, in a spreadsheet
document on iPhone, after loading the document, the normal "mobile
wizard" style context menu did not appear, no matter how long you
pressed a selected cell. But if you first got the context toolbar to
show up once, and after that selected some cell and long-pressed it,
the mobile wizard style context menu did appear, just as when using
web-based Online on the same device.
Note that despite that the code in Control.ContextToolbar.js was used
only in the iOS app (L.control.contextToolbar() was called only if
window.ThisIsTheiOSApp), the file did contain code for non-iOS, too.
Change-Id: Icdbfc7e71f77539c1bcb5ac8cf6984375297a4bd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91055
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
It is a flexible bundling of all javascript libraries and
each platform (ANDROID, IOS, Desktop) can remove or add
from node_modules or imported according to its requirements.
Maybe in a near future some external libraries could be loaded
on demand or lazy loading that are not necessary when the page
is loading.
Change-Id: Ief5d4973ab29a4fb3c4848c3e1653a24fff0da69
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89860
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Henry Castro <hcastro@collabora.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
It is a flexible bundling of the loleafet source files
and each platform (ANDROID, IOS, DESKTOP) can prevent to
bundle some files that is not necessary.
(i.e Mouse handling in native mobile devices)
Change-Id: If018bcc8682df5ae4bf5dd9943aa977e18c0de36
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89734
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Henry Castro <hcastro@collabora.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
We are in state to bundle Javacript files for different platforms:
Android, IOS, desktop. And each platform could add specific chunk
Javascript code according its specific requirements.
Change-Id: Ib52ae816cb9443c8605fdf70aaa4c5e4c81b962d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89557
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Henry Castro <hcastro@collabora.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
And so far disable the various sorting possibilities, they are not
working for the recent files (yet).
Change-Id: I233f6cd05d15cf0c3f9f2bf940a8233ee5300cb7
The file was imported from node_modules/autolinker/dist/Autolinker.js
the main reason is to analyze the source code, debug and patch
if necessary
To get the source code from npm repository
make libs
Change-Id: I3eea7cc6e8d61623398d77ed74e751ccd861252b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89150
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
The file was imported from node_modules/json-js/json2.js
the main reason is to analyze the source code, debug and patch
if necessary
To get the source code from npm repository
make libs
Change-Id: I7d80646704b368f6961c75f1dabaabecde2527e6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89146
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
The file was imported fromnode_modules/select2/dist/js/select2.js
the main reason is to analyze the source code, debug and patch
if necessary
To get the source code from npm repository
make libs
Change-Id: Ibe0fd718d1dd6157d463a304c56fd6475821a0eb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89110
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
The file was imported from node_modules/vex-js/dist/js/vex.combined.js
the main reason is to analyze the source code, debug and patch
if necessary
To get the source code from npm repository
make libs
Change-Id: I59e466e925d43bf4c599305898c656f69ec195d9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89099
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
The file was imported from node_modules/@braintree/sanitize-url/index.js
the main reason is to analyze the source code, debug and patch
if necessary
To obtain the source code from npm repository
make libs
To bundle the file sanitize-url.js
browserify braintree-sanitize-url/index.js --standalone sanitizeUrl > sanitize-url.js
Change-Id: I7869a1349648ae1f8f2194859ebb398b1a73733e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89055
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
The file was imported from node_modules/l10n-for-node/l10n.js,
the main reason is to analyze the source code, debug and patch
if necessary
To obtain the source code from npm repository
make libs
Change-Id: I7bd4d400c504f57a94566e187c6d26361aed8bd0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89043
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
To have the menu translated.
Change-Id: I8d4d90d260aa3fcd80a8eb68515b22c58c9b3e18
Reviewed-on: https://gerrit.libreoffice.org/84931
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Since c59bf4ed3a, $(ENABLE_DEBUG) is
eiher "false" or "true", not empty or "true". So we can't check it in
Makefiles with just $(if $(ENABLE_DEBUG),...), that will match also
the value "false".
Change-Id: I17c079f1c3a6346e9f0a0219f07f642673b55a98
Reviewed-on: https://gerrit.libreoffice.org/83663
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
It is hard to debug the library if it is minfied,
it is preferable to non minified when --enable-debug is set
Change-Id: I7886d047d8aab90b68c12bb50964d263445d8afe
Reviewed-on: https://gerrit.libreoffice.org/77733
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
This adds table markers for resizing rows and columns if the user
has the table selected or the cursor is in the table. The code
reacts to the callback "tableselected:", where the markers are
created for each column and row, if the payload (json) of course
has any data. When the marker is dragged, a uno command to resize
the table column or row border is send to the core.
Change-Id: I9b21d09639c1b2be70a1a897f9e3340b453d847e
Reviewed-on: https://gerrit.libreoffice.org/77360
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
This way, it is more naturally visible what is the actuall app (with the
initial recent documents / file picker) and the editing part.
Change-Id: Ia764f2900939e980f703e3da9f9abd6c0aee7cbb
This is needed for the Android app too, so generalize the switch.
Kill copying of the example documents into the APK when at that...
Change-Id: I5b575ade3e40cc0becd5c739077acff5299d3312