X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/a201669e7bd63f06683f9dc741fd55721ebf4551..3eaf5e66203b1afafc81dfb1214660b20a11739f:/modules/visualEditor.js?ds=sidebyside diff --git a/modules/visualEditor.js b/modules/visualEditor.js index d5ff4b5..65de452 100644 --- a/modules/visualEditor.js +++ b/modules/visualEditor.js @@ -1,5 +1,6 @@ -rng.modules.visualEditor = function(sandbox) { - var transformations = rng.modules.visualEditor.transformations; +define(['./visualEditor.transformations'], function(transformations) { + +return function(sandbox) { var view = { node: $(sandbox.getTemplate('main')()), @@ -277,6 +278,7 @@ rng.modules.visualEditor = function(sandbox) { var view = this; this.node.find('#rng-visualEditor-sidebarButtons a').click(function(e) { e.preventDefault(); + e.stopPropagation(); var target = $(e.currentTarget); if(!target.attr('data-content-id')) return; @@ -493,4 +495,6 @@ rng.modules.visualEditor = function(sandbox) { } } -}; \ No newline at end of file +}; + +}); \ No newline at end of file