Commit graph

1868 commits

Author SHA1 Message Date
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
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