Commit graph

1904 commits

Author SHA1 Message Date
Pranam Lashkari
383b6a7080 zotero: implement citation refresh
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Id91acbed6c651dfed02777d7fa4142edf597a55a
2023-01-06 12:47:34 +01:00
Pranam Lashkari
46d1f930de zotero: renumber citations on citation insertion for numeric style
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I5cc8b7d6cb16a7f849bf42dd893487c95a7a3e8d
2023-01-06 12:47:34 +01:00
Pranam Lashkari
9be49e17c7 Zotero: introduce the citation update mechanism
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
2023-01-06 12:47:34 +01:00
Pranam Lashkari
fb5be17057 zotero: fetch the selected citation style details
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
2023-01-06 12:47:34 +01:00
Szymon Kłos
f6a2d93265 Add missing icon for macro dialog
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id9f5929886703c3881b550dec6987b26203fafcd
2023-01-06 11:15:23 +01:00
Ashod Nakashian
12f3f1e6a4 browser: package.json always get resorted anyway
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>
2023-01-06 11:19:18 +03:00
Pedro Pinto Silva
6ad1b900e0 Remove zotero search label and use placeholder instead
Remove citation search label and instead use placeholder

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I0eef0cd9321babd7239b18b4fd5a422cc4d09831
2023-01-05 19:21:29 +01:00
Szymon Kłos
4d2b020513 Add missing icons for macro dialog
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I9ee72a697b30571234af9314acc64513ee8184c9
2023-01-05 15:24:18 +01:00
Pranam Lashkari
16349472eb zotero: avoid asking unnecessary bibliography data
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I6aab932715cdfc9511f0b96b4f6aaf671f0b6efb
2023-01-04 17:29:12 +05:30
Pranam Lashkari
8086aba917 zotero: keep citation JSON in same sequence as the desktop
makes it easy to compare for debugging

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I948b79d1f17224dfe40dd70671abfb35f49d7336
2023-01-04 17:28:55 +05:30
Pranam Lashkari
60a11b58f8 zotero: add missing fields in style property
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I048d351e5590413fe57e1ac009bd96933e73b5df
2023-01-04 17:28:55 +05:30
Szymon Kłos
1aeeda61ac jsdialog: use unified naming for treeview icons
unified header and no header treeviews
icon shouldn't contain old extension

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0778d49395c084e4ac9adc848b3327529ee37e61
2023-01-04 07:27:20 +01:00
Pedro Pinto Silva
7dcd8a12fc Citations: fix Refresh btn alignment, add json leftaligned property
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
2023-01-03 17:04:32 +01:00
Pedro Pinto Silva
1cc519ccf3 Citations: Fix extra h margins affecting search and locale controls
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5e1bf9cedbce7de1a5ca18c014b30914f9f6f046
2023-01-03 17:04:32 +01:00
Pedro Pinto Silva
3f27c6b1bc JSDialog: edit controls (input fields): do not force their width
setting it at 100% was leading to element getting passed their
container. Example of the referred bug:

