Commit graph

1780 commits

Author SHA1 Message Date
Pranav Kant
7c6d4719da loleaflet: Print dialog for MS edge too
MS Edge seems to be very problematic when one tries to load the
pdf blob into the print iframe and issue a print command to it.

Lets fallback to print prompt as we have in firefox

Change-Id: I97fc394d0053030231c524efb6bf808d32a9aa07
2016-12-14 19:06:26 +05:30
Pranav Kant
1bfbd6990c loleaflet: Reuse L.Browser instead of our own logic
Change-Id: I479d6aa3de657ba032e3bb7e5039d5744a859163
2016-12-14 19:06:12 +05:30
Pranav Kant
a0036f24ba Pick changes from upstream Leaflet
Only the changes made to src/core/Browser.js

Change-Id: I96f95e59a50fabea7dad1a8836e78aebac9112c8
2016-12-14 19:03:13 +05:30
Pranav Kant
7ed38a2011 loleaflet: Pass print frame as argument to close function
Removing this._printIframe may still cause leakage here as
this._printIframe is overwritten everytime user issues a print
command.

Change-Id: I06f45604940380b809bc262f07b9b6a8aa7d9a87
2016-12-14 18:18:11 +05:30
Pranav Kant
e255fe64d2 loleaflet: bump timeout for closing print iframe to 5 minutes
Change-Id: If58a28ef5c856b4ab5e497028fbcabf7b954b282
2016-12-14 18:18:11 +05:30
Pranav Kant
9d039cbd5a Revert "loleaflet: print dialog: it seems that this magic hack is no more needed"
This reverts commit 8c522c44d1.

We need to remove the iframe otherwise it will leak.
2016-12-14 18:18:11 +05:30
Andras Timar
9ee4062935 Bump version to 2.0.1+
Change-Id: I1a670d3b9a3a5d3711f1a83b2a8978e032ded774
2016-12-14 11:34:11 +01:00
Pranav Kant
a76825728e Pass Disable{Print,Export,Copy} options to client and handle them
Change-Id: I59a9432bbdd06d8b184f96882c5f4009fcd0be54
2016-12-13 17:59:02 +05:30
Pranav Kant
8135e678bb loleaflet: Use readable id= argument in downloadas
Change-Id: Ica9ba833f487f2c75f8629fd91f31b216c4797b5
2016-12-13 17:45:16 +05:30
Andras Timar
356374d96b loleaflet: typos 2016-12-12 16:20:36 +01:00
Pranav Kant
b3db321e85 Unify loleaflet's make with top level make
Top level make would now build loleaflet too if necessary.

Respect value of ENABLE_DEBUG and if present add debug-info to
generated js bundles too.

Add new rule, clean-local in loleaflet.

Change-Id: I3a9b727824f2877fc72719a8bfdeebed5448cb7d
2016-12-12 17:56:58 +05:30
Pranav Kant
5938962e0e loleaflet: build: Skip expensive 'npm install'
This always takes ~2 seconds irrespective of whether node_modules
needs updating or not. Lets add appropriate dependencies and save
these precious 2 seconds.

Change-Id: Ided4ff334316c16521e5ea7a69d15736a1cc170f
2016-12-12 16:08:15 +05:30
Pranav Kant
94153379f5 loleaflet: Unused variable
Change-Id: Ic08a04cd196084ce82524ded67445f5b1068b83d
2016-12-12 14:58:21 +05:30
Pranav Kant
6b795ae54d loleaflet: Remove troublesome extra argument to replace()
This errors out in firefox (in some versions).

Change-Id: I4c1d77249ec6883b70c961ffe8239157a0d6466c
2016-12-12 14:55:50 +05:30
Pranav Kant
fda2f26df4 loleaflet: Don't use w2ui directly from loleaflet
Use events, 'hidebusy', 'showbusy' to interact with toolbar.
In some cases, it may happen that w2ui usage in loleaflet happens
before browser loads w2ui.js (as it is in <script> tag after the
one which loads loleaflet).

Change-Id: I9b1b249ede72ed01f97cf31fd3f93780312530bc
2016-12-12 13:49:04 +05:30
Andras Timar
e73841b66c loleaflet: remove unused functions: toggleButton, disableButton 2016-12-09 16:01:40 +01:00
Pranav Kant
e845bdfbe5 loleaflet: build: Pass debug, minify variables as env. vars
Change-Id: I500b49f50901a72a93caa5cce1f50a2c2e3d0613
2016-12-09 20:08:58 +05:30
Pranav Kant
c4fe26e1db loleaflet: build: better log messages
Change-Id: I10c1cacebc542c6a1234603a264f2dbd5381c015
2016-12-09 20:06:45 +05:30
Pranav Kant
ab9d744fe5 loleaflet: Improved build process, don't build unnecessarily
No point in building things that are already built, create
different jake tasks, enclose whole of the build process in a
single jake task - 'build' which would call other various tasks
depending on whether they needs building.

Change-Id: I4b26834440ef638d697aa0793d2ced1e2c49784a
2016-12-09 18:10:55 +05:30
Pranav Kant
b940b34ab1 loleaflet-draw: Return early if no changes
Compression is most expensive in terms of time; if we detect
early that there are no changes between oldSrc and newSrc, lets
return early and skip the compression.

Change-Id: Id3d7c1d4bf89a33819907ff735e01629581627a3
2016-12-09 18:10:55 +05:30
László Németh
076e779649 loleaflet: fix footnote insertion
Ctrl-Alt-F (insert footnote) activated the Search bar (Ctrl-F), too.

Change-Id: I681156f703bc044417c9b47aad8b3ebce5f259f6
2016-12-08 23:32:26 +01:00
Pranav Kant
01d91642f1 loleaflet: Use same loleaflet font for color picker
Change-Id: I4e8235a913db81f3d270a23a95e1b3144de47d08
2016-12-08 22:15:15 +05:30
Pranav Kant
33ce6f38e4 loleaflet: Check boxes against checked items in context menu
Change-Id: I1a51fec67ba79dc2e82cccb54731bfabb9731470
2016-12-08 21:58:58 +05:30
Pranav Kant
cba45fce42 loleaflet: Improved search
Start searching as you type
Press enter to search forward
Shift + enter to search backwards
Esc to get back to editing

Change-Id: Id366069aea9eb0e96e8d73fa4b57f972b0ce78e5
2016-12-08 19:21:36 +05:30
Tor Lillqvist
e221388c79 Add an 'Idle time' column to the Admin console
Use a new protocol message, 'resetidle' to inform Admin clients
whenever a user has done anything in a document view. This is a
message that Admin clients need to subscribe to.

Also add the current idle time for each document to the 'documents'
message.

To reduce protocol chatter, the idle time is updated at most once per
10 s.

Change-Id: I418e82b05048a3628f21dcd240ccd974b3a01356
Reviewed-on: https://gerrit.libreoffice.org/31653
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-12-08 08:39:11 +00:00
László Németh
7bf2bec78f loleaflet: better user tooltip layout in Calc and Impress
Now it is similar to Writer user tooltip coloring.

