Ray's changes for orbit bar

This commit is contained in:
Christophe Vilayphiou 2012-04-06 18:06:57 +08:00
parent 7f8047a645
commit 253f4bcb54
5 changed files with 903 additions and 856 deletions

View File

@ -11,4 +11,5 @@
//= require jquery.tinyscrollbar.min //= require jquery.tinyscrollbar.min
//= require orbit-1.0 //= require orbit-1.0
//= require tinymce-jquery //= require tinymce-jquery
//= require tinymce_orbit //= require tinymce_orbit
//= require orbit-bar-search

View File

@ -0,0 +1,20 @@
$(document).on('click', '.orbit-bar-search', function (){
if ($(this).parents('.search').hasClass('visible')){
$(this).parents('.search').stop().animate({
'width':'28px',
});
$(this).parents('.search').css({
'background-color': 'transparent',
});
$(this).parents('.search').removeClass('visible');
}
else{
$(this).parents('.search').stop().animate({
'width':'265px',
});
$(this).parents('.search').css({
'background-color': 'rgba(0, 0, 0, 0.5)',
});
$(this).parents('.search').addClass('visible');
}
});

File diff suppressed because it is too large Load Diff

View File

@ -152,6 +152,7 @@ module ApplicationHelper
javascripts << "<script type='text/javascript' src='/assets/jquery.tinyscrollbar.min.js'></script>\n" javascripts << "<script type='text/javascript' src='/assets/jquery.tinyscrollbar.min.js'></script>\n"
javascripts << "<script type='text/javascript' src='/assets/jquery.isotope.min.js'></script>\n" javascripts << "<script type='text/javascript' src='/assets/jquery.isotope.min.js'></script>\n"
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-member.js'></script>\n" javascripts << "<script type='text/javascript' src='/assets/orbit-bar-member.js'></script>\n"
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-search.js'></script>\n"
javascripts << "<script type='text/javascript' src='/assets/orbit_bar.js'></script>\n" javascripts << "<script type='text/javascript' src='/assets/orbit_bar.js'></script>\n"
javascripts << "<script type='text/javascript' src='/assets/event.js'></script>\n" javascripts << "<script type='text/javascript' src='/assets/event.js'></script>\n"
page.design.javascripts.each do |js| page.design.javascripts.each do |js|

View File

@ -15,6 +15,7 @@
</div> </div>
<ul class="nav"> <ul class="nav">
<li><%= link_to t(:homepage), root_path, :class => 'orbit-bar-home' %></li> <li><%= link_to t(:homepage), root_path, :class => 'orbit-bar-home' %></li>
<li><a class="orbit-bar-desktop" href="#">Desktop</a></li>
</ul> </ul>
<ul class="nav pull-right"> <ul class="nav pull-right">
<li class="dropdown language"> <li class="dropdown language">
@ -25,6 +26,13 @@
<% end %> <% end %>
</ul> </ul>
</li> </li>
<li class="search clear">
<a class="orbit-bar-search" href="#">search</a>
<form class="navbar-search" action="">
<input class="search-query span3" type="text" placeholder="<%= t(:search_nccu) %>">
</form>
</li>
<% if user_signed_in? %> <% if user_signed_in? %>
<li class="dropdown active"> <li class="dropdown active">
<a class="orbit-bar-account" href="#" data-toggle="dropdown"> <a class="orbit-bar-account" href="#" data-toggle="dropdown">
@ -94,9 +102,6 @@
</li> </li>
<% end %> <% end %>
</ul> </ul>
<form class="navbar-search span6" action="">
<input class="search-query span4" type="text" placeholder="<%= t(:search_nccu) %>">
</form>
</div> </div>
</div> </div>
</header> </header>