we already have selected existing entries in the dialog
so just use pending items directly
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ibc9bf10c0a2815c2c9132100ec1beb254f42b3af
- when api key is incorrect - show snackbar
- when api key is empty but set - integrator has feature implemented
so don't show our warnings about empty API key
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I62aaedc5a8c2033050b97db4c7e1ca1f629a10b0
Add button that opens the page number wizard in the Writer notebook bar
Signed-off-by: Paris Oplopoios <paris.oplopoios@collabora.com>
Change-Id: I108b5cb014f162a243af7d61f6ed045834ff32d0
Also fix TS eslint issues in this file.
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I493ae8b8dc9351fe6aedb3407f78b60379173b5d
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
Before this patch the section types were not used outside of
CanvasSectionContainer.ts and new sections were created by using objects
that looked like CanvasSectionObject.
Let us take advantage of typescript type checks by using
CanvasSectionObject class as the base class for all sections added using
addSection().
To make this happen we need to separate callbacks from member functions
of CanvasSectionObject class because typescript does not treat them as
same.
TODO: Other non-typescript sections need to be converted by follow-up patches.
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ieeac168b6a4f82a0d55accd88a07708bf9da2587
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
Add also notification once they are unlinked
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Id26f7228f5a845b79f941256738a0d83bd12e43f
Currently translated at 99.7% (478 of 479 strings)
Co-authored-by: Flavio F. M <flavius_androiduser@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/pt_BR/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9b14ed8c7ce1ed059206431c72ebff801ed176da
Also, don't load online.js. It seems that it will be loaded into the
JS "web worker" for each thread automatically by
online.worker.js. (But hmm, what loads online.worker.js? I am probably
completely confused here. Probably getting rid of Qt things
(qtloader.js) and using only JS that Emscripten produces (modified if
necessary) will make things simpler to understand.)
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I050a20a553b7c0f6ebe9db0e7cb9cab2f9829f9e
Even if the URL did not have a query parameter called "lang".
And yes, we should stop using String.locale for that, and instead add
our locale property to window.app, which seems to be the place for our
code to store various global state. Using String.locale is hugely
confusing. I naturally thought it was some built-in JavaScript thing
and was very confused when it was undefined and I couldn't find any
documentation on it.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I549d3dac1be0991f87f1ca3aa3f147b081e898b1
Obviously just this is not a good reason to involve Qt, but we want
now initially to get something to even show up, so let's start by
using HTML and from the Qt-based WASM-LibreOffice. Let's see.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I7841fce8e5680a983cc00d516c3fca3a6747e9dc
now refmarks support to cite multiple sources at a place
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I07639bbc7206dd69a604b7aeabe4cf1a6fea5ca3
now bookmark support to cite multiple sources at a place
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Iafc65224d35ff6af5bcae09988567901ffd64dbc
now fieldmarks support to cite multiple sources at a place
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Iea3b6f7bee208d0a7c01780ec5b837d7f1042b4d
- allow reading bibliography properties on load without api key
- if fieldType is missing - use default
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic4ece4b4d61032a29f03cf57852cbdf6694a5294
Another method is used for Calc while scrolling.
Remove unnecessary call to draw in control.header.js
Add condition for draw calls while scrolling on desktop view. Scroll bar is visible by default on desktop.
Remove commented-out code.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Iaaa0267c63a9a92aa67786231baf53a625541440
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
If the welcome dialog will be shown we postpone showing missing font
dialog to user.
Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: Ie19a81588873842f92f4d482c14f07f112b1bcc3
Before this commit dialogs such as hyperlink leave editor warning
or fontmissing didn't have a title
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Icded55a489dbfebc2fb7e12fe0b04da70938a416
Before this commit it, it was impossible to:
- Dismiss the dialog by clicking anywhere else
- Dismiss when using mobile (it blocked both editing and reading)
Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: I3caeef327e653a054994fb01e8e53c5023c20055
It sends post message to the integrator: UI_ZoteroKeyMissing
if API key was not provided in CheckFileInfo and user tried
to perform any action on bibliography
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia7d04cbdd337d989e33bd4e1500efe113131a326
renumber the identification number in bibliography to match the citation number
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ic1eec6044e45c2b24aff1f9127fdb13cdab97313
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
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
with the introduction of showModal:
https://github.com/CollaboraOnline/online/pull/5518 we now have
a type of a dialog that, without this commit, can grow without
limits and can be as small as its content which is not ideal.
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I8768925377606924fd70fab8be40b0b755d802ac
While avoiding to add extra space to first elements
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia4102a783525e801e3adcd7dd8b621bb10ff2eb3
When ok is enabled and style selected - just use it
When style wasn't selected in the pase - ok is not enabled
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I2f36dd967e44dfdaf5210f030521fb6c1ec6ecf5
online stores keys as item id,
but other softewares use numbers for id and no other fields store keys.
keys are required in order to fetch the data from API.
So extract the item key from item URL
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ib2d25df81f975d0e926627408047b79c624394fb
style settings were treated as html instead of xml,
which caused attributes to lose its camelCase naming,
due to which some attributes were unrecognised and caused regression
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I34f211c54f9692ec67e08a872a68f516b1f82944
it reads citation style and shows only available languages
if last used locale is available - use it
if not - use default defined by style
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7539ffeb3942d3a1f8b44c5a17b69b4b4b9b475c
In case of desktop browser window whose size is only a little bigger
than the page, our native comments get collapsed and we use vex. In this
case don't close the comment dialog on clicking outside the dialog or
when switching browser tabs.
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I92c9d800d58a6910d6df01371e6748c864641cff
This reverts commit 089b6d235a0e38d5b1d021fab024becc2def0ada.
Reason for revert: For packaging builds the global.js is in minified
form hence marker comments are not present and it is difficult to
extract the css url renamer function without js-language analysis tools
or packages - this needs more thought.
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I86755cd74c8f92105b157477f7da8f6e439f1f99
if bibliography already exists, update existing and avoid inserting a new copy
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ief742a5c18d2cc9acd9fb14d5c3545bc7fcaa4da
Before this commit, when opening a document with citations,
citations would be updated and the document refreshed but without
any information of what is happening
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I474e8cdf9c31e18027501ebfc9bd6dd2f55a58a5
On Windows firefox auto setting is not handled properly. Scrollbar
flows on the sidebar elements. We use thin instead.
Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: Ife27f461639e6b034ac9071624d628cd35709191
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>
Before this table columns were getting "glued" (content of one
col would end and immediately would start content of another col).
Plus, we were having table content normally aligned to th start
while headers were being centered aligned
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ie0908c26d1e7bedc37b3c5d768d941b091946524
These have no effect on the ui-expander-content since they
are set to display: block somewhere else (jsdialogs.css)
plus, (and even testing with flex) this does not seem to improve
or fix anything
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I0260f44413ff46f79b9ea6a15e154ee62fb1e53f
This commit was initially intended to affect sidebar but it is
affecting every toolbox (dialogs, formula bar) causing regression
in the formula bar buttons
This reverts commit c0302a8d93c183b90079e3c2cbe9c90220e93cdb.
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ie872d26ec7dcfb396c7ccba13dcbf6142655be7a
Before this commit, browsers such as chrome (without enabling
experimental features) were not supporting those float values
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I2530e7bf46d161ac980559c181a4e03947edbeee
now odf documents will by default use refmarks,
MS docs will use field marks by default
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I57ef5de9bef8d1e5f6b5029e478d9a43e38dbc4d
The cursor should minimally obscure the cell content - so the border
should go outside and over the cell border, and the white contrast
line inside it.
Similarly the autofill handle should not obscure the number in the
cell you're trying to read - so move it out and down to a more
familiar position, shrink the size somewhat, and correct the
white boarders around it too.
Change-Id: Ib107adc2927172d69b8cd9a6523b50327d4f81cb
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Note that the code changed is inside an anonymous function that is
called with one argument: window, for the function parameter called
global. Thus the assignment that this change removes sets
window.socket.
The window.socket variable is not used by code later, so this change
can be this minimal.
The window.socket variable has earlier been set to the WebSocket
object used to communicate with the COOL server. Let's keep it for
that purpose. app.socket is the app.definitions.Socket object. Even
though JavaScript is not type-safe, it is very confusing to use the
same variable for completely different object types at different
stages in the code execution. I am working on some new code that will
want to access the WebSocket object also later.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I6273a6d6acee3fa46ab9fedc5742ae44c8bfa567
Commit introduces the following capabilities:
1. Users can now change the style and the existing citations will respond to it and update
2. Citations numbers are handled
3. Citation clusters(multiple citations) can be read and handled now
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I1e7d85ab955db49bf962303f3b6a0471b37e6ae7
fetching selected style language details will allow us to make adjustments to citation texts
this is particularly helpful in handling citation numbers and citation clusters
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ia469e0e44fc0550c083ce572f8fe9f512947a1f4
On every build, nodejs (v12.22.9 for me) re-sorts
the packages in package.json. I expect this is
the case for everyone, so best to commit it
sorted.
Change-Id: Ifa69989ae1bee0fda5a9cc19c2215db92959a434
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Remove citation search label and instead use placeholder
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I0eef0cd9321babd7239b18b4fd5a422cc4d09831
Move refresh button under a buttonbox so it can automatically inherit
container's offset
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I405eddc56ab806b33404221f64255ea676240134
Do not set sub container with a margin. This was resulting in
some elements (that are inside of that container) to be properly
contained but all the rest were being set without any surrounding
margins -> leading to misalignment
- Main jsdialog container shouldn't inherit lokdialog padding 0
- We do not need to specifically set `padding: .5em 1 em` because it
- has been already set and inherit from jquery ui CSS rules
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I957c93c099692a5bd202248731b16bc6bf358234
Fixes the misalignment, before this commit: the safe margin
present in every button was correct but for the cases where
the button is placed to the further left or further right
edge of the dialog -> it looked misaligned
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ibadeaf6cf736b07229d60f99b5af72865f26e23f
There was a bug in the core with duplicated filds, also
we can use original numeric argument to pass colori (tdf#150339).
Let's don't use string color so we can remove that
from the core in the future.
Related core commit: https://gerrit.libreoffice.org/c/core/+/144866
Resolves: tdf#150339 two arguments called "Color"
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I880552b7af4408e568db878dc862e548e901124d
if command "None" and empty item text, there is
an unhandled exception, and no grammar suggestions are shown.
Change-Id: Ie2c832a2a3ff7fe9944024fa003370819b16a432
Signed-off-by: Henry Castro <hcastro@collabora.com>
user was allowed to select language without selecting the style,
if style is not selected language data will also be not written in the doc.
force user to select style too if want to set the language.
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ie323b19189858e601f3fa979d747d7c688e4baf1
some style may differ in languages
i.e: in APA style a citation may appears as (Abrikosov, n.d.) like "no date". When I switch language to Hungarian, it becomes (Abrikosov, é. n.) like "évszám nélkül".
language can be selected in document preference dialog
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ida1cd91b189fc468e0205e9f1e332238f3ebbe7b
following the standerd zotero convention, reason is unknown
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ie7d3167906cdce7be22dc9a201d6a1d20e880a2c
It tries to bring up formula bar, which is unsupported,
and causes issues.
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: I9aaf445fde9ed5fa507e503e72319b6c7a146e44
in the future we can make icons different for every type
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I039f412e9d89b08b86ef9fe0b45bc868343de122
The code that is conditionally called based on that check verifies
using ThisIsAMobileApp anyway.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ic86cf102e061d90bedecb6efcb4ef171dc494004
To switch to edit mode in a cell, firstly we have to select a cell.
During that selection Clipboard (here _clip object) has a context
normally. When we do double click to switch edit mode, that selection
should be invalidated because actually we don't select anything yet
in that case.
Here we clean the selection when we switch to edit mode.
Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: Ib8d5bedba3a6d9c05a26a73edd81b52cd94e3358
To show a checkmark for "Freeze Rows and Columns" item on hamburger menu,
we have to set "checked" propery of the item according to uno command's
status.
Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: Icfc2ac07a84ed8a843b3bb8b2fe4c75de8ad9233
exclude notes, full text and snapshot entries
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib2183d95c4b0f90d3fd80504625f989ccafe3fb9
Currently translated at 100.0% (479 of 479 strings)
Translated using Weblate (Croatian)
Currently translated at 99.7% (478 of 479 strings)
Co-authored-by: Milo Ivir <mail@milotype.de>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/hr/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib32b8d001305efaee88744febf628a67d57b3732
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
use deterministic querySelector to avoid usage of
button from the old window to remove
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I49f7b563666fad614b1f688e80ccb0cdc8d6dcb7
mark as invalidated when this is full update
so we don't change position on any update in the
future
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I90f79937c5a69ccb2ee36cda7860cddcd36e9311
And just disable them when engine is not present
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6504197f096b4e48d075ee0d631217cb576f4a22
- Move menu entries (that are exclusively related to references)
to References menu
- Add Missing menu entries to References menu so it has 1 to 1
parity with References tab (tabbed view)
- Update text in some menu entries so it follows what has changes
in the tabbed view
- Add separators
Note: Footnote and endnote action were also kept under insert
menu because it seems user are already very used to that. So,
now they can be found both under Insert and References menus
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Icde47f88f60c8423b9af3f6f3793bb8da056adde
note: Ideally we would always add the buttons,
but when the extra capabilities are not available we would
switch the trigger for all of those buttons to be a warning
dialog
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I7359fe222eff31920b78116e69b45aa60cb15790
Use keyword citation in multiple buttons so they can be
easily understood and grouped
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4104bdcbb555ee3f4a2b446ad70583e00727cab1
Thus, Remove Zotero dedicated tab and menu
- Add instead to existing references tab
Also remove dedicated top menu (compact)
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I8b056ac17fceb0bad2c9a864faeaf3ed2eec8d9d
Also make sure that new menu is only visible if zotero is
available
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I0893515dbc5495aa8251fc9ca795fea357400e6c
Also rename the current testing button (Citation Style) to be used
temporarily as doc pref.
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I70c434a42034a1ee0d729e4aa855b37e5d195950
When we have 2 users:
A is typing on the page 0
B is at the bottom of the document
We scrolled view B when page overflow happened what caused
"flickering". This patch prevents us from scrolling when
cursor is still on the screen and visible.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id8f3a12ba566a4b2fd03bf3ab5aa618f8e00c263
- Prefer to show zotero related actions within a dedicated tab (instead
of adding those within references tab as it was previously). This,
hopefully is more familiar to user using similar interface elsewhere
- Show this new tab conditionally (if zotero is enabled)
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I1690295724d54693aca68ade567e9d1076f26876
Avoid using `Current Index` (uno text) and instead set custom
string that is easier to understand
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5057b7c974a5bd33f8af5b93f5bf6a85af916f98
LibreOffice has its own solution to handle bibliography. It is outdated, and
reportedly everyone prefers Zotero or similar solutions. Moreover in Online
this feature does not work, because the bibliography database is a file in
the jail that is not retained, and because tunneled dialogs have serious UX
problems.
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibf6195c0265c767b3acf94012ee3f82339cf34d3