Commit graph

1976 commits

Author SHA1 Message Date
Michael Meeks
eeaf436d53 Admin: show cumulative bandwidth sent / recv'd over all time.
Change-Id: I3f9f398d1de19d54e0aa4c51bc44c597019dc839
2017-06-03 22:53:57 +01:00
Ashod Nakashian
d4b2badd4e loleaflet: click to reload idle document
Change-Id: I29275e71d8ca7ef9aa25ef4697ba5c6f414aa0bb
Reviewed-on: https://gerrit.libreoffice.org/38336
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-06-02 05:07:54 +02:00
Jan Holesovsky
0033607f01 loleaflet: Many of the WOPI impls. do not provide avatars yet.
Change-Id: If72a6be9102cb96fe1a6b31f85c0e47bb0622558
2017-06-01 22:07:08 +02:00
Pranav Kant
a0710c9613 Inform the current session about document change too
Change-Id: I9947eb8b23e5a698cc2cbf39bfde4e1941aae0f0
2017-06-01 22:07:25 +05:30
Pranav Kant
f4b22bbb3c Broadcast command result back to clients
This is required to tell the clients if the command they issued was
successfull or not. In this case 'savetostorage' is the command that we
are interested in knowing the success status of.

With this, now if the user commands to overwrite the document, dialog
boxes of all other users are automatically closed.

Can easily more commands in future for this kind of thing. Its similar
to unocommandresult, except its not a uno command, but our internal
command.

Change-Id: I2e7e1fd5edbd55c13ee4bf9bce24284483d6507f
2017-06-01 21:42:29 +05:30
Pranav Kant
9f535580a6 Close the dialog before showing a confirmation dialog
Change-Id: If7220c37f8456627181500d7428caf3657816a16
2017-06-01 21:07:21 +05:30
Pranav Kant
41234773e3 If user permits, save to storage force-fully in case of doc conflict
There is one known problem still - after any user decides to overwrite
the file to storage, other users are not informed, so their dialog keeps
hanging on the screen until they press the cancel or reload button.

Change-Id: I6dad1585e4c53eeed79cd38316892a7f239d44ef
2017-06-01 19:53:10 +05:30
Pranav Kant
4d61cae4c8 If user commands, refresh the document for all in case of doc conflict
Change-Id: I42c61fb8099b0bcc60f942e602561cc97486a918
2017-06-01 19:46:38 +05:30
Pranav Kant
ba4e75cfae Inform all clients when document changed behind our back
Introduce a new header X-LOOL-WOPI-Timestamp

This is a WOPI header extension to detect any external document change. For
example, when the file that is already opened by LOOL is changed
in storage.

The WOPI host sends LastModifiedTime field (in WOPI specs) as part
of the CheckFileInfo response. It also expects wsd to send the
same timestamp in X-LOOL-WOPI-Timestamp header during WOPI::PutFile. If
this header is present, then WOPI host checks, before saving the
document, if the timestamp in the header is equal to the timestamp of
the file in its storage. Only upon meeting this condition, it saves the
file back to storage, otherwise it informs us about some change
to the document.

We are supposed to inform the user accordingly. If user is okay
with over-writing the document, then we can omit sending
X-LOOL-WOPI-Timestamp header, in which case, no check as mentioned above
would be performed while saving the file and document will be
overwritten.

Also, use a separate list of LOOL status codes to denote such a change.
It would be wrong to use HTTP_CONFLICT status code for denoting doc
changed in storage scenario. WOPI specs reserves that for WOPI locks
which are not yet implemented. Better to use a separate LOOL specific
status codes synced across WOPI hosts and us to denote scenario that we
expect and are not covered in WOPI specs.

