Commit graph

497 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
Pranav Kant
5858f4e856 Don't eat new lines
Change-Id: Idaa1af9a0bc12d9967d3807ebca95ec1ca755ae3
2017-04-27 11:09: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
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
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
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
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
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
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
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
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
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
Jan Holesovsky
7b7c73f8be Align the Accept / Reject buttons with the kebab menu.
And few other improvemnts inluding:

* use svg instead of png for the menu
* add title (caption) for the Accept / Reject change.

Change-Id: Ic7e781d7e93d319f766b387a8eddfa70c1920760
2017-04-12 17:43:49 +02:00
Pranav Kant
b7eafb1e4a Move CSP to response headers from meta tag in html
Some older browsers don't have meta tag support for CSP. Lets put all of
the CSP in response headers to be compatible with oldies.

Change-Id: I7f0d7c294e492b3c69ebea6fbd820d6558b9c3b3
2017-04-12 19:24:51 +05:30
Pranav Kant
63631dff24 security: CSP: add frame-src 'self'
We need to be able to create iframes sometimes with same origin as ours,
eg: when loading the 'loading' page during slideshow or downloading the
file (in different formats). The 'blob:' is only used for printing
purposes.

Change-Id: I93666ee45e707997969e151af5142efeeca0d177
2017-04-09 23:32:06 +05:30
Pranav Kant
54d0ff9c21 Stop using inline event handlers wherever possible
Unfortunately, our dependencies (various plugins etc.) still make heavy
use of inline event handlers, so not possible get rid of all of them in
our bundled js. This is the reason we still have to use 'unsafe-inline'
in our CSP.

Change-Id: I519dec0834606ab3c56e090c882a93160ddcb52c
2017-04-07 13:46:04 +05:30
Pranav Kant
0f2c6d8e06 Bin unused function
Change-Id: I57bc98cd382081e776e1ed58da095a404834b431
2017-04-07 13:46:04 +05:30
Pranav Kant
328df11a68 Bin this unused inline style
Change-Id: Ib4ae0cde13acea0e04526cda925f3d4528bb6605
2017-04-07 13:46:04 +05:30
Pranav Kant
03341192ca loleaflet: Add Content Security Policy
Change-Id: I450e0c9fb24d114af35ba9c503d3940ab30a4f4e
2017-04-07 13:46:04 +05:30
Pranav Kant
f90ad6e743 Revert "Add change tracking toolbar buttons"
This reverts commit 0c5efd80ad.

Change tracking options are already available in the menubar, lets bin
them from the toolbar

Change-Id: Ie340957eb1e615429a54be9cb0639db146e6d7a1
2017-04-04 23:02:00 +05:30
Andras Timar
878eef6cb4 loleaflet: Add Upper Sorbian and Lower Sorbian UI languages
Change-Id: I4ad5acbdf6746df03ddf233b986f20d200331794
2017-04-04 16:46:05 +02:00
Pranav Kant
4b7904036a loleaflet: Annotate readonly users in userlist
Change-Id: Ia000a06baf9f88830dd30c4c4a4297eb10192fd6
2017-03-31 12:22:39 +05:30
Pranav Kant
5bb6e203c5 loleaflet: Accept, Reject redlines buttons in main annotation win.
Change-Id: I16b931c07485eb98fdac00d1dc968a4c9251a02a
2017-03-23 17:34:35 +05:30
Pranav Kant
064b2508a7 loleaflet: Slide sorter for draw documents
Change-Id: I4ad11236c0186561b5c7df1a3c634e54f8576c8c
2017-03-20 13:59:52 +05:30
Pranav Kant
f57e412403 loleaflet: Tell WOPI host if document was ever modified by user
Change-Id: Ic99136168716d7a01d1388c4f5e1107ef9e64616
2017-03-17 15:42:10 +05:30
Dewan
92ad94f259 display lokit and loolwsd version in admin panel
Change-Id: Ia5b89373bfd7e921597b73d5a84963268244b748
Reviewed-on: https://gerrit.libreoffice.org/35199
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-03-17 07:53:06 +00:00
Aron Budea
4a99210f97 loleaflet: Don't clear ids in unoCmdToToolbarId(...)
Since 4030795584 spreadsheets
start with Undo/Redo/Doc. Repair buttons enabled, because
of this.

Change-Id: I20a22f483324289435825c3514894389176f57f3
Reviewed-on: https://gerrit.libreoffice.org/35056
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-03-15 05:18:23 +00:00
Henry Castro
bd911ff9d5 loleaflet: rework Impress annotations
LO Impress does not have an anchor position of the annotation object

Change-Id: Ifaa08bb3f62f442f3ee58242e835b6377901a592
2017-03-09 23:01:33 -04:00