Commit graph

56 commits

Author SHA1 Message Date
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
15ed828698 loleaflet: Put row column in a container
Change-Id: Ib271a690783c51d19e3fd6c1634620740051e3bc
2017-01-12 19:29:55 +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
70bbe20f95 tdf#100329: responsive menubar floating on left
Change-Id: I6089ed44a7920a79de7e89f1b0d884c2881d4c7c
2017-01-11 17:05:35 +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
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
3c1804e3b6 loleaflet: Add main-menu to main html rather than dynamically
Change-Id: I3f3a8709104ee0805f509f2c1b5eae2194c5de72
2017-01-11 17:03:53 +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
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
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
Henry Castro
940e78162f loleaflet: remove map attribution 2016-09-28 10:00:35 -04:00
Henry Castro
c3568a6a41 loleaflet: refactor L.Control.Attribution.js 2016-09-27 17:28:30 -04:00
Pranav Kant
a69eea3d58 loleaflet: Modularize all of the CSS; browersify-css
Follow the same approach to bundle everything into a single file
as done for the js files in previous commit.
2016-08-03 15:45:01 +05:30
Pranav Kant
5b6df600a7 loleaflet: Modularize all of the js; use browserify
Don't include each third party script in a separate <script> tag,
rather have one single main.js file require'ing these different
scripts. Then `browserify' on main.js which bundles everything
into a single bundle.js containing all of the dependencies.

Also add these 3rd party scripts such as jquery, jquery-ui,
select2 etc. using npm, rather than manually downloading their
files from the internet. This should ease the process of managing
these front-end dependencies; upgrade process should be very easy
now.
2016-08-03 15:45:01 +05:30
Ashod Nakashian
e685f6a306 loleaflet: disable grey-out when debug-tools is open
Change-Id: Id3d2502fc7a38303395e70b710adaeaf7fae92a6
Reviewed-on: https://gerrit.libreoffice.org/27451
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-23 02:57:49 +00:00
Pranav Kant
1265032896 loleaflet: Separate document URL from query params
Change-Id: I9b8381b8c0d92796aadabe0bc63e5a1b144f8b41
2016-07-11 11:24:19 +05:30
Pranav Kant
277c191eb0 loleaflet: Disable revision history option by default
Hosts are supposed to provide 'revisionhistory' parameter when
calling loleaflet.html

Change-Id: I6c1a89b602a739c0d30b7aeea680b4c577b37cc4
2016-06-29 19:44:31 +05:30
Pranav Kant
454999fa57 loleaflet: Resurrect loleaflet permission model for readonly mode
Remove direct usage of editlock; instead change loleaflet
permission from view to edit when editlock message is received.
By default, map would be in 'view' mode and only get to 'edit'
when server asks it to switch to.

Use a new event 'doclayerinit' for actions that are directly
dependent on intialization of doclayer.

Change-Id: Iaceb95ad85721ddcd675c75cfeb1504ab2759ad4
2016-06-27 16:50:13 +05:30
Andras Timar
80a81abc46 loleaflet: remove extra dist/ from URL 2016-06-22 23:38:06 +02:00
Pranav Kant
55ead88236 loleaflet: Kill simplemodal library
Its use has been superceded by vex now

Change-Id: I4b032dd6e5de61548b76b56e946ced6fc86734d3
2016-06-22 20:09:35 +05:30
Pranav Kant
a789cff8e8 loleaflet: Migrate about dialog to vex
Change-Id: Id853ec14d817b2f4312dee70a087a4ac526e951b
2016-06-22 20:09:32 +05:30
Pranav Kant
c632cf5716 loleaflet: Migrate keyboard-shortcuts dialog to vex
Change-Id: I82324405ee1205becea00fc1de97c248988ab378
2016-06-22 20:00:23 +05:30
Pranav Kant
8bba9da761 Make new version string as a JSON string
... easy to differentiate on client side among various version
info parts, especially for LOKit version information.

Change-Id: I4ba18c60367fb9166462b535bc46953a82a8435d
2016-06-21 22:12:48 +05:30
Pranav Kant
90aee41c70 loleaflet: Dialog to show loolwsd, lokit version information
Change-Id: Ie05f0597d3464b5e7705bd1d1ff4ab5c03af013f
2016-06-21 15:05:11 +05:30
Pranav Kant
7e1d3fe87e loleaflet: Consistency
Change-Id: I5962af5731199cf507da0eece0adc7b480f48ce0
2016-05-31 14:33:31 +05:30
Andras Timar
9c1ff7ef96 loleaflet: decide UI language early 2016-05-29 00:04:35 +02:00
Andras Timar
62abb2533d loleaflet: bccu#1854 add optional 'lang' parameter to loleaflet.html 2016-05-28 11:04:57 +02:00
Pranav Kant
3c077539a2 loleaflet: When no permission specified, switch to old 'edit'
After the introduction of editlock, old styled loleaflet's view
and edit permissions have become obsolete. By default, when
opening a new document, the user is in that old styled 'view'
mode unless specified in the url by permission=

Lets change the behavior and make document to be in 'edit' mode
by default unless specified.

Change-Id: Iebf0d8512ddc8f7ff549c12dbb366643ca207345
2016-05-24 17:16:52 +05:30
Andras Timar
ec6e626952 loleaflet: define l10n _() function earlier 2016-05-24 00:17:44 +02:00
Andras Timar
55c77c6deb loleaflet: enable l10n of two error messages 2016-05-23 22:32:56 +02:00
Pranav Kant
2c3964be1d loleaflet: Setup infrastructure for top menubar
Change-Id: Ib48c2b3219b74da15bc2898044ad9b3c01f8a203
2016-05-23 13:27:48 +05:30
Andras Timar
bd6ee3a8b6 loleaflet: initial l10n support of context menus 2016-05-20 18:13:44 +02:00
Pranav Kant
58c1714ee8 loleaflet: Setup context menu
But use a whitelist to not show items/uno commands that
correspond to opening a dialog. Whitelist is limited as of now,
but can be extended easily to include more commands to the
context menu as required.

Change-Id: I3ff8cf722d395aa643d512c98db41ebeee0a95d1
2016-05-16 14:37:51 +05:30
Pranav Kant
787bdc276f bccu#1758: Move presentation control below slide sorter
Change-Id: I0f1046f55f4bdc8af209138a51e74e1b637a5a34
2016-04-29 21:51:08 +05:30
Jan Holesovsky
97342a2817 bccu#1653: Make the .html's, .css's and .js's versioned.
It is still possible to access them directly via loleaflet/dist/<something>,
but such use can lead to unexpected behaviour due to various caching in the
browsers etc.
2016-04-20 12:58:10 +02:00
Jan Holesovsky
aa158331fc Move css stuff from loleaflet.htms to the appropriate .css files. 2016-04-19 10:23:06 +02:00
Jan Holesovsky
b09b6eab89 Only the access_token (and _ttl) is supposed to be passed via the form post. 2016-04-13 18:32:00 +02:00
Andras Timar
07b68b37a9 loleaflet: put everything we use to dist/ and package only dist/ 2016-04-13 16:55:46 +02:00
Andras Timar
3f0d5a7521 loleaflet: allow HTTP-only mode for testing/trial 2016-04-08 13:16:49 +02:00
Henry Castro
b6aeee816c loleaflet: restore default example title 2016-04-07 17:35:00 -04:00
Henry Castro
dd96c6a4de loolwsd: handle a POST request in loleaflet 2016-04-07 17:20:45 -04:00
Pranav Kant
2220c9d0d0 loleaflet: Rename filename -> title
Change-Id: Ic65b8e819979e35d684807371c76abca55bd5928
Reviewed-on: https://gerrit.libreoffice.org/23734
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-04-01 17:22:16 +00:00
Pranav Kant
fcc48022fa Allow leaflet to be served from loolwsd
Change-Id: I0179f07d83e9d640ab82ad2a866ef493fdf9e655
Reviewed-on: https://gerrit.libreoffice.org/23721
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-04-01 13:31:53 +00:00
Jan Holesovsky
9b54337568 loleaflet: Warn when somebody tries to use ws: for the websocket. 2016-03-29 14:47:09 +02:00
Andras Timar
abe330d390 loleaflet: ws:// -> wss:// 2016-03-23 22:02:50 +01:00
Pranav Kant
7f371958ae SSL everywhere
Use same port (9989) for all client connections. This includes
admin panel, static file serving and normal client websocket
connections.

Change-Id: Idcfd7dd8925523c36e884717c41a3b6a827f6ff3
2016-03-22 00:05:29 +05:30
Henry Castro
dc129d00cc loleaflet: add WOPISrc parameter 2016-03-16 08:58:07 -04:00
Ashod Nakashian
83880c454f loleaflet: removed unnecessary token parameter sent to WSD
Change-Id: Ibdef21665fcbf65c95870c8711321f63f7098596
Reviewed-on: https://gerrit.libreoffice.org/23050
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-09 02:32:19 +00:00
Jan Holesovsky
70a60dbadc loleaflet: Move the contextMenu to dist/. 2016-03-01 10:44:20 +01:00