Change-Id: I61539dfae672bc104b8008f030f96e90f9ff48a5
2017-06-01 16:17:07 +05:30
Ashod Nakashian
935abfacd9 loleaflet: user avatar-specific css for the user list
Change-Id: I5540c3267efcb23513d7df25427af8a8ff0d8909
Reviewed-on: https://gerrit.libreoffice.org/38293
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-06-01 12:40:53 +02:00
Ashod Nakashian
402c2ce2ad loleaflet: show avatar in comments
Change-Id: I97a781a2faf626c2ac6f4b178127aaa77c7775d0
Reviewed-on: https://gerrit.libreoffice.org/38292
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-06-01 12:39:33 +02:00
Ashod Nakashian
a59f78b656 wsd: UserExtraInfo is a map, not array
Change-Id: I64ef04c96223ee74099697cb2276307d834db329
Reviewed-on: https://gerrit.libreoffice.org/38291
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-06-01 07:48:15 +02:00
Pranav Kant
073b58269b tdf#103673 - Use hex color value in API
Change-Id: I51e2431e9253a625fb590af276d991a34e720141
2017-05-31 14:20:58 +05:30
Pranav Kant
d840e8720a Handle WOPI PutFile unauthorized access token
Change-Id: I29ee8cc0c9f3ea42f70628eca6f74d161d1a38f9
2017-05-31 12:08:31 +05:30
Pranav Kant
ac8e458bda User save should terminate edit in calc; and save if unmodified
Only autosave should do the opposite which it already does in
DocumentBroker.

Change-Id: Ibb86e0b29fc058318de96d2684c326dbe958e6fb
2017-05-31 11:27:14 +05:30
Henry Castro
143afd674a loleaflet: merge comments and redlines items
Comments and Redlines were mutually exclusive, but a document
can contain both.

Change-Id: Idb13f0c0e1216edc6bed3291c0c486b45ad74b56
2017-05-30 15:59:00 -04:00
Ashod Nakashian
d76ce9169c loleaflet: suppress docunloading error
This is a soft-error and reconnection
is done transparently, so no need to
show the user unhelpful message.

Change-Id: Ie240897fec1ecdc29a9fc1c1482a416a89ca5323
Reviewed-on: https://gerrit.libreoffice.org/38122
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-29 06:46:42 +02:00
Ashod Nakashian
d0ac8a4b96 loleaflet: add user avatar to useritem
Change-Id: I0b366ab4b92fb9b1d5f7aa0ea6fe51ac9897bdce
Reviewed-on: https://gerrit.libreoffice.org/38121
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-29 06:45:58 +02:00
Ashod Nakashian
da2d3cbc92 wsd: support per-user links and commands
userextrainfo is a json array that contains
extra user-specific links.

Currently 'avatar' is assumed to hold the
image url for the user's avatar.

'mail' and other links can also be added.

Change-Id: I37c4c68bfa0b7ee659e017b4867dcb8cf5c2ca2f
Reviewed-on: https://gerrit.libreoffice.org/38120
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-29 06:45:18 +02:00
Aditya Dewan
66a3e1c273 tdf#106449 Admin console: adding user list
Change-Id: I41b15c6a73fa61c21ef5ab79de149b445014c99a
Reviewed-on: https://gerrit.libreoffice.org/38017
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-05-27 07:08:25 +02:00
Jan Holesovsky
82704ed777 loleaflet: Let's not use a 'disableabout' param.
Instead, just disable the Help -> About choice if the 'about-dialog' div was
removed from loleaflet.html.

Change-Id: I997aa5489bcfbd02f56feb79bea14e92d3666bf2
2017-05-26 10:18:05 +02:00
Jan Holesovsky
9aecf428f6 Revert "wsd: enable option to remove About dialog elements"
The request was meant the other way around; let's just not present "About" in
the menu when there is no element with "about-dialog" id.

This reverts commit b9305d17ce.
2017-05-26 10:03:33 +02:00
Henry Castro
b9305d17ce wsd: enable option to remove About dialog elements
Change-Id: I33c351cbc7373255a22f44cb31e53f21a00869bf
2017-05-25 17:43:11 -04:00
Marco Cecchetti
1588d2fe12 loleflet - sc: header incorrectly shows selection sometimes
Problem:
- Select a whole row, let's say row 10.
- Select a whole column, let's say column I.

=> Columns headers right from I, (J, K etc.) are still highlighted.
Similarly if a column selected first, and a row next.

