change some translation and reduce the feature of ckeditor in title

field at admin
This commit is contained in:
chiu 2020-02-11 21:12:54 +08:00
parent a4ddbb351d
commit 036b3132b1
4 changed files with 28 additions and 6 deletions

View File

@ -0,0 +1,19 @@
$(document).ready(function() {
var config = {}
config.autoGrow_minHeight = 50;
config.toolbar = [
{ name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
{ name: 'editing', items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'CopyFormatting', 'RemoveFormat' ] },
'/',
{ name: 'insert', items: [ 'SpecialChar'] },
{ name: 'styles', items: [ 'Font' ] },
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] }
];
var ckeditor_reduce = $('.ckeditor_reduce')
ckeditor_reduce.each(function(i,v){
CKEDITOR.replace(v,config);
})
});

View File

@ -9,6 +9,7 @@
<%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %> <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
<%= javascript_include_tag "lib/file-type" %> <%= javascript_include_tag "lib/file-type" %>
<%= javascript_include_tag "lib/module-area" %> <%= javascript_include_tag "lib/module-area" %>
<%= javascript_include_tag "form" %>
<% end %> <% end %>
<!-- Input Area --> <!-- Input Area -->
@ -20,7 +21,7 @@
<li class="active"><a href="#basic" data-toggle="tab"><%= t(:basic) %></a></li> <li class="active"><a href="#basic" data-toggle="tab"><%= t(:basic) %></a></li>
<li><a href="#status" data-toggle="tab"><%= t(:status) %></a></li> <li><a href="#status" data-toggle="tab"><%= t(:status) %></a></li>
<li><a href="#tag" data-toggle="tab"><%= t(:tags) %></a></li> <li><a href="#tag" data-toggle="tab"><%= t(:tags) %></a></li>
<li><a href="#imageupload" data-toggle="tab"><%= t(:image) %></a></li> <li><a href="#imageupload" data-toggle="tab"><%= t('announcement.image') %></a></li>
<li><a href="#mail-group" data-toggle="tab"><%= t('announcement.email_reminder')%></a></li> <li><a href="#mail-group" data-toggle="tab"><%= t('announcement.email_reminder')%></a></li>
</ul> </ul>
<!-- Module --> <!-- Module -->
@ -242,7 +243,7 @@
<label class="control-label muted"><%= t(:title) %></label> <label class="control-label muted"><%= t(:title) %></label>
<div class="controls"> <div class="controls">
<%= f.fields_for :title_translations do |f| %> <%= f.fields_for :title_translations do |f| %>
<%= f.text_area locale, class: "ckeditor input-block-level", placeholder: t(:title), value: (@bulletin.title_translations[locale] rescue nil) %> <%= f.text_area locale, class: "ckeditor_reduce input-block-level", placeholder: t(:title), value: (@bulletin.title_translations[locale] rescue nil) %>
<% end %> <% end %>
</div> </div>
</div> </div>

View File

@ -3,6 +3,7 @@ en:
feed: Feed feed: Feed
import: Import import: Import
announcement: announcement:
image: Cover Image
picture_showing_size: Picture Showing Size picture_showing_size: Picture Showing Size
orignal_size: Original Size orignal_size: Original Size
small_size: Small Size small_size: Small Size
@ -104,5 +105,5 @@ en:
is_external_link: Enable External Link is_external_link: Enable External Link
external_link: External Link external_link: External Link
external_link_hint: "Make sure URL starts with http://" external_link_hint: "Make sure URL starts with http://"
display_subtitle: Display Subtitle display_subtitle: Display Subtitle in Content Page
display_img: Display Cover Image display_img: Display Cover Image in Content Page

View File

@ -3,6 +3,7 @@ zh_tw:
feed: 供給 feed: 供給
import: 匯入 import: 匯入
announcement: announcement:
image: 封面圖片
picture_showing_size: 圖片顯示大小 picture_showing_size: 圖片顯示大小
orignal_size: 原圖大小 orignal_size: 原圖大小
small_size: 小張縮圖 small_size: 小張縮圖
@ -108,5 +109,5 @@ zh_tw:
is_external_link: 連結外部網址 is_external_link: 連結外部網址
external_link: 外部連結 external_link: 外部連結
external_link_hint: "確定連結開頭為http://" external_link_hint: "確定連結開頭為http://"
display_subtitle: 顯示副標題 display_subtitle: 內容頁顯示副標題
display_img: 顯示圖片 display_img: 內容頁顯示封面圖片