Change-Id: I68ae24145a199957c506491d38ff50472abcf1bb
2016-12-08 00:40:58 +01:00
Pranav Kant
fbb26d0d13 loleaflet: Request higher pixel density tiles on retina display
Change-Id: I418f0db47239c915d8f12c07979306a814370b65
2016-12-07 21:01:14 +05:30
Pranav Kant
8ee3a8d6c2 loleaflet: Popup virtual keyboard only in editmode
Change-Id: I5e1e134e07f65bc52ff3c5f38879ad3b7097254c
2016-12-07 21:01:14 +05:30
Pranav Kant
5b06f7b916 loleaflet: Higher resoultion on retina displays
Change-Id: Ib2a031d2d1cb88fe7fede392cfc2332a73252bbb
2016-12-07 17:42:12 +05:30
Pranav Kant
322e00cab7 Ununsed option in TileLayer
Change-Id: Ida522fc8f92dd264e4544948394b9c7c11d993ab
2016-12-07 17:42:12 +05:30
Olivier Hallot
1a929bee71 Updated pt_BR translation
Change-Id: I287c8ed93991f9257245faf52c1204b60b285c14
2016-12-07 13:08:46 +01:00
Pranav Kant
d0558bae70 loleaflet: Don't prune tiles after every tile load
When the connection is slow and tiles are received after a good
amount of lag in between them, one tile load can prune tiles (of
earlier zoom level) for which we have not yet received the tile
response from the server - so there's nothing we have yet to
overlap these tiles completely, leading to grey-ish patches when zooming
in or out.

Pruning these tiles later ensures that we do not remove any tiles
of earlier zoom levels until all the tiles have been loaded.

Change-Id: Ibb03f0c6bf2031741f0b8a4584c1821539587e88
2016-12-07 16:16:40 +05:30
Tomaž Vajngerl
e3fe9afa9c don't scroll to the cursor position after focus lose/get
Change-Id: Id017c5ea8c162a71a8b4d8ec47a6d9deb7357fca
2016-12-06 15:35:30 +02:00
Pranav Kant
4c788c3014 loleaflet: Disable row/col header context menu in readonly/view
Also fix a js error trying to disable context menu before
row/column headers are created.

Change-Id: I6b04ce5c0fefa00567ce5fe58fdad9102d1f1651
2016-12-06 13:44:07 +05:30
Pranav Kant
5e4743a54c loleaflet: Missing semi-colon
Change-Id: I216dd1caa9bfba33b5538e149aeddfb7159ccbbd
2016-12-06 13:44:07 +05:30
Pranav Kant
33a6096175 loleaflet: Disable calc toolbar items in readonly/view mode
Change-Id: I2989de5f201eb7f52f5f47d98f9172c640e38fad
2016-12-05 22:04:06 +05:30
Tor Lillqvist
49c505f327 Display leading zero of minutes or seconds properly 2016-12-05 17:17:24 +02:00
Andras Timar
0e786d14a0 disable 'Insert Special Character' for Impress
Change-Id: I6c25d2eb68b0f757771a48bd3c732847d28caff7
Reviewed-on: https://gerrit.libreoffice.org/31628
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-12-05 12:17:23 +00:00
Pranav Kant
d4d4a11750 loleaflet: Disable zoom controls in spreadsheets, don't remove
Due to a bug in w2ui library, w2overlay doesn't popup when it is
near the edge of the screen (reproduceable only when no. of users
are greater than 3). Lets disable zoom controls in case of
spreadsheets so that userlist is not near the edge of the screen,
and hence pops up.

Change-Id: I6f2647d124484235afe6c92da18be38ed8e2b9ce
Reviewed-on: https://gerrit.libreoffice.org/31621
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-12-05 09:45:35 +00:00
Andras Timar
a5c1bdfc6c fix mangled calc toolbar
Change-Id: I59826d82d1096ad5b9383611421cd4fd81416a85
Reviewed-on: https://gerrit.libreoffice.org/31603
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-12-04 21:44:12 +00:00
Marco Cecchetti
729197c676 loleaflet - calc: row/col header unproperly highlighted
Change-Id: I7299dedf8d42e7f185c8977270c4fa8c0d14b820
Reviewed-on: https://gerrit.libreoffice.org/31581
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-12-03 13:32:04 +00:00
Pranav Kant
dde653f920 tdf#103825: Prompt the user when session is about to expire
Set a timer in loleaflet 15 minutes before access token expiry
date (access_token_ttl value) to prompt the user to save and
refresh the session.

Change-Id: I98c3e47c9b7031e29e002f653d488747b9c17df8
Reviewed-on: https://gerrit.libreoffice.org/31381
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-12-02 12:38:51 +00:00
Marco Cecchetti
1ee96c9d97 loleaflet - calc: bad handling of text cursor on lost/got focus
This patch fixes the following bug:

Create blank sheet:
enter "." ie. just a period into A1
enter a "." into A2
now switch virtual desktop away and back again.
hit enter in A2
now switch virtual desktop away and back again.

You should have a blinking edit cursor in A2 - but the focus in A3.

Change-Id: Icda0123f35ecda04559fec859b6bbe6ff3ac33e8
Reviewed-on: https://gerrit.libreoffice.org/31541
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-02 12:20:00 +00:00
Marco Cecchetti
79d18be88c loleaflet - calc: fixed one pixel horizontal auto-scrolling issue
This patch fixes two problems for spreadsheets:

- one pixel alignment offset btw grid and column header

- a one pixel horizontal auto-scrolling issue

Change-Id: Ifd6a3b47863d345656d0dcf3fba2d253c43ba9b1
Reviewed-on: https://gerrit.libreoffice.org/31542
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-02 12:08:06 +00:00
Marco Cecchetti
e7822bb452 loleaflet - calc: horizontal scrollbar not updated on doc width change
Change-Id: I268ab65d0bf7a6794028e23e51012c11534d6f2f
Reviewed-on: https://gerrit.libreoffice.org/31543
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-02 12:01:20 +00:00
László Németh
1f0cbf75ce loleaflet: patch l10n-for-node for older Chrome versions
Online didn't work in Chrome 39 (2014-11). Fixed in
the l10n-for-node shrinkwrap archive (see the patch file in it).
2016-12-02 09:29:34 +01:00
Henry Castro
09923cc10b loleaflet: remove invalid fonts
Change-Id: Ie0383d01f6040d00c630c0aab6b9a66666d079d3
2016-12-01 14:32:42 -04:00
Henry Castro
539e239242 loleaflet: limit Unicode character ranges
There are very big ranges, that's probably not common use for final users
2016-12-01 10:13:12 -04:00
Pranav Kant
15781a4655 loleaflet: Don't handle pageup/dn separately on 'keyup'
... as we handle it already during 'keydown' by sending keyboard
event to core which changes the slide for us.

Change-Id: Id61584ffa0ec5ff3aca098e3dcade664c306c6c3
Reviewed-on: https://gerrit.libreoffice.org/31475
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-01 11:17:37 +00:00
Pranav Kant
2c7f7e8b69 tdf#98484: Fix double-space in chrome when IME enabled
We regressed on chrome with
47699cd908 as 'textInput' event
clubbed with 'keypress' event started emitting double-spaces.

Tweak the hack to keep IME working on chrome while not regressing
when it is not enabled.

