diff --git a/app/models/filefield.rb b/app/models/filefield.rb
index 36b6b9d..bc4778f 100644
--- a/app/models/filefield.rb
+++ b/app/models/filefield.rb
@@ -37,7 +37,8 @@ class Filefield
},:status=>0} ,
"accessibility"=>{:files=>{'back_end@html@erb'=>{:status=>0, :sc=>@app_path+'/updatefiles/accessibility/', :dest=>@views_path+'layouts/'},
'_form@html@erb'=>{:status=>0, :sc=>@app_path+'/updatefiles/accessibility/', :dest=>@views_path+'page_parts/'},
- 'jquery-ui-1@12@1/'=>{:status=>0, :sc=>@app_path+'/updatefiles/accessibility/', :dest=>Rails.root.to_s + '/app/assets/stylesheets/lib/jquery-ui-1.12.1/'}
+ 'jquery-ui-1@12@1/'=>{:status=>0, :sc=>@app_path+'/updatefiles/accessibility/', :dest=>Rails.root.to_s + '/app/assets/stylesheets/lib/jquery-ui-1.12.1/'},
+ 'orbit_bar/'=>{:status=>0, :sc=>@app_path+'/updatefiles/accessibility/', :dest=>@views_path+'orbit_bar/'}
},:status=>0}
}
field :recovery, :type=> String , default:"false"
@@ -57,9 +58,10 @@ class Filefield
if (file_name.include? "/") == false
FileUtils.cp(file_name , file_name+'_back')
else
+ FileUtils.cd('..')
@back_foler =file_path.dup #very important,don't just use '=',it will change original value when it change
@back_foler[-1] = "_back/"
- FileUtils.cp_r(file_name , @back_foler)
+ FileUtils.cp_r(file_name+'.' , @back_foler)
end
end
def recover_file(file_name,file_path)
@@ -69,7 +71,7 @@ class Filefield
else
FileUtils.cd('..')
@back_foler = file_name.dup #very important,don't just use '=',it will change original value when it change
- @back_foler[-1] = "_back/"
+ @back_foler[-1] = "_back/."
FileUtils.cp_r(@back_foler, file_name)
end
end
@@ -78,7 +80,7 @@ class Filefield
if (file_name.include? "/") == false
FileUtils.cp(file_name , dest_file_path)
else
- FileUtils.cp_r(file_name , dest_file_path)
+ FileUtils.cp_r(file_name , dest_file_path+'..')
end
end
def updatefile
diff --git a/updatefiles/accessibility/orbit_bar/index.html.erb b/updatefiles/accessibility/orbit_bar/index.html.erb
new file mode 100644
index 0000000..9cda88b
--- /dev/null
+++ b/updatefiles/accessibility/orbit_bar/index.html.erb
@@ -0,0 +1,347 @@
+<% if params[:is_frontend_view] == "true" %>
+ <% OrbitHelper.render_css_in_head(["basic/icon","lib/orbit_bar/orbit-bar"]) %>
+<% else %>
+ <%= stylesheet_link_tag "basic/icon" %>
+ <%= stylesheet_link_tag "lib/orbit_bar/orbit-bar" %>
+<% end %>
+
+ <% if current_user.nil? %>
+
Open login
+
+
+
+
+
+ <%= form_tag "/sessions?locale=#{locale.to_s}", method: "post", :class => "container" do |f| %>
+
+
+ Username
+ " size="30" title="username" type="text">
+
+
+
+ Password
+
+
+
+
+ <%= t(:login) %>
+
+ <% if current_site.google_oauth_enabled %>
+
+ <% end %>
+
+ <% if !current_site.sign_up_roles.empty? %>
+
+ <% end %>
+ <% end %>
+
+
+
+ <% end %>
+
+
+
+
+
+
+
+
+ <%
+ google_search_cx = current_site.search['sitesearch'] rescue nil
+ is_google_seach_cx = google_search_cx =~ /^[0-9]+\:[0-9A-Za-z]+$/
+ if !google_search_cx.blank? and is_google_seach_cx
+ %>
+
+
+
+ <%
+ else
+ if !google_search_cx.blank? and !is_google_seach_cx
+ search_domain = google_search_cx
+ else
+ search_domain = request.host_with_port
+ end
+ %>
+
+
+
+ <% end %>
+
+ <% if current_site.enable_language_options %>
+ <% if @site_in_use_locales.count > 1 || current_site.enable_zh_cn %>
+ <% zh_cn_added = 0 %>
+ <% locale = session[:zh_cn] ? :zh_cn : I18n.locale %>
+ Language
+
+ <% @site_in_use_locales.each do |l| %>
+ <%
+ case l
+ when :en
+ accesskey = "e"
+ when :zh_tw
+ accesskey = "t"
+ end
+ %>
+ <% if l.to_s == I18n.locale.to_s and !session['zh_cn'] %>
+ ">
+ <%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %>
+
+ <% else %>
+ ">
+ <%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %>
+
+ <% end %>
+ <% if current_site.enable_zh_cn and zh_cn_added == 0 and !request.path.include?("/admin/") %>
+ <% zh_cn_added = 1 %>
+ <% accesskey = "s" %>
+ <% if locale == :zh_cn %>
+
+ <%= t(:zh_cn, :locale => :zh_tw) %>
+
+ <% else %>
+
+ <%= t(:zh_cn, :locale => :zh_tw) %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+
+ <% end %>
+ <% end %>
+
+ <% if !current_user.nil? %>
+
+ <%= current_user.member_profile.name.nil? ? current_user.user_name : current_user.member_profile.name %>
+
+ <%= link_to content_tag(:i, nil, class: 'icons-tools') + ' ' + t("users.change_passwd"),admin_member_edit_passwd_path(current_user.member_profile.to_param), tabindex: '-1' %>
+ <%= link_to content_tag(:i, nil, class: 'icons-vcard') + ' ' + t("users.user_basic_data"),admin_member_path(current_user.member_profile.to_param), tabindex: '-1' %>
+ <% if current_user.is_admin? && params[:is_frontend_view] == "true" %>
+
+ <% if params[:editmode] == "on" %>
+ " style="color:red;"> Edit Mode Off
+ <% else %>
+ "> Edit Mode On
+ <% end %>
+
+ <% end %>
+
+ <%= t(:logout) %>
+
+
+
+ <%= t(:logout) %>
+ <% else %>
+
+ :::
+
+
+ <%= t(:login) %>
+
+
+
+
+ <% end %>
+
+
+
+
+ <% if current_user.nil?%>
+
+ <% else %>
+
+ <%end%>
+
diff --git a/updatefiles/accessibility/orbit_bar/index_mobile.html.erb b/updatefiles/accessibility/orbit_bar/index_mobile.html.erb
new file mode 100644
index 0000000..17c5a6b
--- /dev/null
+++ b/updatefiles/accessibility/orbit_bar/index_mobile.html.erb
@@ -0,0 +1,341 @@
+<% if params[:is_frontend_view] == "true" %>
+ <% OrbitHelper.render_css_in_head(["basic/icon","lib/orbit_bar/orbit-bar-mobile"]) %>
+ <% OrbitHelper.render_css_in_head(["basic/icon","lib/orbit_bar/orbit-bar"]) %>
+<% else %>
+ <%= stylesheet_link_tag "basic/icon" %>
+ <%= stylesheet_link_tag "lib/orbit_bar/orbit-bar-mobile" %>
+ <%= stylesheet_link_tag "lib/orbit_bar/orbit-bar" %>
+<% end %>
+
+ <% if current_user.nil? %>
+
+
+
+
+
+ <%= form_tag "/sessions?locale=#{locale.to_s}", method: "post", :class => "container" do |f| %>
+
+
+ " size="30" type="text">
+
+
+
+
+
+
+
+ <%= t(:login) %>
+
+ <% if current_site.google_oauth_enabled %>
+
+ <% end %>
+
+
+ <% end %>
+
+
+
+ <% end %>
+
+
+
+
+
+
+
+
+ <%
+ google_search_cx = current_site.search['sitesearch'] rescue nil
+ is_google_seach_cx = google_search_cx =~ /^[0-9]+\:[0-9A-Za-z]+$/
+ if !google_search_cx.blank? and is_google_seach_cx
+ %>
+
+
+
+ <%
+ else
+ if !google_search_cx.blank? and !is_google_seach_cx
+ search_domain = google_search_cx
+ else
+ search_domain = request.host_with_port
+ end
+ %>
+
+
+
+ <% end %>
+
+ <% if current_site.enable_language_options %>
+ <% if @site_in_use_locales.count > 1 || current_site.enable_zh_cn %>
+ <% zh_cn_added = 0 %>
+ <% locale = session[:zh_cn] ? :zh_cn : I18n.locale %>
+ Language
+
+ <% @site_in_use_locales.each do |l| %>
+ <%
+ case l
+ when :en
+ accesskey = "e"
+ when :zh_tw
+ accesskey = "t"
+ end
+ %>
+ <% if l.to_s == I18n.locale.to_s and !session['zh_cn'] %>
+ ">
+ <%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %>
+
+ <% else %>
+ ">
+ <%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %>
+
+ <% end %>
+ <% if current_site.enable_zh_cn and zh_cn_added == 0 and !request.path.include?("/admin/") %>
+ <% zh_cn_added = 1 %>
+ <% accesskey = "s" %>
+ <% if locale == :zh_cn %>
+
+ <%= t(:zh_cn, :locale => :zh_tw) %>
+
+ <% else %>
+
+ <%= t(:zh_cn, :locale => :zh_tw) %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+
+ <% end %>
+ <% end %>
+
+ <% if !current_user.nil? %>
+
+ <%= current_user.member_profile.name.nil? ? current_user.user_name : current_user.member_profile.name %>
+ <%= t(:logout) %>
+
+ <%= link_to content_tag(:i, nil, class: 'icons-tools') + ' ' + t("users.change_passwd"),admin_member_edit_passwd_path(current_user.member_profile.to_param), tabindex: '-1' %>
+ <%= link_to content_tag(:i, nil, class: 'icons-vcard') + ' ' + t("users.user_basic_data"),admin_member_path(current_user.member_profile.to_param), tabindex: '-1' %>
+ <% if current_user.is_admin? && params[:is_frontend_view] == "true" %>
+
+ <% if params[:editmode] == "on" %>
+ " style="color:red;"> Edit Mode Off
+ <% else %>
+ "> Edit Mode On
+ <% end %>
+
+ <% end %>
+
+ <%= t(:logout) %>
+
+
+
+ <% else %>
+
+ /accesskey" title="Login">:::
+
+ <%= t(:login) %>
+
+
+
+ <% end %>
+
+
+
+
+
+
+ <% if current_site.enable_language_options %>
+ <% if @site_in_use_locales.count > 1 || current_site.enable_zh_cn %>
+ <% zh_cn_added = 0 %>
+ <% locale = session[:zh_cn] ? :zh_cn : I18n.locale %>
+ Language
+
+ <% @site_in_use_locales.each do |l| %>
+ <%
+ case l
+ when :en
+ accesskey = "e"
+ when :zh_tw
+ accesskey = "t"
+ end
+ %>
+ <% if l.to_s == I18n.locale.to_s and !session['zh_cn'] %>
+ ">
+ <%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %>
+
+ <% else %>
+ ">
+ <%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %>
+
+ <% end %>
+ <% if current_site.enable_zh_cn and zh_cn_added == 0 and !request.path.include?("/admin/") %>
+ <% zh_cn_added = 1 %>
+ <% accesskey = "s" %>
+ <% if locale == :zh_cn %>
+
+ <%= t(:zh_cn, :locale => :zh_tw) %>
+
+ <% else %>
+
+ <%= t(:zh_cn, :locale => :zh_tw) %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+
+ <% end %>
+ <% end %>
+
+ <% if !current_user.nil? %>
+
+ <%= current_user.member_profile.name.nil? ? current_user.user_name : current_user.member_profile.name %>
+
+ <%= link_to content_tag(:i, nil, class: 'icons-tools') + ' ' + t("users.change_passwd"),admin_member_edit_passwd_path(current_user.member_profile.to_param), tabindex: '-1' %>
+ <%= link_to content_tag(:i, nil, class: 'icons-vcard') + ' ' + t("users.user_basic_data"),admin_member_path(current_user.member_profile.to_param), tabindex: '-1' %>
+ <% if current_user.is_admin? && params[:is_frontend_view] == "true" %>
+
+ <% if params[:editmode] == "on" %>
+ " style="color:red;"> Edit Mode Off
+ <% else %>
+ "> Edit Mode On
+ <% end %>
+
+ <% end %>
+
+ <%= t(:logout) %>
+
+
+
+ <% else %>
+
+ /accesskey" title="Login">:::
+
+
+
+
+ <% end %>
+
+
+
+
+
+
+
+
+
+
+
+