48151 Commits

Author SHA1 Message Date
Kovid Goyal
5d63fe7e27
Start work on notes browser 2023-11-13 19:21:33 +05:30
Charles Haley
b00ac0873a
Add more context menu items to the book details notes icon: links and copy text. 2023-11-13 19:21:33 +05:30
Kovid Goyal
b5afce1a85
Avoiding iterating over id_map for ever item lookup 2023-11-13 19:21:32 +05:30
Kovid Goyal
c56b41612b
Change the notes icon to a pencil
This image was already present in the server images, so easy to reuse
2023-11-13 19:21:32 +05:30
Kovid Goyal
8340c9994d
Make get_item_id() faster 2023-11-13 19:21:32 +05:30
Kovid Goyal
2a9e0209ed
Dont read the full notes table every time book details is rendered
Instead check if our particular items have notes only. This is a bit
more work when no notes are present but is much less work when a
significant number of notes are present.
2023-11-13 19:21:32 +05:30
Charles Haley
f099932882
Fix the icon not being updated if notes are changed from within book details.
While fixing this I found other places with both notes and links weren't refreshed in book details.
2023-11-13 19:21:32 +05:30
Charles Haley
071145e70c
Use an icon for notes in book details.
The icon comes from https://www.iconfinder.com/icons/8726310/notes_icon. Feel free to replace it. :)
2023-11-13 19:21:32 +05:30
Kovid Goyal
d74fa0e4da
Add calibre://show-note to link to notes 2023-11-13 19:21:32 +05:30
Kovid Goyal
c966582265
HTMLDisplay: Add resources to the document so they are not repeatedly loaded 2023-11-13 19:21:32 +05:30
Kovid Goyal
ae029cf06a
Cleanup previous PR
Return items_ids rather than note_ids as the rest of the API uses
items_ids to reference notes not note_ids. Also allow querying for only
a single field if needed.
2023-11-13 19:21:32 +05:30
un-pogaz
4e878b14cc
Add retrieve all item_id for each field assosiated to a notes 2023-11-13 19:21:32 +05:30
Kovid Goyal
5657b04d50
Add editing of notes to book details context menu 2023-11-13 19:21:32 +05:30
Kovid Goyal
a07bd5d8b5
Make link order in book details panel and show notes popup the same 2023-11-13 19:21:32 +05:30
Kovid Goyal
d78bd8971d
Show notes when clicking on category items in the book details panel 2023-11-13 19:21:32 +05:30
Kovid Goyal
b5b4162ff3
Document the DB Notes API 2023-11-13 19:21:32 +05:30
Kovid Goyal
d22845828c
Add a find books button to search the calibre library for books with the category item 2023-11-13 19:21:32 +05:30
Kovid Goyal
abe3deb186
Add an edit button to the category notes display dialog 2023-11-13 19:21:31 +05:30
Kovid Goyal
26a73d634a
Add item links to show category note dialog 2023-11-13 19:21:31 +05:30
Kovid Goyal
0620eb2230
Work on dialog to display category notes 2023-11-13 19:21:31 +05:30
Charles Haley
71cafdbc2f
Remove print statement 2023-11-13 19:21:31 +05:30
Charles Haley
671d84037f
Context menu items for import and export. Also fixed the context menu not appearing when a disabled widget is right-clicked. 2023-11-13 19:21:31 +05:30
Kovid Goyal
d1be987b01
Sanitize suggested file name for notes export 2023-11-13 19:21:31 +05:30
Kovid Goyal
c8acbec3d1
Finish implementation of import/export of notes in note edit dialog 2023-11-13 19:21:31 +05:30
Kovid Goyal
10af00f3b3
Start work on export/import in edit notes dialog 2023-11-13 19:21:31 +05:30
Kovid Goyal
33072bf70e
... 2023-11-13 19:21:31 +05:30
Kovid Goyal
0f76bf19f8
Test re-import of exported note 2023-11-13 19:21:31 +05:30
Kovid Goyal
d3ae36a965
Export notes as a single HTML file with embedded images 2023-11-13 19:21:31 +05:30
Kovid Goyal
7df0ec7bee
Handle URL quoting when importing notes 2023-11-13 19:21:31 +05:30
Kovid Goyal
2076fa282d
Add basic tests for export/import of notes 2023-11-13 19:21:31 +05:30
Kovid Goyal
721d13a809
API to export/import notes to HTML 2023-11-13 19:21:31 +05:30
Kovid Goyal
1fb3b9ea28
Sanitize filenames for notes resources 2023-11-13 19:21:31 +05:30
Kovid Goyal
fa83be4192
unretiring notes should not duplicate item value at the top of the searchable text 2023-11-13 19:21:30 +05:30
Charles Haley
ba2de90d00
First try at the template functions for notes. 2023-11-13 19:21:30 +05:30
Kovid Goyal
e6e5f0fe9f
Make loading of notes resources in HTMLDisplay opt-in
HTMLDisplay is a generic class so its not appropriate for it
to try to load notes resources everywhere.
2023-11-13 19:21:30 +05:30
Charles Haley
2856922aeb
Add fetching calres: resources to HTMLDisplay. This permits a copy of a note in a composite column to display properly. 2023-11-13 19:21:30 +05:30
Kovid Goyal
b0766d7a62
Track creation and modified timestamps for notes 2023-11-13 19:21:30 +05:30
Kovid Goyal
652fb651cb
Remove retired entry when setting a note value
Useful since the number of reired entries is capped, no need to use up
one slot for a note that has a value set
2023-11-13 19:21:30 +05:30
Kovid Goyal
07a77403a8
Fix retiring a note with a resource throwing an error if a version of the note with the same resource is already retired 2023-11-13 19:21:30 +05:30
Charles Haley
b9dcc6ee85
Add the undo button. Clean up some code. 2023-11-13 19:21:30 +05:30
Charles Haley
36f65e9187
Some refactoring and improvements:
1) Add a context menu to the notes widget. Remove the keyboard handler as it isn't needed.
2) Allow passing an item string value instead of an item_id to __init__
3) Make the notes widget self contained, making the signal advisory instead of mandatory
4) Add a delete note button to the widget.
2023-11-13 19:21:30 +05:30
Kovid Goyal
8e8f038896
Add API to get all data associated with a note including searchable_text 2023-11-13 19:21:30 +05:30
Charles Haley
50019962b1
Edit Authors dialog 2023-11-13 19:21:30 +05:30
Charles Haley
a240ef62ec
Add editing notes to manage categories, and to the context menu of the tag browser.
Still to do: adding notes to manage authors.
2023-11-13 19:21:30 +05:30
Charles Haley
c11c051309
Fix set_note updating all notes when one is changed. 2023-11-13 19:21:30 +05:30
Kovid Goyal
3b37b5270a
Implement removal of images by right clicking on them 2023-11-13 19:21:30 +05:30
Kovid Goyal
f0cacfdf44
Dont bother implementing browse_existing
It's painful to implement in a performant way and not too useful
2023-11-13 19:21:30 +05:30
Kovid Goyal
9250613998
Ensure searchable_text and references_resources exist 2023-11-13 19:21:29 +05:30
Kovid Goyal
99478d5209
Implement commit of edited note to db 2023-11-13 19:21:29 +05:30
Kovid Goyal
29435392c6
Also implement caching of images for the comments editor 2023-11-13 19:21:29 +05:30