Sha256: a71a17a18be8aefef753f527a2a40f33bf31d547a061ad1e58148003f211255e
Contents?: true
Size: 1.04 KB
Versions: 33
Compression:
Stored size: 1.04 KB
Contents
(function() { var page = document.querySelector('#page_<%= @page.id %>'); <% if @old_page_layout != @page.page_layout -%> Alchemy.ElementsWindow.reload(); Alchemy.growl('<%= j Alchemy.t(:page_layout_changed_notice) %>'); <% end -%> <% if @while_page_edit -%> Alchemy.reloadPreview(); document.querySelector('#page_<%= @page.id %>_status').outerHTML = '<%= j render("current_page", current_page: @page) %>'; Alchemy.growl("<%= j @notice %>"); Alchemy.closeCurrentDialog(); <% else -%> if (page) { var page_html = "<%= j render('page', page: @page) %>"; var compiler = Handlebars.compile(page_html); var tree = <%== @tree.to_json %>; page.outerHTML = compiler(tree.pages[0]); Alchemy.growl("<%= j @notice %>"); Alchemy.closeCurrentDialog(); } else { document.addEventListener('turbolinks:load', function () { Alchemy.growl("<%= j @notice %>"); }, { once: true }) Alchemy.closeCurrentDialog(function() { Turbolinks.visit(location.toString(), { action: "replace" }); }); } <% end -%> })()
Version data entries
33 entries across 33 versions & 1 rubygems