Change-Id: I13ad0e2a152ddbf96c4889a3aea5129885bc95b5
Reviewed-on: https://gerrit.libreoffice.org/38000
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-05-25 11:09:59 +02:00
Marco Cecchetti
061c720ee1 loleaflet: calc: styles are visible in fonts dropdown
Change-Id: Ia909ed9f35d6a1c80f6696abeddefe2d4ad2d6a0
Reviewed-on: https://gerrit.libreoffice.org/38001
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-05-25 11:05:21 +02:00
Henry Castro
c6b1d29578 loleaflet: simplify disable about dialog
CreateMenu is a recursive function

Change-Id: Ied1b076c1ff04a1d471af2360aa8f9fbbe3289ff
2017-05-24 15:25:36 -04:00
Henry Castro
5d22b274f8 loleaflet: add parameter to disable 'About' menu
Change-Id: I07fa655b8318f78d7e479a3dc34830ebe5f81a2e
2017-05-24 10:28:14 -04:00
Henry Castro
05deed08b4 loleaflet: fix undo repair document popup
UNDO_CONFLICT was intented to notify views, but
the constant value changed with latest patch upstream

Change-Id: I09062725539df3d974a47d89374d822d1d852770
2017-05-23 16:42:49 -04:00
Aditya Dewan
9db39ce741 tdf#107752 admin console: indicating whether a document is modified.
Change-Id: I6055a601c1dd3b5e9700ef75d7c07d7e0b13d663
2017-05-23 19:00:53 +05:30
Henry Castro
41c561233d loleaflet: prevent default context menu of the grab handles
Change-Id: I12ede87cb8207257470720c130913e3ab7e967dd
2017-05-22 21:08:30 -04:00
Henry Castro
0ebedb7efa loleaflet: prevent default context menu of the row/column resize area
Change-Id: I184a698fd63a0b3e83efb8c315ccca730d56112a
2017-05-22 20:40:55 -04:00
Pranav Kant
62680fffdb loleaflet: Change opacity manually
See inline comment

Change-Id: I62456dd300eabaa156f9673fe13c190421c22ca0
2017-05-22 16:53:50 +05:30
Ashod Nakashian
4e6fee5407 Hide connecting spinner on authorization failure
Also, fix regression resulting in "This is embarrassing..."
instead of "Unauthorized..." message.

Change-Id: If6219bfbc445b186bb4064b3f20a0ccd2854d617
Reviewed-on: https://gerrit.libreoffice.org/37893
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-22 07:06:50 +02:00
Ashod Nakashian
7bc5989aca loleaflet: correctly reload after server recycling
When the server recylces, the client should
transparently restore connection when the
server is back on. This was broken because
of the different times when moving in and out
of focus for dimming/inactivity purposes.

Here we track server recycling state
separately, and skip the dimming/inactivity
checks in that case.

Change-Id: I432b97b3278b5a6846c8d2c4fa964184f156d5f3
Reviewed-on: https://gerrit.libreoffice.org/37892
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-22 07:06:14 +02:00
Ashod Nakashian
407c538f04 Correctly send termination reason to clients
Fixes the case when the client reconnects on idle
disconnection (because it never got the 'close: idle'
message).

Also, show informative message to users in this case
instead of grey screen.

Change-Id: Ia2e1f2ffefe6d35dd1552e7cc44e490aab86c600
Reviewed-on: https://gerrit.libreoffice.org/37891
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-22 07:05:28 +02:00
Pranav Kant
bcf958c500 wsd: Fail gracefully when storage misbehaves
When WOPI's CheckFileInfo or GetFile responds with status code other
than HTTP 200, show a message to the user indicating some problem in the
storage.

Currently, we open an empty document if storage doesn't return a
document which surely is not correct.

Mention the storage server address when asking user to contact the
server administrator to be more friendly.

