Commit graph

2005 commits

Author SHA1 Message Date
Henry Castro
450f834248 loleaflet: simplify annotation operations
LO Core sends a list sorted by anchor positions, so no need to
have an additional anchor array list in client side
2017-02-17 14:25:02 -04:00
Pranav Kant
8fa0bb54bd loleaflet: fix readonly UI for spreadsheets
There is still one known problem - for some reason, when a spreasheet is
opened in readonly mode, the ViewRowColumnHeader request sent to server
has height=0 leading to server sending no rows information back to client.
Though the problem gets resolved when one scrolls the spreadsheet
window, but something to fix.

Change-Id: I2aefafd1a93c1bc5a9ad8581edb83018ec9a3f07
2017-02-17 22:16:58 +05:30
Pranav Kant
c3f9ebb888 loleaflet: Fix readonly UI for impress
Change-Id: I1434cad4f471a3f13c989d67b95b967345598148
2017-02-17 20:53:54 +05:30
Pranav Kant
e4ed4c1ad2 loleaflet: Vanish UI in readonly mode
Some of the related code was accidently commited in
8ebff4399c74a42463e1ec7578e6f5a028826682

Change-Id: Ia58e31bea7352541a89ae3f1b57c611acbe27e21
2017-02-17 20:09:10 +05:30
Pranav Kant
f75ccb414b loleafet: Revert accidently committed code
... from 8ebff4399c74a42463e1ec7578e6f5a028826682

Change-Id: I004ca52ba79b0a0e7c79c08a354f8d3179bf1daa
2017-02-17 20:09:10 +05:30
Pranav Kant
625a909902 loleaflet: Kill manual browser checking code; user our Browser class
Change-Id: Ia75e1f1bf79647c2eb6562fed8c549b3e272a953
2017-02-17 17:56:03 +05:30
Henry Castro
d4570130fe loleaflet: fix annotation author name 2017-02-16 09:46:17 -04:00
Henry Castro
4b5c667d23 loleaflet: sync annotations with server side 2017-02-15 17:47:46 -04:00
Henry Castro
aa751efbee loleaflet: modify and remove annotations 2017-02-14 16:37:16 -04:00
Ashod Nakashian
990d657672 loleaflet: reconnect silently when disconnected
Change-Id: I7761dcfd283e9b24fd70d255899d438209103a22
Reviewed-on: https://gerrit.libreoffice.org/34193
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-13 05:25:44 +00:00
Henry Castro
f9d54cd058 loleaflet: insert annotation 2017-02-11 21:22:59 -04:00
Marco Cecchetti
66da85e0c8 Calc: Raise the row limit to 10.000 rows.
Change-Id: I5fe99f9d88f80cd9abbcf64d73a4b244739a0310
2017-02-10 19:13:07 +01:00
Michael Meeks
e662b3457a AdminConsole: add new propchange notification, and update memory live. 2017-02-07 18:55:32 +00:00
Ashod Nakashian
0476d1d9f2 wsd: don't complain to the user on idle termination
We no longer tell the clinet "This is embarrassing..."
when we disconnect and unload an idle document. Instead,
the client UI remains greyed out so the user can resume
as if it was inactive (and reload the document in this case).

Also, we now always send the "close: " message prior
to shutting down a client websocket. This is more
reasonable and consistent when we intentionally disconnect,
so clients can rely on it to signal intent and give reason.

Otherwise, a disconnection without this application-level
message should be unexpected and is therefore reasonable
to show the "This is embarrassing..." message.

Change-Id: Ic7439bcc9267be155586ccd5d122e9fe60225516
2017-02-05 21:59:23 -05:00
Ashod Nakashian
5cac95e6a9 loleaflet: remove pagepartrectangles request and handling in loleaflet
Change-Id: Ib83e7c0ca05a7d7d1a3d30675ef3cf5804f5ac4c
2017-02-05 21:59:22 -05:00
Henry Castro
174154093b loleaflet: add annotations 2017-02-05 20:24:18 -04:00
Samuel Mehrbrodt
1f2d04a5e4 Online, not on-line
Change-Id: I93a8322dceca7c1ed95449c6aeb4ae854b982957
Reviewed-on: https://gerrit.libreoffice.org/33886
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-02-03 13:47:30 +00:00
Andras Timar
1a926addc1 loleaflet: updated pot files 2017-01-30 15:41:24 +01:00
Ashod Nakashian
65be8a3e56 loleaflet: 50 docs or more is considered prod deployment
Change-Id: Ib36fdc43a7c94dc63ec9e31fe21eea475913c8d5
Reviewed-on: https://gerrit.libreoffice.org/33681
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 05:09:13 +00:00
Ashod Nakashian
4dc6b574a0 wsd: show a different limit message for non-dev builds
For now we assume configurations of more than 50
documents are not for dev or demo. This is because
loading 50 documents will require a reasonably
sized server and is beyond the default of 10.

Change-Id: I099206d7d35a88102c1834ea9015b85810a3f190
Reviewed-on: https://gerrit.libreoffice.org/33670
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 02:05:09 +00:00
Pranav Kant
4030795584 loleaflet: Make things simpler - use separate cell alignment commands
... instead of using HorizontalAlignment command with different
parameters to do a cell alignment. The state change events for
that would add further complexity here. Lets keep using separate
UNO commands for alignment.

Additonally, change a typo, 'alignblock' -> 'justifypara' when
hiding the toolbar buttons on 'doclayerinit' event - we don't
want to show justify alignment button for spreadsheets.

Change-Id: Iaf7406af9e3172b3fa9d41b3dac6d1e2677f0db8
2017-01-23 13:04:03 +05:30
Jan Holesovsky
fbf3249fce Debug console: Add a setting to disable going to inactive state.
Combined with the automatic typing, very useful for testing with many users
connected.

Change-Id: Ia3dd9ff59b81849a740d65e8e1ee8ce9918ce843
2017-01-20 13:18:45 +01:00
Jan Holesovsky
717e0fb4d4 Rename Close -> Close document.
Change-Id: I7e10e4e8f24f863483f9332719cdc1a00d766f25
2017-01-19 11:44:41 +01:00
Andras Timar
ee1b291a91 loleaflet: updated pot files
Change-Id: Ia19360f624ad9a6fc4aa2db459d95f107ce5261b
2017-01-19 11:02:26 +01:00
Andras Timar
f9beb022e6 loleaflet: l10n of RecalcPivotTable and ReplyToComment commands
Change-Id: Ic322e1559858e7338074d0f85761f272b47f5ce2
2017-01-19 11:00:06 +01:00
Marco Cecchetti
c466c77fe2 Loleaflet - Calc - Added context menu command RecalcPivotTable
Change-Id: Idc750b37dddfee3b8c451aa31a679e4869f5a6ee
Reviewed-on: https://gerrit.libreoffice.org/33272
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-01-18 15:26:44 +00:00
Andras Timar
7c111a4be2 loleaflet: update pot files
Change-Id: Ie81b9c7b4fb5f3d74f63c15d3b1e64661afc5b9f
2017-01-17 14:57:25 +01:00
Andras Timar
48b14a5240 loleaflet: grammar, '0 user' -> '0 users'
Change-Id: If2251c0dc302752820f7a6f70a4a81431a9fc6f2
2017-01-17 14:55:56 +01:00
Pranav Kant
962cc570cd loleaflet: More document space, use space reserved for scrollbars
Don't give extra pixels to scrollbars and reduce the document
area that is visible on the screen. Instead put these scrollbars
on top of the content and show them only when user hovers over
the scrollbar.

Change-Id: I7f7b34d0efde24bfad04324f5dfe3e3e35c752fc
2017-01-16 20:27:46 +05:30
Pranav Kant
f182c53a66 loleaflet: Override default evo-pop z-index
... so that these pop ups doesn't come over the inactive overlay.

Change-Id: I2e4ff68da7549e42283211ef4aed04d0efe7e6f5
2017-01-16 13:45:18 +05:30
Pranav Kant
84c73eccb2 Fix fontcolor, backcolor popup getting truncated
Open them from the right edge of the popup to the left and wrap
them inside wrappers to make it possible.

Change-Id: Ib97fe6a3e306c8cc8612304b53ec42607234d5a7
2017-01-16 13:45:18 +05:30
Pranav Kant
6901ad9251 tdf#103777: Fix inserttable popup truncates when no space on right
Easy solution is move the popup to open from its right edge
instead of the left.

This also overrides overflow: hidden from w2ui-toolbar class,
that doesn't seem to have any side-effect, hopefully there really
isn't.

Change-Id: Iab258cf7e3473b178aa9acdb746b51a5ca582b46
2017-01-16 13:45:06 +05:30
Pranav Kant
ebd5b377d7 Fix z-index of insertable popup
Reduce it to 1000, its sufficient and also allow inactive overlay
to come over the popup, not under it as was before this commit.

Change-Id: If078dc929027dfb938000c5a0135c83704da7d6f
2017-01-16 12:45:57 +05:30
Ashod Nakashian
6b3d2bd7ce wsd: notify the user when document loading fails
Also do not segfault in the event.

Change-Id: I80c4c5c0d1d5f1a4cde9a6a3458f69a3df9dc647
Reviewed-on: https://gerrit.libreoffice.org/33140
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-16 06:26:04 +00:00
Tomaž Vajngerl
724cac1d97 fix Chrome Android and Firefox Android text input
- Change from textarea to input (type="text") to prevent Firefox
to auto-capitalize.

- Clean the text input content after each word so that the soft
keyboard spellcheck suggestions are correct and that backspace
doesn't delete long IME suggestions before it has effect.

- Workaround on Chrome Android 'space' and applying spell-check
corrections.
2017-01-15 23:59:21 +01:00
Pranav Kant
35e904ecf9 loleaflet: Don't focus on map if search is going on
... and part is changed.

Change-Id: Icebcfc9924a6891787d08476ba37a0174ae9b67d
2017-01-13 20:33:45 +05:30
Pranav Kant
64835bec90 loleaflet: Allow search expansion as you type
Change-Id: I648721a0ed9e4d66db45956657398a4834ac45ce
2017-01-13 20:33:45 +05:30
Pranav Kant
582bfbeb7f Update path
Change-Id: Ic0654f64ee5ba9e4678cca42ceea4a5958a01c66
2017-01-13 20:33:45 +05:30
Pranav Kant
9a4aba717a loleaflet: Remove this hamburger <-> closebutton animation
Change-Id: I0c5a4ad2ee0b1d7041091d54c21f538c1a2912f8
2017-01-12 21:45:47 +05:30
Pranav Kant
456afb50bd loleaflet: Move closebutton to menu bar option in mobile mode
Change-Id: Ie6b9f507862e36ada44fda88acd96b1b495ae002
2017-01-12 21:38:13 +05:30
Pranav Kant
9b564af003 loleaflet: Set toolbar-up-more width to auto in low screen width
Change-Id: I10c41630da3a3003db1663bea211b42335f468c8
2017-01-12 21:38:13 +05:30
Pranav Kant
17e2d42e9e loleaflet: Remove useless rule
This seems to be superfluous. w2ui library automatically set the
width of the toolbar overriding this value always.