Change-Id: I0901724bf2db1794078fef3eb7283663b6f6a13b
Reviewed-on: https://gerrit.libreoffice.org/31469
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-12-01 10:45:24 +00:00
Andras Timar
740a28bfae Bump version to 2.0.0+ 2016-11-28 19:13:59 +01:00
Andras Timar
7a5fbd7f3c Bump version to 2.0.0 2016-11-28 19:10:27 +01:00
Ashod Nakashian
2b9ea3d4a6 loolwsd: notify clients before recycling wsd
Change-Id: Ib2733a6af1c27fe39c54f5c3bc6f5bd3acb72a2b
Reviewed-on: https://gerrit.libreoffice.org/31298
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 05:27:34 +00:00
Ashod Nakashian
c0f9ccee42 loleaflet: activate and dismiss dialogs only upon reconnection
Change-Id: I2d8b3d9788b7f66bc746537e34c90493a7cb408a
Reviewed-on: https://gerrit.libreoffice.org/31296
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 05:04:49 +00:00
Ashod Nakashian
2239f25684 Renamed 'shutdown' to 'shuttingdown'
Change-Id: Idae53a59af13eb54b1f18f1a8cd1dde06421b426
Reviewed-on: https://gerrit.libreoffice.org/31295
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 05:03:54 +00:00
Henry Castro
02095a3387 loleaflet: notify repair document when exists a conflict of multiple ..
.. users undo/redo
2016-11-27 23:39:58 -04:00
Henry Castro
2c2d460172 loleaflet: forgot remove console.log
only debugging purpose
2016-11-27 23:06:58 -04:00
Henry Castro
6947e914e1 loleaflet: re-work special character dialog to render all glyphs
.. on server side
2016-11-27 22:47:36 -04:00
Pranav Kant
d0929fb2f6 loleaflet: Popup keyboard on mobile devices
Change-Id: I4f0d1928633f5f0be4148fffd2c68c7aad1a0508
2016-11-25 16:57:06 +05:30
Pranav Kant
47699cd908 tdf#98484: Handle spaces in chrome when IME is enabled
When IME is enabled and user presses the space button, firefox
sends 'compositionend' event with data = ' '. However, chrome
instead fires 'textInput'
event. Lets listen for 'textInput' event too and treat it like
'compositionend' event when data = ' '.

Change-Id: Icbebdf2e89f608f790e6ce68c49f474364e7d5ab
2016-11-25 14:42:12 +05:30
Pranav Kant
e9dbfa3953 tdf#98484: IME support - handle full string in compositions
Parse the compositionend event's string, convert each into a char
code and pass them individually to server.

Change-Id: If79d538ccaebaa29749a5ca48a1f6ed5e0689ed5
2016-11-25 10:08:27 +05:30
Henry Castro
63e002d695 loleaflet: fix default image path 2016-11-24 23:24:31 -04:00
Henry Castro
8317cd46f1 loleaflet: scrollable special character dialog 2016-11-24 14:00:41 -04:00
Henry Castro
0ba3c23c87 loleaflet: do not allow empty option element 2016-11-24 10:19:54 -04:00
Andras Timar
c8fa6cb5b0 loleaflet: disable zoom for spreadsheet even on touchscreens 2016-11-24 15:12:14 +01:00
Pranav Kant
b8a21852b7 loleaflet: Display menu items always in a straight line
... even if the screen size is smaller than the menu size.

Change-Id: I93c579b7503ec98fadd62718ca8062ed7a564042
2016-11-24 16:51:24 +05:30
Pranav Kant
a149a0c2e1 tdf#103679: Don't always change document permission on error
Have a new event 'warn' which doesn't change the document
permission but just show the user dialog with some message.

Change-Id: I455168e4f7315acdcccfb31fc8c70b86bbc6caad
2016-11-23 18:01:21 +05:30
Pranav Kant
f8e0b8c11e tdf#103679: Handle storage diskfull & other PutFile errors
The new behavior is to warn the user when we try to save to
storage and set all the sessions of
the opened document to readonly, if storage server has no disk
space left. In case of WOPI, this is intimated by HTTP response code 413 -
request entity too large.

If save operation to storage failed due to reasons other than
413, just warn the user and let it continue editing the document.
We can add more reasons of failure and act accordingly in future.

Change-Id: I4b046fc38bbc0d752c89d90acb5991a958b76670
2016-11-23 18:01:21 +05:30
Andras Timar
a01ec99e90 loleaflet: updated pot file 2016-11-22 23:14:49 +01:00
Andras Timar
8b8b02e252 loleaflet: extract strings from Insert Character dialog 2016-11-22 23:12:14 +01:00
Henry Castro
1c1ecf20f6 loleaflet: add double click to insert the symbol 2016-11-21 22:43:21 -04:00
Henry Castro
5e143c813d loleaflet: process command values .uno:FontSubset 2016-11-21 22:13:46 -04:00
Tor Lillqvist
8fe58df759 An updated preview of a slide should be broadcast to all document clients
Amazingly, this (my third attempt) seems to work.

Add a boolean 'forAllClients' parameter to the loleafget getPreview()
function, and pass it as true in the location where a new preview of
an edited slide is requested.

Add a parameter 'broadcast' to the 'tile' (request) message. Set to
'yes' in the above case. When subscribing to a such tile rendering,
subscribe all sessions of the document.

While at it, drop the default values for the parameters of the
TileDesc constructor. I dislike default values...

Change-Id: Idb438f11c953d791fafe4c890e0497d8dfbaa733
Reviewed-on: https://gerrit.libreoffice.org/29591
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-11-21 07:07:18 +00:00
Ashod Nakashian
7f29a11bf3 loleaflet: don't show disconnection notice when inactive
Users aren't bothered with connection errors when inactive.
Instead, when they try to re-activate, the connection is
re-established, and only if that is not possible does
the user see the disconnection notice. Otherwise,
the connection is re-established semi-transparently
(the is a small "connecting" status shown at the bottom).

Change-Id: If4735cc1593c6e29c65d3c9686a8f2861365c583
Reviewed-on: https://gerrit.libreoffice.org/31026
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 15:52:28 +00:00
Pranav Kant
57790dd2b8 loleaflet: Let readonly/view modes change slides
Change-Id: Ia4eef3f20cd0cc33c76de1070e09c8d4c8a6c4c8
2016-11-20 14:57:15 +05:30
Pranav Kant
8f3b5bff4c loleaflet: Let readonly/view views change spreadsheet tabs too
Change-Id: If443a71a4e009657ec7d29582a96f4c23962cfe3
2016-11-20 14:53:22 +05:30
Pranav Kant
4e945eefdf loleaflet: Do not grey out for disabled context menus
Change-Id: Id3bf5db6054e5df9511c491452ef164faa3289f9
2016-11-20 14:51:49 +05:30
Pranav Kant
7312aaced7 loleaflet: More sane names
Change-Id: Idc47e84cd1242e61c98b9caa5eed28dd3d1912e4
2016-11-20 14:50:23 +05:30
Pranav Kant
61af82792f loleaflet: Rename to spreadsheet-tabs-container
Change-Id: I08d57e55e4963beefb2aa3d26b05da75a5fd0ba6
2016-11-20 14:41:32 +05:30
Pranav Kant
8a2c2ad91d loleaflet: Don't unnecessarily update map bounds
This leads to emission of 'docsize' event somewhere down the line
which leads inconsistencies while navigating the document.

Change-Id: Iffabac66153e7b32c9b2af041282ef82b813bef3
2016-11-20 14:15:12 +05:30
Ashod Nakashian
fe10c1d272 loleaflet: close open dialogs before showing close frame
Change-Id: I833ec51f47106dc42b7e9d2412f03256721b270d
Reviewed-on: https://gerrit.libreoffice.org/31005
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:27:09 +00:00
Ashod Nakashian
6b7219e25a loleaflet: notify the user when server intentionally closes connection
Change-Id: I82d855c1a50dca42e40d1123e42b0e02227f73d1
Reviewed-on: https://gerrit.libreoffice.org/31003
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:26:00 +00:00
Henry Castro
8876be85bc loleaflet: modify special character dialog 2016-11-19 17:17:25 -04:00
Henry Castro
b592fa923c loleaflet: add more constants for Unicode blocks 2016-11-19 17:17:25 -04:00
Henry Castro
647fe679e9 loleaflet: fix 0-based index 2016-11-19 17:17:24 -04:00
Pranav Kant
373e68d42c Set reconnection flag when reconnecting
'status' message can well be sent after document has already been
loaded. Eg: when the doc size is changed. We don't want this code
to execute in all such cases.

