Sha256: 539aaa32689fa1ce93374122a86e50e202d907b57941efe67c0c65e574b76fbe

Contents?: true

Size: 968 Bytes

Versions: 904

Compression:

Stored size: 968 Bytes

Contents

<%
obj = block.value && block.value != "" ? JSON.parse(block.value) : nil
%>
<div id='pageblock_<%= @block.id %>_value'></div>  

<% content_for :caboose_js do %>
<%= javascript_include_tag "caboose/model/all" %>
<script type='text/javascript'>

var modal = false;
$(window).load(function() {
  modal = new CabooseModal(800);
});

$(document).ready(function() {  
  m = new ModelBinder({
    name: 'PageBlock',
    id: <%= @block.id %>,
    update_url: '/admin/pages/<%= @page.id %>/blocks/<%= @block.id %>',
    authenticity_token: '<%= form_authenticity_token %>',
    attributes: [{
      name: 'value',
      nice_name: 'Content',
      type: 'text',
      value: <%= raw Caboose.json(@block.value) %>,
      width: 800,
      fixed_placeholder: false,
      after_update: function() { parent.controller.render_blocks(); modal.close(); },
      after_cancel: function() { parent.controller.render_blocks(); modal.close(); }
    }]
  });  
});

</script>
<% end %>

Version data entries

904 entries across 904 versions & 1 rubygems

Version Path
caboose-cms-0.9.229 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-1.0.2 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-1.0.1 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.228 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.227 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.226 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.225 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.224 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.223 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.222 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.221 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.220 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.219 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.218 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.217 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.216 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.215 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.214 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.213 app/views/caboose/blocks/admin_edit_custom.html.erb
caboose-cms-0.9.212 app/views/caboose/blocks/admin_edit_custom.html.erb