Commit graph

53 commits

Author SHA1 Message Date
Dennis Francis
688ea1d4ea browser: convert createRectangle() to typescript
The logic is simplified by not having to maintain redundant states for
x2, y2, area and rounded versions of all variables. Here they are
automatically calculated by using getters.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I0125c74d06bceaa69896029ce85c6437ffd3d0dc
2023-01-18 16:45:02 +05:30
Dennis Francis
b6a107291a browser: convert group controls to TS
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Iab63fbee8480c40a29635985e97764c1f62fc561
2023-01-18 16:45:02 +05:30
Dennis Francis
a0932fd840 browser: avoid duplication of check command
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I9a31f5abb20ce230925205501b7f1e67b53cb328
2023-01-18 16:45:02 +05:30
Tor Lillqvist
366b94a5fb Limit line length in uglified bundle.js file
Helps in the hopefully rare cases where you need to see what code some
error message points to. Otherwise bundle.js will have extremely long
lines, and many editors have a hard time with such. (For example: Line
1, column 2949562.)

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I229814e985348e94c8cda2d88b77ad1ea4b74ae7
2023-01-18 02:19:26 +02:00
Tor Lillqvist
b248787bfa We do want to temporarily use the idea that a "WASM app" is a separate thing
Only once we have that working will we go back to having a COOL client
that on the fly can switch from a normal COOL server to using local
online and core code in WASM.

Note that the --with-wasm-fallback configure option now then
temporarily is a no-op, and the ENABLE_WASM_FALLBACK Automake
conditional and WASM_BUILDDIR Autoconf macro are not used anywhere.

Once we have something that barely works as a proof of concept, we can
go back to working towards what we really want.

(Yeah, yeah, I know that "temporary" solutions have a tendency to
become more permanent than you expect...)

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I2f01acd418686e672fd9d2e12cbbd688b128dfa5
2023-01-15 19:46:37 +01:00
Tor Lillqvist
ee157c0810 Clean up WASM-related stuff in configury and the cool HTML page
There is no "Emscripten app", but a COOL client that additionally can
fall back to using in-client WASM code instead of a COOL server.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I86517c6a8f6e0397f6c466278c7be19db001e6d8
2023-01-15 19:46:37 +01:00
Tor Lillqvist
8cc1c1baa5 Preparations for a "WASM app"
The WASM C++ bits (in wasm/wasmapp.cpp) will have to export functions
hande_cool_message(), handle_error_message(), and
handle_debug_message() to receive the calls from JS.

Change-Id: Ic7f2cffdeb4408a9f726ad70a8ceb8db372787dd
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2023-01-11 09:27:36 +02:00
Szymon Kłos
e98e530b66 jsdialog: extract TreeView widget file
This starts cleanup in JSDialogs, we will move
widgets to separate files for easier maintaining.
In the future we will be able to convert single files
to TypeScript

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4ca26bd51f895476a17ba1d54d9cdb684e8c8e2b
2022-12-14 17:31:38 +01:00
Andras Timar
0f40ddbf8b Fix syntax error in Makefile.am
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I7b72a46379833ca8eba21e4ba39ea0271017f216
2022-12-01 21:10:37 +01:00
Pranam Lashkari
2cfae369af initial zotero skeleton
add zotero UI only if user is logged in
when zotero citation edit button is clicked,
fetch the library with zotero API.
Let user select what to insert

at this stage its not a complete solution but just first stage

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Id67d8409bcd6416994713acd9ace495b24823fb0
2022-11-30 20:37:48 +01:00
Szymon Kłos
07c3538589 mobile-wizard: create separate window container
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I8317cb7ec9ae31de07c3f2dd4a691afafce9073d
2022-11-25 17:30:39 +01:00
Henry Castro
38764966dc browser: add fzstd lib
usage

	var decompressed = fzstd.decompress(compressed);
	// Second argument is optional: custom output buffer
	var outBuf = new Uint8Array(100000);

	// IMPORTANT: fzstd will assume the buffer is sufficiently sized, so it
	// will yield corrupt data if the buffer is too small. It is highly
	// recommended to only specify this if you know the maximum output size.
	window.fzstd.decompress(compressed, outBuf);