Change-Id: Ia69ab70edddda1a4e27618101eaff35bd0e5eb65
2016-11-18 17:20:19 +05:30
Pranav Kant
bad071760d Supercede a hack with a better solution + flush tiles on reconn.
This also introduced a regression where upon reconnection of the
document, tiles were not updated. This was because calling
setView leads to calling 'canceltiles' down the line which would
cancel the the 'tilecombine' request for fetching all tiles
leading to stale tiles in the UI

Change-Id: Ib0f583c92802195384ea10f328c0ba2eafc82ffd
2016-11-18 17:18:14 +05:30
Pranav Kant
8a1ac91fa6 loolwsd: Prevent double decoding
Change-Id: I5927e0113505ffcc167e16700db7c2f6408ed3b7
2016-11-17 17:22:09 +05:30
Henry Castro
30531f88f1 loleaflet: update new and last valid slide thumbnails 2016-11-16 10:50:43 -04:00
Pranav Kant
4d28338a10 More WOPI documentation
Change-Id: I0c04d2105ff6227f9f7b6eaa73a7efe6a94faecd
2016-11-16 19:56:33 +05:30
Andras Timar
a65f7d34d1 loleaflet: add missing ui-bg_highlight-soft_100_eeeeee_1x100.png to dist 2016-11-15 20:38:46 +01:00
Pranav Kant
26adebfcb0 tdf#103641: Fix save button visible for presentation
Additionally, change the variable name for presentation-toolbar
to avoid any future confusion.

Also, put the code hiding the save button in onRefresh event so that
save button doesn't show up in the UI as soon as we get the wopi
properties object from the server.

Change-Id: Ib168010c509f55a69aae9752e11321d319f59e99
2016-11-15 18:23:42 +05:30
Pranav Kant
d8a202bf1c tdf#103641: Split App_LoadedStatus - Frame_Ready, Document_Loaded
Post App_LoadingStatus with 'Status' field as Frame_Ready when
we are ready to show the UI.

Post Document_Loaded when document is completely loaded after
which loleaflet is ready to respond to more document specific
queries through post message API.

Change-Id: I60a4e9b75e115c748fcee8d449bc8c2d4ffa34a9
2016-11-15 18:23:40 +05:30
Andras Timar
d02f4bf753 loleaflet: Translation of Special Characters dialog from LibreOffice core 2016-11-15 10:27:45 +01:00
Andras Timar
cb21e68691 loleaflet: Translations of Unicode subsets from LibreOffice core 2016-11-15 10:03:58 +01:00
Henry Castro
c40b79df9e loleaflet: enable font character preview 2016-11-15 00:07:21 -04:00
Aleksander Machniak
fc3a059e75 Fix setting DontTerminateEdit/DontSaveIfUnmodified arguments in Action_Save postMessage
Change-Id: I61a2064104b1748571036891ff7696c1a1e6a3d2
Reviewed-on: https://gerrit.libreoffice.org/30842
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-11-14 18:08:58 +00:00
Pranav Kant
efe6863f17 loleaflet: 'Click to resume editing' label' when inactive doc
Change-Id: I9013158fc6f064dc76398aec044c5b4aa83aa9b7
2016-11-14 23:28:22 +05:30
Pranav Kant
7b332782da loleaflet: Mention sheet name in delete sheet confirm dialog
Change-Id: Ifac13c8fb2f4ec792f1e62541cb92b63edecad56
2016-11-14 20:38:33 +05:30
Pranav Kant
383e8a13a5 loleaflet: Focus after inserting or deleting a sheet
Change-Id: I2807cbeaa0fb5b7ec20002a3f5758ce47bb7d421
2016-11-14 20:38:33 +05:30
Andras Timar
b35ac4cbbf loleaflet: Control.Menubar.js indentation fixes 2016-11-14 14:23:22 +01:00
Andras Timar
40009af7aa loleaflet: add Insert - Special character... to menu 2016-11-14 11:41:03 +01:00
Andras Timar
0e5cf0e07f loleaflet: disable Insert Special Character button in view-only mode 2016-11-14 11:38:12 +01:00
Ashod Nakashian
da5ef9b5a2 loleaflet: add shutdown command to the admin settings
When we add more server controls (restart, f.e.)
we will need to move this to a separate page.

Also, we need to prompt the admin for reason,
which we can broadcast to all users when the server
goes down.

Change-Id: Ide92e58b5b64a5107b6556aef6b1a88191d5d21b
Reviewed-on: https://gerrit.libreoffice.org/30832
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-14 05:35:13 +00:00
Henry Castro
36474b21a6 loleaflet: add special character 2016-11-11 15:24:48 -04:00
Henry Castro
e6cdb7fa19 loleaflet: simplify remove all child elements 2016-11-11 14:05:15 -04:00
Henry Castro
1fde78d6cd loleaflet: move isVisible to Control class 2016-11-11 13:48:32 -04:00
Pranav Kant
25db37484c tdf#103697: Fix color value for spreadsheets and presentations
Change-Id: I89f871f829abd847321bee927b98e9a96e8babbb
2016-11-11 16:22:44 +05:30
Pranav Kant
d060b242e8 More documentation about post message API
Change-Id: I362e159c32d2ea93139be58ca647a2f4c5678dee
2016-11-10 22:37:38 +05:30
Pranav Kant
08a365302e loleaflet: Fix browser print
Accessing the parent iframe, atleast on my local box, where
parent frame and loleaflet frame have different origin, is not
allowed by browser security policy.

Change-Id: Ia3a356fa1d8a81f38bbc27d256471302be8b6729
2016-11-10 22:03:17 +05:30
Pranav Kant
e850ac836f tdf#103641: Another Post message API - Get_Export_Formats
Change-Id: I8a502d3c88c83cc7fb6c3113522ed637bf349a0e
2016-11-10 22:03:17 +05:30
Pranav Kant
5219baaab0 tdf#103641: WOPI: Implement Action_Save, Action_Print, Action_Export
WOPI hosts can now send above mentioned messages to loleaflet so
that loleaflet does stuff accordingly.

Change-Id: I50e10a62c5b629bd12f7d9ce51bcd13cb13cdd8a
2016-11-10 22:03:17 +05:30
Pranav Kant
9bfd5a512e loleaflet: Factor out save uno command
Change-Id: I155329f9dfa37cb47cbac34aa885b3d7a0cbb573
2016-11-10 22:03:17 +05:30
Pranav Kant
2168617d60 tdf#103641: Implement ability to hide save, print, export options
Add more WOPI extensions for this - HidePrintOption,
HideSaveOption, HideExportOption. Setting HideExportOption to
'true' in WOPI CheckFileInfo response would hide the 'Download
as' option from the File menu.

Change-Id: Ia2259ee9525cc6c4331a52e2221af4df188eab07
2016-11-10 22:03:17 +05:30
Pranav Kant
9c5928a87b tdf#103641: Convert 'wopi:' message to JSON formatted message
... to accomdate other WOPI properties easily in future.

Change-Id: Ic92364f06f4f16ebe8f9f128cd49087f6d72a4d1
2016-11-10 22:03:17 +05:30
Pranav Kant
7cacabad40 loleaflet: Give id to these menu items
So that it is easy to manipulate them in future by their
identifier.