Change-Id: I15f0489f36db8689b43d42f6b691fdd21815e4fa
2017-05-19 20:53:42 +05:30
Andras Timar
8cbcf9a41a loleaflet: updated translations
Change-Id: Ic25539b5a5800f9f77ed81697a59bc40ce3fb6da
2017-05-18 14:37:49 +02:00
Aditya Dewan
45b923cb2e tdf#107891 zoom does not reset on window resize
Change-Id: I799d2517496233e6ec04587c257eeada56769aca
Reviewed-on: https://gerrit.libreoffice.org/37747
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-05-18 11:41:34 +02:00
Pranav Kant
827d3f63cb loleaflet: Use safer text assignment method
Change-Id: Idb0e5454f5d795132c762e22c596710bfed75770
2017-05-17 23:31:26 +05:30
Marco Cecchetti
afe8e9d245 loleaflet: broken shortcut for comments
Change-Id: I08eae6a1ba5c22f863f73a2625803f1b38e6e415
Reviewed-on: https://gerrit.libreoffice.org/37713
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-05-17 16:23:55 +02:00
Marco Cecchetti
2b8fc61dde loleaflet: impress: comments that are being modified are shown twice
Reworked handling of annotation layout. Now it behaves more like
writer annotations.

Now scrolling up annotations leads to scrolling the current slide too
when it is required in order to show not visible annotations.

Moreover the top visible annotation is now remembered for each slide,
and when the top annotation is not the first one, a bit of the bottom
of the previous annotation is showed so that the user gets aware that
there are more annotations above.

Change-Id: I3d087a8db35143a5e3abcd3e95e5e612d7638891
Reviewed-on: https://gerrit.libreoffice.org/37628
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-05-16 16:12:54 +02:00
Marco Cecchetti
ef5376197e Loleaflet: Fix for row/col headers and annotation marks on tab switching
Change-Id: Id0f52603af7eaa49979f68d222c9c94e79cf65b1
Reviewed-on: https://gerrit.libreoffice.org/37251
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-05-16 13:21:22 +02:00
Marco Cecchetti
647556b442 loleaflet: misplaced comment mark on inserting/deleting/resizing row/col
Change-Id: Ib95870905d1bfc613ba454c7126501b3533e4ba5
Reviewed-on: https://gerrit.libreoffice.org/36982
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-05-16 13:20:47 +02:00
Pranav Kant
1cb75cbcb8 wsd: Save wrapper over .uno:Save
Document broker needs to know when the save request is sent and when the
save finished. It uses these parameters to avoid shutting down document,
in the document broker main polling loop, if save is already going on.
But direct .uno:Save commands issued from
loleaflet precludes document broker to keep track of it - in this case a
.uno:Save command issued from loleaflet followed by closing the
session will prevent saving the document to storage, if document is huge
enough and LO core takes a bit of time to save it. A save wrapper
command, 'save', ensures that document broker is aware of all such save
requests (_saveRequestTime member variable) and doesn't close the
document until we completely save it (to storage and other cleanups).

Change-Id: I5ec73d45adff23b2e7543e93dfd0624a5e5af46d
2017-05-15 11:41:52 +05:30
Marco Cecchetti
024e786e85 calc: added an address input field
Change-Id: Ic030724e392693847a195b5e53866b40ebad7435
Reviewed-on: https://gerrit.libreoffice.org/37359
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-05-11 17:55:23 +02:00
Ashod Nakashian
954a37a06c Configurable timeouts
Timeouts to dimming the doc in the browser
are now configurable from WSD and is relayed
to loleflet as expected.

Out of focus timeout is now 60 seconds.

Change-Id: I8452e30976f6a81b0c3bb3ba5774daa244c1640c
Reviewed-on: https://gerrit.libreoffice.org/37489
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-05-11 08:01:30 +02:00
Jan Holesovsky
25224666a7 Revert "Implement File -> Download As -> Plain text (.txt)."
Actually it is enough to do Ctrl-a Ctrl-c, no need to have a special Download
As -> Plain text.

This reverts commit 1c13d5523f.
2017-05-10 15:01:01 +02:00
Pranav Kant
4e8a8d6aad loleaflet: Stop ignoring on scrollEnd only; call map.scrollTop to sync
Change-Id: Ic126b60a121cc6959b31ef5533a85e902d58c141
2017-05-09 15:35:50 +05:30
Ashod Nakashian
f9ee1c6150 loleaflet: configurable dimming timeout and fire event
Two timeout are now configurable.
idleTimeoutSecs, which controls when to dim because
of user inactivity, even if the tab is in focus.
outOfFocusTimeoutSecs, which controls when to dim
when the tab loses focus.

