Commit c1c19173a21e1acaea64183b29b86e51ebca6f33
Committed by
Daniela Feitosa
1 parent
e7464a3d
Exists in
master
and in
29 other branches
Fixing the tiny_mce articles on tasks
Obs: should be applied over 4ce41162d5baa9389ae22ac09a730515143ad140 (ActionItem1527)
Showing
10 changed files
with
23 additions
and
44 deletions
Show diff stats
app/models/article.rb
app/models/tiny_mce_article.rb
app/views/cms/_tiny_mce_article.rhtml
... | ... | @@ -18,10 +18,10 @@ |
18 | 18 | <em><%= _('Used when a short version of your text is needed.') %></em> |
19 | 19 | |
20 | 20 | <div id="article-lead"> |
21 | - <%= labelled_form_field(_('Lead'), text_area(:article, 'abstract', :style => 'width: 100%; height: 200px;')) %> | |
21 | + <%= labelled_form_field(_('Lead'), text_area(:article, 'abstract', :style => 'width: 100%; height: 200px;', :class => 'mceEditor')) %> | |
22 | 22 | </div> |
23 | 23 | <div style="margin-top: 10px;"> |
24 | - <%= labelled_form_field(_('Text'), text_area(:article, 'body', :style => 'width:100%; height: 500px;')) %> | |
24 | + <%= labelled_form_field(_('Text'), text_area(:article, 'body', :style => 'width:100%; height: 500px;', :class => 'mceEditor')) %> | |
25 | 25 | </div> |
26 | 26 | |
27 | 27 | </div> | ... | ... |
app/views/shared/tiny_mce.rhtml
app/views/tasks/_approve_article_accept_details.rhtml
1 | +<%= render :file => 'shared/tiny_mce' %> | |
2 | + | |
1 | 3 | <%= labelled_form_field(_('Name for publishing'), f.text_field(:name)) %> |
2 | 4 | <%= select_profile_folder(_('Select the folder where the article must be published'), "tasks[#{task.id}][task]", 'article_parent_id', task.target) %> |
3 | 5 | <%= labelled_form_field(_('Highlight this article'), f.check_box(:highlighted)) %> |
4 | 6 | |
5 | 7 | <div> |
6 | - <%= labelled_form_field(_('Lead'), f.text_area(:abstract, :style => 'width: 482px; height: 200px;')) %> | |
8 | + <% if task.article && task.article.tiny_mce? %> | |
9 | + <%= labelled_form_field(_('Lead'), f.text_area(:abstract, :style => 'width: 482px; height: 200px;', :class => 'mceEditor')) %> | |
10 | + <% else %> | |
11 | + <%= labelled_form_field(_('Lead'), f.text_area(:abstract, :style => 'width: 482px; height: 200px;')) %> | |
12 | + <% end %> | |
7 | 13 | </div> |
8 | 14 | <em><%= _('Used when a short version your text is needed.') %></em> |
9 | 15 | |
10 | 16 | <div style="margin-top: 10px;"> |
11 | - <%= labelled_form_field(_('Text'), f.text_area(:body, :style => 'width:482px; height: 500px;')) %> | |
17 | + <% if task.article && task.article.tiny_mce? %> | |
18 | + <%= labelled_form_field(_('Text'), f.text_area(:body, :style => 'width:482px; height: 500px;', :class => 'mceEditor')) %> | |
19 | + <% else %> | |
20 | + <%= labelled_form_field(_('Text'), f.text_area(:body, :style => 'width:482px; height: 500px;')) %> | |
21 | + <% end %> | |
12 | 22 | </div> |
13 | 23 | <%= labelled_form_field _('Comment for author'), f.text_field(:closing_statment, :style => 'width: 488px;') %> |
14 | 24 | ... | ... |
app/views/tasks/_article.rhtml
app/views/tasks/_suggest_article_accept_details.rhtml
app/views/tasks/_textile_article.rhtml
... | ... | @@ -1,14 +0,0 @@ |
1 | -<% button_bar do %> | |
2 | - <%= button :add, _("Lead"), '#', :id => "lead-button", :title => _('Used when a short version of your text is needed.'), :style => "margin-left: 0px;" %> | |
3 | - <%= button :add, _("Text"), '#', :id => "body-button", :style => "margin-left: 0px;" %> | |
4 | -<% end %> | |
5 | - | |
6 | -<div id="article-lead"> | |
7 | - <%= labelled_form_field(_('Lead'), f.text_area(:abstract, :cols => 64, :rows => 10)) %> | |
8 | -</div> | |
9 | -<div id="article-body-field" style="margin-top: 10px;"> | |
10 | - <%= labelled_form_field(_('Text'), f.text_area(:body, :cols => 64, :rows => 30)) %> | |
11 | -</div> | |
12 | - | |
13 | -<%= javascript_include_tag 'article'%> | |
14 | - |
app/views/tasks/_tiny_mce_article.rhtml
... | ... | @@ -1,15 +0,0 @@ |
1 | -<%= render :file => 'shared/tiny_mce' %> | |
2 | - | |
3 | -<% button_bar do %> | |
4 | - <%= button :add, _("Lead"), '#', :id => "lead-button", :title => _('Used when a short version your text is needed.'), :style => "margin-left: 0px;" %> | |
5 | - <%= button :add, _("Text"), '#', :id => "body-button", :style => "margin-left: 0px;" %> | |
6 | -<% end %> | |
7 | - | |
8 | -<div id="article-lead"> | |
9 | - <%= labelled_form_field(_('Lead'), f.text_area(:abstract, :style => 'width: 100%; height: 200px;')) %> | |
10 | -</div> | |
11 | -<div id="article-body-field" style="margin-top: 10px;"> | |
12 | - <%= labelled_form_field(_('Text'), f.text_area(:body, :style => 'width:100%; height: 500px;')) %> | |
13 | -</div> | |
14 | - | |
15 | -<%= javascript_include_tag 'article' %> |
app/views/tasks/_uploaded_file.rhtml
... | ... | @@ -1,9 +0,0 @@ |
1 | -<% button_bar do %> | |
2 | - <%= button :add, _("Description"), '#', :id => "lead-button", :title => _('Used when a short version your text is needed.') %> | |
3 | -<% end %> | |
4 | - | |
5 | -<div id="article-lead"> | |
6 | - <%= labelled_form_field(_('Description'), text_area(:article, :abstract, :rows => 3, :cols => 64)) %> | |
7 | -</div> | |
8 | - | |
9 | -<%= javascript_include_tag 'article' %> |