https://archive.org/download/jsdialog-ui-edit-has-forced-width/jsdialog-ui-edit-has-forced-width.png

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I64a65e3149356f0094d0ce8e2ace8ffd8fba28fd
2023-01-03 17:04:32 +01:00
Pedro Pinto Silva
f1a86aedd5 JSdialog: Fix container's padding
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
2023-01-03 17:04:32 +01:00
Pedro Pinto Silva
5f29c731fb JSDialog: add margin offsets to buttonbox L and R
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
2023-01-03 17:04:32 +01:00
Szymon Kłos
ba3aa1b4c4 Zotero: refresh insert note dialog
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Idbb7dfe88072fb2071e75efd961317b4184ddcae
2023-01-03 10:19:12 +01:00
Szymon Kłos
130433f8d5 Zotero: don't duplicate notes on insert
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I586e83b05d7757df11dac263b8ed3317efd58575
2023-01-02 20:51:37 +01:00
Szymon Kłos
c3f98060d6 Zotero: show notes from groups
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id24ee1282703f2cb1eea15f828c134151b11352d
2023-01-02 20:51:37 +01:00
Szymon Kłos
c49ae2a78f Zoteor: don't shorten the note
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I452eaf484fd91ad8f3e2d88d0a1270b85f17be99
2023-01-02 20:51:37 +01:00
Szymon Kłos
8d86da3c43 Zotero: show all notes
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I42a9686b275f42615a36d0e02519f2037a0d129b
2023-01-02 20:51:37 +01:00
Szymon Kłos
7d8c7ede3d jsdialog: don't use deprecated string color parameter
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
2023-01-02 16:26:25 +01:00
Henry Castro
857e3f35a6 browser: menu: ignore menu item with empty text
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>
2023-01-02 11:14:31 +03:00
Pranam Lashkari
f7968b4fc1 zotero: fix locale drop down showing incorrect language
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
2022-12-30 12:03:27 +01:00
Pranam Lashkari
852d12960f zotero: in style dialog show selected style
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I420c5f22f8b4aa880f202fe8b0d981f091c1dfa7
2022-12-30 12:02:57 +01:00
Andras Timar
652eb4f16f zotero: localized bibliography
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I2df13cbc1b818ab26551161f18673e9e1a4770d3
2022-12-29 11:48:23 +01:00
Pranam Lashkari
1c7987b87e zotero: fixed broken item query function
fixed regression form 9529215

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Id375958bd17b528dee7e9000d056ca60da064133
2022-12-28 06:19:50 +05:30
Pranam Lashkari
60ac1e18b2 zotero: fetch and set locale language from doc if set
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I5a003d065b062d9631c00ade65e969b21db121ce
2022-12-27 22:46:22 +01:00
Pranam Lashkari
e045552ab0 zotero: added language selection support
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
2022-12-27 22:46:22 +01:00
Pranam Lashkari
952921577d zotero: extract repeated query in a separate function
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I27db5073fcd46f0853e947c4cf9a246477271d84
2022-12-27 22:46:22 +01:00
Szymon Kłos
1480df81d2 Zotero: add note
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I3696bd1115ac996c2f5d163ddcb0238036436aac
2022-12-22 21:31:07 +01:00
Szymon Kłos
aa7503c03c Zotero: unify command naming
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib2b6cda94817e544d2fe37181d4aae105f2ea201
2022-12-22 21:31:07 +01:00
Szymon Kłos
dde1057ac2 Zotero: fix broken requests
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I6dd1e198e6870c62a53bdca141b55c69a9d4a47a
2022-12-22 12:40:16 +01:00
Pranam Lashkari
b7db80cfb4 zotero: insert bibliography
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: If6d1f2189eb27785cd2bb2d15a50ee01c4735afc
2022-12-22 12:40:16 +01:00
Szymon Kłos
84c68b7ef9 Calc: show cursors from others
avoid comparison with undefined for mode param

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ifdcd46ae2d10aa2f203b377e7daf30aee8715802
2022-12-22 11:39:04 +01:00
Pranam Lashkari
80de048866 zotero: store the style property in doc in chunk of 255 char
following the standerd zotero convention, reason is unknown

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ie7d3167906cdce7be22dc9a201d6a1d20e880a2c
2022-12-22 09:58:46 +01:00
Pranam Lashkari
444dab1648 zotero: set document preference before performing any action
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I8c6e3c7c7b75fad59cf09a2c827bcb66a57e012b
2022-12-22 09:58:46 +01:00
Pranam Lashkari
1e0c89c956 zotero: fetch existing style from the document on load
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I377ba844fcbc6881a306668022bfa776b1916293
2022-12-22 09:58:46 +01:00
Pranam Lashkari
3e66d205f4 zotero: set citation style
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ib29683c96bb4037a1084baee282fb4b066018d38
2022-12-22 09:58:46 +01:00
Szymon Kłos
50cf96ee4e Zotero: use correct index for entries
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Icc366fca768d18c31ac351195ddc7680ffba290c
2022-12-22 00:04:24 +05:30
Szymon Kłos
0a3fa6951d Zotero: no expander when there is no subcollection
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic60d72583341cfef28829c8faf8ed59efe22033e
2022-12-20 15:59:52 +01:00
Szymon Kłos
417be951e6 Zotero: handle subcollections in the tree structure
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I93f2a4f77969cf27415d882a8114a644dfced1fb
2022-12-20 15:59:52 +01:00
Szymon Kłos
389ed68493 jsdialog: a11y: handling tab in TreeView
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic5215d6d0706e572c174e1da09afd48e44d14d5a
2022-12-20 15:59:52 +01:00
Szymon Kłos
d59f930fc0 Zotero: fix selection in subcollections
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I6009c52d7f5e106bcba0186359b90489af64a4c5
2022-12-20 15:59:52 +01:00
Szymon Kłos
c3cdad6c61 zotero: use correct index for selection
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I2076c84539fd499eb3a231f6866f22e2e4f99fd9
2022-12-20 15:59:52 +01:00
Aron Budea
6bf8fd1905 browser: Disable F2 handling in Writer
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
2022-12-20 12:21:54 +01:00
Szymon Kłos
a55b0451b8 Zotero: map missing icons to thesis icon
in the future we can make icons different for every type

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I039f412e9d89b08b86ef9fe0b45bc868343de122
2022-12-20 07:00:12 +01:00
Szymon Kłos
c42a7d891f Zotero: show icons
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I864228b2628f7e58c7d5f9eb404145ce482028d7
2022-12-20 07:00:12 +01:00
Szymon Kłos
abb829b736 Zoteor: use camel case naming for icons
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id049146c7b9b91c9054b4f3a4259cb5b178b79ae
2022-12-20 07:00:12 +01:00