Change-Id: Ia87018533f99769ef1dc48463ac58d32cbf40d9d
2017-01-12 21:38:13 +05:30
Pranav Kant
21d3ef8c33 loleaflet: right padding for hamburger option menu
Change-Id: I1d946f537e66d637e82354ff3af80353a930d8eb
2017-01-12 21:38:09 +05:30
Pranav Kant
77b27255f1 loleaflet: No need of resizebreak now
... as we have a mobile mode now where we remove drop downs
anyways.

Change-Id: Ic08634d25d6a3ae272e50642f34d2124c0472bf5
2017-01-12 20:30:30 +05:30
Pranav Kant
54e2b237b6 Position row/col headers absolutely inside header frame
... so that its easy to move all of it when we switch from mobile
mode and vice versa.

Change-Id: If2db351aafc4a8fefa05bc88f73c0046a3f887b8
2017-01-12 19:41:04 +05:30
Pranav Kant
15ed828698 loleaflet: Put row column in a container
Change-Id: Ib271a690783c51d19e3fd6c1634620740051e3bc
2017-01-12 19:29:55 +05:30
Pranav Kant
c20ff7adda loleaflet: Collapse to a single row in mobile mode, more doc space
Change-Id: Ic6ad9dd78e8710497e33069cd7121f31f240f035
2017-01-12 19:29:55 +05:30
Pranav Kant
fb967d998b loleaflet: Use tab here, not space
otherwise our linting tool will shout.

Change-Id: Ia43b0a4bfc3a1d3406a89e9bb71b05f884cce2a2
2017-01-12 19:26:03 +05:30
Pranav Kant
8afcc582be loleaflet: Avoid a race condition
There was a race condition here between our toolbar doing its
stuff and loolwsd sending us websocket messages, noticeable on
slow networks.

Change-Id: I5ae174e94561dd427d22389e443c80b2a6be4ec4
2017-01-12 19:10:12 +05:30
Pranav Kant
fd619e969e loleaflet: Override fontsize in lo-menu class
We want to be consistent with our font in whole of the UI.

Change-Id: I102e66411e4fad8d2d49c1b113ac250807716a12
2017-01-12 17:07:07 +05:30
Tor Lillqvist
13fcb10f91 Do the oldhash thing for Impress documents, too
(Copy-pasta here, too.)

Change-Id: I0327889d05a8d7294499849cb0a2b2dcca60ecff
2017-01-12 13:14:55 +02:00
Tor Lillqvist
b35d708006 Bin superfluous semicolon
Change-Id: I2319ef9badfa50f645af3bedd2a589de61f6d2b3
2017-01-12 13:14:55 +02:00
Pranav Kant
fac3c3aafc loleaflet: Move this logic to updateCommandValues()
Change-Id: I64e96f87e56c1b14dd2085d552eebd40977cd7e9
2017-01-12 16:44:36 +05:30
Pranav Kant
1566ae634d loleaflet: Update dropdowns on refresh everytime
Change-Id: I39071f1c6249e6ecf71684d3b93cc88f1f859510
2017-01-12 16:37:31 +05:30
Pranav Kant
905b077243 loleaflet: Don't hide prev/next buttons for calc
Primary reason we are bringing it back is because in mobile mode
userlist icon goes to the right most edge of the screen which
leads to userlist popup not being shown (which seems to be the
bug in library we are using)

Change-Id: Ie5b93c41f54ffeeb8615f90fa0e71c74de5ed92c
2017-01-12 16:37:31 +05:30
Tor Lillqvist
e8f55142ef Do the oldhash thing for Calc documents, too
(Some serious copy-pasta here.)

Change-Id: Icb5a7b6783b75d67f00cfbdccbba8c402008ff99
2017-01-12 12:26:13 +02:00
Tor Lillqvist
6370143a4b Slight re-factoring: introduce getParameterValue() function
I started changing the cases for all the parameters to use similar
code as for the 'hash=' one: Check the parameter name with
startsWith() instead of fragile substring() function call where the
length parameter must match the length of a string literal that the
substring() result is compared to.

But then I got bored and gave up. It would be even better to not have
to tediously check for all defined parameter names, but instead just
parse each parameter using the same code that sets the property whose
name we found. Except that we have special cases where the parameter
name in the protocol doesn't match our coresponding property name, and
those that consist of a list of comma-separated values.

Maybe we indeed should just switch to JSON (or some binary
representation of JSON or somesuch).

Change-Id: Ibcdb26d7228b75f6f23c186f0b17cb46a12f3cec
2017-01-12 12:11:16 +02:00
Tor Lillqvist
23db565b5b Add Emacs mode lines
Change-Id: I208407f3017f71a4dfb2b86055a9bc639ee2f23c
2017-01-12 12:11:16 +02:00
Andras Timar
76d365651d Update translations from Pootle
Change-Id: I4e765cbf6793f2563230cd17d3d90ab4161d8ccd
2017-01-12 10:38:56 +01:00
Tor Lillqvist
bc19f90dd4 Don't send a tile that hasn't changed even if client asks for it
The server tells the client the hash of each tile it sends (calculated
from the contents of the tile, not its PNG encoding). When the client
asks for a tile to be refreshed, it tells the server what the hash of
the existing tile is. If the server notices that the tile contents
hasn't actually changed, it doesn't PNG encode it and doesn't send it
to the client.

The intent is that this will reduce load on the server and also avoid
unnecessary tile traffic.

Change-Id: Ia06ca68655ea984ed4319f24f4470afda322eccf
2017-01-11 23:25:21 +02:00
Tor Lillqvist
d12a0258d8 Add Emacs mode line
Change-Id: I5ba2b8d5bc3c8b9b75fd357224422079f7ec91f9
2017-01-11 23:25:21 +02:00
Pranav Kant
3233ccee4c loleaflet: Mobilify the statusbar
Reduce userlist text to now only show the number of users in
mobile mode instead of 'x users' string. Drop the 'Document
saved' string notification.

Change-Id: Ife20a5fcea01301601912c734dae6c3d6504c4f5
2017-01-11 20:14:26 +05:30
Pranav Kant
11ed522806 loleaflet: Mobilify for less than 768, not less than equal
Change-Id: I3c499e847674e57ba33859459ace794ff1b97c57
2017-01-11 18:34:46 +05:30
Pranav Kant
d6af42eae0 loleaflet: Remove items from statusbar in mobile mode
Change-Id: I8dbc356a2968764c72edf401d33399c92f9f73e4
2017-01-11 17:05:38 +05:30
Pranav Kant
aa7ef0337c Fix specificity and hide slide sorter for smaller screen width
Using !important always is not a good idea. You can't override an
!important with another !important and we have started to face
such situations now where we want to adjust element's alignment
based on media-screen width. Instead lets fix the specificity to
make this work.

.parts-preview-document or .spreadsheet-document would be
0-0-1-0. Use #document-container.parts-preview-document to
increase its specificity to 0-1-1-0 so that we can do without the
!important flag and use !important flag for media-screen blocks.

Change-Id: I1d15df492cdc7cd1cd09c3b43c8ea84295a07205
2017-01-11 17:05:38 +05:30
Pranav Kant
b34f5a38a2 loleaflet: Wrap slide sorter and related refactoring
Slide sorter and presentation toolbar are now contained in a
presentation-controls-wrapper and alignment values are now
factored out and only present in the container now.

Also, position the presentation-toolbar absolutely outside of
container so that slidesorter scrollbar doesn't go behind the
toolbar hindering some view of the slide thumbnails.

This would also make the job of hiding/showing the whole control
easier.

Change-Id: I080e854906ef0635aba02cfeb687bf87463ef756
2017-01-11 17:05:38 +05:30
Pranav Kant
90d48ee3c4 loleaflet: Fix close button alignment
Change-Id: I0a63229f37e0ea1c8e3c770afac0527890c328e1
2017-01-11 17:05:38 +05:30
Pranav Kant
b8fae54184 loleaflet: On touch devices, don't disable dragging
Change-Id: I722070a7768d89b7b861df4afc37f68098ca9321
2017-01-11 17:05:38 +05:30
Pranav Kant
e7101b6f93 loleaflet: No min-width, we want to mobilify
Change-Id: Ifa52f03683c32939369f0ab97e456f10b954ccf9
2017-01-11 17:05:38 +05:30
Pranav Kant
70bbe20f95 tdf#100329: responsive menubar floating on left
Change-Id: I6089ed44a7920a79de7e89f1b0d884c2881d4c7c
2017-01-11 17:05:35 +05:30
Pranav Kant
4becb5b7e9 Remove irrelevant toolbars
Change-Id: Ib8a8ea4fb597a5aaee802cb7ad04e893cd6eab75
2017-01-11 17:05:22 +05:30
Pranav Kant
bf7df9fa66 loleaflet: Get rid of all fixed position
Change-Id: I104882d995722c14ddefeecf579d1233f37371d6
2017-01-11 17:05:22 +05:30
Pranav Kant
fac33f7a2f loleaflet: Introduce div wrappers
Change-Id: I19ae5daaa11e810b23a1d12b81c510ce96527ac7
2017-01-11 17:05:22 +05:30
Pranav Kant
da11a1fd94 tdf#100329: Hide some toolbar buttons when screen width is low
Most of these can easily be accessed from the menu bar. Lets keep
only most commonly used and simple toolbar items here.

Change-Id: If9ad379c6491b907a980e0ef5b4a46a60266fafe
2017-01-11 17:05:17 +05:30
Pranav Kant
da36bfc520 loleaflet: New class lo-menu to override sm-simple theme
We can now directly use sm-simple.css from node_modules in its
pristine form and then use custom css rules to override to make
it look like LO menu bar instead of directly making changes in
sm-simple.css

Change-Id: I0773ca27fdf549d5c7df0bc781dfc019225d7cb6
2017-01-11 17:03:53 +05:30
Pranav Kant
d0e8d4544d loleaflet: Different css file for menubar
Change-Id: Ic7cf8445c52d3a87de0631d6317674d959d60cf4
2017-01-11 17:03:53 +05:30
Pranav Kant
e3e814fbf5 loleaflet: Set mobile mode if width < 768px
Change-Id: I4732208d354b574218185c2693fd92d8e071307a
2017-01-11 17:03:53 +05:30
Pranav Kant
3c1804e3b6 loleaflet: Add main-menu to main html rather than dynamically
Change-Id: I3f3a8709104ee0805f509f2c1b5eae2194c5de72
2017-01-11 17:03:53 +05:30
Tomaž Vajngerl
903dc8e458 Use svg instead of png icons - looks great on HiDPI screen 2017-01-10 12:44:20 +01:00
Ashod Nakashian
f41c4c6e83 loleaflet: on invalidation check the part before intersection
Shortcircuiting when the part doesn't match is
much faster than intersecting rects first.