Currently they are set to 15 minutes and 30 seconds
respectively by default.

User_Idle event is now fired on dimming.

Change-Id: I894f6df44825b6814872f1c4986fab8dcd4d6cef
Reviewed-on: https://gerrit.libreoffice.org/37373
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-08 04:59:52 +02:00
Jan Holesovsky
1c13d5523f Implement File -> Download As -> Plain text (.txt).
Change-Id: I446f73a3110312cbaab1ce1053aee854b421e71c
2017-05-05 18:24:23 +02:00
Jan Holesovsky
21192c4306 Generate the l10n json files only when the appropriate po's change.
Change-Id: I17c0f022775ec631e6493ba81fa41752f6841188
2017-05-05 11:28:26 +02:00
Pranav Kant
e032cb72fa tdf#106447: Support checked items in menubar
Bin the internal command state recorder to Menubar and use the global
state recorder available in the map.

Change-Id: I32e81700e38c2d544b2d874e6a30fbe58e8d43bd
2017-05-03 21:21:28 +05:30
Pranav Kant
ffaf424103 loleaflet: Store state change handlers in new stateChangeHandler class
... instead of having this logic in our toolbar. All the elements like
menubar or toolbar can then use the map store to see the value of last
state change event for any particular uno command. We will be using it
when menubar starts using this store.

The frivolous logic in toolbar of reading the value of last uno command
should be removed. We don't expect loleaflet to change the permission
dynamically after loading the document anymore. But for now, just change
it accordingly and defer the task of removing it when we refactor
loleaflet codebase to trim our permission model (remove the 'view'
mode).

Change-Id: I1be54a62e96179b7db3f61470a92e3ddc745f52d
2017-05-03 21:21:22 +05:30
Pranav Kant
163e04af0b Make admin l10n work again
The localization.json file contains path like 'l10n/lang.json' which
means path relative the html file being accessed. This works when we
access .../loleaflet.html but not so when we access .../admin/admin.html because
then it tries to access .../admin/l10n/lang.json while it should look for
this file one directory up. One could think to change the paths in
localization.json file to something like '/loleaflet/dist/l10n/lang.json' so
that same path is accessed always for loleaflet UI as well as admin, but
it has repercussions that we access l10n data always using 'dist' prefix
and not using git hash, so browser caching the l10n data across multiple
versions.

Ideal would be to split the admin localization completely from the
loleaflet-ui localization. No point in fetching whole of the loleaflet
localizations strings when we are only accessing the admin console. This
would also solve problem mentioned previously.

For now, just split the admin localization file only while still
allowing admin console to fetch the same l10n files.

Change-Id: I0824fb05b9b4123b58d6fd8edafb374ee7128229
2017-05-02 19:52:47 +05:30
Marco Cecchetti
7aeb66be88 loleaflet: Calc, Impress: should not show Reply entry in annotation menu
There is no `reply` support in Desktop for Calc and Impress comments.

Change-Id: I827ae99148cf8f65446e23e13e2588ce0ced788e
Reviewed-on: https://gerrit.libreoffice.org/36979
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-05-02 15:03:48 +02:00
Pranav Kant
e713b843a0 lolefalet: Animate all annotation elements, not just selected
Change-Id: I5b597b057e5f26e79b4db7aa3b4b5733c34914cf
2017-05-02 14:17:18 +05:30
Pranav Kant
18e5fb50f6 loleaflet: Set correct initial position of the comment
Otherwise the comment is animated from the bottom of the document to the
correct position and it confuses IE. Better to set the correct position
of the comment initially, so it doesn't have to animate all the way
through to the original position.