Change-Id: I252aa448c26c23a00f0a3e717e1603b0d0277e67
2016-11-10 22:03:17 +05:30
Pranav Kant
df50c8fd34 loleaflet: Fix some silliness
Change-Id: I8977d2f3a569d2442c34248a9b86fec9761fb0e2
2016-11-10 22:03:17 +05:30
Pranav Kant
b0933b063e tdf#103640: Implement OwnerTermination; send application-level close frame
This implements a new feature 'OwnerTermination' for WOPI based
hosts. WOPI hosts now have to enable this feature by mentioning
'EnableOwnerTermination' as 'true' in their CheckFileInfo
response. If the OwnerId of the file matches that of the UserId
of the session, this session would be able to terminate all other
sessions currently editing the same document.

The reason for this kind of document termination is sent to all
sessions in a new application-level 'close:' message. This new message is
similar to the CLOSE frame of WebSocket protocol which doesn't
seem to work across all browsers as of now. Eg: Chrome -
https://bugs.chromium.org/p/chromium/issues/detail?id=426798
After receiving this 'close: ' message, loleaflet acts
accordingly and tells the WOPI host why the websocket was closed
via post message API.

Change-Id: I997aa2e7805157ed599a3946a877fd32477cee1b
2016-11-10 15:04:21 +05:30
Pranav Kant
7f77618f38 Document PostMessage API in reference.html
Change-Id: Ibdd3fc060a99f3b6185362fa3143014710873079
2016-11-10 14:45:20 +05:30
Pranav Kant
1a1792cdc1 loleaflet: Group map getters together
Change-Id: I576f78aaa215b6ba3aff6a5ce8498a3449080927
2016-11-10 14:45:20 +05:30
Pranav Kant
f1f5c4ed66 loleaflet: A more OO approach for WOPI post message API
Abstract all the WOPI related logic in a map handler which is
enabled only if map.options.wopi is set during map
initialization.

Change-Id: I54c5d6eecf33f88e4fd4d2b5ac9e8cf9dd001966
2016-11-10 14:45:17 +05:30
László Németh
8ef5c5fa36 loleaflet: hide debug control in disabled tile debug mode 2016-11-09 12:16:46 +01:00
Andras Timar
7f80400dea loleaflet: typo: No-with -> No-width 2016-11-09 00:28:27 +01:00
Andras Timar
937d8754b7 Updated Slovenian translation 2016-11-09 00:27:13 +01:00
Andras Timar
127b39d5b6 fix l10n of word count (thousand separator!) 2016-11-08 14:25:18 +01:00
Andras Timar
7b83a5f90b loleaflet: update pot file 2016-11-07 18:52:50 +01:00
Andras Timar
b4dd01a3c8 loleaflet: update uno command translations 2016-11-07 18:51:25 +01:00
Pranav Kant
5f9a9264e4 Fix menubar l10n, set String.locale before requiring loleaflet
Change-Id: Ic5a22f05d0a11bd0485d0c88dfa34dcc6bfe29cf
2016-11-07 17:59:42 +05:30
Pranav Kant
9f65377c42 getViewIdHexColor -> getViewIdColor
This doesn't return a hex value anymore, it returns a rgb
integer.

Change-Id: I2fc234d7ba09e7b750c63dd9cf93356d02707fce
2016-11-07 17:31:15 +05:30
Pranav Kant
216d1b6a52 Undefined variable
Change-Id: I0c5a07fa383523053ca7de319fcc9d1acdca63cd
2016-11-07 10:26:32 +05:30
Andras Timar
f96ef2c4f3 loleaflet: page orientation in Writer's Format menu 2016-11-03 19:40:27 +01:00
Michael Meeks
59d28fdeba Help->About can point to the log more helpfully than the commit. 2016-11-02 14:38:58 +00:00
Andras Timar
e7355553cc loleaflet: update translations from Pootle 2016-11-01 12:39:54 +01:00
Henry Castro
2c5cbe6555 loleaflet: row/column highlighting to reflect the cell cursor 2016-10-31 21:37:27 -04:00
Andras Timar
760c1e732a loleaflet: hide zoom controls for spreadsheets 2016-10-31 18:39:32 +01:00
Marco Cecchetti
8c522c44d1 loleaflet: print dialog: it seems that this magic hack is no more needed
Change-Id: I5dc3af5d8c70b381638f82de14ea47b1627237b9
2016-10-31 17:45:22 +01:00
Andras Timar
cbff583462 loleaflet: add link to git hash 2016-10-31 17:24:31 +01:00
Andras Timar
d589618bc1 disable zoom for Calc 2016-10-31 14:45:04 +01:00
Andras Timar
513d963b57 loleaflet: add Format - Page size to Writer menu 2016-10-31 13:27:02 +01:00
Ashod Nakashian
fb8d89589b loleaflet: fire addview and removeview events last
This fixes regression to the hackish fix done
in b26f2f2738 -
loleaflet: prevent the zoomlevel from changing on connect/disconnect

Change-Id: I09c899546d0d8bfbe4c274b0774fd30008cbcfa5
Reviewed-on: https://gerrit.libreoffice.org/30400
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-30 16:51:10 +00:00
Henry Castro
3c9eed3bb0 loleaflet: row/column highlighting to reflect the existing selection 2016-10-29 16:05:31 -04:00
Henry Castro
52793e8dd2 loleaflet: add Ctrl+F for Find 2016-10-29 10:42:40 -04:00
Marco Cecchetti
5e90ce91cf loleaflet: PgUp/PgDn fix: check doc type
Change-Id: Ib240e50a4f973a6ba83916e6b551dcdbb017a919
Reviewed-on: https://gerrit.libreoffice.org/30362
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-10-28 15:40:29 +00:00
Andras Timar
c96ef2d3af add Formatting marks to Insert menu of Writer 2016-10-28 12:40:40 +02:00
Andras Timar
453307a67c add left-to-right anf right-to-left commands to Writer Format menu 2016-10-28 12:22:36 +02:00
Andras Timar
ab0bd735e1 Writer Format menu 2016-10-28 11:44:04 +02:00
Andras Timar
36715b7a54 loleaflet: switch position of View and Insert menus 2016-10-28 11:44:04 +02:00
László Németh
443d0baea1 loleaflet: tile debug: add timestamps to the console log 2016-10-27 14:51:51 +02:00
Andras Timar
1496a08e78 too many connections/users -> jump to FAQ 2016-10-27 13:28:52 +02:00
Pranav Kant
e0e6a343da tdf#103450: Implement session management postmessage API
Change-Id: Id22759c5c103948078fb20943768a9ff6251dddf
2016-10-26 21:45:35 +05:30
Pranav Kant
56f6ee7a57 loleaflet: Store userid in map
Change-Id: Ia54516b52ace3f722ae27ee28b5a11897dedc479
2016-10-26 21:34:26 +05:30
Pranav Kant
4987df6547 tdf#103450: WOPI compliant message and new way to post message
Use map's WOPIPostMessage which takes care of bunch of things
according to WOPI

Change-Id: Id559179d684fd6243d3afa488d4cddc9eb92f4d6
2016-10-26 21:34:19 +05:30
Pranav Kant
cfcc6bdd94 tdf#103450: Implement WOPI initialization postmessage API
This includes support for Host_PostmessageReady and
App_LoadingStatus

Change-Id: Iaa0222dfa63c17b26a4fcb2236973bacdd61ee62
2016-10-26 21:34:11 +05:30
Andras Timar
f79546853f loleaflet: spelling noun vs. verb: checkout -> check out 2016-10-24 22:18:00 +02:00
Andras Timar
ae0b3a6cac loleaflet: add loleaflet-font class to Calc tab context menu 2016-10-24 20:54:55 +02:00
Andras Timar
67d21d682d loleaflet: typo: initalized -> initialized 2016-10-24 20:52:52 +02:00
Pranav Kant
d50d3f5b77 loleaflet: Fix missing comma, semi-colons etc
Change-Id: Ic47e6e44a83c43ff7aea840fb6b04d1ad7c4e4a2
2016-10-24 16:26:35 +05:30
Ashod Nakashian
b26f2f2738 loleaflet: prevent the zoomlevel from changing on connect/disconnect
When a client connects or disconnects ViewInfo message is sent.
The handler for this updates the number of users via addView
and removeView. Unfortunately when the toolbar control is
updated, it resets the zoomlevel to 100% (the initial value).

