forked from saurabh/orbit4-5
Merge branch 'master' of gitlab.tp.rulingcom.com:saurabh/orbit4-5 into nccu
This commit is contained in:
commit
a4081d40b2
|
@ -31,6 +31,10 @@ var FormValidator = function(form){
|
|||
email : function(value){
|
||||
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
return re.test(value);
|
||||
},
|
||||
url : function(value){
|
||||
var reg = new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/);
|
||||
return reg.test(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
color: #FFF;
|
||||
font-family: 'Chivo';
|
||||
i {
|
||||
display: block;
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
|
@ -51,6 +51,13 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
text-align: center;
|
||||
}
|
||||
}
|
||||
.orbit-bar-language-icon {
|
||||
width: 30px;
|
||||
}
|
||||
.orbit-bar-language-text {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
#orbit-bar {
|
||||
position: fixed;
|
||||
|
@ -402,6 +409,9 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
}
|
||||
}
|
||||
}
|
||||
#language {
|
||||
padding-left: 0;
|
||||
}
|
||||
label {
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
|
@ -470,6 +480,8 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
}
|
||||
.orbit-bar-title {
|
||||
display: block;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
ul.orbit-bar-search-sign-language {
|
||||
display: none;
|
||||
|
|
|
@ -118,9 +118,13 @@ class PagesController < ApplicationController
|
|||
page.inc(view_count: 1)
|
||||
end
|
||||
render :html => render_final_page("#{module_app}/#{params[:target_action]}",page,layout).html_safe
|
||||
else
|
||||
if Site.first.enable_redirect_index
|
||||
redirect_to root_url
|
||||
else
|
||||
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => :not_found
|
||||
end
|
||||
end
|
||||
else
|
||||
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => :not_found
|
||||
end
|
||||
|
|
|
@ -5,7 +5,7 @@ module Admin::ModuleStoreHelper
|
|||
extensions_to_update = get_extensions_to_update
|
||||
@extensions_to_update_count = extensions_to_update.count
|
||||
built_in_extensions = get_extension_from_file("built_in",extensions_to_update)
|
||||
# built_in_extensions.concat(get_extension_from_file("downloaded",extensions_to_update))
|
||||
built_in_extensions.concat(get_extension_from_file("downloaded",extensions_to_update))
|
||||
return built_in_extensions
|
||||
end
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ class Site
|
|||
field :mobile_api_openness_on, :type => Boolean, :default => false
|
||||
field :desktop_closed, :type => Boolean, :default => false
|
||||
field :enable_language_detection, :type => Boolean, :default => false
|
||||
field :enable_redirect_index, :type => Boolean, :default => false
|
||||
field :enable_zh_cn, :type => Boolean, :default => true
|
||||
field :default_locale, :default => "zh_tw"
|
||||
field :mobile_on, :type => Boolean, :default => false
|
||||
|
|
|
@ -185,6 +185,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t('preferences.redirect_index') %>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :enable_redirect_index, :class => "toggle-check reset_default_locale", data: {disabled: true} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- OrbitBar Them -->
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
<li>
|
||||
<% if @site_in_use_locales.count > 1 || current_site.enable_zh_cn %>
|
||||
<% locale = session[:zh_cn] ? :zh_cn : I18n.locale %>
|
||||
<span id="language"><%= t((locale==:zh_tw ? :zh_tw_ : locale.to_s)) %></span>
|
||||
<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" : "" %>">
|
||||
|
|
|
@ -423,6 +423,7 @@ en:
|
|||
lang_enabled: Enable Language
|
||||
lang_default: Default Language
|
||||
lang_detection: Enable User Language Detection
|
||||
redirect_index: Redirect to home if page not found
|
||||
nav_enabled: Enable Sidebar Sub Nav
|
||||
openness: Openness
|
||||
orbitbar_theme: OrbitBar Theme
|
||||
|
|
|
@ -430,6 +430,7 @@ zh_tw:
|
|||
icon: 圖示
|
||||
language: 語系設定
|
||||
lang_detection: 開啟使用者語系偵測
|
||||
redirect_index: 切換語系倒回首頁
|
||||
lang_enabled: 開啟語系
|
||||
lang_default: 預設語系
|
||||
nav_enabled: 開啟側欄導引
|
||||
|
|
Loading…
Reference in New Issue