X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/434a8ca0e146d0ad9514978fffec916c90fb7542..df341bdd09208d2b0f84060454cc0000df19deba:/src/redakcja/static/js/wiki/view_editor_wysiwyg.js diff --git a/src/redakcja/static/js/wiki/view_editor_wysiwyg.js b/src/redakcja/static/js/wiki/view_editor_wysiwyg.js index 3ec4f701..f056edc9 100644 --- a/src/redakcja/static/js/wiki/view_editor_wysiwyg.js +++ b/src/redakcja/static/js/wiki/view_editor_wysiwyg.js @@ -193,7 +193,7 @@ spoint.insertNode(btag[0]) btag.replaceWith(text); selection.removeAllRanges(); - openForEdit($('.motyw[theme-class=' + id + ']')); + openForEdit($('.motyw[theme-class="' + id + '"]')); } }); } @@ -239,7 +239,7 @@ } tableContent += ""; - $("#content").append(specialCharsContainer); + $("body").append(specialCharsContainer); // localStorage for recently used characters - reading @@ -399,20 +399,13 @@ if ($origin.is('.motyw')) { $('.akap-edit-button').remove(); - withThemes(function(canonThemes){ - $('textarea', $overlay).autocomplete(canonThemes, { - autoFill: true, - multiple: true, - selectFirst: true, - highlight: false - }); - }) + $.themes.autocomplete($('textarea', $overlay)); } if ($origin.is('.motyw')){ $('.delete-button', $overlay).click(function(){ - if (window.confirm("Czy jesteś pewien, że chcesz usunąć ten motyw ?")) { - $('[theme-class=' + $origin.attr('theme-class') + ']').remove(); + if (window.confirm("Czy jesteś pewien, że chcesz usunąć ten motyw?")) { + $('[theme-class="' + $origin.attr('theme-class') + '"]').remove(); $overlay.remove(); $(document).unbind('click.blur-overlay'); return false; @@ -580,14 +573,14 @@ return false; }); - $('.edit-button').live('click', function(event){ + $(document).on('click', '.edit-button', function(event){ event.preventDefault(); openForEdit($(this).parent()); }); } - $('.motyw').live('click', function(){ + $(document).on('click', '.motyw', function(){ selectTheme($(this).attr('theme-class')); });