Commit graph

617 commits

Author SHA1 Message Date
Faruk Uzun
02f6f0d6fa loleaflet: bccu#1456 fix spreadsheet tabs
Adds a custom navigation for spreadsheet-tabs

Change-Id: I57d9ef1ff9466c18c9edca849519bbe2af5826ab
Reviewed-on: https://gerrit.libreoffice.org/22610
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-02-23 15:56:44 +00:00
Pranav Kant
98fbc0c4a4 loleaflet: Handle password protected documents
Change-Id: Ife7923869710999de83365dc2c6be33ed42c2f3b
Reviewed-on: https://gerrit.libreoffice.org/21895
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-02-22 20:23:32 +00:00
Marco Cecchetti
05c4a034c3 loleaflet - user view does not follow cell cursor - fixed corner cases
Change-Id: If6497d46c5d4457493864fdea04c28bb917865c0
Reviewed-on: https://gerrit.libreoffice.org/22519
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 27d4b4b75aeaddac550b5c2bdf04fcde744c87fe)
Reviewed-on: https://gerrit.libreoffice.org/22518
2016-02-22 10:47:40 +00:00
Ashod Nakashian
d8df19d064 loolwsd: Authentication and Authorization support
An abstract class to request an access token, given
an authorization grant. The class should be
specialized for each authentication/authorization
type we support.

Currently it's not enabled in the code as it's
an early stage in developing an general API.

Change-Id: I4f2efd376d575640bd3e17c7257994020b11bbe8
Reviewed-on: https://gerrit.libreoffice.org/22512
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-19 21:44:55 +00:00
Marco Cecchetti
049633a644 loleaflet - user view does not follow the cell cursor
Change-Id: I7e877847de0c2c644948b47daa0bff0e5f7da3a0
Reviewed-on: https://gerrit.libreoffice.org/22489
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-02-19 10:21:12 +00:00
Pranav Kant
10fcfdd210 loleaflet: Fix all ESLint errors
And we are now finally in a clean state.

Change-Id: Ifd949d925cc758a007d036e1de9df7dafd911c40
2016-02-19 01:02:55 +05:30
Pranav Kant
f8b104b88c loleaflet: Silence ESLint errors
Moral - Run 'jake lint' before committing your code.

Change-Id: I401567360dfdfb16e99dafc3171ac158a90605e4
2016-02-18 21:34:46 +05:30
Pranav Kant
f6baed14c0 loleaflet: Handle outline levels as special case, for l10n
'Outline' is localized, 'Outline x', where x = number, is not.
Lets treat outline levels as special case so that we could get
their localized form also.

Change-Id: I96d1a0d715e5859f9d0f2da2c00c06232621555b
Reviewed-on: https://gerrit.libreoffice.org/22354
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-02-17 08:33:25 +00:00
Pranav Kant
816a43efb6 loleaflet: Added style translations
Translation of styles for writer, impress and calc
in all languages taken from LibreOffice translation submodule.

Change-Id: Id533463f63523cade53435d66ff85a90fc15736b
Reviewed-on: https://gerrit.libreoffice.org/22353
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-02-17 08:32:14 +00:00
Andras Timar
b9856a7806 loleaflet: enable scrollHandler 2016-02-16 17:31:17 +01:00
Andras Timar
30cfc3678f loleaflet: enable l10n of insert/delete slide feature 2016-02-15 10:27:33 +01:00
Andras Timar
63cc475ffc loleaflet: enable l10n of socket error messages 2016-02-15 10:06:10 +01:00
Andras Timar
691b40fedc loleaflet: enable l10n of add/remove/rename sheet tab feature 2016-02-15 09:26:01 +01:00
Pranav Kant
78dfb5f3eb loleaflet: Allow adding/removing/renaming spreadsheets
This uses context menus using a jquery plugin:
Project: https://github.com/swisnl/jQuery-contextMenu
License: MIT

Change-Id: Ibab544555ace25e4f7816392eb048349f0c4c1e1
Reviewed-on: https://gerrit.libreoffice.org/22279
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-02-15 08:07:51 +00:00
Andras Timar
4d59d91293 typo 2016-02-15 09:06:47 +01:00
Jan Holesovsky
f73c0980e2 loleaflet: Allow wss: protocol as a base for the image upload URL too. 2016-02-11 20:26:06 +01:00
Jan Holesovsky
9f96b1716f loleaflet: Init the handlers necessary for initializationcomplete first. 2016-02-11 11:20:45 +01:00
Pranav Kant
b482dfba56 loleaflet: Fix wrong initializationcomplete signal
This should ideally be fired when we receive 'commandvalues'
command, not 'statechanged'.