This is an ugly hack to change it back to the correct
value, since nothing really visually changes. It certainly
could be improved by only correcting the toolbar.

Change-Id: I37294da2d9d1bc84e8cb3b7f634aadcfd80d6497
Reviewed-on: https://gerrit.libreoffice.org/30218
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-24 04:19:29 +00:00
Andras Timar
a502371c27 loleaflet: updated uno command translations 2016-10-23 16:01:52 +02:00
Henry Castro
ea45bdb1f9 loleaflet: add hide/show row/column to header context menu 2016-10-23 08:44:04 -04:00
Pranav Kant
ba23ab2927 loleaflet: Expose some context menu item for comments
Change-Id: I242755c67f904ffbaaac63db24d735a9bfaa6bca
2016-10-21 23:34:49 +05:30
Andras Timar
2e12fade82 Updated Slovenian translation 2016-10-20 22:39:22 +02:00
László Németh
7f72553236 loleaflet: traffic log and automatic typing in tile debug mode
- show outgoing and incoming network messages with some
  highlighting in Javascript console (default in tile
  debug mode)

- add optional automatic typing

- add layer controls for overlays and automatic typing

- differentiate rectangle borders (newer is more opaque)

- fixes:

  - fix function call at cancelled tiles

  - hide all attribution control when disabling debug mode
2016-10-20 16:25:05 +02:00
Henry Castro
e189f60ad4 loleaflet: refocus map due drop down insert table 2016-10-20 09:31:27 -04:00
Pranav Kant
49f4e696e5 loleaflet: Click user item to go to its cursor
Change-Id: Iac87da20cfe422000eb9a32ccad50e8483637616
2016-10-20 17:22:36 +05:30
Pranav Kant
9f69359b33 loleaflet: Disable these toolbar buttons too, in readonly mode
Change-Id: I8bc661dd3cfd689c7c7ded367deacdba853153e4
2016-10-19 21:08:33 +05:30
Pranav Kant
1be2a78564 Handle WOPI's UserCanWrite to determine readonliness
permission= parameter in URL is still supported, but overridden
by UserCanWrite parameter.

Also, introduce a new protocol message, perm: which dictates
loleaflet about the permission rather than the other way around
(only in case of WOPI)

It is to be noted that by default loolwsd assumes very
restrictive permissions, so not providing UserCanWrite in WOPI
implementation by a WOPI host would lead to opening of only
readonly session.

Change-Id: I2013c1661fd491c79bb367a41e1a7036fa03f984
2016-10-19 20:47:20 +05:30
Andras Timar
1f2be91009 loleaflet: updated port files 2016-10-19 11:53:18 +02:00
Tor Lillqvist
bb36ca79d4 Attempt to handle unauthorized WOPI usage better
Use the previously unused UnauthorizedRequestException for this, and
throw a such in StorageBase::create() when the WOPI host doesn't match
any of those configured.

In a developer debug build, without access to any real WOPI
functionality, you can test by setting the FAKE_UNAUTHORIZED
environment variable and attempting to edit a plain local file:
URI. That will cause such an exception to be thrown in that function.

Catch that UnauthorizedRequestException in
ClientRequestHandler::handleGetRequest(), and send an 'error:
cmd=internal kind=unauthorized' message to the client. Handle that in
loleaflet in the same place where the 'error: cmd=internal
kild=diskfull' message is handled, and in the same fashion, giving up
on the document.

Actually, using exceptions for relatively non-exceptional situations
like this is lame and makes understanding the code harder, but that is
just my personal preference...

FIXME: By the time StorageBase::create() gets called we have already
sent three 'statusindicator:' messages ('find', 'connect', and
'ready') to the client. We should ideally do the checks we do in
StorageBase::create() much earlier.

Also consider that ClientRequestHandler::handleClientRequest() has
code that catches UnauthorizedRequestException and
BadRequestException, and tries to set the HTTP response in those
cases. I am not sure if that functionality has ever been exercised,
though. Currently, we upgrade the HTTP connection to WebSocket early,
and only after that we check whether the WOPI host is authorized
etc. By that time it is too late to return an HTTP response to the
user. If that even is what we ideally should do? If not, then we
probably should drop the code that constructs HTTP responses and
attempts to send them.

Also, if I, as a test, force an HTTPResponse::HTTP_BAD_REQUEST to be
sent before the HTTP connection is upgraded to WebSocket, loleaflet
throws up the generic "Well, this is embarrassing" dialog anyway. At
least in Firefox on Linux. (Instead of the browser showing some own
dialog, which I was half-expecting to happen.)
2016-10-17 19:34:04 +03:00
Tor Lillqvist
b29ae3c032 Sort lines for clarity 2016-10-17 19:34:04 +03:00
Marco Cecchetti
e61d8aaa5f loleaflet: handle EMPTY invalid tiles msg with part in the payload
Change-Id: I73e363f51101c8e4e258131ea1692a7709d6a544
Reviewed-on: https://gerrit.libreoffice.org/29964
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-10-17 10:39:41 +00:00
Henry Castro
1d40b1eb79 loleaflet: fix mouse over text that it changes re-size cursor 2016-10-14 14:46:46 -04:00
Marco Cecchetti
78e707393e loleaflet: handle EMPTY invalid tiles msg with part in the payload
Change-Id: I84ae55440b540dc027bddf341994d34d411f2a3a
Reviewed-on: https://gerrit.libreoffice.org/29826
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-10-14 13:26:16 +00:00
Henry Castro
9d89989b99 loleaflet: remove unused query string 2016-10-13 17:03:48 -04:00
Andras Timar
cb4fb86794 loleaflet: add Insert - Comment to Calc menu 2016-10-13 12:58:04 +02:00
Henry Castro
fbfd500a2e loleaflet: fix style names in Layout dropdown 2016-10-12 21:51:48 -04:00
Henry Castro
25dce7a30f loleaflet: column/row re-size cleanup 2016-10-12 17:30:52 -04:00
Henry Castro
5a2fe805db loleaflet: add localizable error message 2016-10-12 12:44:44 -04:00
László Németh
f910dcbf88 loleaflet: tile debug: show tile render count and cached tiles
- show total number of the rendered tiles of the document, also
  the difference between the previous number in the client

- show cached tiles in transparent yellow color (in debug build)

- send ping messages after every invalidation message instead of
  keypressing

- fix memory leak: remove unused leaflet rectangle overlays on the
  tiles
2016-10-11 17:43:25 +02:00
Andras Timar
7ecf78a18e update pot files 2016-10-11 12:13:23 +02:00
Henry Castro
03f912115a loleaflet: do not show internal errors
Internal error message, it was intended for debugging purposes,
so it is not necessary to show them to final users
2016-10-10 16:03:30 -04:00
Pranav Kant
a01d2fc91d loleaflet: Restore old coloring algorithm for non-text documents
.uno:TrackedChangeAuthors doesn't give correct colors for
documents other than writer, lets use our old algorithm for color
assignment for these documents.

