mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix existing notes not being prefilled when editing an annotation
This commit is contained in:
parent
c5c3182a59
commit
ded52279fc
@ -271,6 +271,9 @@ class CreateAnnotation:
|
|||||||
return document.getElementById(self.middle_id)
|
return document.getElementById(self.middle_id)
|
||||||
|
|
||||||
def add_notes(self):
|
def add_notes(self):
|
||||||
|
current_notes = self.current_notes
|
||||||
|
if not current_notes and self.editing_annot_uuid:
|
||||||
|
current_notes = self.annotations_manager.notes_for_highlight(self.editing_annot_uuid)
|
||||||
self.show_middle(self.apply_notes)
|
self.show_middle(self.apply_notes)
|
||||||
container = self.middle
|
container = self.middle
|
||||||
clear(container)
|
clear(container)
|
||||||
@ -283,7 +286,7 @@ class CreateAnnotation:
|
|||||||
|
|
||||||
E.h3(_('Add notes for this highlight')),
|
E.h3(_('Add notes for this highlight')),
|
||||||
E.textarea(
|
E.textarea(
|
||||||
self.current_notes or '',
|
current_notes or '',
|
||||||
rows='10', spellcheck='true', style='resize: none; width: 80vw; max-width: 80em; margin: 1ex',
|
rows='10', spellcheck='true', style='resize: none; width: 80vw; max-width: 80em; margin: 1ex',
|
||||||
onkeydown=def(ev):
|
onkeydown=def(ev):
|
||||||
ev.stopPropagation()
|
ev.stopPropagation()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user