Commit graph

1256 commits

Author SHA1 Message Date
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
Henry Castro
216ff61baf loleaflet: limit vertical/horizontal line movement 2016-08-10 17:05:45 -04:00
Henry Castro
d32f4e824b loleaflet: fix offset while moving vertical/horizontal line 2016-08-10 11:33:20 -04:00
Jan Iversen
ff1b071a8f pot file update, to help automate the pootle connection
Added more explanation in the README.
Corrected template -> templates
2016-08-10 10:36:57 +00:00
Henry Castro
a0499e4a65 loleaflet: fix vertical center text of row header 2016-08-09 15:50:35 -04:00
Henry Castro
5c75f31305 loleaflet: add Vertical/Horizontal line when dragging Column/Row 2016-08-09 15:15:54 -04:00
Pranav Kant
bdc4b61ba7 loleaflet: Remove irrelevant inherited files from upstream Leflet 2016-08-09 20:36:03 +05:30
Pranav Kant
9b9e5199e0 loleaflet: Update README 2016-08-09 20:28:10 +05:30
Pranav Kant
2b7bd99fcd loleaflet: Update package.json 2016-08-09 20:23:24 +05:30
Pranav Kant
5f44c55011 loleaflet: npm-sify d3.js
Don't use external CDN for this library, rather 'require()' it
from our local npm modules.
2016-08-09 20:18:59 +05:30
Pranav Kant
6c69b63be5 loleaflet: Browserify admin, more modularization, npm-isation
Use browserify for admin console scripts too.

Modularize needed files such as l10n strings for console.

Use npm for managing bootstrap as dependency of admin console.
2016-08-09 20:18:59 +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
Jan Iversen
7839aecac6 Changed Makefile and po directory, to prepare for automatic pootle commit
Changed "make pot" to deliver files in po/template, so the .pot files
are committed as well as the resulting .po files.

Added a README to explain, that styles is not part of translation.
2016-08-09 07:18:09 +00:00
Pranav Kant
3761e5e9c2 loleaflet: Debug mode bundle.js with source maps 2016-08-08 11:15:10 +05:30
Ashod Nakashian
045f0b6388 loleaflet: npm requirement and upgrade instructions added
Change-Id: Id769931cfef8c6c1cc291b12ed399484f6b19f97
Reviewed-on: https://gerrit.libreoffice.org/27972
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-08 03:54:06 +00:00
Pranav Kant
3fdd2cb151 loleaflet: Handle 'viewcursorvisible' message 2016-08-07 21:39:54 +05:30
Pranav Kant
d307315f75 loleaflet: Ignore irrelevant view messages coming from server
View callbacks with viewid = 0 seems strange; it always lurks
around but is never attached to any view.

Also, view callbacks with viewid = our own viewid should not be
sent from the server, lets ignore them for now.
2016-08-07 21:39:54 +05:30
Pranav Kant
6ff4cd69f0 loleaflet: Handle 'invalidateviewcursor' and show colored cursors
... for different views based on view ids received from the
server.
2016-08-07 21:39:54 +05:30
Pranav Kant
0284235da1 loleaflet: Support for non-blinking colored cursors 2016-08-07 21:39:54 +05:30
Pranav Kant
726b213dcf loleaflet: Add viewId to color mapping; using colordata.hxx 2016-08-07 21:39:54 +05:30
Pranav Kant
8dd2987871 loleaflet: Store viewId of the view received in 'status:' command 2016-08-07 21:39:54 +05:30
Pranav Kant
d144d4ac47 loleaflet: Separate blinking-cursor property from cursor
... so that it is possibe to make cursor non-blinking whenever we
want. This will be used in subsequent commits for view cursors.
2016-08-07 21:39:54 +05:30
Henry Castro
77224486f2 loleaflet: add drag & drop Column/Row resize 2016-08-07 11:13:59 -04:00
Henry Castro
3336af0804 loleaflet: add Column/Row cursor resize 2016-08-04 16:52:00 -04:00
Jan Holesovsky
d60a8848d2 Pull translations from Pootle.
(cherry picked from commit ed0861c9c00a20dd4f9c35725860a409f2e52a92)
2016-08-04 10:34:18 +02:00
Jan Holesovsky
3b3c8760c2 We are using large icons from the Breeze theme, update the Calc toolbar. 2016-08-04 10:03:16 +02:00
Jan Holesovsky
b7619f93d5 Remove unused images: we don't use small images any more.
It was a bad idea keeping them around, apparently they are confusing people...
2016-08-04 10:03:07 +02:00
Pranav Kant
1350ac3ee9 loleaflet: Expose more global variables
'title' is accessed by loleaflet, so need to expose this too.
2016-08-03 18:27:23 +05:30
Pranav Kant
b99d51616c loleaflet: Update README for updating dependencies 2016-08-03 15:45:01 +05:30
Pranav Kant
5014cb8cc2 loleaflet: Bump jquery-contextmenu to 2.2.3
With current version, position of context menu is not set at
specified position. 2.2.3 fixes the issue.

