caboose-cms 0.3.129 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/assets/javascripts/caboose/admin_block_edit.js +267 -0
- data/app/assets/javascripts/caboose/admin_page_edit_content.js +71 -45
- data/app/assets/javascripts/caboose/admin_page_edit_content_bak.js +164 -0
- data/app/assets/javascripts/caboose/admin_page_new_blocks.js +4 -4
- data/app/assets/stylesheets/caboose/admin_page_edit_content.css +37 -16
- data/app/controllers/caboose/block_types_controller.rb +162 -0
- data/app/controllers/caboose/blocks_controller.rb +293 -0
- data/app/controllers/caboose/edit_controller.rb +33 -0
- data/app/controllers/caboose/pages_controller.rb +4 -3
- data/app/controllers/caboose/posts_controller.rb +1 -1
- data/app/models/caboose/block.rb +222 -0
- data/app/models/caboose/block_type.rb +28 -0
- data/app/models/caboose/core_plugin.rb +6 -6
- data/app/models/caboose/page.rb +8 -4
- data/app/models/caboose/schema.rb +90 -59
- data/app/models/caboose/utilities/schema.rb +3 -3
- data/app/views/caboose/block_types/admin_edit.html.erb +111 -0
- data/app/views/caboose/{page_block_types → block_types}/admin_index.html.erb +2 -2
- data/app/views/caboose/{page_block_types → block_types}/admin_new.html.erb +9 -6
- data/app/views/caboose/blocks/_block.html.erb +8 -0
- data/app/views/caboose/blocks/_heading.html.erb +7 -0
- data/app/views/caboose/blocks/_html.html.erb +7 -0
- data/app/views/caboose/blocks/_image.html.erb +0 -0
- data/app/views/caboose/blocks/_layout_default.html.erb +33 -0
- data/app/views/caboose/blocks/_layout_default_content.html.erb +16 -0
- data/app/views/caboose/blocks/_layout_default_footer.html.erb +20 -0
- data/app/views/caboose/blocks/_layout_default_header.html.erb +32 -0
- data/app/views/caboose/blocks/_richtext.html.erb +7 -0
- data/app/views/caboose/{page_blocks/_richtext.html.erb → blocks/_text.html.erb} +1 -2
- data/app/views/caboose/blocks/admin_edit.html.erb +106 -0
- data/app/views/caboose/{page_blocks → blocks}/admin_edit_custom.html.erb +0 -0
- data/app/views/caboose/{page_blocks → blocks}/admin_edit_h1.html.erb +0 -0
- data/app/views/caboose/{page_blocks → blocks}/admin_edit_h2.html.erb +0 -0
- data/app/views/caboose/{page_blocks → blocks}/admin_edit_h3.html.erb +0 -0
- data/app/views/caboose/{page_blocks → blocks}/admin_edit_h4.html.erb +0 -0
- data/app/views/caboose/{page_blocks → blocks}/admin_edit_h5.html.erb +0 -0
- data/app/views/caboose/{page_blocks → blocks}/admin_edit_h6.html.erb +0 -0
- data/app/views/caboose/{page_blocks → blocks}/admin_edit_richtext.html.erb +0 -0
- data/app/views/caboose/blocks/admin_new.html.erb +55 -0
- data/app/views/caboose/pages/_admin_header.html.erb +1 -1
- data/app/views/caboose/pages/_content.html.erb +1 -1
- data/app/views/caboose/pages/_new_block_header.html.erb +13 -0
- data/app/views/caboose/pages/admin_edit_content.html.erb +24 -20
- data/app/views/caboose/pages/show.html.erb +13 -30
- data/app/views/layouts/caboose/application.html.erb +26 -14
- data/config/routes.rb +38 -30
- data/lib/caboose/engine.rb +2 -2
- data/lib/caboose/version.rb +1 -1
- metadata +33 -35
- data/app/controllers/caboose/page_block_field_values_controller.rb +0 -55
- data/app/controllers/caboose/page_block_fields_controller.rb +0 -123
- data/app/controllers/caboose/page_block_types_controller.rb +0 -100
- data/app/controllers/caboose/page_blocks_controller.rb +0 -165
- data/app/models/caboose/page_block.rb +0 -49
- data/app/models/caboose/page_block_field.rb +0 -21
- data/app/models/caboose/page_block_field_value.rb +0 -39
- data/app/models/caboose/page_block_renderers/h1.rb +0 -5
- data/app/models/caboose/page_block_renderers/h2.rb +0 -5
- data/app/models/caboose/page_block_renderers/h3.rb +0 -5
- data/app/models/caboose/page_block_renderers/h4.rb +0 -5
- data/app/models/caboose/page_block_renderers/h5.rb +0 -5
- data/app/models/caboose/page_block_renderers/h6.rb +0 -5
- data/app/models/caboose/page_block_renderers/p.rb +0 -5
- data/app/models/caboose/page_block_renderers/richtext.rb +0 -5
- data/app/models/caboose/page_block_type.rb +0 -12
- data/app/views/caboose/page_block_fields/admin_edit.html.erb +0 -77
- data/app/views/caboose/page_block_fields/admin_new.html.erb +0 -30
- data/app/views/caboose/page_block_types/admin_edit.html.erb +0 -82
- data/app/views/caboose/page_blocks/_heading.html.erb +0 -7
- data/app/views/caboose/page_blocks/_partial.html.erb +0 -11
- data/app/views/caboose/page_blocks/admin_edit.html.erb +0 -69
@@ -1,21 +0,0 @@
|
|
1
|
-
|
2
|
-
class Caboose::PageBlockField < ActiveRecord::Base
|
3
|
-
self.table_name = "page_block_fields"
|
4
|
-
|
5
|
-
belongs_to :page_block_type
|
6
|
-
has_many :page_block_field_values, :dependent => :destroy
|
7
|
-
attr_accessible :id,
|
8
|
-
:page_block_type_id,
|
9
|
-
:name, :field_type,
|
10
|
-
:nice_name, :default,
|
11
|
-
:width, :height,
|
12
|
-
:fixed_placeholder,
|
13
|
-
:options,
|
14
|
-
:options_function,
|
15
|
-
:options_url
|
16
|
-
|
17
|
-
def render_options(empty_text = nil)
|
18
|
-
return eval(self.options_function)
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
|
2
|
-
class Caboose::PageBlockFieldValue < ActiveRecord::Base
|
3
|
-
self.table_name = "page_block_field_values"
|
4
|
-
|
5
|
-
belongs_to :page_block
|
6
|
-
belongs_to :page_block_field
|
7
|
-
|
8
|
-
has_attached_file :file, :path => '/uploads/:id.:extension'
|
9
|
-
do_not_validate_attachment_file_type :file
|
10
|
-
has_attached_file :image,
|
11
|
-
:path => 'uploads/:id_:style.:extension',
|
12
|
-
:styles => {
|
13
|
-
:tiny => '160x120>',
|
14
|
-
:thumb => '400x300>',
|
15
|
-
:large => '640x480>'
|
16
|
-
}
|
17
|
-
do_not_validate_attachment_file_type :image
|
18
|
-
|
19
|
-
attr_accessible :id, :page_block_id, :page_block_field_id, :value
|
20
|
-
|
21
|
-
after_initialize do |fv|
|
22
|
-
# Do whatever we need to do to set the value to be correct for the field type we have.
|
23
|
-
# Most field types are fine with the raw value in the database
|
24
|
-
case fv.page_block_field.field_type
|
25
|
-
when 'checkbox' then fv.value = (fv.value == 1 || fv.value == '1' || fv.value == true ? true : false)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
before_save :caste_value
|
30
|
-
def caste_value
|
31
|
-
case self.page_block_field.field_type
|
32
|
-
when 'checkbox'
|
33
|
-
if self.value.nil? then self.value = false
|
34
|
-
else self.value = (self.value == 1 || self.value == '1' || self.value == true ? 1 : 0)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
|
2
|
-
class Caboose::PageBlockType < ActiveRecord::Base
|
3
|
-
self.table_name = "page_block_types"
|
4
|
-
|
5
|
-
has_many :page_block_fields, :dependent => :destroy
|
6
|
-
attr_accessible :id, :name, :description, :use_render_function, :render_function
|
7
|
-
|
8
|
-
def fields
|
9
|
-
return page_block_fields
|
10
|
-
end
|
11
|
-
|
12
|
-
end
|
@@ -1,77 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
block_type_id = @field.page_block_type.id
|
3
|
-
%>
|
4
|
-
|
5
|
-
<h1>Edit Page Block Field</h1>
|
6
|
-
<div id='pageblockfield_<%= @field.id %>_name'></div>
|
7
|
-
<div id='pageblockfield_<%= @field.id %>_nice_name'></div>
|
8
|
-
<div id='pageblockfield_<%= @field.id %>_field_type'></div>
|
9
|
-
<div id='pageblockfield_<%= @field.id %>_default'></div>
|
10
|
-
<div id='pageblockfield_<%= @field.id %>_width'></div>
|
11
|
-
<div id='pageblockfield_<%= @field.id %>_height'></div>
|
12
|
-
<div id='pageblockfield_<%= @field.id %>_fixed_placeholder'></div>
|
13
|
-
<div id='pageblockfield_<%= @field.id %>_options_url'></div>
|
14
|
-
<div id='pageblockfield_<%= @field.id %>_options_function'></div>
|
15
|
-
<div id='pageblockfield_<%= @field.id %>_options'></div>
|
16
|
-
<br />
|
17
|
-
|
18
|
-
<div id='message'></div>
|
19
|
-
<p>
|
20
|
-
<input type='button' value='< Back' onclick="window.location='/admin/page-block-types/<%= block_type_id %>/edit';" />
|
21
|
-
<input type='button' value='Delete Field' onclick="delete_field(<%= @field.id %>);" />
|
22
|
-
</p>
|
23
|
-
|
24
|
-
<% content_for :caboose_css do %>
|
25
|
-
<style type='text/css'>
|
26
|
-
#pageblockfield_<%= @field.id %>_options_function { font-family: Courier; font-size: 80%; }
|
27
|
-
</style>
|
28
|
-
<% end %>
|
29
|
-
<% content_for :caboose_js do %>
|
30
|
-
<%= javascript_include_tag "caboose/model/all" %>
|
31
|
-
<script type="text/javascript">
|
32
|
-
|
33
|
-
function delete_field(field_id, confirm)
|
34
|
-
{
|
35
|
-
if (!confirm)
|
36
|
-
{
|
37
|
-
var p = $('<p/>').addClass('note warning')
|
38
|
-
.append('Are you sure you want to delete the field? ')
|
39
|
-
.append($('<input/>').attr('type', 'button').val('Yes').click(function() { delete_field(field_id, true); })).append(" ")
|
40
|
-
.append($('<input/>').attr('type', 'button').val('No' ).click(function() { $('#message').empty(); }));
|
41
|
-
$('#message').empty().append(p);
|
42
|
-
return;
|
43
|
-
}
|
44
|
-
$('#message').empty().append($('<p/>').addClass('loading').html('Deleting field...'));
|
45
|
-
$.ajax({
|
46
|
-
url: '/admin/page-block-types/<%= block_type_id %>/fields/' + field_id,
|
47
|
-
type: 'delete',
|
48
|
-
success: function(resp) {
|
49
|
-
if (resp.error) $('#message').empty().append($('<p/>').addClass('note error').html(resp.error));
|
50
|
-
if (resp.redirect) window.location = resp.redirect;
|
51
|
-
}
|
52
|
-
});
|
53
|
-
}
|
54
|
-
|
55
|
-
$(document).ready(function() {
|
56
|
-
m = new ModelBinder({
|
57
|
-
name: 'PageBlockField',
|
58
|
-
id: <%= @field.id %>,
|
59
|
-
update_url: '/admin/page-block-types/<%= @field.page_block_type.id %>/fields/<%= @field.id %>',
|
60
|
-
authenticity_token: '<%= form_authenticity_token %>',
|
61
|
-
attributes: [
|
62
|
-
{ name: 'name' , nice_name: 'Short name' , type: 'text' , value: <%= raw Caboose.json(@field.name) %>, width: 400 },
|
63
|
-
{ name: 'nice_name' , nice_name: 'Long name' , type: 'text' , value: <%= raw Caboose.json(@field.nice_name) %>, width: 400 },
|
64
|
-
{ name: 'field_type' , nice_name: 'Field type' , type: 'select' , value: <%= raw Caboose.json(@field.field_type) %>, text: <%= raw Caboose.json(@field.field_type) %>, width: 400, options_url: '/admin/page-block-fields/field-type-options' },
|
65
|
-
{ name: 'default' , nice_name: 'Default value' , type: 'text' , value: <%= raw Caboose.json(@field.default) %>, width: 400 },
|
66
|
-
{ name: 'width' , nice_name: 'Width' , type: 'text' , value: <%= raw Caboose.json(@field.width) %>, width: 400 },
|
67
|
-
{ name: 'height' , nice_name: 'Height' , type: 'text' , value: <%= raw Caboose.json(@field.height) %>, width: 400 },
|
68
|
-
{ name: 'fixed_placeholder' , nice_name: 'Fixed placeholder' , type: 'checkbox' , value: <%= raw Caboose.json(@field.fixed_placeholder) %>, width: 400 },
|
69
|
-
{ name: 'options_url' , nice_name: 'Options URL' , type: 'text' , value: <%= raw Caboose.json(@field.options_url) %>, width: 400 },
|
70
|
-
{ name: 'options_function' , nice_name: 'Options Function' , type: 'textarea' , value: <%= raw Caboose.json(@field.options_function) %>, width: 400, height: 100 },
|
71
|
-
{ name: 'options' , nice_name: 'Options' , type: 'textarea' , value: <%= raw Caboose.json(@field.options) %>, width: 400, height: 100 }
|
72
|
-
]
|
73
|
-
});
|
74
|
-
});
|
75
|
-
|
76
|
-
</script>
|
77
|
-
<% end %>
|
@@ -1,30 +0,0 @@
|
|
1
|
-
|
2
|
-
<h1>New Field</h1>
|
3
|
-
<p><input type='text' id='name' name='name' placeholder='Field name' /></p>
|
4
|
-
<div id='message'></div>
|
5
|
-
<p>
|
6
|
-
<input type='button' value='< Back' onclick="window.location='/admin/page-block-types/<%= @block_type.id %>/edit';" />
|
7
|
-
<input type='button' value='Add Field' onclick="add_field();" />
|
8
|
-
</p>
|
9
|
-
|
10
|
-
<% content_for :caboose_js do %>
|
11
|
-
<script type='text/javascript'>
|
12
|
-
|
13
|
-
function add_field()
|
14
|
-
{
|
15
|
-
$('#message').empty().append($('<p/>').addClass('loading').html('Adding field...'));
|
16
|
-
$.ajax({
|
17
|
-
url: '/admin/page-block-types/<%= @block_type.id %>/fields',
|
18
|
-
type: 'post',
|
19
|
-
data: {
|
20
|
-
name: $('#name').val()
|
21
|
-
},
|
22
|
-
success: function(resp) {
|
23
|
-
if (resp.error) $('#message').empty().append($('<p/>').addClass('note error').html(resp.error));
|
24
|
-
if (resp.redirect) window.location = resp.redirect;
|
25
|
-
}
|
26
|
-
});
|
27
|
-
}
|
28
|
-
|
29
|
-
</script>
|
30
|
-
<% end %>
|
@@ -1,82 +0,0 @@
|
|
1
|
-
|
2
|
-
<h1>Edit Page Block Type</h1>
|
3
|
-
<div id='pageblocktype_<%= @block_type.id %>_name'></div>
|
4
|
-
<div id='pageblocktype_<%= @block_type.id %>_description'></div>
|
5
|
-
<div id='pageblocktype_<%= @block_type.id %>_use_render_function'></div>
|
6
|
-
<div id='pageblocktype_<%= @block_type.id %>_render_function'></div>
|
7
|
-
|
8
|
-
<h2>Fields</h2>
|
9
|
-
<p><a href='/admin/page-block-types/<%= @block_type.id %>/fields/new'>New Field</a></p>
|
10
|
-
<% if @block_type.fields.count > 0 %>
|
11
|
-
<table class='data'>
|
12
|
-
<tr>
|
13
|
-
<th>Short Name</th>
|
14
|
-
<th>Long Name</th>
|
15
|
-
<th>Field Type</th>
|
16
|
-
</tr>
|
17
|
-
<% @block_type.fields.each do |f| %>
|
18
|
-
<tr onclick="window.location='/admin/page-block-types/<%= @block_type.id %>/fields/<%= f.id %>/edit';">
|
19
|
-
<td><%= f.name %></td>
|
20
|
-
<td><%= f.nice_name %></td>
|
21
|
-
<td><%= f.field_type %></td>
|
22
|
-
</tr>
|
23
|
-
<% end %>
|
24
|
-
</table><br />
|
25
|
-
<% else %>
|
26
|
-
<p>This type of page block doesn't have any fields.</p>
|
27
|
-
<% end %>
|
28
|
-
|
29
|
-
<div id='message'></div>
|
30
|
-
<p>
|
31
|
-
<input type='button' value='< Back' onclick="window.location='/admin/page-block-types';" />
|
32
|
-
<input type='button' value='Delete Block Type' onclick="delete_block_type(<%= @block_type.id %>);" />
|
33
|
-
</p>
|
34
|
-
|
35
|
-
<% content_for :caboose_css do %>
|
36
|
-
<style type='text/css'>
|
37
|
-
#pageblocktype_<%= @block_type.id %>_render_function { font-family: Courier; font-size: 80%; }
|
38
|
-
</style>
|
39
|
-
<% end %>
|
40
|
-
<% content_for :caboose_js do %>
|
41
|
-
<%= javascript_include_tag "caboose/model/all" %>
|
42
|
-
<script type="text/javascript">
|
43
|
-
|
44
|
-
function delete_block_type(block_type_id, confirm)
|
45
|
-
{
|
46
|
-
if (!confirm)
|
47
|
-
{
|
48
|
-
var p = $('<p/>').addClass('note warning')
|
49
|
-
.append('Are you sure you want to delete the block type? ')
|
50
|
-
.append($('<input/>').attr('type', 'button').val('Yes').click(function() { delete_block_type(block_type_id, true); })).append(" ")
|
51
|
-
.append($('<input/>').attr('type', 'button').val('No' ).click(function() { $('#message').empty(); }));
|
52
|
-
$('#message').empty().append(p);
|
53
|
-
return;
|
54
|
-
}
|
55
|
-
$('#message').empty().append($('<p/>').addClass('loading').html('Deleting block type...'));
|
56
|
-
$.ajax({
|
57
|
-
url: '/admin/page-block-types/' + block_type_id,
|
58
|
-
type: 'delete',
|
59
|
-
success: function(resp) {
|
60
|
-
if (resp.error) $('#message').empty().append($('<p/>').addClass('note error').html(resp.error));
|
61
|
-
if (resp.redirect) window.location = resp.redirect;
|
62
|
-
}
|
63
|
-
});
|
64
|
-
}
|
65
|
-
|
66
|
-
$(document).ready(function() {
|
67
|
-
m = new ModelBinder({
|
68
|
-
name: 'PageBlockType',
|
69
|
-
id: <%= @block_type.id %>,
|
70
|
-
update_url: '/admin/page-block-types/<%= @block_type.id %>',
|
71
|
-
authenticity_token: '<%= form_authenticity_token %>',
|
72
|
-
attributes: [
|
73
|
-
{ name: 'name' , nice_name: 'Name' , type: 'text' , value: <%= raw Caboose.json(@block_type.name) %> , width: 400 },
|
74
|
-
{ name: 'description' , nice_name: 'Description' , type: 'text' , value: <%= raw Caboose.json(@block_type.description) %> , width: 400 },
|
75
|
-
{ name: 'use_render_function' , nice_name: 'Use Render Function' , type: 'checkbox' , value: <%= @block_type.use_render_function ? 'true' : 'false' %> , width: 400 },
|
76
|
-
{ name: 'render_function' , nice_name: 'Render Function' , type: 'textarea' , value: <%= raw Caboose.json(@block_type.render_function) %> , width: 800, height: 200 }
|
77
|
-
]
|
78
|
-
});
|
79
|
-
});
|
80
|
-
|
81
|
-
</script>
|
82
|
-
<% end %>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
partial = block.field_value('partial')
|
3
|
-
%><% if editing %>
|
4
|
-
<% if partial.nil? || partial.strip.length == 0 %>
|
5
|
-
<p>Empty partial, click to edit.</p>
|
6
|
-
<% else %>
|
7
|
-
<p>Partial <%= partial %>, click to edit.</p>
|
8
|
-
<% end %>
|
9
|
-
<% elsif !partial.nil? && partial.strip.length > 0 %>
|
10
|
-
<%= render partial %>
|
11
|
-
<% end %>
|
@@ -1,69 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
update_on_close = false
|
3
|
-
@block.page_block_type.fields.each do |f|
|
4
|
-
update_on_close = true if f.field_type == 'image' || f.field_type == 'file'
|
5
|
-
end
|
6
|
-
%>
|
7
|
-
<h2 style='margin-top: 0; padding-top: 0;'>Edit <%= @block.page_block_type.description %></h2>
|
8
|
-
<% @block.page_block_type.fields.each do |f| %>
|
9
|
-
<% fv = @block.field_value_object(f.name) %>
|
10
|
-
<div id='pageblockfieldvalue_<%= fv.id %>_value'></div>
|
11
|
-
<% end %>
|
12
|
-
<p><input type='button' value='Close' onclick="<% if update_on_close %>parent.controller.render_blocks();<% end %>modal.close();" /></p>
|
13
|
-
|
14
|
-
<% content_for :caboose_js do %>
|
15
|
-
<%= javascript_include_tag "caboose/model/all" %>
|
16
|
-
<script type='text/javascript'>
|
17
|
-
|
18
|
-
var modal = false;
|
19
|
-
$(window).load(function() {
|
20
|
-
modal = new CabooseModal(800);
|
21
|
-
});
|
22
|
-
|
23
|
-
$(document).ready(function() {
|
24
|
-
<% use_tinymce = false %>
|
25
|
-
<% @block.page_block_type.fields.each do |f| %>
|
26
|
-
<% fv = @block.field_value_object(f.name) %>
|
27
|
-
<% use_tinymce = true if f.field_type == 'richtext' %>
|
28
|
-
m = new ModelBinder({
|
29
|
-
name: 'PageBlockFieldValue',
|
30
|
-
id: <%= fv.id %>,
|
31
|
-
update_url: '/admin/page-block-field-values/<%= fv.id %>',
|
32
|
-
authenticity_token: '<%= form_authenticity_token %>',
|
33
|
-
attributes: [{
|
34
|
-
name: 'value',
|
35
|
-
type: <%= raw Caboose.json(f.field_type) %>,
|
36
|
-
value: <%
|
37
|
-
if f.field_type == 'checkbox' %><%= fv.value ? 'true' : 'false' %><%
|
38
|
-
elsif f.field_type == 'image' %><%= raw Caboose.json(fv.image.url(:tiny)) %><%
|
39
|
-
elsif f.field_type == 'file' %><%= raw Caboose.json(fv.image.url) %><%
|
40
|
-
else %><%= raw Caboose.json(fv.value) %><%
|
41
|
-
end %>,
|
42
|
-
<% if f.field_type == 'select' %>text: <%= raw Caboose.json(fv.value) %>,<% end %>
|
43
|
-
nice_name: <%= raw Caboose.json(f.nice_name ? f.nice_name : f.name) %>,
|
44
|
-
width: <% if f.width %><%= raw Caboose.json(f.width) %><% else %>780<% end %>,
|
45
|
-
<% if f.height %>height: <%= raw Caboose.json(f.height) %>,<% end %>
|
46
|
-
<% if f.fixed_placeholder %>fixed_placeholder: <%= raw Caboose.json(f.fixed_placeholder) %>,<% end %>
|
47
|
-
<% if f.options || f.options_function %>options_url: '/admin/page-block-fields/<%= f.id %>/options',<%
|
48
|
-
elsif f.options_url %>options_url: <%= raw Caboose.json(f.options_url) %>,<% end %>
|
49
|
-
<% if f.field_type == 'image' %>update_url: '/admin/page-block-field-values/<%= fv.id %>/image',
|
50
|
-
image_refresh_delay: 100,
|
51
|
-
<% end %>
|
52
|
-
<% if f.field_type == 'file' %>update_url: '/admin/page-block-field-values/<%= fv.id %>/file',<% end %>
|
53
|
-
after_update: function() { parent.controller.render_blocks(); },
|
54
|
-
after_cancel: function() { parent.controller.render_blocks(); }
|
55
|
-
}]
|
56
|
-
});
|
57
|
-
<% end %>
|
58
|
-
});
|
59
|
-
|
60
|
-
</script>
|
61
|
-
<% if use_tinymce %>
|
62
|
-
<%= tinymce_assets %>
|
63
|
-
<script type='textjavascript'>
|
64
|
-
document.domain = "<%= Rails.application.config.action_controller.asset_host %>";
|
65
|
-
</script>
|
66
|
-
<%= tinymce :caboose, width: '800px', height:'300px' %>
|
67
|
-
<% end %>
|
68
|
-
<% end %>
|
69
|
-
|