X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/aee9f15afdae1c21e12b7ddc0671c0a619a7776f..1aaa2260767069a2265ceefd73f55e8270c84a1f:/src/redakcja/static/js/wiki/view_properties.js diff --git a/src/redakcja/static/js/wiki/view_properties.js b/src/redakcja/static/js/wiki/view_properties.js index 32a7101b..5af43e67 100644 --- a/src/redakcja/static/js/wiki/view_properties.js +++ b/src/redakcja/static/js/wiki/view_properties.js @@ -47,14 +47,20 @@ self.$pane = $("#side-properties"); $(document).on('click', '[x-node]', function(e) { - e.stopPropagation(); - self.edit(this); + if (!e.redakcja_edited) { + e.redakcja_edited = true; + self.edit(this); + } }); self.$pane.on('click', '#parents li', function(e) { self.edit($(this).data('node')); }); + $(document).on('click', '#bubbles .badge', function(e) { + self.edit($(this).data('node')); + }); + self.$pane.on('change', '.form-control', function() { let $input = $(this); @@ -95,6 +101,14 @@ }); self.$edited; }); + + self.$pane.on('click', '.current-convert', function() { + self.convert($(this).attr('data-to')); + }); + self.$pane.on('click', '#current-delete', function() { + self.delete(); + }); + oldCallback.call(this); }; @@ -109,11 +123,22 @@ let $node = $(element); $("#parents", self.$pane).empty(); + $("#bubbles").empty(); + + let b = $("
").text($node.attr('x-node')); + b.data('node', element); + $("#bubbles").append(b); + $node.parents('[x-node]').each(function() { let a = $("