Sha256: 7aae30250d1e9f9f8c75706fcc2d4af226545f83faa06ec25b9b9478d97453aa
Contents?: true
Size: 1.81 KB
Versions: 30
Compression:
Stored size: 1.81 KB
Contents
<h1>Page Settings</h1> <div class='top_right_controls'> <input type='button' value='General' onclick="window.location='/pages/<%= @page.id %>/edit-settings';" /> <input type='button' value='CSS' onclick="window.location='/pages/<%= @page.id %>/edit-css';" /> <input type='button' value='JS' onclick="window.location='/pages/<%= @page.id %>/edit-js';" disabled='true' /> <input type='button' value='SEO' onclick="window.location='/pages/<%= @page.id %>/edit-seo';" /> <input type='button' value='Resources' onclick="window.location='/pages/<%= @page.id %>/edit-resources';" /> </div> <textarea id='page_<%= @page.id %>_custom_js' placeholder='Custom Javascript' style='width:795px; height:595px;'><%= raw @page.custom_js %></textarea> <br /> <div id='message'></div> <div id='controls'> <input type='button' value='Close' onclick="modal.close();" /> <input type='button' value='Update' onclick="updateCustomJs();" /> </div> <% content_for :caboose_js do %> <%= javascript_include_tag "caboose/model/all" %> <script type="text/javascript"> var modal = false; $(document).ready(function() { modal = new CabooseModal(800, 700); }); function updateCustomJs() { $.ajax({ url: '/pages/<%= @page.id %>', type: 'put', data: { authenticity_token: "<%= form_authenticity_token %>", custom_js: $('#page_<%= @page.id %>_custom_js').val() }, success: function(resp) { if (resp.success) { contentVal = $('#page_<%= @page.id %>_custom_js').val(); // parent.$('#editmode_content_container').html(contentVal == null || contentVal.length == 0 ? 'No content.' : contentVal); modal.close(); } if (resp.error) modal.autosize("<p class='note success'>" + resp.error + "</p>"); } }); } </script> <% end %>
Version data entries
30 entries across 30 versions & 1 rubygems