Change-Id: Ie59e2d785b6a778f3c918082a1a8cb7b2923cc33
2017-04-27 16:11:05 +05:30
Pranav Kant
d5cdd776cf loleaflet: Fix replying comment behavior on IE
Change-Id: If56d217073e88ed7bc554383dc3bad059b4ef305
2017-04-27 15:12:10 +05:30
Pranav Kant
bc180ed370 Bin unused animation object
Change-Id: I66d4716ba2bfac5797d8a0e7213479abd3eb3467
2017-04-27 15:12:10 +05:30
Jan Holesovsky
5a164b3c6a comments: Don't trust the date parsing in Calc.
The Calc returns dates differently according to locale, which terribly
confuses IE11.

Change-Id: I80e70cae0091e7eeba782e43e666817f29c1a11f
2017-04-27 10:24:03 +02:00
Jan Holesovsky
fdb5f6f09f Build the translations even for the developers.
Change-Id: Ida8e705c500c9698afc32427815a5b12ab076ac9
Reviewed-on: https://gerrit.libreoffice.org/37018
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-04-27 10:01:03 +02:00
Pranav Kant
5858f4e856 Don't eat new lines
Change-Id: Idaa1af9a0bc12d9967d3807ebca95ec1ca755ae3
2017-04-27 11:09:55 +05:30
Pranav Kant
b49fd14f91 loleaflet: Pass author name field everytime editing cell annotation
Unlike writer and impress, editing annotation in calc creates a new note
without inheriting the author value from the previous cell annotation.
If we don't send the author field here while editing annotation, no
author would be set for the annotation resulting in empty string in the
UI, which looks quite incomplete and ugly.

It should be noted that the new author that is being sent to core
corresponds the current view now. So if cell annotation was added by
someone else and we are trying to edit it, we'd be the new author. This
is contrary to the behavior in writer and impress where author name
persists even if someone else edits the annotation.

Change-Id: I3bfbb34cef304687e42f4ee422d89c5a240834f0
2017-04-27 10:55:55 +05:30
Pranav Kant
56c49af98a loleaflet: Bin client side cell annotation marker
No need as core renders its in-tile annotation marker now, if comment
indicator setting is on in the document.

Change-Id: I213827fc089790398e02b0fd9cba464ab62b0d8d
2017-04-27 10:40:47 +05:30
Jan Holesovsky
ad5a5e086d comments: If we fail to parse the date, show it verbatim.
Change-Id: Iefee7057b3c192c33d49891dd7ef5835d39d1cb8
2017-04-26 19:19:56 +02:00
Pranav Kant
8acc05fa85 loleaflet: Disable retina display on calc
Change-Id: I2a16844db7873b4c26e1f28d17dc33a5526efb78
2017-04-26 17:56:02 +05:30
Pranav Kant
e3ef5d01af loleaflet: Allow mouse clicks to pass through comment/redline selection
Otherwise, it was not possible to use the mouse to click on the text
beneath the text selection svg layer. This simulates a mouse click on
the document after selecting the comment.

Change-Id: Ia2717a0a4356f40e31db94b68563abffc87cac37
2017-04-26 13:16:48 +05:30
Pranav Kant
91421bae3d loleaflet: Allow selecting annotations in readonly mode too
Change-Id: I5c58baf95a1cbbb2ffbe756de30e596e2c35e6fb
2017-04-26 13:15:03 +05:30
Pranav Kant
91f824ae21 loleaflet: Warn here when unexpected data arrives
Hitting save, while there are redlines in the document, makes lo core send
redline information with empty textRange string. Further changes to the
document however brings in correct textRange rectangles back from the
core. Though ideally, it should be investigated why core is not able to
send correct redline text rectangles or why sending these redlines at
all while saving the document (not necessary unless some
attribute in redline changed), but no harm in having an additional check
here to filter unexpected messages received from server.

Change-Id: Ib709422e91cee6f141e4fea8ac923e88d7f65f50
2017-04-26 10:33:45 +05:30
Henry Castro
fa78cbf8a6 loleaflet: fix zooms and scroll annotations of the layer Impress
Change-Id: I4785551ebac4e8f0c1f877a00b651e7ac1203e67
2017-04-25 20:38:53 -04:00
Henry Castro
d5ab42a999 loleaflet: initialize undefined variable
Math.min(undefined, number) return NaN

