Commit graph

80 commits

Author SHA1 Message Date
Pranav Kant
ffaf424103 loleaflet: Store state change handlers in new stateChangeHandler class
... instead of having this logic in our toolbar. All the elements like
menubar or toolbar can then use the map store to see the value of last
state change event for any particular uno command. We will be using it
when menubar starts using this store.

The frivolous logic in toolbar of reading the value of last uno command
should be removed. We don't expect loleaflet to change the permission
dynamically after loading the document anymore. But for now, just change
it accordingly and defer the task of removing it when we refactor
loleaflet codebase to trim our permission model (remove the 'view'
mode).

Change-Id: I1be54a62e96179b7db3f61470a92e3ddc745f52d
2017-05-03 21:21:22 +05:30
Marco Viscido
0bb650e7c4 keep expired document and query them to get the historical content
A Document has its own snapshots set.
A snapshot is a string representation of a JSON object.
AdminModel keeps also the expired document objects.
Query each document object in order to get their own history.
Admin accepts an "history" command then returns a json object.
An administrator checks the history by dashboard.

Change-Id: I73c87eff334cdb5a4a58043b2b66f18a56240b3a
Reviewed-on: https://gerrit.libreoffice.org/35926
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-04-19 04:08:38 +02:00
Henry Castro
44482615ca loleaflet: update PosAnimation.js file
Change-Id: I38a2643e67d1d341b486c987eb73dc5e5608a7cb
2017-04-12 17:24:48 -04:00
Henry Castro
bd911ff9d5 loleaflet: rework Impress annotations
LO Impress does not have an anchor position of the annotation object

Change-Id: Ifaa08bb3f62f442f3ee58242e835b6377901a592
2017-03-09 23:01:33 -04:00
Henry Castro
91666d7cd3 loleaflet: insert Calc comments 2017-02-25 18:18:24 -04:00
Henry Castro
174154093b loleaflet: add annotations 2017-02-05 20:24:18 -04:00
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
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
Henry Castro
36474b21a6 loleaflet: add special character 2016-11-11 15:24:48 -04:00
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
Henry Castro
44c3d5dfde loleaflet: add Path.Popup 2016-09-14 19:23:41 -04:00
Henry Castro
fa96352881 loleaflet: add L.Control.DocumentRepair 2016-08-28 08:57:27 -04:00
Henry Castro
23a71ac35b loleaflet: add L.Control.MetricInput 2016-08-21 16:08:40 -04:00
Pranav Kant
e86e7a73f8 loleaflet: performance improvements in build process
Minifiying the js code was taking too much time. Minifying is not
really needed on developer's machine, so lets disable it by
default, otherwise it gets annoying during development having to
wait for so many seconds for it to build.

A simple 'make' now means no debug-info and non-minified
bundle.js. To add debug-info(source-maps), do 'make DEBUG=true'.
And to minify, similarly use the MINIFY=true variable with make.

'make dist' forcefully minifies the js code.
2016-08-16 11:11:16 +05:30
Pranav Kant
461e1d5cb0 loleaflet: Externalize source-maps only if debug=true
Otherwise, running exorcist when debug is off gives a broken
bundle.js
2016-08-11 21:38:53 +05:30
Pranav Kant
a28203424d loleaflet: Separate source map files from the bundle 2016-08-11 16:29:08 +05:30
Pranav Kant
8c74346a6f loleaflet: colon -> comma 2016-08-11 16:20:27 +05:30
Pranav Kant
65b83c0409 loleaflet: Minify our js bundle 2016-08-11 15:55:49 +05:30
Pranav Kant
ebaecafdeb loleaflet: Add debug support to API based build process 2016-08-11 14:46:55 +05:30
Pranav Kant
1156a9534f loleaflet: build: Use API to bundle, instead of commands
This should give more fine-grained control as now we are sure
what version of browserify, or any other tool we are using to bundle
our assets. Installing browserify globally is also not required now.

This will also be helpful when we add more complicated transforms
and other tools to our build process, as otherwise it would keep
complicating our command used currently for the build process.
2016-08-11 14:36:47 +05:30
Pranav Kant
e09da0d764 loleaflet: Superfluous colon 2016-08-11 13:46:11 +05:30
Pranav Kant
f75de86c6d loleaflet: Modularize admin console scripts
Let the whole compiled admin bundle export a variable 'Admin' and
attach various classes to this global variable, similar to how we
have in Leaflet having a global L variable and other things
attached to this variable.
2016-08-09 20:18:59 +05:30
Henry Castro
77224486f2 loleaflet: add drag & drop Column/Row resize 2016-08-07 11:13:59 -04:00
Pranav Kant
0a7d6d7794 loleaflet: Remove unused files; bower config and publish scripts
This is only leaflet related, not needed in loleaflet.
2016-08-03 15:45:01 +05:30
Pranav Kant
2b5418a151 loleaflet: Typo; Colon -> comma operator 2016-08-03 15:45:01 +05:30
Andras Timar
4b72613447 loleaflet: bccu#1649 l10n of Admin Console 2016-05-31 23:31:16 +02:00
Pranav Kant
d9019a2e79 loleaflet: Reuse html canvas spinner for slideshows
Move the spinner initialization to a separate class L.LOUtil.
Other similar LO related functions should also go there.

Also remove superfluous class leaflet-slideshow-spinner. It was
not being used anyway due to wrong spelling.

