diff --git a/app/assets/javascripts/form.js b/app/assets/javascripts/form.js
new file mode 100644
index 0000000..941193e
--- /dev/null
+++ b/app/assets/javascripts/form.js
@@ -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);
+ })
+});
\ No newline at end of file
diff --git a/app/views/admin/announcements/_form.html.erb b/app/views/admin/announcements/_form.html.erb
index f295fe9..32f79f2 100644
--- a/app/views/admin/announcements/_form.html.erb
+++ b/app/views/admin/announcements/_form.html.erb
@@ -9,6 +9,7 @@
<%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
<%= javascript_include_tag "lib/file-type" %>
<%= javascript_include_tag "lib/module-area" %>
+ <%= javascript_include_tag "form" %>
<% end %>
@@ -20,7 +21,7 @@
<%= t(:basic) %>
<%= t(:status) %>
<%= t(:tags) %>
- <%= t(:image) %>
+ <%= t('announcement.image') %>
<%= t('announcement.email_reminder')%>
@@ -242,7 +243,7 @@
<%= 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 %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 0e8db55..c5117c0 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -3,6 +3,7 @@ en:
feed: Feed
import: Import
announcement:
+ image: Cover Image
picture_showing_size: Picture Showing Size
orignal_size: Original Size
small_size: Small Size
@@ -104,5 +105,5 @@ en:
is_external_link: Enable External Link
external_link: External Link
external_link_hint: "Make sure URL starts with http://"
- display_subtitle: Display Subtitle
- display_img: Display Cover Image
+ display_subtitle: Display Subtitle in Content Page
+ display_img: Display Cover Image in Content Page
diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml
index b118107..f85f8cc 100644
--- a/config/locales/zh_tw.yml
+++ b/config/locales/zh_tw.yml
@@ -3,6 +3,7 @@ zh_tw:
feed: 供給
import: 匯入
announcement:
+ image: 封面圖片
picture_showing_size: 圖片顯示大小
orignal_size: 原圖大小
small_size: 小張縮圖
@@ -108,5 +109,5 @@ zh_tw:
is_external_link: 連結外部網址
external_link: 外部連結
external_link_hint: "確定連結開頭為http://"
- display_subtitle: 顯示副標題
- display_img: 顯示圖片
+ display_subtitle: 內容頁顯示副標題
+ display_img: 內容頁顯示封面圖片