X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/e64e37a2fbe6d64b2513133d34370f0d1a63f7b9..bb42027c8fd9ed17234381d3c366c387a20592f0:/modules/documentToolbar/documentToolbar.js diff --git a/modules/documentToolbar/documentToolbar.js b/modules/documentToolbar/documentToolbar.js index c459428..a6dd0be 100644 --- a/modules/documentToolbar/documentToolbar.js +++ b/modules/documentToolbar/documentToolbar.js @@ -13,7 +13,7 @@ return function(sandbox) { e.stopPropagation(); var btn = $(e.currentTarget); if(btn.attr('data-btn-type') === 'toggle') { - btn.toggleClass('active') + btn.toggleClass('active'); var event; var btnId = btn.attr('data-btn'); if(btnId === 'grid') @@ -33,12 +33,6 @@ return function(sandbox) { wlxmlTag = split[0]; wlxmlClass = split[1]; } - if(window.getSelection().isCollapsed) { - //view.insertNewNode(wlxmlTag, wlxmlClass); - } - else { - //this.wrapWithNodeRequest(wlxmlTag, wlxmlClass); - } sandbox.publish('newNodeRequested', wlxmlTag, wlxmlClass); } else { sandbox.publish('command', btn.attr('data-btn'), btn.attr('data-meta')); @@ -49,7 +43,7 @@ return function(sandbox) { getOption: function(option) { return this.node.find('.rng-module-documentToolbar-toolbarOption[data-option=' + option +']').val(); } - } + }; view.setup(); @@ -57,7 +51,7 @@ return function(sandbox) { start: function() { sandbox.publish('ready'); }, getView: function() { return view.node; }, getOption: function(option) { return view.getOption(option); } - } -} + }; +}; }); \ No newline at end of file