X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f938afb8ab4cb091d12e0ef0311eaea14b774798..8bbef1628f527255a64f624a5508116eeccad083:/redakcja/static/js/wiki/view_editor_source.js diff --git a/redakcja/static/js/wiki/view_editor_source.js b/redakcja/static/js/wiki/view_editor_source.js index a0a2e69a..9fc99227 100644 --- a/redakcja/static/js/wiki/view_editor_source.js +++ b/redakcja/static/js/wiki/view_editor_source.js @@ -46,26 +46,10 @@ return true; }); - $('#source-editor .toolbar button').click(function(event){ - event.preventDefault(); - var params = eval("(" + $(this).attr('data-ui-action-params') + ")"); - scriptletCenter.callInteractive({ - action: $(this).attr('data-ui-action'), - context: self.codemirror, - extra: params - }); + $('#source-editor .toolbar').toolbarize({ + actionContext: self.codemirror }); - $('.toolbar select').change(function(event){ - var slug = $(this).val(); - - $('.toolbar-buttons-container').hide().filter('[data-group=' + slug + ']').show(); - $(window).resize(); - }); - - $('.toolbar-buttons-container').hide(); - $('.toolbar select').change(); - console.log("Initialized CodeMirror"); // textarea is no longer needed