Change-Id: I4b1c7c0428a4e665235a170282a377f980e84924
2017-04-25 14:42:23 -04:00
Pranav Kant
31ff4d29a1 loleaflet: Warn, and don't crash, if we don't get expected data
It is possible that backend sends comment for which there is no parent
comment sent yet, as presently is the case as I am writing this. Warn
nicely in this case.

Change-Id: I2609dfdcdac69380b824d444ba8f64803996286c
2017-04-25 21:04:46 +05:30
Pranav Kant
0760786392 loleaflet: Commit reply comment when focus lost
Change-Id: I0a47c6b74afed31264aec06ab654063fb5beaca8
2017-04-25 20:27:23 +05:30
Pranav Kant
759b0945d4 loleaflet: Don't allow inserting breaks anywhere
overflow-break property is enough for us which still allows inserting
line breaks arbitrarily anywhere but only if there is no otherwise
acceptable break points in the line.

Change-Id: I8ea94daba258b00caa259c97597cf1206a89fa64
2017-04-25 19:40:30 +05:30
Jan Holesovsky
51d922f1af Lint.
Change-Id: Ie4fbe41568502f9c4f7642e8e85a631da648e3c3
Reviewed-on: https://gerrit.libreoffice.org/36939
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2017-04-25 13:14:55 +02:00
Marco Cecchetti
6735fbc8a1 Loleaflet - fix: row/col header do not update on switching tab
Change-Id: I6528646276647ea78048d68eb91794cb394b67c3
Reviewed-on: https://gerrit.libreoffice.org/36935
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-04-25 13:09:14 +02:00
Pranav Kant
2d55476b20 loleaflet: Don't overflow long names, align author names properly
Change-Id: I0d833291fc996ecb4007bcb58b588967afa6ea58
2017-04-25 14:48:23 +05:30
Pranav Kant
0c53975f18 loleaflet: New comment size/width
Change-Id: Ief2d9c942dffab7a98dc5a7de2208e511f45df78
2017-04-25 13:32:51 +05:30
Pranav Kant
7486f44ee1 loleaflet: Don't send linkified comment data back to core
Only use the modified markup for representation to the user.

Change-Id: I50a6ea4d7411a7d0a1662430f90201b00415ccbf
2017-04-25 11:40:35 +05:30
Andras Timar
567308e4b5 loleaflet: updated translations
Change-Id: I5c4542b461240ce6d56be9b488b12f79458798d3
2017-04-24 20:25:00 +02:00
Jan Holesovsky
94737a890d loleaflet: Disable the Accept / Reject if the document is read only.
Change-Id: I8d3f312d9d2dd75b44e5a779875688da1a31e123
2017-04-24 20:09:47 +02:00
Pranav Kant
2b38191e3b loleaflet: Wrap both comments and redlines
Change-Id: Iee0c61340cc78b93a2d3d23157bab715c3e7411e
2017-04-24 20:31:06 +05:30
Pranav Kant
ca482f0065 loleaflet: Fix width of the redlines too
... otherwise with very long comments, they keep increasing their width
which looks ugly.

Change-Id: I5cd67258b251a9d522716433d5e190cd29fef078
2017-04-24 20:31:06 +05:30
Pranav Kant
3a10c48013 loleaflet: new dependency - autolinker - link what can be linked
... in annotations. Emails, phone numbers, email address and what not.
We are not sending the generated markup, eg: the html <a> tags back to
LO core, only the representation in the UI is linkified.

Autolinker license: MIT
https://www.npmjs.com/package/autolinker