Change-Id: Ie8fac0391a9c6a3771900539e8f08d1b73b9be28
2016-05-31 14:30:22 +05:30
Pranav Kant
2c3964be1d loleaflet: Setup infrastructure for top menubar
Change-Id: Ib48c2b3219b74da15bc2898044ad9b3c01f8a203
2016-05-23 13:27:48 +05:30
Jan Holesovsky
e3b0d00240 Kill the rest of document_simple_example.html + related controls.
[Those that are not used in the loleaflet.html.]
2016-05-19 00:43:51 +02:00
Jan Holesovsky
30f34cff39 document_simple_example: Kill Control.Presentation.js. 2016-05-19 00:43:50 +02:00
Jan Holesovsky
0f3cf72724 document_simple_example: Kill Control.Buttons.js.
We don't need the document_simple_example.html any more, remove the stuff that
is needed only for that.
2016-05-19 00:43:50 +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
Henry Castro
a1e3c30d6e loleaflet: bccu#1622, add a marker progress bar 2016-03-31 21:33:48 -04:00
Pranav Kant
32e24dcab3 loleaflet: Make style l10n work in new toolbar
Please note that this is just a workaround because there is no
consistent pattern between LO sending us programmatic, UI names.
During the initial command value event, we get programmatic names
from it. During the state change event, we get UI names for
Writer, but programmatic ones for others.

Change-Id: I7e69e1d437b22a34e54d2026b76e81951c4cc601
2016-03-25 18:24:11 +05:30
Pranav Kant
ee5ebb8489 loleaflet: Move admin console related files to dist/admin
Better to put all admin related content in a separate directory
rather than mixing it with other files in dist/

Change-Id: I328ff95cf23251ff91bb438c3b9be923ccc2017f
2016-03-22 00:05:29 +05:30
Tor Lillqvist
e41be7c0f4 Revert "loleaflet: Move admin console related files to dist/admin"
This reverts commit 3a09c992f7.
2016-03-21 16:52:52 +02:00
Pranav Kant
3a09c992f7 loleaflet: Move admin console related files to dist/admin
Better to put all admin related content in a separate directory
rather than mixing it with other files in dist/

Change-Id: I328ff95cf23251ff91bb438c3b9be923ccc2017f
2016-03-21 16:33:17 +02:00
Pranav Kant
8519a6a462 loleaflet: Support for memory subscription
Library for creating graphs: D3.js
License: BSD
Currently only being served by a CDN, not copied into the source
tree.

Change-Id: Ib99ec9011da489fc42799c3610612a8c3c8e5c2b
2016-03-13 19:40:52 +05:30
Pranav Kant
ee54f2abbb loleaflet: Split admin JS files into multiple
And then combine into one during build for distributing. We would
also want to minify the combined JS file but that is for later.

This come up rather early than anticipated, but good for us.

Change-Id: I74feb4955c5d47f0e9e817b410726ad219add485
2016-03-08 15:12:28 +05:30
Pranav Kant
cd58f2a491 loleaflet: Better design for Admin console JS files
Lets have a new websocket class for each websocket type we want
in admin console inheriting from single abstract base class.

This, hopefully, would provide us with extensibility and ease of
managing files in future. Right now, there is only one class with
very less complexity, hence all the code is in one file.
As the complexity increases, we would need to separate all these
classes in different files, concat and compress them before moving
to dist/

Also rename dashboard.html to admin.html

Change-Id: I34b9b2817fe4a0e6ee2913c017d2694a17ab978c
Reviewed-on: https://gerrit.libreoffice.org/22904
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-03-07 10:56:59 +00:00
Ozcan Esen
e78d65c199 loleaflet: add presentation controls
Change-Id: Ied2c8d0700d95ad628ad9634b1736839c90bd313
2015-12-22 14:58:18 +02:00
Mihai Varga
2d883a2dbe loleaflet: fixed indentation 2015-12-11 14:47:45 +02:00
Andras Timar
19c3187371 Revert "loleaflet: add column/row-header selection support"
This reverts commit db02f8795b.
2015-12-02 16:46:17 +01:00
Andrzej Hunt
db02f8795b loleaflet: add column/row-header selection support
(cherry picked from commit 264761ca18406b414080ccae31554b8ea1128dfd)
2015-12-02 16:23:10 +01:00
Mihai Varga
c1efc7c012 Formula bar for calc 2015-11-12 16:55:56 +02:00
Henry Castro
fd6d0c2b53 loleaflet: add ColumnHeader and RowHeader controls
Column and Row headers for spreadsheet documents, based
on html table tag
2015-11-08 12:29:58 -04:00
Andrzej Hunt
2879547c67 loleaflet: Implement DomEvent trplclick and qdrplclick support
Browsers only support single and double click, so we need
to do our own trplclick and qdrplclick synthesis.
2015-10-29 16:43:38 +01:00
Mihai Varga
f03459611a loleaflet: file insert control 2015-10-22 18:40:43 +03:00
Mihai Varga
6e8bd4fdf0 loleaflet: file insert handler
It sends a file to the server to the /insertfile endpoint,
once the file has been saved in the loolwsd choot, loolwsd is then
notified to insert it in the document

TODO: avoid the last roundtrip
2015-10-22 18:38:35 +03:00
Mihai Varga
84b7b128a0 loleaflet: fullscreen slideshow
We request svg exports for each slide which we then display in fulscreen
2015-10-16 14:07:45 +03:00