Also udpate tarballs in node_shrinkwrap and dep. tree in
npm-shrinkwrap.json
2016-08-03 15:45:01 +05:30
Pranav Kant
484c664445 loleaflet: Shrinkwrap and shrinkpack; local dependencies tarballs
Using npm-shrinkwrap, we are locking in our dependency tree
completely, leaving no scope of being affected by any
regression in any of the dependencies. In other words, all of the
dependency tree is dumped in npm-shrinkwrap.json file.

Using shrinkpack, we are also committing these tarballs of
dependencies in node_shrinkwrap/, so that, we are not
depending on npm registry at all during our build process. Since these
are just tarballs, its also better space-wise than committing
node_modules/ per se.

Developers when want to update any dependency should bump the
version in package.json, and also commit the new copy of
tarballs in node_shrinkwrap/.

See: https://github.com/JamieMason/shrinkpack for more info.
2016-08-03 15:45:01 +05:30
Pranav Kant
ebacc6624a loleaflet: Bump jquery version to 2.2.4
Mainly because one of the dependency depends on it, so why have
two different versions of jquery in our dep tree.
2016-08-03 15:45:01 +05:30
Pranav Kant
38d574476b loleaflet: Remove unused dependencies
Commented out devDependencies; these are required for testing framework
inherited from upstream leaflet, but we do not have such tests as of
now for loleaflet.

Move them to devDependencies when need arises.
2016-08-03 15:45:01 +05:30
Pranav Kant
9ebb23aa77 loleaflet: Ununsed dependency
Can't find it being used anywhere.
2016-08-03 15:45:01 +05:30
Pranav Kant
51590125de loleaflet: Bump select2 version
We need https://github.com/select2/select2/issues/3287 which is
fixed in 4.0.1
2016-08-03 15:45:01 +05:30
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
d85127eda3 loleaflet: These are not needed now as we browserify
... and use them from node_modules/ directly now.
2016-08-03 15:45:01 +05:30
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
Pranav Kant
1410f34d0f loleaflet: Consistency, start url with /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
Pranav Kant
7f84b2eb4c loleaflet: Update license field
specifying the type and URL is deprecated:

https://docs.npmjs.com/files/package.json#license
http://npm1k.org/

(inspired from 6a6d833a2f407bad37587f5e30bf56fb539e7f8d in
upstream Leaflet)
2016-08-03 15:45:01 +05:30
Pranav Kant
efbd0a4940 loleaflet: Fix incorrect info in README 2016-08-03 15:45:01 +05:30
Ashod Nakashian
b04f29b679 loleaflet: dim the UI after 30 seconds of losing focus
Change-Id: I28239eb92e758b45d10e260c7a8f616062b22839
Reviewed-on: https://gerrit.libreoffice.org/27681
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-29 11:59:56 +00:00
Pranav Kant
b8ef017610 Move JWT auth to inside websocket to prevent CSRF
... instead of setting a httpOnly cookie for admin websocket
endpoint which can be CSRFed.

With this, we remove the httpOnly tag on jwt cookie so that
scripts in admin html pages can access the jwt cookie and
authenticates after opening websocket endpoint. Until
authenticated using 'auth authToken' command, admin will not
respond to any admin command.

Also, adapt admin test these changes
2016-07-29 12:03:14 +05:30
Henry Castro
7f5eed80a0 loleaflet: remove styles toolbar from spreadsheets 2016-07-24 10:55:51 -04:00
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
Henry Castro
fa02df7ad3 loleaflet: avoid Uncaught TypeError: Cannot read property
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
2016-07-22 20:39:29 -04:00
Pranav Kant
6457d779da loleaflet: admin console: Refactor and fix potential XSS
Use jquery instead of plain html methods.

Change-Id: I6f70ef81ca7f021f8b42a1e4faea055ef1f15e37
2016-07-19 15:54:42 +05:30