Change-Id: I9038eb5cafd141e75e8b18a5308b30216e4c9653
Reviewed-on: https://gerrit.libreoffice.org/32918
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-10 05:40:10 +00:00
Andras Timar
fdb71825c4 loleaflet: use --duplicates=merge option of html2po
Change-Id: Id2bba4580910a7dd02c0a11302e4ae1dd2c15acb
2017-01-09 15:48:16 +01:00
Andras Timar
eea6a7c6d5 loleaflet: pot update
Change-Id: I99d88b563cb0254d472887ea2f93c5b16baa7217
2017-01-09 13:00:34 +01:00
Henry Castro
e1b7e53b3a tdf#103779: Help menu accessibility, part 3
Change shortcut to Ctrl + Shift + ?
2017-01-07 08:44:35 -04:00
Henry Castro
73cf6f71fb tdf#103779: Help menu accessibility, part 2
Add a keyboard shortcut ctrl + h to display the
Keyboard shortcuts help
2017-01-06 23:11:48 -04:00
Pranav Kant
22b676f088 loleaflet: Make id of these toolbar items consistent with others
We assume that id of the toolbar item is lowercase(unocommand),
so lets keep it consistent too for alignment buttons.

This also makes alignment buttons toggle except for spreadsheet
where alignment of cell text happens via a different uno command,
HorizontalAlignment.

Change-Id: Ibacf06bd99435cd24b27c7870173a2519b167af1
Reviewed-on: https://gerrit.libreoffice.org/32774
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-01-06 09:16:25 +00:00
Pranav Kant
5374b6c6ff loleaflet: Don't forward shift+insert/delete key events
This are converted to 'cut', 'paste' events which are
automatically handled by us using uno commands, so avoid
double-handling them.

Change-Id: If97e9f4efabbb929e7a5dd87c1228ee6a0df9e61
2017-01-05 13:17:07 +05:30
Pranav Kant
053f5b5d9f Unused variable
Change-Id: I1e8ba0dc8683193d7ce0680854cb43286fc0dd98
2017-01-05 13:14:42 +05:30
Pranav Kant
907b391f43 dist-hook and install-data-hook for loleaflet
Also tell automake to use tar-pax instead to allow bigger file
names (> 99).

Change-Id: I1d910a08684e780c958c7edc9852432705d51b18
2017-01-04 19:46:48 +05:30
Tor Lillqvist
8828e7ebb1 Bin dead code
Nothing adds any prefetch= parameter to a message anywhere any longer.
Presumably this went away in 5d6ab6e8dc.
Thus also the preFetch field is dead.

Change-Id: Ide586a702277e77c9b7bf37edd01def4aaf3ace1
2017-01-04 12:14:52 +02:00
Tor Lillqvist
6d276ef2c6 Fix misleading comment: There is nothing commented out here any more
Change-Id: I3450bce7f7ad2115719fb198b28062f57f4f6b81
2017-01-04 12:14:52 +02:00
Tor Lillqvist
04e2931583 Add Emacs mode line
Change-Id: I2ac8e460a5884c74e8ee3a90831f0268a4d7442a
2017-01-04 12:14:46 +02:00
Pranav Kant
fe1fe65e44 Include loleaflet files to source archive
Change-Id: Ia7583786fd5a709e56f3319fac25e554465ab3df
2017-01-04 14:20:27 +05:30
Andras Timar
233619333e loleaflet: Updated Slovenian translation
Change-Id: I07c0921d94323d520f644c183b56964625351918
2017-01-03 14:24:06 +01:00
Henry Castro
9c64db3ad1 tdf#103642 Page refresh causes unwanted error message 2016-12-28 13:44:49 -04:00
Henry Castro
1bede62b13 tdf#103779: Help menu accessibility 2016-12-22 13:43:43 -04:00
Pranav Kant
e35fe1c826 loleaflet: Focus on textarea after map activation
So that user does not have to click again into the document to
start typing.

Change-Id: Iaf1993a9a331ab86c668e718fae5f6a727c120cc
2016-12-22 15:58:40 +05:30
Henry Castro
65bfc63ace tdf#103775: Font color/Highlighting button issue 2016-12-21 19:52:12 -04:00
Henry Castro
9450f3938c tdf#103776: Hide/Deactivate "Document repair" button 2016-12-20 14:41:37 -04:00
Pranav Kant
fedfc75714 loleaflet: reset selection after search-not-found
Change-Id: If1c10cb10d1fce79a4697d5cc548dae781cfb2ec
2016-12-20 16:03:24 +05:30
Pranav Kant
794910e901 loleaflet: Disable bullet/numbering in calc
Change-Id: I7509fbf8cfb593fc23ace3ca02c71342d1112def
2016-12-20 15:56:42 +05:30
Pranav Kant
00b5ca590b loleaflet: Separator before 'wrap text' in calc
Change-Id: If1f4536dec24238ff1476e9e7d9ab58207d86495
2016-12-20 15:54:08 +05:30
Andras Timar
cf13700cac loleaflet: updated translations
Change-Id: I9b2fcba693c6c4b96e1eb0a1d98b48a80111c736
2016-12-19 21:05:53 +01:00
Andras Timar
fc637c740f loleaflet: new pots
Change-Id: If1bd7edaf0bf5e0d3225188ddfadbe482db5056e
2016-12-19 21:05:53 +01:00
Pranav Kant
5d69090b0b loleaflet: Fix remaining incorrect key name, insertannotation
Fallback from e2151b30b2

Change-Id: I26130bd75e26f2ae4f8fba864115d2b50f938f30
2016-12-19 18:10:20 +05:30
Henry Castro
416c4a5267 Revert "disable 'Insert Special Character' for Impress"
This reverts commit 0e786d14a0.
2016-12-16 23:40:21 -04:00
Pranav Kant
dd4a5278ad loleaflet: Fix cursor dissappearing during document load
Change-Id: I9e301d7d2b6e7d2626de91c242b7617fbc823572
2016-12-16 23:08:44 +05:30
Pranav Kant
d1a3d365b0 loleaflet: Cleanup & fix default numbering/bullet state
Automatically initialize formatButtons internal object to
preclude the possibility of one forgetting to enter the id of the
button in formatButtons object.

Fix 'id' of default numbering/bullet button after which it is
correctly showing the state now.

Change-Id: I57247e1b0e6d462153a47d31a883ceb04ecff74b
Reviewed-on: https://gerrit.libreoffice.org/32101
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-16 16:45:07 +00:00
Pranav Kant
e2151b30b2 loleaflet: Fix incorrect key name
It is insertannotation, not just annotation

Change-Id: I1bc01e87da963d0e07d670ffec261e33b45062d2
Reviewed-on: https://gerrit.libreoffice.org/32096
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-16 16:44:03 +00:00
Pranav Kant
56cb689a64 Handle enabled/disabled, true/false toolbar button states
If we get a true/false, assume its enabled.

Change-Id: I364c7cd611481757b674877ed44ac6ee0f6b0e58
Reviewed-on: https://gerrit.libreoffice.org/32089
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-16 15:08:02 +00:00
Pranav Kant
98036fd909 loleaflet: Don't move items to 'toolbar-more' after resizebreak
Change-Id: I9660e84f68cde2ab5eed6871d4f3948a736575b9
Reviewed-on: https://gerrit.libreoffice.org/32088
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-16 15:07:54 +00:00
Tor Lillqvist
ba765ddeba Fix accidentally pushed local debugging change, 1 instead of 10 min
Change-Id: I6b4fc6bff76d83442b17ee6ebf6c8fa718b80684
2016-12-15 15:04:19 +02:00
Andras Timar
73f2c278aa loleaflet: put link to git hashes beginning with 0 in About box
Change-Id: I3e981e72f69af45776f7ecccb10a0beda56f7c1f
2016-12-15 12:58:50 +01:00
Pranav Kant
73842dd307 Uncomment these console output statements
... as these are now printed only when compiled with
--enable-debug, so they shouldn't be polluting the release build.

Change-Id: I3169fb39cea298b001a4d576632a1634ff35e004
2016-12-15 16:55:09 +05:30
Pranav Kant
39dd5018e2 browser console logging depending on loleaflet_logging prop.
loleaflet_logging defaults to true with compiled with
--enable-debug otherwise false.

Browser will print additional debug info when this property is
set to true.

Change-Id: Id9fabf134bd8d19fa1a09ca8c0987df46d4f1a4c
2016-12-15 16:52:07 +05:30
Pranav Kant
6c4472de1d This code conditional to presentations only
Change-Id: If7caef1ec78e26960a4dd91edd3c798190d2fdc4
2016-12-15 16:12:30 +05:30
Pranav Kant
774a9a6e16 Remove devtools-detect as one of the dependencies
Usage of this module was removed in
2bbab9bf94

Change-Id: I7fdde32cdf52fa0d33859fc4cda58d4daed40254
2016-12-15 14:15:10 +05:30
Pranav Kant
1fa03a7c98 Lets avoid using global variable, map for consistency
Change-Id: I81157ea54ace6ff04d0730244f4ff8fdb893a3c3
2016-12-15 14:09:46 +05:30
Pranav Kant
1b690898f9 Clicking on content layer now also activates the map
Change-Id: Idd9343ab58e83ee1a710e82c649f2876c8b225bd
2016-12-15 13:42:45 +05:30
Tor Lillqvist
8b05044151 Add an Emacs mode line to the two JS files I edit most often
Change-Id: I4bcce4a859221aa9581df85945080178f90ae6ce
2016-12-14 18:24:38 +02:00
Tor Lillqvist
2bbab9bf94 Don't let whether the web console is open of not affect our behaviour
After all, why would you have the console open unless when debugging
(even just following console.log() output), so it is
counter-productive to have the code behave differently in that case.

Change-Id: I2aa7cf095e249a4c87f920aa0f1911be76a348ca
2016-12-14 18:24:38 +02:00
Tor Lillqvist
8f98206926 Grey-out ("dim") after 10 minutes if idle even while having focus
(The greying-out without focus happens, as before, already after 30
seconds.)

Factor out the dimming code to a separate function _dim. When we have
focus, check once a minute if ten minutes has passed without user
activity. Keep track of when last user activity happened.

There is a bug left: When greyed-out while having focus, you need to
click on the background layer, not in the layer with the 'Inactive
document ...' text, to wake it up.

Change-Id: I19160a82f5de860fc609dad391b168acfba560ce
2016-12-14 18:24:38 +02:00
Pranav Kant
632c57df08 loleaflet: Fix stray toolbar items in corner cases
Change-Id: I4d2684548a9fb325afb62d4811f17f436621027f
2016-12-14 21:40:12 +05:30
Pranav Kant
7ce89800cb loleaflet: Check if this element exists before querying length
eg: for spreadsheets

