forked from saurabh/orbit4-5
Orbit bar search done, fix site language seting for new checkbox js, fix orbit-boostrap template memu, translations
This commit is contained in:
parent
f220130f88
commit
4830a9a7b8
|
@ -353,6 +353,460 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
@media (max-width: 479px) {
|
||||
#orbit-bar {
|
||||
.login-window {
|
||||
width: 90%;
|
||||
margin-left: -45%;
|
||||
.login-body {
|
||||
form {
|
||||
width: 100%;
|
||||
}
|
||||
.input-prepend {
|
||||
.input-xlarge {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.orbit-bar-inner {
|
||||
& > label {
|
||||
display: block;
|
||||
}
|
||||
& > ul {
|
||||
background-color: $orbit-bar-bgc-darker;
|
||||
& > li {
|
||||
display: block;
|
||||
float: none;
|
||||
&:hover {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
& > ul {
|
||||
display: block;
|
||||
position: static;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
list-style: none;
|
||||
border-radius: none;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
&:before {
|
||||
display: none;
|
||||
}
|
||||
li {
|
||||
&.divider {
|
||||
background-color: $orbit-bar-bgc;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ul.orbit-bar-menu {
|
||||
display: none;
|
||||
float: none;
|
||||
.orbit-bar-logo, .orbit-bar-home {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.orbit-bar-title {
|
||||
display: block;
|
||||
}
|
||||
ul.orbit-bar-search-sign-language {
|
||||
display: none;
|
||||
float: none;
|
||||
& > li {
|
||||
background-color: $orbit-bar-bgc-dark;
|
||||
text-align: center;
|
||||
#search {
|
||||
text-align: center;
|
||||
input[type="search"] {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
& + li {
|
||||
width: 50%;
|
||||
float: left;
|
||||
border-top: 1px solid $orbit-bar-bgc-light;
|
||||
box-shadow: inset -1px 0 0 $orbit-bar-bgc-light;
|
||||
& + li {
|
||||
box-shadow: none;
|
||||
}
|
||||
&:hover {
|
||||
& > a, & > span {
|
||||
background-color: $orbit-bar-bgc;
|
||||
}
|
||||
& > ul {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
background-color: $orbit-bar-bgc-dark;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
& > ul {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}@import "http://fonts.googleapis.com/css?family=Chivo";
|
||||
$orbit-bar-bgc: #333 !default;
|
||||
$orbit-bar-bgc-darker: darken($orbit-bar-bgc, 20%) !default;
|
||||
$orbit-bar-bgc-dark: darken($orbit-bar-bgc, 10%) !default;
|
||||
$orbit-bar-bgc-light: lighten($orbit-bar-bgc, 10%) !default;
|
||||
$orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
||||
|
||||
@mixin clearfix() {
|
||||
&:before,
|
||||
&:after {
|
||||
content: " "; // 1
|
||||
display: table; // 2
|
||||
}
|
||||
&:after {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
.orbitMenuLink {
|
||||
cursor: pointer;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
padding: 0 0.5em;
|
||||
background-size: 70%;
|
||||
display: block;
|
||||
line-height: 40px;
|
||||
color: #FFF;
|
||||
font-family: 'Chivo';
|
||||
i {
|
||||
display: block;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 1.4em;
|
||||
@media (max-width: 479px) {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
body {
|
||||
background-color: #ededed;
|
||||
}
|
||||
#orbit-bar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
font-family: 'Chivo';
|
||||
#open-orbit-nav,
|
||||
#open-orbit-login {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
top: 0;
|
||||
left: -100px;
|
||||
}
|
||||
#open-orbit-nav {
|
||||
&:checked {
|
||||
& + .orbit-bar-inner {
|
||||
@media (max-width: 479px) {height: auto;}
|
||||
.orbit-bar-search-sign-language,
|
||||
.orbit-bar-menu {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#open-orbit-login {
|
||||
&:checked {
|
||||
&~.cover {
|
||||
display: block;
|
||||
}
|
||||
&~.login-window {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cover {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, .8);
|
||||
z-index: 10
|
||||
}
|
||||
.login-window {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 10em;
|
||||
left: 50%;
|
||||
width: 400px;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
margin-left: -200px;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
|
||||
.login-header {
|
||||
padding: 10px 15px;
|
||||
border-bottom: 1px solid lighten($orbit-bar-bgc, 60%);
|
||||
.close {
|
||||
float: right;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
line-height: 20px;
|
||||
cursor: pointer;
|
||||
color: lighten($orbit-bar-bgc, 60%);
|
||||
&:hover {
|
||||
color: lighten($orbit-bar-bgc, 40%);
|
||||
}
|
||||
}
|
||||
h3 {
|
||||
color: $orbit-bar-bgc-lighter;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.login-body {
|
||||
padding: 15px;
|
||||
text-align: center;
|
||||
form {
|
||||
width: 312px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.input-prepend {
|
||||
margin-bottom: 15px;
|
||||
.add-on {
|
||||
color: #8D8D8D;
|
||||
border-radius: 4px 0 0 4px;
|
||||
margin-right: -5px;
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
min-width: 16px;
|
||||
padding: 4px 5px;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 0 #ffffff;
|
||||
background-color: #eeeeee;
|
||||
border: 1px solid #ccc;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.input-xlarge {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 250px;
|
||||
height: 30px;
|
||||
vertical-align: top;
|
||||
border-radius: 0 4px 4px 0;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #cccccc;
|
||||
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
||||
margin-left: 0;
|
||||
padding: 4px 6px;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
color: #555555;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
.submit {
|
||||
button {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
margin-bottom: 0;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
color: #FFF;
|
||||
outline: none;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
background-color: #006dcc;
|
||||
border: 1px solid #bbbbbb;
|
||||
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
|
||||
border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
|
||||
border-radius: 4px;
|
||||
box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
|
||||
&:hover {
|
||||
background-color: #0044cc;
|
||||
}
|
||||
&:active {
|
||||
box-shadow: inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.orbit-bar-inner {
|
||||
height: 40px;
|
||||
padding: 0 15px;
|
||||
position: relative;
|
||||
background-color: $orbit-bar-bgc;
|
||||
@include clearfix();
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
& > label {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
margin-top: 7px;
|
||||
padding: 0 1px 0 0;
|
||||
color: lighten($orbit-bar-bgc, 40%);
|
||||
text-align: center;
|
||||
border: 1px solid lighten($orbit-bar-bgc, 40%);
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: lighten($orbit-bar-bgc, 90%);
|
||||
border-color: lighten($orbit-bar-bgc, 90%);
|
||||
}
|
||||
i {
|
||||
font-size: 1.2em;
|
||||
line-height: 23px;
|
||||
}
|
||||
}
|
||||
& > ul {
|
||||
position: relative;
|
||||
margin: 0 -15px;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
@include clearfix();
|
||||
& > li {
|
||||
position: relative;
|
||||
float: left;
|
||||
display: inline-block;
|
||||
&:hover {
|
||||
padding-bottom: 10px;
|
||||
& > a, & > span, & > label {
|
||||
background-color: #0095CF;
|
||||
}
|
||||
& > ul {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
& > ul {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
margin: 0;
|
||||
padding: 0.5em 0;
|
||||
background-color: #FFF;
|
||||
list-style: none;
|
||||
border-radius: 5px;
|
||||
border: 1px solid lighten($orbit-bar-bgc, 60%);
|
||||
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.4);
|
||||
&:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
left: 10px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
display: block;
|
||||
border-style: solid;
|
||||
border-width: 0 8px 8px 8px;
|
||||
border-color: transparent transparent #ffffff transparent;
|
||||
}
|
||||
li {
|
||||
min-width: 100px;
|
||||
padding: 0 0.8em;
|
||||
&.divider {
|
||||
height: 1px;
|
||||
margin: 0.3em 0;
|
||||
background-color: lighten($orbit-bar-bgc, 60%);
|
||||
}
|
||||
&:hover, &.active {
|
||||
background-color: #0095CF;
|
||||
a {
|
||||
color: #FFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
a {
|
||||
color: $orbit-bar-bgc-lighter;
|
||||
font-size: 0.8em;
|
||||
display: block;
|
||||
padding: 0.5em 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.orbit-bar-menu {
|
||||
float: left;
|
||||
.orbit-bar-logo {
|
||||
@extend .orbitMenuLink;
|
||||
padding: 0;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url(/assets/orbit-logo.svg);
|
||||
background-image: url(/assets/orbit-logo.png)\9;
|
||||
& + ul {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.orbit-bar-home {
|
||||
@extend .orbitMenuLink;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
.orbit-bar-title {
|
||||
display: none;
|
||||
top: 0;
|
||||
margin: 0 2em;
|
||||
padding: 0.3em 0;
|
||||
color: #FFF;
|
||||
font-size: 1.4em;
|
||||
text-align: center;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
a {
|
||||
color: #FFF;
|
||||
}
|
||||
}
|
||||
.orbit-bar-search-sign-language {
|
||||
float: right;
|
||||
#search {
|
||||
@extend .orbitMenuLink;
|
||||
cursor: default;
|
||||
width: auto;
|
||||
text-align: right;
|
||||
input[type="search"] {
|
||||
color: $orbit-bar-bgc-lighter;
|
||||
border: none;
|
||||
border-radius: 1.7em;
|
||||
line-height: 1.3em;
|
||||
padding: 0.2em 0.8em;
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
#language, #user, label {
|
||||
@extend .orbitMenuLink;
|
||||
width: auto;
|
||||
font-size: 0.8em;
|
||||
& + ul {
|
||||
right: 0;
|
||||
&:before {
|
||||
right: 10px;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
label {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 479px) {
|
||||
#orbit-bar {
|
||||
.login-window {
|
||||
|
|
|
@ -118,7 +118,11 @@ class Admin::SitesController < OrbitAdminController
|
|||
# end
|
||||
|
||||
unless params[:site][:in_use_locales].nil?
|
||||
params[:site][:in_use_locales] = params[:site][:in_use_locales].map{|locale| locale.to_sym}
|
||||
in_user_locales = []
|
||||
I18n.available_locales.each do |locale|
|
||||
in_user_locales << locale if params[:site][:in_use_locales][locale].eql?("1")
|
||||
end
|
||||
params[:site][:in_use_locales] = in_user_locales
|
||||
end
|
||||
|
||||
if params[:site][:phone_number].nil?
|
||||
|
|
|
@ -36,8 +36,22 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.dropdown {
|
||||
&:hover {
|
||||
position: relative;
|
||||
& > a {
|
||||
color: #74A6BD;
|
||||
background: #ffffff;
|
||||
}
|
||||
ul {
|
||||
&[data-menu-level] {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.dropdown-menu {
|
||||
top: 120%;
|
||||
top: 100%;
|
||||
border: 4px solid rgba(0, 0, 0, 0.1);
|
||||
border-radius: 0;
|
||||
@include box-shadow(none);
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
<label class="control-label muted"><%= t('preferences.lang_enabled') %></label>
|
||||
<div class="controls">
|
||||
<% I18n.available_locales.each do |valid_locale| %>
|
||||
<%= check_box_tag "site[in_use_locales][]", valid_locale, @site.in_use_locales.include?(valid_locale), :class=>"toggle-check in_use_locales", :data => { :title => "#{t(valid_locale.to_s)}", disabled: true }, "data-deploy"=>"inline" %>
|
||||
<%= check_box_tag "site[in_use_locales][#{valid_locale}]", valid_locale, @site.in_use_locales.include?(valid_locale), :class=>"toggle-check in_use_locales", :data => { :title => "#{t(valid_locale.to_s)}", disabled: true }, "data-deploy"=>"inline" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -10,20 +10,20 @@
|
|||
<div class="login-window">
|
||||
<div class="login-header">
|
||||
<label for="open-orbit-login" class="close">×</label>
|
||||
<h3>登入 Orbit</h3>
|
||||
<h3><%= t(:login_orbit) %></h3>
|
||||
</div>
|
||||
<div class="login-body">
|
||||
<%= form_tag "/sessions?locale=#{locale.to_s}", method: "post", :class => "container" do |f| %>
|
||||
<div class="input-prepend">
|
||||
<span class="add-on"><i class="icon-user"></i></span>
|
||||
<input class="input-xlarge" id="user_user_id" name="user_name" placeholder="使用者帳號" size="30" type="text">
|
||||
<input class="input-xlarge" id="user_user_id" name="user_name" placeholder="<%= t("users.user_id") %>" size="30" type="text">
|
||||
</div>
|
||||
<div class="input-prepend">
|
||||
<span class="add-on"><i class="icon-lock"></i></span>
|
||||
<input class="input-xlarge" id="user_password" name="password" placeholder="密碼" size="30" type="password">
|
||||
<input class="input-xlarge" id="user_password" name="password" placeholder="<%= t(:password) %>" size="30" type="password">
|
||||
</div>
|
||||
<div class="submit">
|
||||
<button type="submit">登入</button>
|
||||
<button type="submit"><%= t(:login) %></button>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -44,18 +44,18 @@
|
|||
<ul>
|
||||
<li>
|
||||
<a href="/<%= locale.to_s %>/admin/dashboards">
|
||||
<i class="icons-gauge"></i> Dashboard
|
||||
<i class="icons-gauge"></i> <%= t(:dashboard_) %>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/<%= locale.to_s %>/admin/members">
|
||||
<i class="icons-users"></i> Member
|
||||
<i class="icons-users"></i> <%= t(:member_) %>
|
||||
</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="/<%= locale.to_s %>/admin/items" tabindex="-1">
|
||||
<i class="icons-cog"></i> Site setting
|
||||
<i class="icons-cog"></i> <%= t(:settings) %>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -70,7 +70,8 @@
|
|||
<ul class="orbit-bar-search-sign-language">
|
||||
<li>
|
||||
<form id="search" method="get" action="http://www.google.com/cse" target="_blank">
|
||||
<input type="search" name="cx">
|
||||
<input type="hidden" name="cx" value="<%= current_site.search['sitesearch'] rescue "" %>">
|
||||
<%= text_field_tag 'q', '', {:type => "search", :placeholder => t("search.sitesearch"), 'x-webkit-speech' => ''} %>
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -78,7 +79,7 @@
|
|||
<ul>
|
||||
<% @site_valid_locales.each do |l| %>
|
||||
<li class="<%= l == locale ? "active" : "" %>">
|
||||
<a href="<%= switch_language(l) %>"><%= t(l.to_s) %></a>
|
||||
<a href="<%= switch_language(l) %>"><%= t(:_locale, :locale => l) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
@ -88,7 +89,7 @@
|
|||
<span id="user"><%= current_user.member_profile.nil? ? current_user.user_name : current_user.member_profile.name %></span>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/logout"><i class="icons-logout"></i> Logout</a>
|
||||
<a href="/logout"><i class="icons-logout"></i><%= t(:logout) %></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%= content_tag :p, msg, :class => [key, "alert alert-error in fade"] %>
|
||||
<% end %>
|
||||
<div class="form">
|
||||
<h3 class="login-logo">Log In to Orbit</h3>
|
||||
<h3 class="login-logo"><%= t(:login_orbit) %></h3>
|
||||
<div>
|
||||
<input name="utf8" type="hidden" value="" />
|
||||
<input name="authenticity_token" type="hidden" value="" />
|
||||
|
|
|
@ -39,8 +39,14 @@ zh_tw:
|
|||
upload_pictures: 上傳圖片
|
||||
widget_info_for_ad_image_size: "此區塊圖片尺寸使用: %{best_size}"
|
||||
ad_banner: 廣告輪播
|
||||
ad_banner:
|
||||
add: 新增
|
||||
all: 全部
|
||||
banner: 廣告輪播
|
||||
ad_banner: 廣告輪播
|
||||
add: 新增
|
||||
add_attribute_field: 新增欄位
|
||||
add_files: 新增檔案
|
||||
add_image: 加入圖片
|
||||
add_item: 新增項目
|
||||
add_member: 新增成員
|
||||
|
@ -109,6 +115,7 @@ zh_tw:
|
|||
built_in: 內建
|
||||
# calendar: 行事曆
|
||||
cancel: 取消
|
||||
cancel_upload: 取消上傳
|
||||
cant_delete_self: 不可以刪除自己
|
||||
cant_empty_star: 不能為空白 (*)
|
||||
cant_revoke_self_admin: 不可以撤銷自己的管理狀態
|
||||
|
@ -246,6 +253,7 @@ zh_tw:
|
|||
images: images
|
||||
info: 基本資料
|
||||
initial: 預設值
|
||||
insert: 插入
|
||||
install: 安裝
|
||||
installed_modules: 已安裝模組
|
||||
intro: 簡介
|
||||
|
@ -512,6 +520,7 @@ zh_tw:
|
|||
size: 大小
|
||||
start: 開始
|
||||
start_date: 開始日期
|
||||
start_upload: 開始上傳
|
||||
statistics: 統計資訊
|
||||
status: 狀態
|
||||
structure: 結構
|
||||
|
|
Loading…
Reference in New Issue