Change-Id: I8df3676a9eb6122884defb6bc3da87d30f993b04
2017-04-24 20:31:06 +05:30
Pranav Kant
c88f1156b2 loleaflet: Increase the annotation height a bit more
Change-Id: Ibd04cfe3e17354244a31177edca23467e0f8e9c8
2017-04-24 20:31:06 +05:30
Pranav Kant
ecdb7e2645 loleaflet: Enable vertical scroll on annotations
Change-Id: I6ff7a29bd22f57b4d9bbdbb824619030cf5f2e43
2017-04-24 20:31:06 +05:30
Henry Castro
a33e9eab76 loleaflet: disable the annotation menu if the document is read only
Change-Id: Ic5973e582e56d2452672219bdd443ec8dd551dab
2017-04-24 09:49:47 -04:00
Pranav Kant
0b419faf10 loleaflet: Trigger layout algorithm on scrollend
This is just a quick workaround to circumvent the problem where
annotations dissappear when document is scrolled swiftly using the
mousewheel.

Change-Id: I51df6cecb770e5542ecdad765a5f0ccb6ec1eb98
2017-04-24 19:07:59 +05:30
Pranav Kant
c7757a7263 loleaflet: do not unnecessarily layout on unselect
Return early if there is no annotation selected currently.
Without this patch, we were unnecessarily layouting all the annotations
again and again on every click which is likely to make things slow.

Change-Id: I20ce5894a4d605b9811eb37d3b3af207bbb48d50
2017-04-24 15:56:34 +05:30
Pranav Kant
3175a3a042 loleaflet: Check parent relationship before linking next comment
Change-Id: Ib22e1e1adca0544a70fa224abc9c98060ad83e5f
2017-04-24 15:44:53 +05:30
Andras Timar
f50b64b44e loleaflet: 'shutdown' is noun, 'shut down' is verb
Change-Id: I001a2ce9081b8f7145f2622ef844b6eeb7655193
2017-04-23 19:23:20 +02:00
Marco Cecchetti
1e0deae3df Calc: changed the way header are updated on row/col insertion/deletion
Now when a row/col is inserted/removed or resized is the core to
notify the client that current header is no more valid and a new
header should be requested by the client to core.

In this way core can notify the header invalidation to all views.

Change-Id: Ia3c1872b73cfb3458cd0d35907291a9fc9eebd11
Reviewed-on: https://gerrit.libreoffice.org/36729
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-04-21 15:45:15 +02:00
Henry Castro
42091f0b20 loleaflet: update document size when insert new annotation
Change-Id: Iaaca82aba1c04de336e89ff4e854cc9632fbfc53
2017-04-20 21:56:07 -04:00
Andras Timar
c38e5de273 loleaflet: without quotes the target file name was truncated at 'ui-bg_highlight-soft_'
Change-Id: I0f7ffb0babf4295a48e1684a24bb24a0fd7ab8f4
Reviewed-on: https://gerrit.libreoffice.org/36725
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2017-04-20 11:00:37 +02:00
Andras Timar
84259a9eb6 loleaflet: updated translations
Change-Id: I99f6fab9d8a22d13aac237ecaea3acfa5d630c4d
Reviewed-on: https://gerrit.libreoffice.org/36720
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2017-04-20 10:59:36 +02:00
Pranav Kant
ee683c106c loleaflet: Fix incorrect variable usage in this loop
Change-Id: I586ad59874b901d31b6e138a74577ecf3e1920c3
2017-04-20 12:43:39 +05:30
Pranav Kant
702bcdcf8d Surely, it is supposed to be update, not upate
Change-Id: I5d576ec0ae6976cb915b1c458546bbf82bf9fe8f
2017-04-20 12:43:39 +05:30
Henry Castro
b142e0ba48 loleaflet: add option no menu when insert new annotation
Change-Id: I0950c743f9443f85674fb087c44c8fe942bcc322
2017-04-19 21:11:28 -04:00
Aron Budea
33a562515b Show font/highlight color on toolbar in IE 11 as well
.repeat is not supported.

Change-Id: I4f9d75f851f73e4cc626ca6f0a13aa1877308e70
Reviewed-on: https://gerrit.libreoffice.org/36553
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2017-04-20 02:27:24 +02:00
Henry Castro
30f8254e88 loleaflet: remove unnecessary spreadsheet context menu items
It is replaced by interactive client side annotations

Change-Id: Ib21926bea1cf125c82b9254c536d70ec94d95f91
2017-04-19 20:20:15 -04:00