Change-Id: Ie40fa27833fa0edb0e444a247895a1cb401b15b2
2016-12-14 21:40:05 +05:30
Pranav Kant
6f212ee49d loleaflet: Fix L.Browser.pointer
window.PointerEvent is available even on non-touch devices in
chrome and Edge (and maybe others too, firefox doesn't have it).

So it results in L.Browser.pointer resulting in true on Chrome,
Edge while false in firefox which leads to click event not
working on these browsers.

Fallout from a0036f24ba

Change-Id: I73b5824882e1cc1f87cdfbc9e7e31f22320367b1
2016-12-14 21:09:56 +05:30
Pranav Kant
07df52e45a loleaflet: Refresh the toolbar
Change-Id: I16fed0dd508ce6d3863157d316ab17898b680df5
2016-12-14 19:32:00 +05:30
Pranav Kant
7c6d4719da loleaflet: Print dialog for MS edge too
MS Edge seems to be very problematic when one tries to load the
pdf blob into the print iframe and issue a print command to it.

Lets fallback to print prompt as we have in firefox

Change-Id: I97fc394d0053030231c524efb6bf808d32a9aa07
2016-12-14 19:06:26 +05:30
Pranav Kant
1bfbd6990c loleaflet: Reuse L.Browser instead of our own logic
Change-Id: I479d6aa3de657ba032e3bb7e5039d5744a859163
2016-12-14 19:06:12 +05:30
Pranav Kant
a0036f24ba Pick changes from upstream Leaflet
Only the changes made to src/core/Browser.js

Change-Id: I96f95e59a50fabea7dad1a8836e78aebac9112c8
2016-12-14 19:03:13 +05:30
Pranav Kant
7ed38a2011 loleaflet: Pass print frame as argument to close function
Removing this._printIframe may still cause leakage here as
this._printIframe is overwritten everytime user issues a print
command.

Change-Id: I06f45604940380b809bc262f07b9b6a8aa7d9a87
2016-12-14 18:18:11 +05:30
Pranav Kant
e255fe64d2 loleaflet: bump timeout for closing print iframe to 5 minutes
Change-Id: If58a28ef5c856b4ab5e497028fbcabf7b954b282
2016-12-14 18:18:11 +05:30
Pranav Kant
9d039cbd5a Revert "loleaflet: print dialog: it seems that this magic hack is no more needed"
This reverts commit 8c522c44d1.

We need to remove the iframe otherwise it will leak.
2016-12-14 18:18:11 +05:30
Andras Timar
9ee4062935 Bump version to 2.0.1+
Change-Id: I1a670d3b9a3a5d3711f1a83b2a8978e032ded774
2016-12-14 11:34:11 +01:00
Pranav Kant
a76825728e Pass Disable{Print,Export,Copy} options to client and handle them
Change-Id: I59a9432bbdd06d8b184f96882c5f4009fcd0be54
2016-12-13 17:59:02 +05:30
Pranav Kant
8135e678bb loleaflet: Use readable id= argument in downloadas
Change-Id: Ica9ba833f487f2c75f8629fd91f31b216c4797b5
2016-12-13 17:45:16 +05:30
Andras Timar
356374d96b loleaflet: typos 2016-12-12 16:20:36 +01:00
Pranav Kant
b3db321e85 Unify loleaflet's make with top level make
Top level make would now build loleaflet too if necessary.

Respect value of ENABLE_DEBUG and if present add debug-info to
generated js bundles too.

Add new rule, clean-local in loleaflet.

Change-Id: I3a9b727824f2877fc72719a8bfdeebed5448cb7d
2016-12-12 17:56:58 +05:30
Pranav Kant
5938962e0e loleaflet: build: Skip expensive 'npm install'
This always takes ~2 seconds irrespective of whether node_modules
needs updating or not. Lets add appropriate dependencies and save
these precious 2 seconds.

Change-Id: Ided4ff334316c16521e5ea7a69d15736a1cc170f
2016-12-12 16:08:15 +05:30
Pranav Kant
94153379f5 loleaflet: Unused variable
Change-Id: Ic08a04cd196084ce82524ded67445f5b1068b83d
2016-12-12 14:58:21 +05:30
Pranav Kant
6b795ae54d loleaflet: Remove troublesome extra argument to replace()
This errors out in firefox (in some versions).

Change-Id: I4c1d77249ec6883b70c961ffe8239157a0d6466c
2016-12-12 14:55:50 +05:30
Pranav Kant
fda2f26df4 loleaflet: Don't use w2ui directly from loleaflet
Use events, 'hidebusy', 'showbusy' to interact with toolbar.
In some cases, it may happen that w2ui usage in loleaflet happens
before browser loads w2ui.js (as it is in <script> tag after the
one which loads loleaflet).

Change-Id: I9b1b249ede72ed01f97cf31fd3f93780312530bc
2016-12-12 13:49:04 +05:30
Andras Timar
e73841b66c loleaflet: remove unused functions: toggleButton, disableButton 2016-12-09 16:01:40 +01:00
Pranav Kant
e845bdfbe5 loleaflet: build: Pass debug, minify variables as env. vars
Change-Id: I500b49f50901a72a93caa5cce1f50a2c2e3d0613
2016-12-09 20:08:58 +05:30
Pranav Kant
c4fe26e1db loleaflet: build: better log messages
Change-Id: I10c1cacebc542c6a1234603a264f2dbd5381c015
2016-12-09 20:06:45 +05:30
Pranav Kant
ab9d744fe5 loleaflet: Improved build process, don't build unnecessarily
No point in building things that are already built, create
different jake tasks, enclose whole of the build process in a
single jake task - 'build' which would call other various tasks
depending on whether they needs building.

Change-Id: I4b26834440ef638d697aa0793d2ced1e2c49784a
2016-12-09 18:10:55 +05:30
Pranav Kant
b940b34ab1 loleaflet-draw: Return early if no changes
Compression is most expensive in terms of time; if we detect
early that there are no changes between oldSrc and newSrc, lets
return early and skip the compression.

Change-Id: Id3d7c1d4bf89a33819907ff735e01629581627a3
2016-12-09 18:10:55 +05:30
László Németh
076e779649 loleaflet: fix footnote insertion
Ctrl-Alt-F (insert footnote) activated the Search bar (Ctrl-F), too.

Change-Id: I681156f703bc044417c9b47aad8b3ebce5f259f6
2016-12-08 23:32:26 +01:00
Pranav Kant
01d91642f1 loleaflet: Use same loleaflet font for color picker
Change-Id: I4e8235a913db81f3d270a23a95e1b3144de47d08
2016-12-08 22:15:15 +05:30
Pranav Kant
33ce6f38e4 loleaflet: Check boxes against checked items in context menu
Change-Id: I1a51fec67ba79dc2e82cccb54731bfabb9731470
2016-12-08 21:58:58 +05:30
Pranav Kant
cba45fce42 loleaflet: Improved search
Start searching as you type
Press enter to search forward
Shift + enter to search backwards
Esc to get back to editing

Change-Id: Id366069aea9eb0e96e8d73fa4b57f972b0ce78e5
2016-12-08 19:21:36 +05:30
Tor Lillqvist
e221388c79 Add an 'Idle time' column to the Admin console
Use a new protocol message, 'resetidle' to inform Admin clients
whenever a user has done anything in a document view. This is a
message that Admin clients need to subscribe to.

Also add the current idle time for each document to the 'documents'
message.

To reduce protocol chatter, the idle time is updated at most once per
10 s.

Change-Id: I418e82b05048a3628f21dcd240ccd974b3a01356
Reviewed-on: https://gerrit.libreoffice.org/31653
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-12-08 08:39:11 +00:00
László Németh
7bf2bec78f loleaflet: better user tooltip layout in Calc and Impress
Now it is similar to Writer user tooltip coloring.

Change-Id: I68ae24145a199957c506491d38ff50472abcf1bb
2016-12-08 00:40:58 +01:00
Pranav Kant
fbb26d0d13 loleaflet: Request higher pixel density tiles on retina display
Change-Id: I418f0db47239c915d8f12c07979306a814370b65
2016-12-07 21:01:14 +05:30
Pranav Kant
8ee3a8d6c2 loleaflet: Popup virtual keyboard only in editmode
Change-Id: I5e1e134e07f65bc52ff3c5f38879ad3b7097254c
2016-12-07 21:01:14 +05:30
Pranav Kant
5b06f7b916 loleaflet: Higher resoultion on retina displays
Change-Id: Ib2a031d2d1cb88fe7fede392cfc2332a73252bbb
2016-12-07 17:42:12 +05:30
Pranav Kant
322e00cab7 Ununsed option in TileLayer
Change-Id: Ida522fc8f92dd264e4544948394b9c7c11d993ab
2016-12-07 17:42:12 +05:30
Olivier Hallot
1a929bee71 Updated pt_BR translation
Change-Id: I287c8ed93991f9257245faf52c1204b60b285c14
2016-12-07 13:08:46 +01:00
Pranav Kant
d0558bae70 loleaflet: Don't prune tiles after every tile load
When the connection is slow and tiles are received after a good
amount of lag in between them, one tile load can prune tiles (of
earlier zoom level) for which we have not yet received the tile
response from the server - so there's nothing we have yet to
overlap these tiles completely, leading to grey-ish patches when zooming
in or out.

Pruning these tiles later ensures that we do not remove any tiles
of earlier zoom levels until all the tiles have been loaded.

Change-Id: Ibb03f0c6bf2031741f0b8a4584c1821539587e88
2016-12-07 16:16:40 +05:30
Tomaž Vajngerl
e3fe9afa9c don't scroll to the cursor position after focus lose/get
Change-Id: Id017c5ea8c162a71a8b4d8ec47a6d9deb7357fca
2016-12-06 15:35:30 +02:00
Pranav Kant
4c788c3014 loleaflet: Disable row/col header context menu in readonly/view
Also fix a js error trying to disable context menu before
row/column headers are created.

Change-Id: I6b04ce5c0fefa00567ce5fe58fdad9102d1f1651
2016-12-06 13:44:07 +05:30
Pranav Kant
5e4743a54c loleaflet: Missing semi-colon
Change-Id: I216dd1caa9bfba33b5538e149aeddfb7159ccbbd
2016-12-06 13:44:07 +05:30
Pranav Kant
33a6096175 loleaflet: Disable calc toolbar items in readonly/view mode
Change-Id: I2989de5f201eb7f52f5f47d98f9172c640e38fad
2016-12-05 22:04:06 +05:30
Tor Lillqvist
49c505f327 Display leading zero of minutes or seconds properly 2016-12-05 17:17:24 +02:00
Andras Timar
0e786d14a0 disable 'Insert Special Character' for Impress
Change-Id: I6c25d2eb68b0f757771a48bd3c732847d28caff7
Reviewed-on: https://gerrit.libreoffice.org/31628
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-12-05 12:17:23 +00:00
Pranav Kant
d4d4a11750 loleaflet: Disable zoom controls in spreadsheets, don't remove
Due to a bug in w2ui library, w2overlay doesn't popup when it is
near the edge of the screen (reproduceable only when no. of users
are greater than 3). Lets disable zoom controls in case of
spreadsheets so that userlist is not near the edge of the screen,
and hence pops up.

Change-Id: I6f2647d124484235afe6c92da18be38ed8e2b9ce
Reviewed-on: https://gerrit.libreoffice.org/31621
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-12-05 09:45:35 +00:00
Andras Timar
a5c1bdfc6c fix mangled calc toolbar
Change-Id: I59826d82d1096ad5b9383611421cd4fd81416a85
Reviewed-on: https://gerrit.libreoffice.org/31603
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-12-04 21:44:12 +00:00
Marco Cecchetti
729197c676 loleaflet - calc: row/col header unproperly highlighted
Change-Id: I7299dedf8d42e7f185c8977270c4fa8c0d14b820
Reviewed-on: https://gerrit.libreoffice.org/31581
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-12-03 13:32:04 +00:00
Pranav Kant
dde653f920 tdf#103825: Prompt the user when session is about to expire
Set a timer in loleaflet 15 minutes before access token expiry
date (access_token_ttl value) to prompt the user to save and
refresh the session.

Change-Id: I98c3e47c9b7031e29e002f653d488747b9c17df8
Reviewed-on: https://gerrit.libreoffice.org/31381
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-12-02 12:38:51 +00:00
Marco Cecchetti
1ee96c9d97 loleaflet - calc: bad handling of text cursor on lost/got focus
This patch fixes the following bug:

Create blank sheet:
enter "." ie. just a period into A1
enter a "." into A2
now switch virtual desktop away and back again.
hit enter in A2
now switch virtual desktop away and back again.

You should have a blinking edit cursor in A2 - but the focus in A3.

Change-Id: Icda0123f35ecda04559fec859b6bbe6ff3ac33e8
Reviewed-on: https://gerrit.libreoffice.org/31541
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-02 12:20:00 +00:00
Marco Cecchetti
79d18be88c loleaflet - calc: fixed one pixel horizontal auto-scrolling issue
This patch fixes two problems for spreadsheets:

- one pixel alignment offset btw grid and column header

- a one pixel horizontal auto-scrolling issue

Change-Id: Ifd6a3b47863d345656d0dcf3fba2d253c43ba9b1
Reviewed-on: https://gerrit.libreoffice.org/31542
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-02 12:08:06 +00:00
Marco Cecchetti
e7822bb452 loleaflet - calc: horizontal scrollbar not updated on doc width change
Change-Id: I268ab65d0bf7a6794028e23e51012c11534d6f2f
Reviewed-on: https://gerrit.libreoffice.org/31543
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-02 12:01:20 +00:00
László Németh
1f0cbf75ce loleaflet: patch l10n-for-node for older Chrome versions
Online didn't work in Chrome 39 (2014-11). Fixed in
the l10n-for-node shrinkwrap archive (see the patch file in it).
2016-12-02 09:29:34 +01:00
Henry Castro
09923cc10b loleaflet: remove invalid fonts
Change-Id: Ie0383d01f6040d00c630c0aab6b9a66666d079d3
2016-12-01 14:32:42 -04:00
Henry Castro
539e239242 loleaflet: limit Unicode character ranges
There are very big ranges, that's probably not common use for final users
2016-12-01 10:13:12 -04:00
Pranav Kant
15781a4655 loleaflet: Don't handle pageup/dn separately on 'keyup'
... as we handle it already during 'keydown' by sending keyboard
event to core which changes the slide for us.

Change-Id: Id61584ffa0ec5ff3aca098e3dcade664c306c6c3
Reviewed-on: https://gerrit.libreoffice.org/31475
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-01 11:17:37 +00:00
Pranav Kant
2c7f7e8b69 tdf#98484: Fix double-space in chrome when IME enabled
We regressed on chrome with
47699cd908 as 'textInput' event
clubbed with 'keypress' event started emitting double-spaces.

Tweak the hack to keep IME working on chrome while not regressing
when it is not enabled.

Change-Id: I0901724bf2db1794078fef3eb7283663b6f6a13b
Reviewed-on: https://gerrit.libreoffice.org/31469
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-12-01 10:45:24 +00:00
Andras Timar
740a28bfae Bump version to 2.0.0+ 2016-11-28 19:13:59 +01:00
Andras Timar
7a5fbd7f3c Bump version to 2.0.0 2016-11-28 19:10:27 +01:00
Ashod Nakashian
2b9ea3d4a6 loolwsd: notify clients before recycling wsd
Change-Id: Ib2733a6af1c27fe39c54f5c3bc6f5bd3acb72a2b
Reviewed-on: https://gerrit.libreoffice.org/31298
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 05:27:34 +00:00
Ashod Nakashian
c0f9ccee42 loleaflet: activate and dismiss dialogs only upon reconnection
Change-Id: I2d8b3d9788b7f66bc746537e34c90493a7cb408a
Reviewed-on: https://gerrit.libreoffice.org/31296
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 05:04:49 +00:00
Ashod Nakashian
2239f25684 Renamed 'shutdown' to 'shuttingdown'
Change-Id: Idae53a59af13eb54b1f18f1a8cd1dde06421b426
Reviewed-on: https://gerrit.libreoffice.org/31295
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 05:03:54 +00:00
Henry Castro
02095a3387 loleaflet: notify repair document when exists a conflict of multiple ..
.. users undo/redo
2016-11-27 23:39:58 -04:00
Henry Castro
2c2d460172 loleaflet: forgot remove console.log
only debugging purpose
2016-11-27 23:06:58 -04:00
Henry Castro
6947e914e1 loleaflet: re-work special character dialog to render all glyphs
.. on server side
2016-11-27 22:47:36 -04:00
Pranav Kant
d0929fb2f6 loleaflet: Popup keyboard on mobile devices
Change-Id: I4f0d1928633f5f0be4148fffd2c68c7aad1a0508
2016-11-25 16:57:06 +05:30
Pranav Kant
47699cd908 tdf#98484: Handle spaces in chrome when IME is enabled
When IME is enabled and user presses the space button, firefox
sends 'compositionend' event with data = ' '. However, chrome
instead fires 'textInput'
event. Lets listen for 'textInput' event too and treat it like
'compositionend' event when data = ' '.

Change-Id: Icbebdf2e89f608f790e6ce68c49f474364e7d5ab
2016-11-25 14:42:12 +05:30
Pranav Kant
e9dbfa3953 tdf#98484: IME support - handle full string in compositions
Parse the compositionend event's string, convert each into a char
code and pass them individually to server.

Change-Id: If79d538ccaebaa29749a5ca48a1f6ed5e0689ed5
2016-11-25 10:08:27 +05:30
Henry Castro
63e002d695 loleaflet: fix default image path 2016-11-24 23:24:31 -04:00
Henry Castro
8317cd46f1 loleaflet: scrollable special character dialog 2016-11-24 14:00:41 -04:00
Henry Castro
0ba3c23c87 loleaflet: do not allow empty option element 2016-11-24 10:19:54 -04:00
Andras Timar
c8fa6cb5b0 loleaflet: disable zoom for spreadsheet even on touchscreens 2016-11-24 15:12:14 +01:00
Pranav Kant
b8a21852b7 loleaflet: Display menu items always in a straight line
... even if the screen size is smaller than the menu size.

Change-Id: I93c579b7503ec98fadd62718ca8062ed7a564042
2016-11-24 16:51:24 +05:30
Pranav Kant
a149a0c2e1 tdf#103679: Don't always change document permission on error
Have a new event 'warn' which doesn't change the document
permission but just show the user dialog with some message.

Change-Id: I455168e4f7315acdcccfb31fc8c70b86bbc6caad
2016-11-23 18:01:21 +05:30
Pranav Kant
f8e0b8c11e tdf#103679: Handle storage diskfull & other PutFile errors
The new behavior is to warn the user when we try to save to
storage and set all the sessions of
the opened document to readonly, if storage server has no disk
space left. In case of WOPI, this is intimated by HTTP response code 413 -
request entity too large.

If save operation to storage failed due to reasons other than
413, just warn the user and let it continue editing the document.
We can add more reasons of failure and act accordingly in future.

Change-Id: I4b046fc38bbc0d752c89d90acb5991a958b76670
2016-11-23 18:01:21 +05:30
Andras Timar
a01ec99e90 loleaflet: updated pot file 2016-11-22 23:14:49 +01:00
Andras Timar
8b8b02e252 loleaflet: extract strings from Insert Character dialog 2016-11-22 23:12:14 +01:00
Henry Castro
1c1ecf20f6 loleaflet: add double click to insert the symbol 2016-11-21 22:43:21 -04:00
Henry Castro
5e143c813d loleaflet: process command values .uno:FontSubset 2016-11-21 22:13:46 -04:00
Tor Lillqvist
8fe58df759 An updated preview of a slide should be broadcast to all document clients
Amazingly, this (my third attempt) seems to work.

Add a boolean 'forAllClients' parameter to the loleafget getPreview()
function, and pass it as true in the location where a new preview of
an edited slide is requested.

Add a parameter 'broadcast' to the 'tile' (request) message. Set to
'yes' in the above case. When subscribing to a such tile rendering,
subscribe all sessions of the document.

While at it, drop the default values for the parameters of the
TileDesc constructor. I dislike default values...

Change-Id: Idb438f11c953d791fafe4c890e0497d8dfbaa733
Reviewed-on: https://gerrit.libreoffice.org/29591
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-11-21 07:07:18 +00:00
Ashod Nakashian
7f29a11bf3 loleaflet: don't show disconnection notice when inactive
Users aren't bothered with connection errors when inactive.
Instead, when they try to re-activate, the connection is
re-established, and only if that is not possible does
the user see the disconnection notice. Otherwise,
the connection is re-established semi-transparently
(the is a small "connecting" status shown at the bottom).

Change-Id: If4735cc1593c6e29c65d3c9686a8f2861365c583
Reviewed-on: https://gerrit.libreoffice.org/31026
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 15:52:28 +00:00
Pranav Kant
57790dd2b8 loleaflet: Let readonly/view modes change slides
Change-Id: Ia4eef3f20cd0cc33c76de1070e09c8d4c8a6c4c8
2016-11-20 14:57:15 +05:30
Pranav Kant
8f3b5bff4c loleaflet: Let readonly/view views change spreadsheet tabs too
Change-Id: If443a71a4e009657ec7d29582a96f4c23962cfe3
2016-11-20 14:53:22 +05:30
Pranav Kant
4e945eefdf loleaflet: Do not grey out for disabled context menus
Change-Id: Id3bf5db6054e5df9511c491452ef164faa3289f9
2016-11-20 14:51:49 +05:30
Pranav Kant
7312aaced7 loleaflet: More sane names
Change-Id: Idc47e84cd1242e61c98b9caa5eed28dd3d1912e4
2016-11-20 14:50:23 +05:30
Pranav Kant
61af82792f loleaflet: Rename to spreadsheet-tabs-container
Change-Id: I08d57e55e4963beefb2aa3d26b05da75a5fd0ba6
2016-11-20 14:41:32 +05:30
Pranav Kant
8a2c2ad91d loleaflet: Don't unnecessarily update map bounds
This leads to emission of 'docsize' event somewhere down the line
which leads inconsistencies while navigating the document.

Change-Id: Iffabac66153e7b32c9b2af041282ef82b813bef3
2016-11-20 14:15:12 +05:30
Ashod Nakashian
fe10c1d272 loleaflet: close open dialogs before showing close frame
Change-Id: I833ec51f47106dc42b7e9d2412f03256721b270d
Reviewed-on: https://gerrit.libreoffice.org/31005
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:27:09 +00:00
Ashod Nakashian
6b7219e25a loleaflet: notify the user when server intentionally closes connection
Change-Id: I82d855c1a50dca42e40d1123e42b0e02227f73d1
Reviewed-on: https://gerrit.libreoffice.org/31003
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:26:00 +00:00
Henry Castro
8876be85bc loleaflet: modify special character dialog 2016-11-19 17:17:25 -04:00
Henry Castro
b592fa923c loleaflet: add more constants for Unicode blocks 2016-11-19 17:17:25 -04:00
Henry Castro
647fe679e9 loleaflet: fix 0-based index 2016-11-19 17:17:24 -04:00
Pranav Kant
373e68d42c Set reconnection flag when reconnecting
'status' message can well be sent after document has already been
loaded. Eg: when the doc size is changed. We don't want this code
to execute in all such cases.

Change-Id: Ia69ab70edddda1a4e27618101eaff35bd0e5eb65
2016-11-18 17:20:19 +05:30
Pranav Kant
bad071760d Supercede a hack with a better solution + flush tiles on reconn.
This also introduced a regression where upon reconnection of the
document, tiles were not updated. This was because calling
setView leads to calling 'canceltiles' down the line which would
cancel the the 'tilecombine' request for fetching all tiles
leading to stale tiles in the UI

Change-Id: Ib0f583c92802195384ea10f328c0ba2eafc82ffd
2016-11-18 17:18:14 +05:30
Pranav Kant
8a1ac91fa6 loolwsd: Prevent double decoding
Change-Id: I5927e0113505ffcc167e16700db7c2f6408ed3b7
2016-11-17 17:22:09 +05:30
Henry Castro
30531f88f1 loleaflet: update new and last valid slide thumbnails 2016-11-16 10:50:43 -04:00
Pranav Kant
4d28338a10 More WOPI documentation
Change-Id: I0c04d2105ff6227f9f7b6eaa73a7efe6a94faecd
2016-11-16 19:56:33 +05:30
Andras Timar
a65f7d34d1 loleaflet: add missing ui-bg_highlight-soft_100_eeeeee_1x100.png to dist 2016-11-15 20:38:46 +01:00
Pranav Kant
26adebfcb0 tdf#103641: Fix save button visible for presentation
Additionally, change the variable name for presentation-toolbar
to avoid any future confusion.

Also, put the code hiding the save button in onRefresh event so that
save button doesn't show up in the UI as soon as we get the wopi
properties object from the server.

Change-Id: Ib168010c509f55a69aae9752e11321d319f59e99
2016-11-15 18:23:42 +05:30
Pranav Kant
d8a202bf1c tdf#103641: Split App_LoadedStatus - Frame_Ready, Document_Loaded
Post App_LoadingStatus with 'Status' field as Frame_Ready when
we are ready to show the UI.

Post Document_Loaded when document is completely loaded after
which loleaflet is ready to respond to more document specific
queries through post message API.

Change-Id: I60a4e9b75e115c748fcee8d449bc8c2d4ffa34a9
2016-11-15 18:23:40 +05:30
Andras Timar
d02f4bf753 loleaflet: Translation of Special Characters dialog from LibreOffice core 2016-11-15 10:27:45 +01:00
Andras Timar
cb21e68691 loleaflet: Translations of Unicode subsets from LibreOffice core 2016-11-15 10:03:58 +01:00
Henry Castro
c40b79df9e loleaflet: enable font character preview 2016-11-15 00:07:21 -04:00
Aleksander Machniak
fc3a059e75 Fix setting DontTerminateEdit/DontSaveIfUnmodified arguments in Action_Save postMessage
Change-Id: I61a2064104b1748571036891ff7696c1a1e6a3d2
Reviewed-on: https://gerrit.libreoffice.org/30842
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-11-14 18:08:58 +00:00
Pranav Kant
efe6863f17 loleaflet: 'Click to resume editing' label' when inactive doc
Change-Id: I9013158fc6f064dc76398aec044c5b4aa83aa9b7
2016-11-14 23:28:22 +05:30
Pranav Kant
7b332782da loleaflet: Mention sheet name in delete sheet confirm dialog
Change-Id: Ifac13c8fb2f4ec792f1e62541cb92b63edecad56
2016-11-14 20:38:33 +05:30
Pranav Kant
383e8a13a5 loleaflet: Focus after inserting or deleting a sheet
Change-Id: I2807cbeaa0fb5b7ec20002a3f5758ce47bb7d421
2016-11-14 20:38:33 +05:30
Andras Timar
b35ac4cbbf loleaflet: Control.Menubar.js indentation fixes 2016-11-14 14:23:22 +01:00
Andras Timar
40009af7aa loleaflet: add Insert - Special character... to menu 2016-11-14 11:41:03 +01:00
Andras Timar
0e5cf0e07f loleaflet: disable Insert Special Character button in view-only mode 2016-11-14 11:38:12 +01:00
Ashod Nakashian
da5ef9b5a2 loleaflet: add shutdown command to the admin settings
When we add more server controls (restart, f.e.)
we will need to move this to a separate page.

Also, we need to prompt the admin for reason,
which we can broadcast to all users when the server
goes down.

Change-Id: Ide92e58b5b64a5107b6556aef6b1a88191d5d21b
Reviewed-on: https://gerrit.libreoffice.org/30832
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-14 05:35:13 +00:00
Henry Castro
36474b21a6 loleaflet: add special character 2016-11-11 15:24:48 -04:00
Henry Castro
e6cdb7fa19 loleaflet: simplify remove all child elements 2016-11-11 14:05:15 -04:00
Henry Castro
1fde78d6cd loleaflet: move isVisible to Control class 2016-11-11 13:48:32 -04:00
Pranav Kant
25db37484c tdf#103697: Fix color value for spreadsheets and presentations
Change-Id: I89f871f829abd847321bee927b98e9a96e8babbb
2016-11-11 16:22:44 +05:30
Pranav Kant
d060b242e8 More documentation about post message API
Change-Id: I362e159c32d2ea93139be58ca647a2f4c5678dee
2016-11-10 22:37:38 +05:30
Pranav Kant
08a365302e loleaflet: Fix browser print
Accessing the parent iframe, atleast on my local box, where
parent frame and loleaflet frame have different origin, is not
allowed by browser security policy.

Change-Id: Ia3a356fa1d8a81f38bbc27d256471302be8b6729
2016-11-10 22:03:17 +05:30
Pranav Kant
e850ac836f tdf#103641: Another Post message API - Get_Export_Formats
Change-Id: I8a502d3c88c83cc7fb6c3113522ed637bf349a0e
2016-11-10 22:03:17 +05:30
Pranav Kant
5219baaab0 tdf#103641: WOPI: Implement Action_Save, Action_Print, Action_Export
WOPI hosts can now send above mentioned messages to loleaflet so
that loleaflet does stuff accordingly.

Change-Id: I50e10a62c5b629bd12f7d9ce51bcd13cb13cdd8a
2016-11-10 22:03:17 +05:30
Pranav Kant
9bfd5a512e loleaflet: Factor out save uno command
Change-Id: I155329f9dfa37cb47cbac34aa885b3d7a0cbb573
2016-11-10 22:03:17 +05:30
Pranav Kant
2168617d60 tdf#103641: Implement ability to hide save, print, export options
Add more WOPI extensions for this - HidePrintOption,
HideSaveOption, HideExportOption. Setting HideExportOption to
'true' in WOPI CheckFileInfo response would hide the 'Download
as' option from the File menu.

Change-Id: Ia2259ee9525cc6c4331a52e2221af4df188eab07
2016-11-10 22:03:17 +05:30
Pranav Kant
9c5928a87b tdf#103641: Convert 'wopi:' message to JSON formatted message
... to accomdate other WOPI properties easily in future.

Change-Id: Ic92364f06f4f16ebe8f9f128cd49087f6d72a4d1
2016-11-10 22:03:17 +05:30
Pranav Kant
7cacabad40 loleaflet: Give id to these menu items
So that it is easy to manipulate them in future by their
identifier.

Change-Id: I252aa448c26c23a00f0a3e717e1603b0d0277e67
2016-11-10 22:03:17 +05:30
Pranav Kant
df50c8fd34 loleaflet: Fix some silliness
Change-Id: I8977d2f3a569d2442c34248a9b86fec9761fb0e2
2016-11-10 22:03:17 +05:30
Pranav Kant
b0933b063e tdf#103640: Implement OwnerTermination; send application-level close frame
This implements a new feature 'OwnerTermination' for WOPI based
hosts. WOPI hosts now have to enable this feature by mentioning
'EnableOwnerTermination' as 'true' in their CheckFileInfo
response. If the OwnerId of the file matches that of the UserId
of the session, this session would be able to terminate all other
sessions currently editing the same document.

The reason for this kind of document termination is sent to all
sessions in a new application-level 'close:' message. This new message is
similar to the CLOSE frame of WebSocket protocol which doesn't
seem to work across all browsers as of now. Eg: Chrome -
https://bugs.chromium.org/p/chromium/issues/detail?id=426798
After receiving this 'close: ' message, loleaflet acts
accordingly and tells the WOPI host why the websocket was closed
via post message API.

Change-Id: I997aa2e7805157ed599a3946a877fd32477cee1b
2016-11-10 15:04:21 +05:30
Pranav Kant
7f77618f38 Document PostMessage API in reference.html
Change-Id: Ibdd3fc060a99f3b6185362fa3143014710873079
2016-11-10 14:45:20 +05:30
Pranav Kant
1a1792cdc1 loleaflet: Group map getters together
Change-Id: I576f78aaa215b6ba3aff6a5ce8498a3449080927
2016-11-10 14:45:20 +05:30
Pranav Kant
f1f5c4ed66 loleaflet: A more OO approach for WOPI post message API
Abstract all the WOPI related logic in a map handler which is
enabled only if map.options.wopi is set during map
initialization.

Change-Id: I54c5d6eecf33f88e4fd4d2b5ac9e8cf9dd001966
2016-11-10 14:45:17 +05:30
László Németh
8ef5c5fa36 loleaflet: hide debug control in disabled tile debug mode 2016-11-09 12:16:46 +01:00
Andras Timar
7f80400dea loleaflet: typo: No-with -> No-width 2016-11-09 00:28:27 +01:00
Andras Timar
937d8754b7 Updated Slovenian translation 2016-11-09 00:27:13 +01:00
Andras Timar
127b39d5b6 fix l10n of word count (thousand separator!) 2016-11-08 14:25:18 +01:00
Andras Timar
7b83a5f90b loleaflet: update pot file 2016-11-07 18:52:50 +01:00
Andras Timar
b4dd01a3c8 loleaflet: update uno command translations 2016-11-07 18:51:25 +01:00
Pranav Kant
5f9a9264e4 Fix menubar l10n, set String.locale before requiring loleaflet
Change-Id: Ic5a22f05d0a11bd0485d0c88dfa34dcc6bfe29cf
2016-11-07 17:59:42 +05:30
Pranav Kant
9f65377c42 getViewIdHexColor -> getViewIdColor
This doesn't return a hex value anymore, it returns a rgb
integer.

Change-Id: I2fc234d7ba09e7b750c63dd9cf93356d02707fce
2016-11-07 17:31:15 +05:30
Pranav Kant
216d1b6a52 Undefined variable
Change-Id: I0c5a07fa383523053ca7de319fcc9d1acdca63cd
2016-11-07 10:26:32 +05:30
Andras Timar
f96ef2c4f3 loleaflet: page orientation in Writer's Format menu 2016-11-03 19:40:27 +01:00
Michael Meeks
59d28fdeba Help->About can point to the log more helpfully than the commit. 2016-11-02 14:38:58 +00:00
Andras Timar
e7355553cc loleaflet: update translations from Pootle 2016-11-01 12:39:54 +01:00
Henry Castro
2c5cbe6555 loleaflet: row/column highlighting to reflect the cell cursor 2016-10-31 21:37:27 -04:00
Andras Timar
760c1e732a loleaflet: hide zoom controls for spreadsheets 2016-10-31 18:39:32 +01:00
Marco Cecchetti
8c522c44d1 loleaflet: print dialog: it seems that this magic hack is no more needed
Change-Id: I5dc3af5d8c70b381638f82de14ea47b1627237b9
2016-10-31 17:45:22 +01:00
Andras Timar
cbff583462 loleaflet: add link to git hash 2016-10-31 17:24:31 +01:00
Andras Timar
d589618bc1 disable zoom for Calc 2016-10-31 14:45:04 +01:00
Andras Timar
513d963b57 loleaflet: add Format - Page size to Writer menu 2016-10-31 13:27:02 +01:00
Ashod Nakashian
fb8d89589b loleaflet: fire addview and removeview events last
This fixes regression to the hackish fix done
in b26f2f2738 -
loleaflet: prevent the zoomlevel from changing on connect/disconnect

Change-Id: I09c899546d0d8bfbe4c274b0774fd30008cbcfa5
Reviewed-on: https://gerrit.libreoffice.org/30400
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-30 16:51:10 +00:00
Henry Castro
3c9eed3bb0 loleaflet: row/column highlighting to reflect the existing selection 2016-10-29 16:05:31 -04:00
Henry Castro
52793e8dd2 loleaflet: add Ctrl+F for Find 2016-10-29 10:42:40 -04:00
Marco Cecchetti
5e90ce91cf loleaflet: PgUp/PgDn fix: check doc type
Change-Id: Ib240e50a4f973a6ba83916e6b551dcdbb017a919
Reviewed-on: https://gerrit.libreoffice.org/30362
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-10-28 15:40:29 +00:00
Andras Timar
c96ef2d3af add Formatting marks to Insert menu of Writer 2016-10-28 12:40:40 +02:00
Andras Timar
453307a67c add left-to-right anf right-to-left commands to Writer Format menu 2016-10-28 12:22:36 +02:00
Andras Timar
ab0bd735e1 Writer Format menu 2016-10-28 11:44:04 +02:00
Andras Timar
36715b7a54 loleaflet: switch position of View and Insert menus 2016-10-28 11:44:04 +02:00
László Németh
443d0baea1 loleaflet: tile debug: add timestamps to the console log 2016-10-27 14:51:51 +02:00
Andras Timar
1496a08e78 too many connections/users -> jump to FAQ 2016-10-27 13:28:52 +02:00
Pranav Kant
e0e6a343da tdf#103450: Implement session management postmessage API
Change-Id: Id22759c5c103948078fb20943768a9ff6251dddf
2016-10-26 21:45:35 +05:30
Pranav Kant
56f6ee7a57 loleaflet: Store userid in map
Change-Id: Ia54516b52ace3f722ae27ee28b5a11897dedc479
2016-10-26 21:34:26 +05:30
Pranav Kant
4987df6547 tdf#103450: WOPI compliant message and new way to post message
Use map's WOPIPostMessage which takes care of bunch of things
according to WOPI

Change-Id: Id559179d684fd6243d3afa488d4cddc9eb92f4d6
2016-10-26 21:34:19 +05:30
Pranav Kant
cfcc6bdd94 tdf#103450: Implement WOPI initialization postmessage API
This includes support for Host_PostmessageReady and
App_LoadingStatus

Change-Id: Iaa0222dfa63c17b26a4fcb2236973bacdd61ee62
2016-10-26 21:34:11 +05:30
Andras Timar
f79546853f loleaflet: spelling noun vs. verb: checkout -> check out 2016-10-24 22:18:00 +02:00
Andras Timar
ae0b3a6cac loleaflet: add loleaflet-font class to Calc tab context menu 2016-10-24 20:54:55 +02:00
Andras Timar
67d21d682d loleaflet: typo: initalized -> initialized 2016-10-24 20:52:52 +02:00
Pranav Kant
d50d3f5b77 loleaflet: Fix missing comma, semi-colons etc
Change-Id: Ic47e6e44a83c43ff7aea840fb6b04d1ad7c4e4a2
2016-10-24 16:26:35 +05:30
Ashod Nakashian
b26f2f2738 loleaflet: prevent the zoomlevel from changing on connect/disconnect
When a client connects or disconnects ViewInfo message is sent.
The handler for this updates the number of users via addView
and removeView. Unfortunately when the toolbar control is
updated, it resets the zoomlevel to 100% (the initial value).

This is an ugly hack to change it back to the correct
value, since nothing really visually changes. It certainly
could be improved by only correcting the toolbar.

Change-Id: I37294da2d9d1bc84e8cb3b7f634aadcfd80d6497
Reviewed-on: https://gerrit.libreoffice.org/30218
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-24 04:19:29 +00:00
Andras Timar
a502371c27 loleaflet: updated uno command translations 2016-10-23 16:01:52 +02:00
Henry Castro
ea45bdb1f9 loleaflet: add hide/show row/column to header context menu 2016-10-23 08:44:04 -04:00
Pranav Kant
ba23ab2927 loleaflet: Expose some context menu item for comments
Change-Id: I242755c67f904ffbaaac63db24d735a9bfaa6bca
2016-10-21 23:34:49 +05:30
Andras Timar
2e12fade82 Updated Slovenian translation 2016-10-20 22:39:22 +02:00
László Németh
7f72553236 loleaflet: traffic log and automatic typing in tile debug mode
- show outgoing and incoming network messages with some
  highlighting in Javascript console (default in tile
  debug mode)

- add optional automatic typing

- add layer controls for overlays and automatic typing

- differentiate rectangle borders (newer is more opaque)

- fixes:

  - fix function call at cancelled tiles

  - hide all attribution control when disabling debug mode
2016-10-20 16:25:05 +02:00
Henry Castro
e189f60ad4 loleaflet: refocus map due drop down insert table 2016-10-20 09:31:27 -04:00
Pranav Kant
49f4e696e5 loleaflet: Click user item to go to its cursor
Change-Id: Iac87da20cfe422000eb9a32ccad50e8483637616
2016-10-20 17:22:36 +05:30
Pranav Kant
9f69359b33 loleaflet: Disable these toolbar buttons too, in readonly mode
Change-Id: I8bc661dd3cfd689c7c7ded367deacdba853153e4
2016-10-19 21:08:33 +05:30
Pranav Kant
1be2a78564 Handle WOPI's UserCanWrite to determine readonliness
permission= parameter in URL is still supported, but overridden
by UserCanWrite parameter.

Also, introduce a new protocol message, perm: which dictates
loleaflet about the permission rather than the other way around
(only in case of WOPI)

It is to be noted that by default loolwsd assumes very
restrictive permissions, so not providing UserCanWrite in WOPI
implementation by a WOPI host would lead to opening of only
readonly session.

Change-Id: I2013c1661fd491c79bb367a41e1a7036fa03f984
2016-10-19 20:47:20 +05:30
Andras Timar
1f2be91009 loleaflet: updated port files 2016-10-19 11:53:18 +02:00
Tor Lillqvist
bb36ca79d4 Attempt to handle unauthorized WOPI usage better
Use the previously unused UnauthorizedRequestException for this, and
throw a such in StorageBase::create() when the WOPI host doesn't match
any of those configured.

In a developer debug build, without access to any real WOPI
functionality, you can test by setting the FAKE_UNAUTHORIZED
environment variable and attempting to edit a plain local file:
URI. That will cause such an exception to be thrown in that function.

Catch that UnauthorizedRequestException in
ClientRequestHandler::handleGetRequest(), and send an 'error:
cmd=internal kind=unauthorized' message to the client. Handle that in
loleaflet in the same place where the 'error: cmd=internal
kild=diskfull' message is handled, and in the same fashion, giving up
on the document.

Actually, using exceptions for relatively non-exceptional situations
like this is lame and makes understanding the code harder, but that is
just my personal preference...

FIXME: By the time StorageBase::create() gets called we have already
sent three 'statusindicator:' messages ('find', 'connect', and
'ready') to the client. We should ideally do the checks we do in
StorageBase::create() much earlier.

Also consider that ClientRequestHandler::handleClientRequest() has
code that catches UnauthorizedRequestException and
BadRequestException, and tries to set the HTTP response in those
cases. I am not sure if that functionality has ever been exercised,
though. Currently, we upgrade the HTTP connection to WebSocket early,
and only after that we check whether the WOPI host is authorized
etc. By that time it is too late to return an HTTP response to the
user. If that even is what we ideally should do? If not, then we
probably should drop the code that constructs HTTP responses and
attempts to send them.

Also, if I, as a test, force an HTTPResponse::HTTP_BAD_REQUEST to be
sent before the HTTP connection is upgraded to WebSocket, loleaflet
throws up the generic "Well, this is embarrassing" dialog anyway. At
least in Firefox on Linux. (Instead of the browser showing some own
dialog, which I was half-expecting to happen.)
2016-10-17 19:34:04 +03:00
Tor Lillqvist
b29ae3c032 Sort lines for clarity 2016-10-17 19:34:04 +03:00
Marco Cecchetti
e61d8aaa5f loleaflet: handle EMPTY invalid tiles msg with part in the payload
Change-Id: I73e363f51101c8e4e258131ea1692a7709d6a544
Reviewed-on: https://gerrit.libreoffice.org/29964
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-10-17 10:39:41 +00:00
Henry Castro
1d40b1eb79 loleaflet: fix mouse over text that it changes re-size cursor 2016-10-14 14:46:46 -04:00
Marco Cecchetti
78e707393e loleaflet: handle EMPTY invalid tiles msg with part in the payload
Change-Id: I84ae55440b540dc027bddf341994d34d411f2a3a
Reviewed-on: https://gerrit.libreoffice.org/29826
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-10-14 13:26:16 +00:00
Henry Castro
9d89989b99 loleaflet: remove unused query string 2016-10-13 17:03:48 -04:00
Andras Timar
cb4fb86794 loleaflet: add Insert - Comment to Calc menu 2016-10-13 12:58:04 +02:00
Henry Castro
fbfd500a2e loleaflet: fix style names in Layout dropdown 2016-10-12 21:51:48 -04:00
Henry Castro
25dce7a30f loleaflet: column/row re-size cleanup 2016-10-12 17:30:52 -04:00
Henry Castro
5a2fe805db loleaflet: add localizable error message 2016-10-12 12:44:44 -04:00
László Németh
f910dcbf88 loleaflet: tile debug: show tile render count and cached tiles
- show total number of the rendered tiles of the document, also
  the difference between the previous number in the client

- show cached tiles in transparent yellow color (in debug build)

- send ping messages after every invalidation message instead of
  keypressing

- fix memory leak: remove unused leaflet rectangle overlays on the
  tiles
2016-10-11 17:43:25 +02:00
Andras Timar
7ecf78a18e update pot files 2016-10-11 12:13:23 +02:00
Henry Castro
03f912115a loleaflet: do not show internal errors
Internal error message, it was intended for debugging purposes,
so it is not necessary to show them to final users
2016-10-10 16:03:30 -04:00
Pranav Kant
a01d2fc91d loleaflet: Restore old coloring algorithm for non-text documents
.uno:TrackedChangeAuthors doesn't give correct colors for
documents other than writer, lets use our old algorithm for color
assignment for these documents.

Change-Id: If865788154a80da2637aad84183a0e947bb4b7e8
2016-10-10 18:00:38 +05:30
Pranav Kant
176367b408 loleaflet: Fix incorrect reference to username
Change-Id: Ibd6433c862eaf5f5fe57244180691ef8b08e3fbb
2016-10-10 17:14:54 +05:30
Pranav Kant
0ad39593d0 loleaflet: Use view colors directly from core
Change-Id: I2fdffd6dd0823a77ff52e40150a81db4b261ec81
2016-10-10 13:02:22 +05:30
pootlebot automatic
29ce548144 Pootle automatic update from libo_online 2016-10-09 17:03:25 +00:00
Henry Castro
7f514422c3 loleaflet: increase re-size cursor zone 2016-10-09 11:43:26 -04:00
jan Iversen
83848bfb29 update from pootle 2016-10-09 09:42:29 +02:00
Henry Castro
0f86fde3e0 loleaflet: add .uno:AutoSum 2016-10-06 14:37:06 -04:00
Marco Cecchetti
fd3aba3be7 loleaflet: page-up/down - visible area is not scrolled as on desktop
Change-Id: Id6a61e93cd195cf731237961c0694685b2d497b4
2016-10-06 17:53:47 +02:00
Tor Lillqvist
c99379d67f The 'invalidatepreview' event handling seems to be unimplemented
No need to fire it if nothing happens. Just confuses a reader of the
code.

I don't really understand JavsScript events etc, so if I have
misunderstood something, feel free to revert.
2016-10-06 15:43:41 +03:00
Andras Timar
fd1991a961 Revert "loleaflet: add 'Freeze panes' item to View menu of Calc"
This reverts commit 81f374a940.
2016-10-05 16:01:07 +02:00
Andras Timar
81f374a940 loleaflet: add 'Freeze panes' item to View menu of Calc 2016-10-05 13:21:53 +02:00
Andras Timar
b5f95c2aed loleaflet: add Insert Footnote, Endnote, Page and Column break to Writer menu 2016-10-04 11:21:10 +02:00
Pranav Kant
7e57ae5dce loleaflet: Don't add these layers in readonly mode
Change-Id: I17437f53921dc3d5036be4a9650213a7eb0895dd
2016-10-03 11:16:32 +05:30
Henry Castro
4074587a12 loleaflet: the cell view cursor displays user name 2016-10-02 16:46:30 -04:00
Henry Castro
97fa8e45f9 loleaflet: fix error message localization 2016-10-01 11:35:19 -04:00
Miklos Vajna
81a114c47d DocumentRepair: still show the absolute time as a tooltip
Change-Id: I64cbf519e53c2a2ad697deb9932fb7a32e702d25
2016-09-30 17:44:54 +02:00
Miklos Vajna
655915da05 leaflet: bundle timeago JS module
And start using it in DocumentRepair.

Change-Id: I8d2b8af4d2e0dcc7cf8082c9d7adbc633df1c387
2016-09-30 17:12:01 +02:00
Andras Timar
d22cdad721 loleaflet: enable l10n of Update/Delete TOC commands 2016-09-30 16:33:38 +02:00
Andras Timar
b4d3bfdcae expose Update TOC and Remove TOC context menu items in Writer 2016-09-30 15:36:29 +02:00
Miklos Vajna
3090981c8a Document repair: expose user names, not only view IDs
Also in leaflet replace the current user with "You" to be consistent
with the statusbar.

Change-Id: If2d76f078eeae3038f8ae17506ae7679f7b23023
2016-09-30 14:21:14 +02:00
Pranav Kant
ec88a53072 loleaflet: loleaflet-font for userlist items too
Change-Id: If2c96d9d70a84bac1e75816f07bb7da8ff2642f5
2016-09-30 15:49:24 +05:30
Pranav Kant
7b60a9e3f6 loleaflet: Show error message dialog on diskfull
Set the mode to viewonly after the error so that user can still
see the tiles downloaded from the server, but cannot interact
anymore before server administrator fixes the disk space.

Change-Id: If03f4fabe93458672a631c020d09dcebecbb955c
2016-09-30 15:22:12 +05:30
Pranav Kant
42fbfa936c loleaflet: Use 'error' event to open the alert dialog
Change-Id: I8f1ca3d896027755fe1291cb227ded102e57e112
2016-09-30 15:22:12 +05:30
Henry Castro
b4ba3c9c55 loleaflet: fix mege mistakes 2016-09-29 17:57:17 -04:00
Henry Castro
e766e82f3d loleaflet: fix undefined variables 2016-09-29 17:41:10 -04:00
Henry Castro
3fcde8be83 loleaflet: fix show dialog error
Conflicts:
	loleaflet/src/core/Socket.js
2016-09-29 17:38:48 -04:00
Pranav Kant
d5f8c5b2e6 Change main websocket url for consistency with other urls
From
/lool/ws/docurl
to
/lool/docurl/ws

The main purpose behind changing this and other related urls is
to help in load-balancing. The first two parts of the URL can now
be used in a hash-based load-balancing algorithm which decides which
slave gets to serve the requests. Requests such as insertfile,
downloadas need to end up in the same slave in which document was opened.
/lool/docurl/ i.e first two parts of the URL are constant for all
the requests that should be served by a single slave.

Change-Id: Ibc605ca1251957b8b32b376cf19b78f6178fadfa
2016-09-30 00:50:57 +05:30
Pranav Kant
085a07b3e2 loleaflet: Ignore view messages before 'viewinfo' message
Change-Id: If0f759976f13a76c54c068a18bab5e07818cb86e
2016-09-30 00:33:58 +05:30
Pranav Kant
8330341a8a Include docurl in document download requests
From
/lool/jailid/randomdir/filename
to
/lool/docurl/jailid/randomdir/filename

Change-Id: I4d58e733768c62f2951ecfdcfcb604d99772862d
2016-09-30 00:33:58 +05:30
Pranav Kant
187abe0018 loleaflet: Remove unused fields
Change-Id: Ide180430cb2d359fa089ded8061af764c4001bb2
2016-09-30 00:33:58 +05:30
Pranav Kant
8c61ee3c94 Change insertfile URI to include doc key in it
From
/lool/insertfile
to
/lool/<docUrl>/insertfile

Change-Id: I63864673bc1d92a737a95b484c2f440cb5ce6605
2016-09-30 00:33:58 +05:30
Pranav Kant
12dee85ef8 Serve all assets (l10n, images etc.) versioned
Rather than accessing them using '/dist/', access them using the
version (git hash) in the url.

Change-Id: I999bd99a13dbf92b26641e3bd5c9e0b7468bb654
2016-09-30 00:33:58 +05:30
Henry Castro
940e78162f loleaflet: remove map attribution 2016-09-28 10:00:35 -04:00
László Németh
0b454bccfc loleaflet: cleanup of tile debugging mode 2016-09-28 13:21:01 +02:00
Henry Castro
c3568a6a41 loleaflet: refactor L.Control.Attribution.js 2016-09-27 17:28:30 -04:00
László Németh
459b5e585c loleaflet: show latency and other data in tile debugging mode
- show best, average, worst, last times of
  - server ping round trip
  - times between key press and invalidation message
  - tile based and total tile update latencies

- show data of the last five invalidation:
  - tilecombine messages, if they exist
  - otherwise the invalidation message
  - border of the last five invalidation rectangles

- visual fixes:
  - more transparent red color for better text typing
  - small letters over tiles with transparent background
  - black attribution text instead of gray + bottomleft position
2016-09-27 20:49:13 +02:00
Pranav Kant
bd40df2c97 loleaflet: Update view cursors when zoom changes
Change-Id: I58c8e71379b11c334c7a3cdd2d0b767d5b9d023c
2016-09-27 07:59:00 +05:30
Pranav Kant
5891371dca loleaflet: Show usercolor in userlist
Change-Id: I6be05f36ffc4c00aa986b3873fce1bc5acc6fbf0
2016-09-25 23:36:51 +05:30
Henry Castro
23b2792053 loleaflet: improve cursor, hide view cursor if same position 2016-09-25 12:42:32 -04:00
Pranav Kant
e7c510a202 loleaflet: Store view id as int
Change-Id: I80a36311a66767d3caafb9bb94df6205309af02b
2016-09-23 17:07:41 +05:30
Pranav Kant
2579e1191c loolwsd: Prevent passing a nullptr to std::string()
Undefined behavior.

Change-Id: I2ddcb0a5cba1d593791ced62783d02e732162d17
2016-09-23 16:15:46 +05:30
László Németh
68d3693d97 loleaflet: extend tile debugging
- show invalidated rectangles with fading effect
- show last tilecombine message and cancelled tile count
- show received/requested tile updates
- fix popup handling
- custom popup style (transparent, big numbers)
- clean up
2016-09-23 12:25:00 +02:00
Pranav Kant
b6448a8864 loleaflet: Move loading spinner to toolbar-down when doc loaded
Change-Id: If3ae7801b8438da490f1ceba2e61824518bdc94d
2016-09-23 11:40:58 +05:30
Pranav Kant
c23b37f352 loleaflet: Better to have 'reconnected' signal here
Change-Id: I50c9484bb591d7192977fe49adb75f99d8ee1b08
2016-09-23 11:40:58 +05:30