Text messages are already utf8 decoded, so we only need to decode
if its a binary message, not otherwise.
This also fixes context menu invocation on the UI as in some
cases double-decoding of utf8 strings would throw a URI malformed
error. This problem started to appear after we explicitly started
sending context menu payload as text message rather than binary
message in ecd33e1b07
L.Polygon can take array of latlng pairs. Lets pass the full
array instead of passing each array element one by one and
creating Polygon instances everytime.
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.
This command is intended to be used when re-activating a
client. It is intended to be sent prior to sending the
list of active views, including the re-activating
client's own view.
A client UI must maintain its own view ID and info
when receiving this command.
Change-Id: Iea58c01fb30af139888e746b5cf9e7ba7e7eeab1
Reviewed-on: https://gerrit.libreoffice.org/28132
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
The new commands help the UI update the cursors and other
visual elements that track views and clients.
Currently, when remview is received loleaflet removes
the associated cursor from the screen.
Change-Id: I03e2f9e3485166adae31de84ae7ac6bd1c85b05d
Reviewed-on: https://gerrit.libreoffice.org/28131
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
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.
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.
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.
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.
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.
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
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.
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.
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.
... 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
Saving this way, key sequences are forwarded to core directly, so
loolwsd is not aware if a save operation is going on or not. This
leads to problem as loolwsd might want to upload to storage.
Change-Id: I32d10012064a0dda7fff0c3ac4848f140b1b6fb8
Specified when websocket is initialized. Documents once
opened in readonly mode cannot edit throughout the life of the session.
This is very much like present view mode except the ability to
change to edit mode.
Change-Id: I176e3bbf210c3383268d1a5b50dc17f0cbfb26b8
In cp-5.1 branch, the state table cell reports the string "Sum=0"
for empty cells, the client side splits the string with a separator '=',
so the status item shows "Sum".
A bug was found: Slide was translated to Slide in pt_BR, while Slide was
translated to Diapositivo in pt. The identical translation was ignored,
and browser fell back to pt translation, which was wrong in pt_BR UI.
Assigning this._graphicMarker to visibleCursor leads to problems
as graphicMarker is not the same kind of object as visibleCursor.
Change-Id: Ic0aa1d7d2a8d11fa38a86e2c143342c9a16d507e
OnInsertFile is triggered on onchange event, but this event is
not triggered if same image is choosen again from file chooser
dialog. Reset the value everytime so that onchange event is
always triggered.
Change-Id: I1efb76122b3a9437622754d28d0c55d4adbf32e8
There is still one problem though, that if already opened
document is opened in a different browser window, it doesn't
receive any command states which shows enable/disable states of
menubar items incorrectly.
Change-Id: Ib03f1becfb6585fed075bb5f1bf9c587063323a6
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
... easy to differentiate on client side among various version
info parts, especially for LOKit version information.
Change-Id: I4ba18c60367fb9166462b535bc46953a82a8435d
This was removed in c7588f0e8c in
an effort to fix calc row/col offset where it must not be ignored to
have aligned row/col offset without any side-effects that one can
have in single-part documents like writer.
Earlier approach using a timer of 200 ms for 'scroll ignore' also
doesn't seem very effective, so change it to: ignoring the first
'whileScrolling' invocation.
Change-Id: Ic3a6868a279fc200b8f9fee74bb40aebad5d9646
Option 'updateOnContentResize' is true by default, which means
this method is called automatically when scroll container is
resized, so no need to manually call it again.
Change-Id: Ie80e90239752acb119e3a92c09a1f77dd61b2ad4
All post requests will now have to be prefixed with /lool/
This is necessary to ease proxy url redirection setup.
Change-Id: I04fbc211879722f6433cb9eb17786f394187a1b9
Reviewed-on: https://gerrit.libreoffice.org/26091
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Normal websocket connections are now :
/lool/ws/filename
Admin websocket is now :
/lool/adminws/
Change-Id: If39382cb852d89ed0394adbd7fe168fe4767a075
Reviewed-on: https://gerrit.libreoffice.org/26029
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
* Use new param DontCommit in .uno:EnterString to not trigger
recalculation until enter is pressed.
* On pressing 'ESC', reset the current content
* Range selection is now possible when formula is entered in
* formula bar
* Forward 'enter' key events to `map` from formula bar
Change-Id: I073eca2fa08520faa9f679b1c986e10805da0ad6
Apparently it does not work. In desktop version I cannot delete a table by
Select All + Cut, or Select All + Delete/Backspace key. Only Select All +
Delete Rows/Columns works...
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