now can insert word to ckeditor directly and also fixed looping problem for freego software.

This commit is contained in:
Harry Bomrah 2015-05-15 21:33:11 +08:00
parent 451176b068
commit 3772e350ba
4 changed files with 27 additions and 11 deletions

View File

@ -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';

View File

@ -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 {

View File

@ -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;
}
}

View File

@ -120,13 +120,25 @@
<span id="language"><i class="icons-earth orbit-bar-language-icon"></i><span class="orbit-bar-language-text">Language</span></span>
<ul>
<% @site_in_use_locales.each do |l| %>
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
<a href="<%= switch_language(l) %>"><%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %></a>
</li>
<% if current_site.enable_zh_cn and l == :zh_tw and !request.path.include?("/admin/") %>
<li class="<%= locale==:zh_cn ? "active" : "" %>">
<a href="<%= switch_language(:zh_cn) %>"><%= t(:zh_cn, :locale => :zh_tw) %></a>
<% if l.to_s == I18n.locale.to_s and !session['zh_cn'] %>
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
<%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %>
</li>
<% else %>
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
<a href="<%= switch_language(l) %>"><%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %></a>
</li>
<% end %>
<% if current_site.enable_zh_cn and l == :zh_tw and !request.path.include?("/admin/") %>
<% if locale == :zh_cn %>
<li class="active">
<%= t(:zh_cn, :locale => :zh_tw) %>
</li>
<% else %>
<li>
<a href="<%= switch_language(:zh_cn) %>"><%= t(:zh_cn, :locale => :zh_tw) %></a>
</li>
<% end %>
<% end %>
<% end %>
</ul>