Sha256: fb8b24104951da30632e8fba6bd19ea449f01776f51e60a7a64c0f69846b8b74

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';" disabled='true' />
<input type='button' value='JS'        onclick="window.location='/pages/<%= @page.id %>/edit-js';" />
<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_css' placeholder='Custom CSS' style='width:795px; height:595px;'><%= raw @page.custom_css %></textarea>
<br />
<div id='message'></div>
<div id='controls'>
<input type='button' value='Close' onclick="modal.close();" />
<input type='button' value='Update' onclick="updateCustomCSS();" />
</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 updateCustomCSS()
  {
    $.ajax({
      url: '/pages/<%= @page.id %>',
      type: 'put',
      data: {
        authenticity_token: "<%= form_authenticity_token %>",
        custom_css: $('#page_<%= @page.id %>_custom_css').val()
      },
      success: function(resp) {
        if (resp.success) {
          contentVal = $('#page_<%= @page.id %>_custom_css').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

Version Path
caboose-cms-0.2.57 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.55 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.54 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.52 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.50 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.49 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.48 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.47 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.46 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.45 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.44 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.43 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.42 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.41 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.40 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.39 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.38 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.37 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.36 app/views/caboose/pages/edit_css.html.erb
caboose-cms-0.2.35 app/views/caboose/pages/edit_css.html.erb