Change-Id: I34748979a7606cd50e6965850757eda891a9aa15
2016-02-10 15:01:00 +01:00
Jan Holesovsky
f41b9c7703 loleaflet: Send 'saveas' with the 'TakeOwnership' option.
So that the .uno:ModifiedStatus works.
2016-02-10 15:00:50 +01:00
Jan Holesovsky
0f537ca780 loleaflet: Move _permission to L.Map. 2016-02-09 18:12:35 +01:00
Jan Holesovsky
65b492404c loleaflet: initializationComplete renamed to initializationcomplete.
This is for consistency with other events there.

Add documentation too.
2016-02-09 15:38:01 +01:00
Jan Holesovsky
5c01f032a0 loleaflet: Move the initializationComplete code around a bit. 2016-02-09 15:31:01 +01:00
Pranav Kant
6f69af91e6 loleaflet: Fire event on initialization complete
Change-Id: Iaba99d88b1ce770374f9f39a443b169c8c019d72
Reviewed-on: https://gerrit.libreoffice.org/22234
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-02-09 14:01:47 +00:00
Jan Holesovsky
70966240bf loleaflet: Trigger the clientvisiblearea message even when resizing. 2016-02-08 21:03:16 +01:00
Jan Holesovsky
03bbe395ec loleaflet: Let 'saveas' produce the 'document cannot be saved' id too (5). 2016-02-08 20:27:39 +01:00
Jan Holesovsky
551c868652 loleaflet: statusindicator messages must be handled already in the Socket.
Otherwise the messages will be lost - we don't have a docLayer instance yet.
2016-02-08 14:59:34 +01:00
Henry Castro
4ed8b37e9c loleaflet: rework Control.Presentation.js toolbar items 2016-02-07 18:42:12 -04:00
Henry Castro
587dde0908 loleaflet: fix disable state toolbar item 2016-02-07 18:38:17 -04:00
Marco Cecchetti
686a531287 loleaflet - L.Cursor.imagePath can be a relative path
Change-Id: Ib4e2c88f580ebc6322427d6f950231b603c58186
2016-02-06 18:23:34 +01:00
Marco Cecchetti
2a95b7dea3 loleaflet: now the 'search' event has a 'highlightAll' property
Change-Id: I2fffe54d1474d4dea3fd2d69f5cadc8ff7a0f459
2016-02-05 17:49:33 +01:00
Jan Holesovsky
81bdf7cd7a loleaflet: When the 'premission' is 'edit', disable dragging too. 2016-02-04 20:46:44 +01:00
Jan Holesovsky
41378e9945 loleaflet: When the 'premission' is 'edit', request a session immediately. 2016-02-04 20:41:24 +01:00
Jan Holesovsky
32ecdb8ab6 loolwsd, loleaflet: Handle the ERROR callback.
This introduces a new error id 5 - "document save failed".
2016-02-03 11:24:21 +01:00
Miklos Vajna
1e3432b7e9 loleaflet: initial support for the clientvisiblearea command
This is enough, so that e.g. pagedown jumps down about a visual page
correctly.

Areas where this could be improved further in the future:

- Currently the visual area is only updated on zoom change. Perhaps it
  would be better to update it when the visual area really changes, i.e.
  on scroll or resize. But the cost of this only makes sense if
  something on the server side needs the correct position or width as
  well, not only the height (as pgdown does).
- Currently the visual area is sent only before a key command (if it's
  dirty), is there a use-case when sending it also before e.g. a mouse
  click is also useful?
2016-02-02 14:11:23 +01:00
Marco Cecchetti
876a04cb31 loleaflet - now only zoomlevelchange trigger _updateDisabled
Earlier both 'zoomend' and 'zoomlevelchange' triggered
Control.Zoom._updateDisabled.

Removing 'zoomend' let us fire 'zoomlevelchange' when the zoom level
is set (map.setZoom).

Change-Id: Ifde4977f39ca924bbcb7621d16f6169088d2c608
2016-02-02 14:01:04 +01:00
Marco Cecchetti
6da856dd29 loleaflet: map option: cursorURL - local server path to cursors
The meaning of the cursorURL option is changed: now it does not
represent anymore the full URL including protocol and server but only
the path local to the server.

Map option curosr.HotSpot has been removed since not requested.

cursorURL option has been documented in reference.html.

Change-Id: I9ccc4756ade469018837af08b1d32a3fabddc958
2016-02-02 12:07:22 +01:00
Marco Cecchetti
e88d2f5ae7 loleaflet: custom cursor properties can be passed as map options
Change-Id: I0213278becc63bbd66e202c870cb55268c1bcd2b
2016-02-01 22:22:05 +01:00
Marco Cecchetti
e6d10469ee loleaflet - in highlighting mode a custom cursor is used
When the user clicks on the background text color control while
editing a text document, loleaflet enter in highlighting mode (exactly
as Wrieter does).
In order to notify that loleaflet has switched to highlighting mode
the cursor changes is shape to a small bottle in the act of dropping
ink.

