From 3772e350ba5d167568c1411fa69db8a00c669724 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 15 May 2015 21:33:11 +0800 Subject: [PATCH] now can insert word to ckeditor directly and also fixed looping problem for freego software. --- app/assets/javascripts/ckeditor/config.js.erb | 5 +++- .../stylesheets/basic/orbit_bar.css.erb | 2 +- .../lib/orbit_bar/orbit-bar.scss.erb | 7 +++--- app/views/orbit_bar/index.html.erb | 24 ++++++++++++++----- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/ckeditor/config.js.erb b/app/assets/javascripts/ckeditor/config.js.erb index 06c2ec9..79fd447 100644 --- a/app/assets/javascripts/ckeditor/config.js.erb +++ b/app/assets/javascripts/ckeditor/config.js.erb @@ -5,11 +5,14 @@ CKEDITOR.editorConfig = function( config ) { config.uiColor = '#e6e6e6'; - config.language = 'zh'; + config.defaultLanguage = "en"; + config.language = '<%= (I18n.locale.to_s == "zh_tw" || I18n.locale.to_s == "zh_cn" ? "zh" : I18n.locale.to_s) %>'; config.height = 400; config.resize_minHeight = 400; config.toolbarCanCollapse = true; config.allowedContent = true; + config.pasteFromWordRemoveFontStyles=false; + config.pasteFromWordRemoveStyles=false; config.plugins = 'dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,blockquote,clipboard,button,panelbutton,panel,floatpanel,colorbutton,colordialog,templates,menu,contextmenu,resize,toolbar,elementspath,enterkey,entities,popup,filebrowser,find,image,fakeobjects,floatingspace,listblock,richcombo,font,format,horizontalrule,htmlwriter,iframe,wysiwygarea,indent,indentblock,indentlist,justify,menubutton,link,list,liststyle,magicline,maximize,newpage,pastetext,pastefromword,removeformat,selectall,showblocks,showborders,sourcearea,specialchar,scayt,stylescombo,tab,table,tabletools,undo,wsc,youtube,codemirror'; diff --git a/app/assets/stylesheets/basic/orbit_bar.css.erb b/app/assets/stylesheets/basic/orbit_bar.css.erb index 7ce707a..8120a3d 100644 --- a/app/assets/stylesheets/basic/orbit_bar.css.erb +++ b/app/assets/stylesheets/basic/orbit_bar.css.erb @@ -16,7 +16,7 @@ background-repeat: no-repeat; background-image: url('<%= asset_path 'orbit-logo.svg' %>'); - /* For Suck IE */ + /* For IE */ background-image: url('<%= asset_path 'orbit-logo.png' %>'); } #orbit-bar.navbar .nav > li > a { diff --git a/app/assets/stylesheets/lib/orbit_bar/orbit-bar.scss.erb b/app/assets/stylesheets/lib/orbit_bar/orbit-bar.scss.erb index c449d65..6f7981a 100644 --- a/app/assets/stylesheets/lib/orbit_bar/orbit-bar.scss.erb +++ b/app/assets/stylesheets/lib/orbit_bar/orbit-bar.scss.erb @@ -310,24 +310,25 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default; } li { min-width: 100px; - padding: 0 0.8em; + padding: 0; &.divider { height: 1px; margin: 0.3em 0; background-color: lighten($orbit-bar-bgc, 60%); } &:hover, &.active { + color: #fff; background-color: #0095CF; a { color: #FFF; } } } - a { + a, .active { color: $orbit-bar-bgc-lighter; font-size: 0.8em; display: block; - padding: 0.5em 0; + padding: 0.5em 1.2em; white-space: nowrap; } } diff --git a/app/views/orbit_bar/index.html.erb b/app/views/orbit_bar/index.html.erb index 96bb0db..98beced 100644 --- a/app/views/orbit_bar/index.html.erb +++ b/app/views/orbit_bar/index.html.erb @@ -120,13 +120,25 @@ Language