Skip to content

Commit 6165df0

Browse files
committed
Removed cms/ajax from editor plugins and moved it into page_editor
Added accepts */* to ajax.js to allow page_components modal to load properly Made the text areas respect the column setting - 80 cols
1 parent 6532760 commit 6165df0

File tree

7 files changed

+14
-13
lines changed

7 files changed

+14
-13
lines changed

app/assets/javascripts/ckeditor/plugins/delete_content/plugin.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//= require cms/ajax
2-
31
CKEDITOR.plugins.add('delete_content', {
42
icons:'deletecontent',
53
init:function (editor) {

app/assets/javascripts/ckeditor/plugins/edit_content/plugin.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//= require cms/ajax
2-
31
CKEDITOR.plugins.add('edit_content', {
42
icons:'editcontent',
53
init:function (editor) {

app/assets/javascripts/ckeditor/plugins/move_content/plugin.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//= require cms/ajax
2-
31
CKEDITOR.plugins.add('move_content', {
42
icons:'movecontentup,movecontentdown',
53
init:function (editor) {

app/assets/javascripts/cms/ajax.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ jQuery(function ($) {
1010
asJS:function () {
1111
return function (xhr) {
1212
xhr.setRequestHeader('X-CSRF-Token', $.cms.csrfToken());
13-
xhr.setRequestHeader("Accept", "text/javascript");
13+
xhr.setRequestHeader("Accept", "text/javascript, */*, q=0.1");
1414
}
1515
},
1616
asJSON:function () {
1717
return function (xhr) {
1818
xhr.setRequestHeader('X-CSRF-Token', $.cms.csrfToken());
19-
xhr.setRequestHeader("Accept", "application/json");
19+
xhr.setRequestHeader("Accept", "application/json, */*, q=0.1");
2020
}
2121
},
2222
// Invoke a Rails aware (w/ CSRF token) PUT request.

app/assets/javascripts/cms/page_editor.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//= require 'cms/core_library'
44
//= require 'bootstrap-modal'
55
//= require 'ckeditor-jquery'
6+
//= require 'cms/ajax'
67

78
// Since we are within the page editing iframe, add a 'target=_top' to all links so they refresh the entire page.
89
$(function() {
@@ -52,8 +53,8 @@ $(function() {
5253
} else {
5354
reload.apply();
5455
}
55-
},
56-
beforeSend: $.cms_ajax.asJSON()
56+
}
57+
//,beforeSend: $.cms_ajax.asJSON()
5758
});
5859

5960
},
@@ -114,8 +115,8 @@ $(function() {
114115
afterSave.apply();
115116
}
116117
},
117-
data: message,
118-
beforeSend: $.cms_ajax.asJS()
118+
data: message
119+
//,beforeSend: $.cms_ajax.asJS()
119120
});
120121
}
121122
};

app/assets/stylesheets/cms/bootstrap-customizations.css.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,10 @@ tbody .block_status.published, #sitemap .span1.Published {
8585

8686
.navbar .nav > li > .btn:hover, .btn:focus {
8787
background-position: 0 0px;
88+
}
89+
90+
input,
91+
textarea,
92+
.uneditable-input {
93+
width: inherit;
8894
}

app/views/cms/dynamic_views/_form.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<%= f.cms_text_field :name %>
66
<%= f.cms_text_field :format %>
77
<%= f.cms_drop_down :handler, ActionView::Template.template_handler_extensions, :default => "erb" %>
8-
<%= f.cms_text_area :body, :style => "height: 500px" %>
8+
<%= f.cms_text_area :body, :style => "height: 500px", :cols => 80 %>
99
<div class="buttons">
1010
<%=raw dk_button_wrapper(f.submit("Save", :class => "submit", :tabindex => next_tabindex)) %>
1111
</div>

0 commit comments

Comments
 (0)