Merge branch 'sw_new_course' of http://repository.trustie.net/xianbo/trustie2 into sw_new_course
Conflicts: app/views/layouts/_unlogin_header.html.erb
This commit is contained in:
commit
bedc364275
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$(".homepageSearchIcon").click(function(){
|
$(".homepageSearchIcon").click(function(){
|
||||||
var val=$('input:radio[name="navSearchType"]:checked').val();
|
var val=$('input:radio[name="search_type"]:checked').val();
|
||||||
if(val==null){
|
if(val==null){
|
||||||
$("#navSearchAlert").css({display:"block"});
|
$("#navSearchAlert").css({display:"block"});
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,29 +9,41 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
function search(doc){
|
||||||
|
//alert(1)
|
||||||
|
// val = $('input:radio[name="search_type"]:checked').val();
|
||||||
|
// alert(2)
|
||||||
|
// $("#search_type").val(val);
|
||||||
|
// alert(3)
|
||||||
|
$(doc).parent().submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<div class="fl" id="navHomepageSearch">
|
<div class="fl" id="navHomepageSearch">
|
||||||
<form class="navHomepageSearchBox">
|
<!--<form class="navHomepageSearchBox">-->
|
||||||
<input type="text" name="navHomepageSearch" class="navHomepageSearchInput"/>
|
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
|
||||||
<a href="javascript:void(0);" class="homepageSearchIcon"></a>
|
<input type="text" name="q" class="navHomepageSearchInput"/>
|
||||||
</form>
|
<input type="hidden" name="search_type" id="type" value=""/>
|
||||||
|
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="$('#type').val($('input[type=radio]:checked').val());$(this).parent().submit();"></a>
|
||||||
|
<% end %>
|
||||||
<div class="navSearchTypeBox" id="navHomepageSearchType">
|
<div class="navSearchTypeBox" id="navHomepageSearchType">
|
||||||
<div class="fl mr15 mt8">
|
<div class="fl mr15 mt8">
|
||||||
<input type="radio" value="课程" name="navSearchType" checked/>
|
<input type="radio" value="courses" name="search_type" checked/>
|
||||||
课程
|
课程
|
||||||
</div>
|
</div>
|
||||||
<div class="fl mr15 mt8">
|
<div class="fl mr15 mt8">
|
||||||
<input type="radio" value="项目" name="navSearchType" />
|
<input type="radio" value="projects" name="search_type" />
|
||||||
项目
|
项目
|
||||||
</div>
|
</div>
|
||||||
<div class="fl mr15 mt8">
|
<div class="fl mr15 mt8">
|
||||||
<input type="radio" value="用户" name="navSearchType" />
|
<input type="radio" value="users" name="search_type" />
|
||||||
用户
|
用户
|
||||||
</div>
|
</div>
|
||||||
<div id="navSearchAlert" class="fr mr10">
|
<div id="navSearchAlert" class="fr mr10">
|
||||||
<span class="c_red">请选择搜索类型</span>
|
<span class="c_red">请选择搜索类型</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="loginInButton" class="fr ml20">
|
<div id="loginInButton" class="fr ml20">
|
||||||
<a href="<%= signin_path(:login=>true) %>" class="c_white db">登录</a>
|
<a href="<%= signin_path(:login=>true) %>" class="c_white db">登录</a>
|
||||||
|
@ -48,4 +60,5 @@
|
||||||
}).mouseout(function(){
|
}).mouseout(function(){
|
||||||
$("#navHomepageSearchType").hide();
|
$("#navHomepageSearchType").hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -21,19 +21,29 @@
|
||||||
<%= call_hook :view_layouts_base_html_head %>
|
<%= call_hook :view_layouts_base_html_head %>
|
||||||
<!-- page specific tags -->
|
<!-- page specific tags -->
|
||||||
<%= yield :header_tags -%>
|
<%= yield :header_tags -%>
|
||||||
|
<%= stylesheet_link_tag 'base','header', :media => 'all'%>
|
||||||
</head>
|
</head>
|
||||||
<body class="<%=h body_css_classes %>">
|
<body class="<%=h body_css_classes %>">
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div class="navContainer mb10">
|
||||||
|
<% if User.current.logged? %>
|
||||||
|
<%= render :partial => 'layouts/logined_header' %>
|
||||||
|
<% else%>
|
||||||
|
<%= render :partial => 'layouts/unlogin_header' %>
|
||||||
|
<% end%>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
<div id="wrapper2">
|
<div id="wrapper2">
|
||||||
<div id="wrapper3">
|
<div id="wrapper3">
|
||||||
<%=render :partial => 'layouts/base_header'%>
|
<%#=render :partial => 'layouts/base_header'%>
|
||||||
<div id="main" class="nosidebar">
|
<div id="main" class="nosidebar">
|
||||||
<div id="content_">
|
<div id="content_">
|
||||||
<%= render_flash_messages %>
|
<%= render_flash_messages %>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
<%= call_hook :view_layouts_base_content %>
|
<%= call_hook :view_layouts_base_content %>
|
||||||
<div style="clear:both;"></div>
|
<!--<div style="clear:both;"></div>-->
|
||||||
<%=render :partial => 'layouts/base_footer'%>
|
<!--<%#=render :partial => 'layouts/base_footer'%>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,6 +55,10 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<%= render :partial => 'layouts/footer' %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
<%= call_hook :view_layouts_base_body_bottom %>
|
<%= call_hook :view_layouts_base_body_bottom %>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue