Commit graph

185 commits

Author SHA1 Message Date
Tor Lillqvist
91c6c4d0da Introduce --enable-bundle to decouple bundling from --enable-debug
Without --enable-bundle, --enable-debug works as before: Individual JS
and CSS files are sourced in loleaflet.html.

But with both --enable-debug and --enable-bundle, a non-empty
bundle.js and bundle.css is produced and that is used instead. It is
important for developers to be able to test also the use of bundle.js
because there can be significant differences in behaviour. Developers
typically have to use --enable-debug because otherwise there are
various stict run-time checks in the C++ code that you don't want to
bother with when developing, like having a separate login for COOL.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: If7d0220b7910fe0f7a2f391b856cd0dedc788152
2021-10-14 10:38:01 +03:00
Szymon Kłos
8568f36371 sidebar: don't show empty on init
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iab30702bcb2aad8d7eaf1cf6e97f9c536cb4931f
2021-09-23 12:37:08 +02:00
Szymon Kłos
bf5375beb0 Introduce MobileWizardPopup and use for comments
New container which builds the same structure as mobile-wizard.
It will be used in case of smaller screens on desktop and tablets.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4631750963bb7daec2659b7af021a4b7bc55f033
2021-09-23 11:08:17 +02:00
Ashod Nakashian
e363273e22 leaflet: support hexifying the body of the lool URI
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit cfa7972289e9c71b56c81722aedc14189f842475)

Change-Id: Iebf214a1bba76dd44fe2c160a0749675aa5b140a
2021-09-13 09:40:09 -04:00
Mert Tumer
70f573f3b2 Implemented an option to pass PostMessageOrigin
External apps load loolwsd inside the iframe
and loolwsd makes postmessages to parent window.
We receive the postMessageOrigin from checkfileInfo yet
we still send some messages before we even go to the WOPI Api
in that case, if parent window runs on a different domain, we
end up with CORS blocking by the browser. To prevent that we can
allow safely passing the origin inside the first post like access_token
and sanitize it with Poco::URI::encode.

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I5724f2d103603a599d45b7f61da81fb30834ef0e
2021-09-07 10:36:07 +02:00
Alexandru Vlăduţu
0b361d1cfc loleaflet: add demo for opening multiple docs and switching between them
closes #3122

Signed-off-by: Alexandru Vlăduţu <alexandru.vladutu@1and1.ro>
Change-Id: Ibf4823b03cb70812c84d9125f4092b87bec6613b
2021-08-26 12:08:17 +02:00
Pedro Pinto Silva
edcc5b0faa Calc: Help: Add Navigational shortcuts
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I3117d6137e2ec6a7a544fcb4cecf1ef4aa543b85
2021-08-10 09:13:05 +02:00
Henry Castro
67bbb9b9c9 loleaflet: fix variable "feebackLocation"
Define the "feedbackLocation" variable only if it is enabled

Change-Id: I75ab9eec9f2f074eefe8551e876bb7dc07a30b4c
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-08-06 17:21:18 +02:00
Henry Castro
c8e2d25d24 add initial feedback option
Change-Id: I9357f556474e5ada881e27983c95f7527b284efc
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-08-06 17:21:18 +02:00
Gökay ŞATIR
81d5d58ceb Main-document-content: Prevent over-sizing.
Set min-height property to prevent exceeding the available size.

slide-sorter: Set max-height to prevent over-sizing relative its parent.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Ib8c50bc9f6f6ac4311cefa3b0e016da728efe95b
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
b36b732e1f Move side bars into flex container.
So, we no longer need to set positions of HTML elements using margins or absolute positioning or attributes like "left: 30px".

Tested on mobile, desktop, tablet views with & without notebookbar.

The problem was:
    On an unbranded build, side bar's width is different. So pre-assumed pixel based positioning would need to be changed according to existence of branding.
    Instead, i tried to use CSS rules with flexbox.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Ib301dfa8c06a9cf12acd33caf1b6a852a2faab20

There is an additional fixup for master branch included.
2021-07-20 13:43:22 +03:00
Pedro Pinto Silva
7062fe28e9 Freemium: Use vex attributes plus styling
Do not use external html file and instead use input attribute from vex
so we can send html while being able to use variables (those variables
should then be overwritten by integrator)

Also Fix styling and DOM elements creation:
- Avoid to many elements and messy notebookbar with multiple (states)
  - Replace disabled feature icon with lock icon
	- Also style it properly and make it similar in other properties as
	the existent disable status

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I9c2a07ef1fe5f089d5e63cb53d2d6b7f0b5083a8
2021-07-20 14:41:18 +05:30
Pedro Pinto Silva
81aac851a7 Freemium options: Add external content and fix vex
- Add html file where structure can be changed
  - Add illustration as default (in the case integrator doesn't
	have one). Avoid any purple so to do not confuse the user about
	who is requesting the subscription
- Set custom vex button text (to do: translations)
- Add custom class to vex so we can target it better in CSS

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6a4c0232f3728ba88f650ce28905ebfe2f6d9bfc
2021-07-20 14:41:18 +05:30
Gökay Şatır
ded14a96c5 IE11 compatibility changes.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: If595e742ecef633741892c4a714f74d93e97c6a9
2021-07-09 21:05:40 +03:00
Gökay Şatır
ff744fb70e html.m4: Use CSS-flex for page layout.
Use flex for document-container, so now it automatically resizes itself.
Remove absolute positioning from row elements.
This patch is for desktop view.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I2807794da268fe0f3d7f2c54ad19a728f4c6f981
2021-07-09 21:05:40 +03:00
Tor Lillqvist
91486ce5d6 Show verbose feedback when toggling log level and Trace Event generation
Sadly I had to use a global variable to access the actual contents of
the Help>About window as being displayed in its key event handler. If
somebody can figure out the correct clean way to do it, be my
guest. (Look for the app.ExpertlyTrickForLOAbout.)

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I88582e490d566d127d60226e045535e12c172e9c
2021-06-30 14:32:24 +03:00
Pedro Pinto Silva
2e5e1ad826 Keyboard keys: Fix style inconsistencies: missing Draw
- Add missing <kbd> tags to Draw

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I30c71ba576a42aa64935c6fa493ef9b54b51f1dc
2021-05-14 10:58:24 +02:00
Pedro Pinto Silva
d3c0e77e4b DocumentNameInput: Simplify component
Initially we had only a simple text label with an outline but due to
user feedback we end up increasing its contrast and displaying the input
field outline as a box plus adding an icon so to emphasize that it's
possible to edit the document. See this for context:
https://github.com/CollaboraOnline/online/issues/2310

Since this feature is not new to our user base:

This change aims to
- Fix some quirkiness of that component (too heavy element floating
   in the toolbar)
- Getting rid of pencil icon inside of input field
  - Which avoid problems in responsive mode (cropping pencil icon) and
	- helps to use the space more efficiently
- Helps users understanding that we are still in presence of something
  more than a simple static label
	- by keep it with a white background and with a hover state
- Improves look and feel
  - Use the same size as used for tabs
	- Use app color
	- Use rounded corners so to appear less bulky
	  - and so it looks like the title of the window (text centered aligned)
		- on hover shows shadow (is clickable)
		- on focus text is left aligned and outline appears, showing that
		is ready for accepting key strokes
	- Also changes on device-tablet.css fixes
	  - cropped or juxtaposition of document name and close button
		- easier to interact with the document name input field on a tablet
- This affects both Notebookbar and Classic mode
  - When in classic mode use the same font-size as the neighboring
	 elements	(10pt)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iff17b32bf9cf95968fdb387de856b377a23a116a
2021-05-11 13:06:40 +02:00
Pedro Pinto Silva
25bad4f9c6 Keyboard keys: Fix style inconsistencies
fixes #2011

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I227fed8bc8838f09e878290650d47d000ac53801
2021-04-21 10:09:12 +02:00
Tor Lillqvist
97c77a25c2 Make the help file work properly in the mobile apps
We cannot use jQuery.get (a.k.a. $.get) in the mobile apps as that
uses some XMLHttpRequest thing that obviously won't work when there is
no web server involved, but loleaflet.html has been loaded from a
file: URL. Simply store the help file into a global variable and use
that instead.

A small refactoring of the showHelp function was needed to factor out
the call of vex.open into a separate function. That is called directly
from showHelp in the mobile app case. Otherwise, it is called from a
short function passed to $.get, as before.

Note that in the mobile apps we cannot use window.open (which in the
mobile apps has been redefined to send a "HYPERLINK <url>" message to
the native app code) to open the help file, because the HYPERLINK
message is for opening a web page in a browser, completely separately
from the app. It is used to display the commit log for the Help>About
functionality.