Change-Id: I0b378f9395b2442bac9f0790f7633e6a6cb0402e
Signed-off-by: Henry Castro <hcastro@collabora.com>
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-11-02 12:09:53 +01:00
Dennis Francis
08f4872e90 remember scroll position on switching tabs
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I7e540f08d2d493e449a41c07fe054207bb79f4ac
2022-10-14 11:55:39 +03:00
Andras Timar
f66871cf18 Enable l10n of browser/src/map/handler/Map.Feedback.js
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Iceebef11d522be1a964be35dbd6484ed44b699d4
2022-10-07 17:08:00 +02:00
Rash419
d13d430b58 writer: introducing new mention feature
now you can insert a mention just by starting to type with @
integrator needs to implement UI_Mention postmessage api endpoint on which
online will send request of initial character what user is typing on the basis of
that integrator should send the list of user using Action_Mention postmessage api call
object where each object contains { username: '<username>', profile: '<username profile link> }
for example you can check framed.doc.html

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I38387cd05f1654b0bdb2b4f31cbac633eece5722
2022-09-27 14:43:16 +05:30
Andras Timar
cf6e22c22c Fix typos in comments
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I813f652b516c79f350b46317e589b91e0ef39a1a
2022-08-23 18:37:44 +02:00
Pedro Pinto Silva
a864d41c09 Revert "Add color-scheme-dark.css support"
This reverts commit 08b1d4b1e78fc2560d554b5935452ebb2d025214.

Better to avoid backporting WIP dark mode at least until
issue number #5054 is fixed

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Id4fe8582fdebe9ad078ef5eaa7ba6be655cfb941
2022-08-04 15:26:47 +02:00
Pedro Pinto Silva
ddcf4797a6 Remove Toolbar-mobile.css, avoid bleeding out rules to desktop
The rules found in toolbar-mobile.css seem to no longer be needed
in any shape or form on desktop (even on FF). Remove file and
insert those changes within device-mobile (so it is loaded only
when on mobile)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I58a3d52fc6313a8e32916fa2b5dd4796dd1c1cef
2022-07-06 08:35:13 +02:00
Rash419
0e12c85fc9 browser: contentcontrol: added dropdown type
- added a new menu button 'form' in classic and tab button in notebookbar for content control

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ibe06667de39199fd2541fa70ced3ff879274366d
2022-06-01 15:33:47 +03:00
Gökay Şatır
a4885396bb Remove unused divOverlay parts.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I98ea380037e1653cc4635f895d472825df413c73
2022-05-16 21:52:09 +03:00
Gökay Şatır
04a049922a Remove unused boxzoom related parts.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I6ce90e4ec020f2c96ad72b54ea5c5d2182c91bc1
2022-05-16 21:51:56 +03:00
Rash419
c9b9a6589e introduce content control in online
added unocommand to enter rich text in classic, NB and mobile
created a new section to draw rich text rectangles
handle the callback for content control

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: If9912b3598729c26014519c4e1c3c65000b973a4
2022-05-13 17:57:53 +03:00
Henry Castro
f19348f0c3 browser: fix bundling error
The uglify tool does not support es6

Change-Id: Ia87651ad39064889c99922b5e910bd4bcaf09885
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-09 16:40:57 +01:00
Henry Castro
e3c170cf94 browser: add pako dev dependency
https://github.com/nodeca/pako

Change-Id: I115c6c729f6783a23856a0e41f1908a7fc7f61fe
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-09 16:40:57 +01:00
andreas kainz
592d27a409 Add color-scheme-dark.css support
@media (prefers-color-scheme: dark) setting
is available by use color-scheme-dark.css
instead of color-scheme.css

sure the scheme need some update
but there are other open points like
use dark color for document
use dark colibre icons

this is only the .css change
so no full dark mode update

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: I5c2adcbb75583a952f419af507d7cfe5c1343e3c
2022-05-03 10:40:35 +02:00
Szymon Kłos
52018664f4 autofilter: remove old jsdialog code
starting with co-22.05 core we don't need old
autofilter code as it is now unified with popups
handled in Control.JSDialog.js

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I613d76950c9c9d727be958607d25793a3a69c28a
2022-04-25 09:59:56 +02:00
Szymon Kłos
3ef60a9cab jsdialogs: formulabar
this patch handles formulabar generated with jsdialogs
for core version which supports that (>=co-22.05)
- jsdialog formulabar is implemented in Control.FormulaBarJSDialog.js

it does translation so instead of drawingarea we got input field,
later it sends events with modified type so core doesn't know about
any change in widget type

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I690409ec2e83e803ed9dfe3544e68b6521ae768d
2022-04-23 10:58:55 +02:00
Ashod Nakashian
59a59f6de5 browser: make: remove duplicate .ts files from makefile
Change-Id: Iff5c26df9757f9dec18a4fcd3da464475f40e6a4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Gökay Şatır
4f4c11a886 Moved window.app variable into its own file.
"socket" and "console" variables are used at initialization, so they are left in global.js file.

Debugging of window.app object's variables is now easier.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ic2811ff45ce845cb32d15018eaa2fa9e140202d7
2022-04-15 16:37:51 +03:00
Rash419
9679c36432 jsdialog: in debug build added button in about dialog to open WidgetTestDialog
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ib525515f27640114f5d8bc83314b63f006893d37
2022-04-15 15:18:31 +02:00
Henry Castro
c550a206e8 Remove the old vex-based welcome dialog code
... and make Welcome dialog optional for COOL

config: add welome url parameter

Signed-off-by: Henry Castro <hcastro@collabora.com>

config: add feedback url parameter

Signed-off-by: Henry Castro <hcastro@collabora.com>

config: add infobar-url parameter

Signed-off-by: Henry Castro <hcastro@collabora.com>

welcome: fix unhandled exceptions

Signed-off-by: Henry Castro <hcastro@collabora.com>

welcome: preprocess welcome file

added welcome-message.html

Signed-off-by: Henry Castro <hcastro@collabora.com>

welcome: clean up code related to vex welcome

Signed-off-by: Henry Castro <hcastro@collabora.com>

--enable-welcome-message is not necessary, when we specify a welcome URL, then it is enabled, otherwise it's user configurable

Signed-off-by: Andras Timar <andras.timar@collabora.com>

remove the unused welcome config settings

Signed-off-by: Andras Timar <andras.timar@collabora.com>

remove unused define ENABLE_FEEDBACK

Signed-off-by: Andras Timar <andras.timar@collabora.com>

do not install/package fallback welcome dialog, when welcome feature is not configured

Signed-off-by: Andras Timar <andras.timar@collabora.com>

remove welcome-message.html

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I20aa6220362018b63aaebd114b2b661561823fbb
2022-04-04 10:53:07 +02:00
Mert Tumer
e0511aa1bd sanitize-url: bump package version to 6.0.0
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I7c58e3a417e7a247b781800a2ec93417d3b7bc8f
2022-03-28 14:38:20 +03:00
Andras Timar
3ad28a69f4 msguniq after appending welcome strings
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ic4ceefca9d4084909b2f783738838bc340ac9e1a
2022-03-11 23:56:53 +01:00
Andras Timar
f0db52d761 Welcome dialog fallback l10n
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I4267481c5b34f0493ca8a7b1b50d398299deeae3
2022-03-11 21:46:08 +01:00
Ashod Nakashian
6da32684ca browser: mocha: hide the test results when successful
This reduces clutter on the screen when there is
nothing to pay attention to. The full output is
still captured in mocha.log with the full path
printed in the make output.

Upon failure of any mocha test the output is
unchanged: the full output is printed to stdout.

Change-Id: I8d73d88be84852bb209eda63a3bb03c040be8f13
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-03-09 19:24:40 -05:00
Henry Castro
56af316604 browser: makefile: the welcome folder has images and CSS files
Modify the rules to install CSS and images to welcome folder

Change-Id: I805666daed893c08938e7d0c4240e8a62e005e52
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-02-24 19:15:35 +03:00
Tor Lillqvist
46e6f6b4ba Introduce symbolic names for the UNO key codes and modifiers.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I1c97f4a8f1ad7ca1d788357399b4fac0f28e74c2
2022-02-15 13:39:47 +02:00
Henry Castro
9107ca8eff browser: add initial welcome dialog
Change-Id: Ic42ad71fec286fe85e5130951fcab0e11b1563c0
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-01-26 16:46:06 +01:00
Henry Castro
f44ae10700 browser: add initial Map.Infobar handler
Change-Id: Ic7d24d11ec54bcdc42904f9fd5005cb49216ca01
Signed-off-by: Henry Castro <hcastro@collabora.com>
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
2022-01-26 16:46:06 +01:00
NickWingate
450468e3d3 CDarkOverlay replaces ObjectFocusDarkOverlay.js
Signed-off-by: NickWingate <nicholas.wingate03@gmail.com>
Change-Id: Ic8005b7609d9c0842120ce5e4ca074e3d4d862f4
2022-01-17 16:04:51 +03:00
NickWingate
b63222ab78 Remove reference to ObjectFocusDarkOverlay in Makefile.am
Signed-off-by: NickWingate <nicholas.wingate03@gmail.com>
Change-Id: Ibe966e8252858d4baa90674523576928fc41d55b
Signed-off-by: NickWingate <nicholas.wingate03@gmail.com>
2022-01-17 16:04:51 +03:00
NickWingate
6c1a13894e Implement CDarkOverlay.ts in CanvasTileLayer.js
Signed-off-by: NickWingate <nicholas.wingate03@gmail.com>
Change-Id: Ic8005b7609d9c0842120ce5e4ca074e3d4d862f4
2022-01-17 16:04:51 +03:00
Andras Timar
944a66d5d2 Update list of js files with localizable strings
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Idd7d5ff0ab2568d4a634efb619f054256a7538ba
2022-01-13 22:22:41 +01:00
Dennis Francis
71e2bc6fed convert L.Transformation to typescript
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ib189a5ea5267fc7ee99231a519cfec53b1c8febc
2022-01-11 21:21:27 +01:00
Michael Meeks
33c4af86e7 perf-test: record stats by default and print them out.
Also exit after replaying events.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I04571fd99e2cc85869b4cad883416b37431e4ce0
2022-01-08 09:48:20 +00:00
Pedro Pinto Silva
5f4cef403c Fix top (smartmenus) menu for small window width
On Laptops: When resize the browser window or tiling it to the right
or left the whole layout would get very difficult to work with due to
the smartmenus overlap over everything else.

Introduce override-smartmenus.css file (following the applied same logic
as with override-vex.css) and make sure smartmenus are not only
displayed correctly at those sizes but that other elements such as
document's title and modified timestamp get hidden if no space is
available.

Note: since we are not using the smartmenus for mobile we can safely do
this without worrying or adjusting nothing else for smartphones.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ib42767f2110fc7bd0f471ea490f5430ae2958021
2022-01-05 15:10:19 +01:00
Pranam Lashkari
fa35ead871 added inline source to debug ts in browser
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ic34695faa47e47dd4951837a8a1dd2ba288ece62
2021-12-24 19:49:05 +05:30
Pranam Lashkari
40e779fa53 enable source maps for debug mode
enabling source maps helps while debugging through the IDEs

it becomes necessary with typescript

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ia5f09595ed9726e0076d1837024868a651d92361
2021-12-22 18:22:34 +05:30
Gleb Popov
63cf19a399 Use cp -a instead of cp -ar.
According to Linux man, `-r` and `-R` are synonims and `-a` implies `-R`.
However, FreeBSD `cp` errors out when both `-r` and `-a` are given.
This fixes `make install` on FreeBSD.

Signed-off-by: Gleb Popov <6yearold@gmail.com>
Change-Id: I5b325eb654ca52ad0f988e777c5bf5447d385ab5
2021-11-26 22:33:10 +01:00
Andras Timar
f07ff8c7e0 rename: remaining lool->cool changes
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib7d4e804bebe52dead8d53b0e0bbaed0f08bf3d0
2021-11-18 14:14:11 +01:00