Fixed orbit bar theme

This commit is contained in:
saurabhbhatia 2013-11-28 10:18:13 +08:00
parent 9e0bed029b
commit fa85920043
1 changed files with 25 additions and 5 deletions

View File

@ -153,7 +153,7 @@
<div class="control-group"> <div class="control-group">
<label class="control-label muted">Enable Language</label> <label class="control-label muted">Enable Language</label>
<div class="controls"> <div class="controls">
<% @site_in_use_locales.each do |valid_locale| %> <% @site_valid_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 => "#{I18nVariable.from_locale(valid_locale)}", disabled: true }, "data-deploy"=>"inline" %> <%= check_box_tag "site[in_use_locales][]", valid_locale, @site.in_use_locales.include?(valid_locale), :class=>"toggle-check in_use_locales", :data => { :title => "#{I18nVariable.from_locale(valid_locale)}", disabled: true }, "data-deploy"=>"inline" %>
<% end %> <% end %>
</div> </div>
@ -177,11 +177,11 @@
<div class="controls"> <div class="controls">
<!-- if this page editing please add class "fileupload-edit" --> <!-- if this page editing please add class "fileupload-edit" -->
<div class="fileupload fileupload-new clearfix" data-provides="fileupload"> <div class="fileupload fileupload-new clearfix" data-provides="fileupload">
<div class="fileupload-new thumbnail pull-left"> <div class="fileupload-new thumbnail pull-left" style="background:black;">
<% if @site.default_image.file.present? %> <% if @site.default_image.file.present? %>
<%= image_tag( @site.default_image, :size=>"120x120") rescue ''%> <%= image_tag( @site.default_image, :size=>"120x120") rescue ''%>
<% else %> <% else %>
<%= image_tag "http://www.placehold.it/50x50/EFEFEF/AAAAAA",:size=>"120x120",:class => "pull-left upload-picture"%> <%= image_tag "orbit-logo.png",:class => "pull-left upload-picture"%>
<% end %> <% end %>
</div> </div>
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div> <div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
@ -210,7 +210,7 @@
<% if @site.favicon.file.present? %> <% if @site.favicon.file.present? %>
<%= image_tag( @site.favicon, :size=>"120x120") rescue ''%> <%= image_tag( @site.favicon, :size=>"120x120") rescue ''%>
<% else %> <% else %>
<%= image_tag "http://www.placehold.it/50x50/EFEFEF/AAAAAA",:size=>"120x120", :class => "pull-left upload-picture"%> <%= image_tag "favicon.ico", :class => "pull-left upload-picture"%>
<% end %> <% end %>
</div> </div>
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div> <div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
@ -259,6 +259,9 @@ var locales = <%= @site.in_use_locales.to_json.html_safe %>;
}) })
delete locales; delete locales;
</script> </script>
<script type="text/javascript">
$(".language-nav li a").click(function(){window.location.hash = $(this).attr("href")})
</script>>
<% content_for :page_specific_javascript do %> <% content_for :page_specific_javascript do %>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
@ -272,3 +275,20 @@ delete locales;
}); });
</script> </script>
<% end %> <% end %>
<script>
$(document).ready(function () {
if (location.hash.substr(0,2) == "#") {
$("a[href='#" + location.hash.substr(2) + "']").tab("show");
}
$("a[data-toggle='tab']").on("shown", function (e) {
var hash = $(e.target).attr("href");
if (hash.substr(0,1) == "#") {
location.replace("#" + hash.substr(1));
console.log(location.hash);
}
});
});
</script>