And anyway, the old idea (that didn't work) to take a shortcut in the
mobile app case and just display the help file in showHelp will not
work anyway as we need the code that edits the contents before it is
displayed, and handles the close button in the help file.

This fixes https://github.com/CollaboraOnline/online/issues/400
This fixes https://github.com/CollaboraOnline/online/issues/401

Change-Id: I16dc960f26af7e6e89663c3ac0523ce5c3d41c34
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-03-18 19:37:34 +02:00
Szymon Kłos
5945b2d396 Hide Macro Selector dialgo from menu if disabled
Change-Id: I35d521341032ca23a13e8d6795d168ac32c9ec43
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-16 10:41:36 +01:00
Andras Timar
e2ed44b8ab Add Action_ChangeUIMode to PostMessage test harness
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I06c5e7fab8fff763e59f2a4fdf85c7f47dec51bb
2021-03-01 08:48:52 +01:00
Gökay Şatır
5f1090dcb1 CanvasTileLayer: Position canvas on mobile, tablet and desktop.
Remove "spreadsheet-row-column-frame" div. Since row & column headers and groups are drawn onto the same canvas with tiles, that div shouldn't exist.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
2021-02-02 09:49:48 +01:00
Tomaž Vajngerl
aa6d8af042 Separate shortcuts online help for presentations and drawings
Change-Id: Ic6290ea43fc55e78a037ac3b774cb0eb090e8ba5
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
2021-01-21 10:22:58 +01:00
Andras Timar
bcf7054fcf Do not let screenshots in Online Help be bigger than the width of help popup window
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I93d4267720f969a1d04d7adf8efd5c14ed0de93e
2021-01-05 07:07:48 +01:00
Andras Timar
8f947d907b remove traces of "LibreOffice Online Personal" brand
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9fa6e33a8012065262885a5a0ef1c855e2df5b53
2020-12-21 12:39:27 +01:00
mert
740f6e6220 Android: Pass userInterfaceMode
This will enable notebookbar for tables
smaller devices will continue on classic mode

Change-Id: Ib74b8a0ad161d83300d807fff1fd8b3ffba11399
Signed-off-by: mert <mert.tumer@collabora.com>
2020-11-17 19:51:06 +03:00
Ashod Nakashian
23638329bb sample: new form page to load documents via post requests
Often loleaflet.html is loaded via POST requests. This
new sample demonstrates and exercises this approach and
is a handy way to load documents.

Change-Id: I065a946413ab08d399ac5704c67f6f1ba37bdd9e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-15 11:10:20 -05:00
Ashod Nakashian
ebcdaa9e87 sample: added usage and improved url construction in framed.doc.html
This should make this sample much more useful by documenting
the proper usage and helping the user avoid common pitfalls.

Change-Id: I965bed0e4ab685dd2a68f7b246dd9a409d296337
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-15 11:10:20 -05:00
mert
ffaf53d3ef Make Themeing related CSS vars UI Configurable
Change-Id: If6e4096dc37573ff116f218ceb4ca14135820ff7
Signed-off-by: mert <mert.tumer@collabora.com>
2020-10-30 11:20:00 +01:00
Tor Lillqvist
843a249d8c This is a help file, not marketing
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I4c5efaf1b16a81a870befae30e0422c13acf0504
2020-10-29 15:40:42 +00:00
Tor Lillqvist
a57df6387f Use the notebookbar in the iOS app on iPad
(But not on iPhone.)

Change-Id: I0589fd914b2ccdd7a62981ab76c02363d7dcf114
2020-10-22 09:24:20 +02:00
mert
867e4a7f67 Fix uncaught exception on localStorage
3rd party cookies or localstorage can be blocked
on the browser settings, especially is on chrome incognito
mode. This causes the document fail to load.

Change-Id: Ia2a182262a754c76aec58cbbce60a0298320df33
Signed-off-by: mert <mert.tumer@collabora.com>
2020-10-09 13:56:47 +03:00
Andrea Gelmini
9d01540680 Fix typos
Change-Id: I7d487f32ca43e19023760ef3c6bb1683607f93d1
2020-10-07 12:51:08 +02:00
Pedro Pinto Silva
9b352038f2 Document name input: Add label, hide it but make sure screen readers can use it
Change-Id: I7f1d0c248829c61726f0083cfc6196fd20066c4c
2020-10-07 10:17:40 +02:00
Andras Timar
34bc966d68 change product name
Change-Id: Ic34d324c952364442d3f4f9f0758676ab57c8a9a
2020-10-02 14:18:28 +02:00
Jan Holesovsky
4ad8773821 Make various bits of the UI configurable.
This adds the infrastructure to be able to pass the info which elements
like the statusbar / ruler / sidebar are supposed to be shown or hidden
on startup of the editor.

Change-Id: I188264dec6961074444934ff5fd7088e23b170d4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103169
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
2020-09-28 11:53:16 +02:00
Thais Vieira
54cad07c4e Loleaflet: fix pencil icon
- to be displayed after the toolbar appears
- only when it's possible to edit the name of the document
- only when not in presence of android app and hidden (display: none) by default so it does show up before input field

Change-Id: I5c78593b1229da1682832a46e6fc8f1b09b31e12
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102675
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Pedro Silva <pedro.silva@collabora.com>
2020-09-16 12:38:35 +02:00
Pranam Lashkari
35cc34c420 leaflet: updated paste shortcuts in the help menu
Change-Id: Ie151debcbe169f59e662512448f4df5372cf52a6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101886
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
2020-09-01 20:06:24 +02:00
Tor Lillqvist
3df718aac7 tdf#133284: Improve hardware and on-screen keyboard in the iOS app
This is a quite complicated change that should both fix tdf#133284
(cursor keys on a hardware keyboard do not work in a spreadsheet
document) and also improve the interaction with
CollaboraOnlineWebViewKeyboardManager that manages the on-screen
keyboard. We need to jump through complicated hoops in order to get
the hardware cursor keys handled right after loading a spreadsheet
document.

In the CollaboraOnlineWebViewKeyboardManager case we try harder to
keep loleaflet's _textArea buffer in sync with what the UITextView in
CollaboraOnlineWebViewKeyboardManager uses to provide suggestions
above the on-screen keyboard.

Also merges in related changes from today to
CollaboraOnlineWebViewKeyboardManager.

Change-Id: Ic4acb54bd4e815aa8bfb2bf40b08493446ae5ab0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101878
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-09-01 17:24:36 +02:00
Pedro Pinto Silva
1c4dcc1f58 Document Name Input: make it flexible (dynamic width) and
* convert var colors to rgb
* use the var colors for shadow + alpha (rgba)
* .document-title container: remove table display and add min width

Change-Id: Id4289af91562790edd23c83d4e70a16688e44fe3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101048
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Pedro Silva <pedro.silva@collabora.com>
2020-08-25 12:55:50 +02:00
thais-dev
43904d4598 Fix comment syntax.
Change-Id: Ia726b1b46c1aa2ca7d2757441e6699956313b924
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101142
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-08-21 16:12:06 +02:00
Tor Lillqvist
ad031401b5 window.webkit.messageHandlers.<name>.postMessage() takes just one argument
There has apparently been confusion with the unrelated
Window.postMessage() method.

Do it for the iOS app case but presumably the same can be done for the
Android app case, too.

Change-Id: Iabb259b618426cbbb9f4ed2a9a97ad907bc09c39
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100773
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-08-15 17:05:53 +02:00
Michael Meeks
d28278fa7e Constrain image insertion to select just images.
Change-Id: Ife7a655ca540ddc854f1bdeaacf256a58ebcc02d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100475
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-08-11 14:21:37 +02:00
Tor Lillqvist
888b31ad86 Revert "Return early in L.Map.showBusy() in the iOS app, too"
Instead, set brandProductName from the MOBILEAPPNAME. Now the mobile
app name shows up in the progress bar.

This reverts commit 24a0c7c3dc.

Change-Id: I91c7ea3d21f5362fc6a4d777b041089413e921ee
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98205
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-06 13:24:28 +02:00
Andras Timar
bab4380e6d default product name: LibreOffice Online Personal
Can be changed:
* configure --with-app-name
* brandProductName in loleaflet/dist/branding.js

When there is no brandProductName defined, this message will
appear in About box:

"The Personal edition is supported by volunteers and
intended for individual use."

Change-Id: Iec5aa2df7e734bdbc1dd8037656334f0016a7a82
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97837
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-07-05 13:29:38 +02:00
Szymon Kłos
3141bf7775 notebookbar: Introduce switch in loolwsd.xml
Change-Id: I94546a899fde1cecc2c35dc527e41e8a36061750
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93050
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-30 08:16:25 +02:00
Pedro Pinto Silva
40110f2ba7 Desktop: Set max size for document name's width
Change-Id: Ic35990efd9e240ed29ae9da1e72dcd6b58a4e933
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96053
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-06-11 12:54:38 +02:00
Michael Meeks
33ae2bec0f Proxy: centralize URL building and use absolute URL for images.
Fixes missing images on mobile.

Change-Id: If5f858cec5fc81ea50c4679162b36eb000f6d872
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95803
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-06-08 15:42:04 +02:00
Samuel Mehrbrodt
665b1629de tdf#131123 Report back save result
Change-Id: Ie3dee5d344bc65c325b95f2746c9734bdd9e2f9d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94490
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-05-29 08:39:46 +02:00