X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d9c51b94bfe6b1cda1790d57a9108b83c6e1643b..f7d8acded4a58d423035c5759f6dee9a34396959:/src/wolnelektury/static/js/book_text/marker.js diff --git a/src/wolnelektury/static/js/book_text/marker.js b/src/wolnelektury/static/js/book_text/marker.js new file mode 100644 index 000000000..5db4d7e7a --- /dev/null +++ b/src/wolnelektury/static/js/book_text/marker.js @@ -0,0 +1,36 @@ +(function($){$(function(){ + + class PMarker { + putBox(box) { + + let $z = $(this).closest('.zakladka'); + let $box = $("#zakladka-box"); + $z.append($box); + $box.data('z', $z); + + anchor = $z.data('anchor'); + let note = anchor in zakladki ? zakladki[anchor].note : ''; + $('textarea', $box).val(note); + + // TODO update note content here. + // And/or delete buttons. + $box.toggle(); + + + } + + + + showForAnchor(anchor) { + } + + showForP(p) { + } + } + + $.PMarker = PMarker; + + // There can be more than one marker. + // Some markers + +})})(jQuery);