Change-Id: If865788154a80da2637aad84183a0e947bb4b7e8
2016-10-10 18:00:38 +05:30
Pranav Kant
176367b408 loleaflet: Fix incorrect reference to username
Change-Id: Ibd6433c862eaf5f5fe57244180691ef8b08e3fbb
2016-10-10 17:14:54 +05:30
Pranav Kant
0ad39593d0 loleaflet: Use view colors directly from core
Change-Id: I2fdffd6dd0823a77ff52e40150a81db4b261ec81
2016-10-10 13:02:22 +05:30
pootlebot automatic
29ce548144 Pootle automatic update from libo_online 2016-10-09 17:03:25 +00:00
Henry Castro
7f514422c3 loleaflet: increase re-size cursor zone 2016-10-09 11:43:26 -04:00
jan Iversen
83848bfb29 update from pootle 2016-10-09 09:42:29 +02:00
Henry Castro
0f86fde3e0 loleaflet: add .uno:AutoSum 2016-10-06 14:37:06 -04:00
Marco Cecchetti
fd3aba3be7 loleaflet: page-up/down - visible area is not scrolled as on desktop
Change-Id: Id6a61e93cd195cf731237961c0694685b2d497b4
2016-10-06 17:53:47 +02:00
Tor Lillqvist
c99379d67f The 'invalidatepreview' event handling seems to be unimplemented
No need to fire it if nothing happens. Just confuses a reader of the
code.

I don't really understand JavsScript events etc, so if I have
misunderstood something, feel free to revert.
2016-10-06 15:43:41 +03:00
Andras Timar
fd1991a961 Revert "loleaflet: add 'Freeze panes' item to View menu of Calc"
This reverts commit 81f374a940.
2016-10-05 16:01:07 +02:00
Andras Timar
81f374a940 loleaflet: add 'Freeze panes' item to View menu of Calc 2016-10-05 13:21:53 +02:00
Andras Timar
b5f95c2aed loleaflet: add Insert Footnote, Endnote, Page and Column break to Writer menu 2016-10-04 11:21:10 +02:00
Pranav Kant
7e57ae5dce loleaflet: Don't add these layers in readonly mode
Change-Id: I17437f53921dc3d5036be4a9650213a7eb0895dd
2016-10-03 11:16:32 +05:30
Henry Castro
4074587a12 loleaflet: the cell view cursor displays user name 2016-10-02 16:46:30 -04:00
Henry Castro
97fa8e45f9 loleaflet: fix error message localization 2016-10-01 11:35:19 -04:00
Miklos Vajna
81a114c47d DocumentRepair: still show the absolute time as a tooltip
Change-Id: I64cbf519e53c2a2ad697deb9932fb7a32e702d25
2016-09-30 17:44:54 +02:00
Miklos Vajna
655915da05 leaflet: bundle timeago JS module
And start using it in DocumentRepair.

Change-Id: I8d2b8af4d2e0dcc7cf8082c9d7adbc633df1c387
2016-09-30 17:12:01 +02:00
Andras Timar
d22cdad721 loleaflet: enable l10n of Update/Delete TOC commands 2016-09-30 16:33:38 +02:00
Andras Timar
b4d3bfdcae expose Update TOC and Remove TOC context menu items in Writer 2016-09-30 15:36:29 +02:00
Miklos Vajna
3090981c8a Document repair: expose user names, not only view IDs
Also in leaflet replace the current user with "You" to be consistent
with the statusbar.

Change-Id: If2d76f078eeae3038f8ae17506ae7679f7b23023
2016-09-30 14:21:14 +02:00
Pranav Kant
ec88a53072 loleaflet: loleaflet-font for userlist items too
Change-Id: If2c96d9d70a84bac1e75816f07bb7da8ff2642f5
2016-09-30 15:49:24 +05:30
Pranav Kant
7b60a9e3f6 loleaflet: Show error message dialog on diskfull
Set the mode to viewonly after the error so that user can still
see the tiles downloaded from the server, but cannot interact
anymore before server administrator fixes the disk space.

Change-Id: If03f4fabe93458672a631c020d09dcebecbb955c
2016-09-30 15:22:12 +05:30
Pranav Kant
42fbfa936c loleaflet: Use 'error' event to open the alert dialog
Change-Id: I8f1ca3d896027755fe1291cb227ded102e57e112
2016-09-30 15:22:12 +05:30
Henry Castro
b4ba3c9c55 loleaflet: fix mege mistakes 2016-09-29 17:57:17 -04:00
Henry Castro
e766e82f3d loleaflet: fix undefined variables 2016-09-29 17:41:10 -04:00
Henry Castro
3fcde8be83 loleaflet: fix show dialog error
Conflicts:
	loleaflet/src/core/Socket.js
2016-09-29 17:38:48 -04:00
Pranav Kant
d5f8c5b2e6 Change main websocket url for consistency with other urls
From
/lool/ws/docurl
to
/lool/docurl/ws

The main purpose behind changing this and other related urls is
to help in load-balancing. The first two parts of the URL can now
be used in a hash-based load-balancing algorithm which decides which
slave gets to serve the requests. Requests such as insertfile,
downloadas need to end up in the same slave in which document was opened.
/lool/docurl/ i.e first two parts of the URL are constant for all
the requests that should be served by a single slave.

Change-Id: Ibc605ca1251957b8b32b376cf19b78f6178fadfa
2016-09-30 00:50:57 +05:30
Pranav Kant
085a07b3e2 loleaflet: Ignore view messages before 'viewinfo' message
Change-Id: If0f759976f13a76c54c068a18bab5e07818cb86e
2016-09-30 00:33:58 +05:30
Pranav Kant
8330341a8a Include docurl in document download requests
From
/lool/jailid/randomdir/filename
to
/lool/docurl/jailid/randomdir/filename

Change-Id: I4d58e733768c62f2951ecfdcfcb604d99772862d
2016-09-30 00:33:58 +05:30
Pranav Kant
187abe0018 loleaflet: Remove unused fields
Change-Id: Ide180430cb2d359fa089ded8061af764c4001bb2
2016-09-30 00:33:58 +05:30
Pranav Kant
8c61ee3c94 Change insertfile URI to include doc key in it
From
/lool/insertfile
to
/lool/<docUrl>/insertfile

Change-Id: I63864673bc1d92a737a95b484c2f440cb5ce6605
2016-09-30 00:33:58 +05:30
Pranav Kant
12dee85ef8 Serve all assets (l10n, images etc.) versioned
Rather than accessing them using '/dist/', access them using the
version (git hash) in the url.

Change-Id: I999bd99a13dbf92b26641e3bd5c9e0b7468bb654
2016-09-30 00:33:58 +05:30
Henry Castro
940e78162f loleaflet: remove map attribution 2016-09-28 10:00:35 -04:00
László Németh
0b454bccfc loleaflet: cleanup of tile debugging mode 2016-09-28 13:21:01 +02:00
Henry Castro
c3568a6a41 loleaflet: refactor L.Control.Attribution.js 2016-09-27 17:28:30 -04:00
László Németh
459b5e585c loleaflet: show latency and other data in tile debugging mode
- show best, average, worst, last times of
  - server ping round trip
  - times between key press and invalidation message
  - tile based and total tile update latencies

- show data of the last five invalidation:
  - tilecombine messages, if they exist
  - otherwise the invalidation message
  - border of the last five invalidation rectangles

- visual fixes:
  - more transparent red color for better text typing
  - small letters over tiles with transparent background
  - black attribution text instead of gray + bottomleft position
