Commit graph

1854 commits

Author SHA1 Message Date
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
Adolfo Jayme Barrientos
566c3adee9 Update Spanish translation (styles, synched from core)
Change-Id: I0262fb34860d23d149cc1127982160815d1d831e
2017-04-19 16:16:08 -05:00
Henry Castro
516fb8ae9c loleaflet: extend document size to scroll annotations
Change-Id: I9581818628c365587a4a115b9d3f0b457b8a6905
2017-04-19 15:00:06 -04:00
Pranav Kant
78fd7f6ffd loleaflet: Select change tracking comments; hidden overlay
Make this overlay interactive, but we don't want to color this overlay
since LO core already colors redlines in tiles for us.

Change-Id: I46077f5b6a28cdd492325b8ab3014fb25ecd94ec
2017-04-19 19:39:55 +05:30
Pranav Kant
4a8caa40e8 loleaflet: Select and deselect comment upon mouse click
Make comment overlays clickable and when clicked select the
corresponding annotation. Also deselect when clicked where there is no
comment overlay.

Change-Id: Id9236862eec86b7508978ad8fe803455e03adbe2
2017-04-19 19:13:25 +05:30
Pranav Kant
0fb2c19014 loleaflet: Animate child elements together with their parent
Create the new L.PosAnimation object everytime you want to animate, not
just use the same everytime which has the limitation that animation
doesn't happen simultaneously.

Change-Id: If5f63702afe0fee7f44c8cf4605179d68de289e8
2017-04-19 18:10:00 +05:30
Pranav Kant
b864b562cf Revert "loleaflet: Remove box-shadow from comments"
This reverts commit 86be5a24a5.

Change-Id: I272b9a88e29a8ab77e93dfc36c6e3aec9c91a1a6
2017-04-19 15:22:18 +05:30
Aditya Dewan
41ed318de8 tdf#106449 admin:adding user list for each document
Change-Id: Ia5c382f469a80464d0435e1e2e4de3daaba8a690
Reviewed-on: https://gerrit.libreoffice.org/36275
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-04-19 08:17:11 +02:00
Ashod Nakashian
175f4d995f loleaflet: no need to tell the user when doc is unloading
This is rare and should take a few short seconds
to save and then we can load as normal.

Since the client auto-reconnects anyway, no
need to tell the user to try again.

Change-Id: I51a7ad207edec3203933a1808288870e69699952
Reviewed-on: https://gerrit.libreoffice.org/36655
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-19 07:21:44 +02:00
Marco Viscido
0bb650e7c4 keep expired document and query them to get the historical content
A Document has its own snapshots set.
A snapshot is a string representation of a JSON object.
AdminModel keeps also the expired document objects.
Query each document object in order to get their own history.
Admin accepts an "history" command then returns a json object.
An administrator checks the history by dashboard.

Change-Id: I73c87eff334cdb5a4a58043b2b66f18a56240b3a
Reviewed-on: https://gerrit.libreoffice.org/35926
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-04-19 04:08:38 +02:00
Henry Castro
c21221d514 loleaflet: animate pan if animate: true specified
Change-Id: I1d6b70d33d7459984da1541e3cd80e722268ce13
2017-04-18 16:39:34 -04:00
Ashod Nakashian
624380089e loleaflet: don't send setclientpart when the server sets part
Client now sends setclientpart only when it wants to change
the current part number, but not when it is updating
the current part when it receives setpart from the server.

When switching parts (either by the keyboard or mouse)
LoKit sends a notification of the current part and
invalidates tiles. As a reaction to that the client
cancels its tiles and requests new tiles for the
new part. In addition, it sends setclientpart
back with the new part number.

This works fine, except when the client switches
between parts quickly (as when randomly pressing
page-up and page-down quickly in impress), by
the time LoKit receives the second request the
client would have reacted to switching the first
by sending setclientpart for the first. This
will result in a resonance back and forth ad
infinitum (or when the client goes inactive).

The client shouldn't echo back the part number
which the LoKit has told it (it should only send it
to explicitly set it itself). But the server should
be smart enough to remove duplicate setpart
notifications from the client queue. This reduces
the chances of an ocillation like that to happen.

Change-Id: Ia8a1bb25e427ab910129340ce599e3743983463b
Reviewed-on: https://gerrit.libreoffice.org/36598
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-17 07:06:02 +02:00
Ashod Nakashian
5479788e52 loleaflet: reconnect when load fails due to unloading
Retry up to 10 times with a delay of 1 second in between.

Also, show the user a message (after first reconnection
fails) that the document is unloading to try again
(but of course we auto-retry anyway).

Change-Id: I616d7643f146a6d5b7ccda7bb2aa567e3a9efe47
Reviewed-on: https://gerrit.libreoffice.org/36596
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-17 07:03:41 +02:00
Ashod Nakashian
28d15220e6 loleaflet: don't reference uninitialized docLayer
Change-Id: I0ea169474f17aa541f678c7474a6903b85129101
Reviewed-on: https://gerrit.libreoffice.org/36595
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-17 07:02:41 +02:00
Ashod Nakashian
5e3fc10eee loleaflet: log socket activity
Change-Id: I763ac09fcd5eef700b331b4d8016db3d30e1ef9a
Reviewed-on: https://gerrit.libreoffice.org/36594
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-17 06:50:25 +02:00
Pranav Kant
86be5a24a5 loleaflet: Remove box-shadow from comments
This box-shadow interferes with direct comment children and breaks the
root-children comment block UI. Lets remove the shadow for now.

Change-Id: Idda659bcfca76093c148400b2ab311bc39861e84
2017-04-14 13:46:01 +05:30
Pranav Kant
3f397584aa loleaflet: Adjust parent,children when comment is added/removed
... in between comments.

Change-Id: I7b707d04adb045df43c66a29ccc9d2c3e702fca5
2017-04-14 13:45:16 +05:30
Pranav Kant
043ec94bef loleaflet: Same width for all comments, different from redline comments
Separate css classes for these different types of annotations.

Change-Id: I2013a05a2f7095956765661169670e0bb87bb372
2017-04-14 11:46:12 +05:30
Pranav Kant
3f4c678ab3 Combine root comments with their children comments
Change the layouting algorithm to check for comment relationship and set
the layout bounds accordingly.

Change-Id: I67cc32092d8cf2c1bbc0d677258387739bfc638e
2017-04-14 11:32:05 +05:30
Henry Castro
95d5941e9b loleaflet: update annotation position when performed zoom
Change-Id: I931081b2451d965ab669b428f8b258c3e39fb729
2017-04-13 20:58:52 -04:00
Andras Timar
976ce69183 loleaflet: ' Save ' -> 'Save'
Change-Id: I23b24aeda989652b04c1759810b1801b041e0a6b
2017-04-13 12:16:03 +02:00
Henry Castro
b0c889f2d2 loleaflet: animate the new position of selected annotation
Change-Id: I47af4ac3ec01b03797a03dfcc91ec84f0fd39bb5
2017-04-12 17:24:48 -04:00
Henry Castro
44482615ca loleaflet: update PosAnimation.js file
Change-Id: I38a2643e67d1d341b486c987eb73dc5e5608a7cb
2017-04-12 17:24:48 -04:00