Change-Id: Ic9a5a636df9fd6071e38edc7e0fc2e11e037a517
2016-02-01 18:45:16 +01:00
Jan Holesovsky
0bb8d0f1c3 loleaflet: Rename searchAll() to highlightAll() for clarity.
The previous work changed the behaviour of searchAll so that it does not
create a real selection, but instead adds additional mean of highlight, so
that it is possible to show all the results, and travel them at the same time.

The usage is now:

* call once the highlightAll()
* and then traverse the results using search()
2016-01-25 22:42:38 +01:00
Marco Cecchetti
a6364328e1 loleaftlet - enable propagation of the onmousedown in view mode
For details see bug bccu1446.

Change-Id: I91585e2402aea2e72645b7358ee68efc8b7de313
2016-01-25 19:06:34 +01:00
Marco Cecchetti
c3083e9048 loleaflet - active cursor in multiple documents - fixed
Added handlers for focus and blur events.

Change-Id: Ie85ae264696e5221168f7ac280ba91732e9f5df3
2016-01-25 19:06:30 +01:00
Jan Holesovsky
f7d4a2cfa1 loleaflet: Position the mouse with 'drop' always (even html snippet). 2016-01-25 12:35:24 +01:00
Andras Timar
650ea84b4f loleaflet: Cmd on Mac should be sent as Ctrl to server (Linux) 2016-01-25 12:04:53 +01:00
Jan Holesovsky
29cc2e1b21 loleaflet: Add 'rel's for spreadsheet column/row headers for easy addressing. 2016-01-25 11:32:23 +01:00
Andras Timar
b8d560ddb9 loleaflet: focus to hidden input field when user presses Cmd (Meta) 2016-01-25 10:35:24 +01:00
Marco Cecchetti
a698d6a2d1 loleaflet - fix for multi-line text selection issues
Steps for reproducing the problem:
1) try to select some multi-line text
2) still holding the mouse button pressed move the mouse pointer
outside the browser window
3) release the mouse button
4) move the cursor back over the map.

Expected result: the selection should not change any more after the
mouse button has been released.
Real result: the selection changes when you move the mouse.

The same happens when you move the mouse pointer out of the tiles
covering, even if we are still inside the html document element area
where the map is embedded.

A similar issue occurs in view only mode when you drag the document: in
this case the problem occurs only when you move the mouse pointer out of
the tiles covering, but still inside the html document element area
where the map is embedded.

The behaviour described above is due to the fact that the map container
receives mouse events only when the mouse pointer is over the map.
The implemented fix checks for mouseout events which occur between a
tile element and a non-tile element (such as the the resize-detector
iframe, the scroll-bar container, the selection cursor marker). When
such an event occurs handlers for mousemove and mouseup events are
attached to the HTML document element and to the resize-detector iframe.
In the same way when a mouseover event occurs between a tile element and
a non-tile element such handlers are removed.

It was needed to attach handlers to the resize-detector iframe too since
the HTML document element seems to not be able to receive mouse events
that occur inside the iframe area.

A side effect of this fix is that now the text selection goes on
changing as far as the mouse button is not released even when the mouse
pointer is moved out of the tiles covering.

Since for an iframe the coordinates embedded in a mouse event are
relative to the iframe area, it was needed to implement a workaround in
order to avoid sudden changes in the current selection or in the
document position when the mouse pointer moves out of the map.
2016-01-24 20:19:48 +01:00
Marco Cecchetti
47aeaa62e0 text doc - search - normal search does not discard highlighting
Improved search behavior for text documents:now when a normal search is
performed with the same search string utilized by a previous searchAll
action, search results highlighting is not removed.
2016-01-24 20:19:13 +01:00
Ozcan Esen
b281819ab1 loleaflet: new searchAll for presentation
does not affect regular searches since it caches results only if
(this._docType === 'presentation' && count > 1) and clears cache on
mousedown

Change-Id: I5569424df6e463da0c63166eef36842fa7d32f0e
2016-01-24 20:18:02 +01:00
Andras Timar
bc98b0194e loleaflet: fix Cmd+C / Cmd+X / Cmd+V on OS X Safari 2016-01-24 18:20:30 +01:00
Andras Timar
7e50b73f50 loleaflet: fix Cmd+C / Cmd+X / Cmd+V on OS X Firefox and Chrome 2016-01-24 17:42:19 +01:00