2016-09-27 20:49:13 +02:00
Pranav Kant
bd40df2c97 loleaflet: Update view cursors when zoom changes
Change-Id: I58c8e71379b11c334c7a3cdd2d0b767d5b9d023c
2016-09-27 07:59:00 +05:30
Pranav Kant
5891371dca loleaflet: Show usercolor in userlist
Change-Id: I6be05f36ffc4c00aa986b3873fce1bc5acc6fbf0
2016-09-25 23:36:51 +05:30
Henry Castro
23b2792053 loleaflet: improve cursor, hide view cursor if same position 2016-09-25 12:42:32 -04:00
Pranav Kant
e7c510a202 loleaflet: Store view id as int
Change-Id: I80a36311a66767d3caafb9bb94df6205309af02b
2016-09-23 17:07:41 +05:30
Pranav Kant
2579e1191c loolwsd: Prevent passing a nullptr to std::string()
Undefined behavior.

Change-Id: I2ddcb0a5cba1d593791ced62783d02e732162d17
2016-09-23 16:15:46 +05:30
László Németh
68d3693d97 loleaflet: extend tile debugging
- show invalidated rectangles with fading effect
- show last tilecombine message and cancelled tile count
- show received/requested tile updates
- fix popup handling
- custom popup style (transparent, big numbers)
- clean up
2016-09-23 12:25:00 +02:00
Pranav Kant
b6448a8864 loleaflet: Move loading spinner to toolbar-down when doc loaded
Change-Id: If3ae7801b8438da490f1ceba2e61824518bdc94d
2016-09-23 11:40:58 +05:30
Pranav Kant
c23b37f352 loleaflet: Better to have 'reconnected' signal here
Change-Id: I50c9484bb591d7192977fe49adb75f99d8ee1b08
2016-09-23 11:40:58 +05:30
Pranav Kant
56d92527c2 loleaflet: Kill this troublesome editlock related code
This code throws sometimes. Rather than investigating what makes
it actually throw, lets kill it because we don't want any
editlock functionality anyways now.

Change-Id: I8a484ba9e3a658ca739122bb6d2d0c92c4180ff5
2016-09-23 01:43:40 +05:30
Pranav Kant
afe14df047 loleaflet: Start spinner when added to map
... otherwise we see a non-rotating spinner after first
initialization.

Change-Id: Idf6e259634607249e3411bf772a55fee768f925a
2016-09-23 01:43:26 +05:30
Pranav Kant
460ca57dab loleaflet: Smooth reconnection of documents
Change-Id: Id8e2b02ee47e163f046c81949d3d2ce75f330542
2016-09-23 01:43:26 +05:30
Pranav Kant
143ce92995 loleaflet: Don't send 'status' command, server sends it always
Change-Id: Ibcacda08309e887cb80588220fb423726134d959
2016-09-23 01:43:26 +05:30
Pranav Kant
7db798992f loleaflet: Set permission to default after reconnecting
Change-Id: I39ce187e47371785bf4a183253349bbdbea9786c
2016-09-23 01:43:26 +05:30
Pranav Kant
2d73333984 loleaflet: 'tiledebuggingmode' is not a protocol message
Lets use this function, onMessage, for protocol messages only.

Change-Id: I418eab988ea54b814da3b05bf78b14f65709e586
2016-09-22 20:52:32 +05:30
Pranav Kant
4e6c1cf569 loleaflet: Group all other view's layers
Change-Id: Ide0d91850520e97550016b17c4505f2c75ead132
2016-09-22 20:52:32 +05:30
Pranav Kant
7ea0688760 loleaflet: Code reuse in debug mode implementation
Lets use the already existing getParameterByName function

Change-Id: Ib75ff5430e440cee609f48450a28916f9d2aff43
2016-09-22 20:52:32 +05:30
Miklos Vajna
9aeedd5268 leaflet: make sure showing the graphic view selection doesn't result in scrolling
Otherwise if you edit a different part of the document and somebody else
selects a shape, you get an unexpected, annoying jump.

Change-Id: I161a27c8a69e0873de0ebe3a020e2868cbe0afca
2016-09-22 16:56:39 +02:00
Henry Castro
a8394110f2 loleaflet: blink cursor should en top of rendering stack 2016-09-21 15:23:58 -04:00
László Németh
165ab830ef add Ctrl-Shift-Alt-d shortcut to tile debugging mode 2016-09-21 13:26:59 +02:00
Pranav Kant
5ba6360a8b loleaflet: Factor out generation of .json
... so that one can use the factored-out rule, build-l10n, to
install these translation .json files in dist/ and start using
them, without having to do 'make dist' first and then extract the
package.

Change-Id: Ie2814a9f2596246b487799968f3027aa48475e7b
2016-09-21 13:57:14 +05:30
Pranav Kant
c2f0b84dd1 loleaflet: Don't try to delete .pot files
The behavior has changed to include .pot files in git as well in
7839aecac6

So, don't try to delete these .pot files now

Change-Id: I6f5d015596ff1f2d98adca426b1458f66bc7d4b4
Reviewed-on: https://gerrit.libreoffice.org/29130
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-09-21 08:14:42 +00:00
Pranav Kant
ede173201f loleaflet: Fix admin l10n strings file location
Location was changed in 6c69b63be5
in an effort to modularize everything including these l10n
strings.

Change-Id: I4d7538a6e6d1370a45326bc163a496cf7c681259
2016-09-21 13:05:52 +05:30
Pranav Kant
ed860594a1 loleaflet: Guard against null
This helps in preventing some of many warnings in the browser
console.

Change-Id: I568b9a20e7cecfddaffd7309271fae4f6c265b46
2016-09-21 13:00:39 +05:30
Pranav Kant
a9946c59c0 loleaflet: cleanup
Change-Id: Ia61402f5e0d650d7de606b1d8c8a548453972475
2016-09-21 12:46:49 +05:30
Pranav Kant
0991924a59 loleaflet: Cleanup internal view list after socket close
Change-Id: Ic18bc0f3efcd7cf68d5291305e4f0bcff9d48fdb
2016-09-21 12:02:27 +05:30
Pranav Kant
626eab255a loleaflet: Handle new message, 'viewinfo:'
Change-Id: I82d886e3450439bbfd2e4b381cc8f9336bcdd57e
2016-09-21 12:02:27 +05:30
László Németh
fb351f2c1a add client-side tile debugging mode
Extending the document URL with debug=1 option will switch

- visible tile boundaries
- update numbers over tiles

and invalidated tiles will be blue during waiting for an update.
2016-09-20 13:22:36 +02:00
Pranav Kant
f84cad1e8d loleaflet: Fix some cases of leaked connecting spinner
Change-Id: If694e8f699a2a087dad1e36fc3b67960ac294560
2016-09-20 15:18:10 +05:30
Andras Timar
7465853d34 l10n: add src/control/Control.DocumentRepair.js for string extraction to pot file 2016-09-20 09:52:24 +02:00
Pranav Kant
77e219ceff loleaflet: Kill editlock code, completely
Editlock buttons have already been removed; most of this code is
unreachable/useless anyways.

Don't listen to editlock messages anymore, and always set the map
permission to edit unless specified.

Change-Id: I2ee672e72beaa48a7c6cd0bbd1c548ff10a251d1
2016-09-20 11:17:20 +05:30
Pranav Kant
f5a9e8e33d loleaflet: l10n: Repair Document
Change-Id: I3b320547a25094fbfa2d1538b4fa1e91b2cf41ad
2016-09-19 14:48:27 +05:30
Henry Castro
f1b54a3f57 loleaflet: add border color to L.Popup 2016-09-15 17:21:33 -04:00
Pranav Kant
912281bd20 loleaflet: dos2unix this new file from upstream Leaflet
Change-Id: I87000cc481dc9b8880d80606b16cd4151d572be1
2016-09-15 19:25:10 +05:30