Commit 831bebc3090194e7030d2726335b2e5ddf872f61
1 parent
91b62197
Exists in
master
and in
29 other branches
Added WYSIWYG editor on header/footer edition
(ActionItem1895)
Showing
2 changed files
with
8 additions
and
2 deletions
Show diff stats
app/views/profile_editor/header_footer.rhtml
... | ... | @@ -21,9 +21,9 @@ |
21 | 21 | </div> |
22 | 22 | <% end %> |
23 | 23 | <h2><%= _('Content for header ') %></h2> |
24 | - <%= text_area_tag(:custom_header, @header, :style => 'width: 100%; height: 150px;') %> | |
24 | + <%= text_area_tag(:custom_header, @header, :style => 'width: 100%; height: 150px;', :class => 'mceEditor') %> | |
25 | 25 | <h2><%= _('Content for footer') %></h2> |
26 | - <%= text_area_tag(:custom_footer, @footer, :style => 'width: 100%; height: 150px;') %> | |
26 | + <%= text_area_tag(:custom_footer, @footer, :style => 'width: 100%; height: 150px;', :class => 'mceEditor') %> | |
27 | 27 | <% button_bar do %> |
28 | 28 | <%= submit_button(:save, _('Save')) %> |
29 | 29 | <%= button(:cancel, _('Cancel'), :action => 'index') %> | ... | ... |
test/functional/profile_editor_controller_test.rb
... | ... | @@ -498,6 +498,12 @@ class ProfileEditorControllerTest < Test::Unit::TestCase |
498 | 498 | assert_tag :tag => 'textarea', :content => 'my custom footer' |
499 | 499 | end |
500 | 500 | |
501 | + should 'render TinyMce Editor for header and footer' do | |
502 | + get :header_footer, :profile => profile.identifier | |
503 | + assert_tag :tag => 'textarea', :attributes => { :id => 'custom_header', :class => 'mceEditor' } | |
504 | + assert_tag :tag => 'textarea', :attributes => { :id => 'custom_footer', :class => 'mceEditor' } | |
505 | + end | |
506 | + | |
501 | 507 | should 'save footer and header' do |
502 | 508 | person = profile |
503 | 509 | post :header_footer, :profile => profile.identifier, :custom_header => 'new header', :custom_footer => 'new footer' | ... | ... |