Initial bookmarks.
[wolnelektury.git] / src / wolnelektury / static / js / book_text / marker.js
1 (function($){$(function(){
2
3     class PMarker {
4         putBox(box) {
5
6             let $z = $(this).closest('.zakladka');
7             let $box = $("#zakladka-box");
8             $z.append($box);
9             $box.data('z', $z);
10
11             anchor = $z.data('anchor');
12             let note = anchor in zakladki ? zakladki[anchor].note : ''; 
13             $('textarea', $box).val(note);
14             
15             // TODO update note content here.
16             // And/or delete buttons.
17             $box.toggle();
18
19
20         }
21
22
23
24         showForAnchor(anchor) {
25         }
26
27         showForP(p) {
28         }
29     }
30
31     $.PMarker = PMarker;
32     
33     // There can be more than one marker.
34     // Some markers
35
36 })})(jQuery);