Merge remote-tracking branch 'origin/szzh' into szzh

This commit is contained in:
lizanle 2015-10-10 11:38:04 +08:00
commit 485208f3ab
5 changed files with 109 additions and 109 deletions

View File

@ -5,15 +5,15 @@
<div class="fl"> <div class="fl">
<ul> <ul>
<li class="navHomepageMenu fl"> <li class="navHomepageMenu fl">
<%= link_to "首页",user_activities_path(User.current.id), :class => "c_white f16 db"%> <%= link_to "首页",user_activities_path(User.current.id), :class => "c_white f16 db p10"%>
</li> </li>
<li class="navHomepageMenu fl"> <li class="navHomepageMenu fl">
<a href="<%=url_for(:controller => 'users', :action => 'user_resource',:id=>User.current.id,:type=>1)%>" class="c_white f16 db">资源库</a></li> <a href="<%=url_for(:controller => 'users', :action => 'user_resource',:id=>User.current.id,:type=>1)%>" class="c_white f16 db p10">资源库</a></li>
<li class="navHomepageMenu fl"> <li class="navHomepageMenu fl">
<%= link_to "作业", user_homeworks_user_path(User.current.id), :class => "c_white f16 db"%> <%= link_to "作业", user_homeworks_user_path(User.current.id), :class => "c_white f16 db p10"%>
</li> </li>
<li class="navHomepageMenu fl mr30"> <li class="navHomepageMenu fl mr30">
<a href="http://forge.trustie.net/forums/1/memos/1168" class="c_white f16 db">帮助中心</a> <a href="http://forge.trustie.net/forums/1/memos/1168" class="c_white f16 db p10">帮助中心</a>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -1,95 +1,95 @@
<div class="navHomepage"> <div class="navHomepage">
<div class="navHomepageLogo fl"> <div class="navHomepageLogo fl">
<%=link_to image_tag("../images/nav_logo.png",width:"51px", height: "45px",class: "mt3"), signin_path%> <%=link_to image_tag("../images/nav_logo.png",width:"51px", height: "45px",class: "mt3"), signin_path%>
</div> </div>
<div class="fl"> <div class="fl">
<ul> <ul>
<li class="navHomepageMenu fl mr40"> <li class="navHomepageMenu fl mr40">
<a href="http://forge.trustie.net/forums/1/memos/1168" class="c_white f16">帮助中心</a> <a href="http://forge.trustie.net/forums/1/memos/1168" class="c_white f16 p10">帮助中心</a>
</li> </li>
</ul> </ul>
</div> </div>
<script> <script>
function search(doc){ function search(doc){
//alert(1) //alert(1)
// val = $('input:radio[name="search_type"]:checked').val(); // val = $('input:radio[name="search_type"]:checked').val();
// alert(2) // alert(2)
// $("#search_type").val(val); // $("#search_type").val(val);
// alert(3) // alert(3)
$(doc).parent().submit(); $(doc).parent().submit();
} }
<% type = type%> <% type = type%>
$(function (){ $(function (){
if('<%= type %>' != null && '<%= type %>' == 'courses' ){ if('<%= type %>' != null && '<%= type %>' == 'courses' ){
$('input:radio[value="courses"]').attr('checked','checked'); $('input:radio[value="courses"]').attr('checked','checked');
} }
if('<%= type %>' != null && '<%= type %>' == 'projects' ){ if('<%= type %>' != null && '<%= type %>' == 'projects' ){
$('input:radio[value="projects"]').attr('checked','checked'); $('input:radio[value="projects"]').attr('checked','checked');
} }
if('<%= type %>' != null && '<%= type %>' == 'users' ){ if('<%= type %>' != null && '<%= type %>' == 'users' ){
$('input:radio[value="users"]').attr('checked','checked'); $('input:radio[value="users"]').attr('checked','checked');
} }
}); });
function search_in_header(obj){ function search_in_header(obj){
var name = $.trim($('#navHomepageSearchInput').val()); var name = $.trim($('#navHomepageSearchInput').val());
if (name != "" && name.length != 0) { if (name != "" && name.length != 0) {
$('#type').val($('input[type=radio]:checked').val()); $('#type').val($('input[type=radio]:checked').val());
obj.parent().submit(); obj.parent().submit();
} }
} }
function search_in_header_I(e,obj){ function search_in_header_I(e,obj){
var name = $.trim($('#navHomepageSearchInput').val()); var name = $.trim($('#navHomepageSearchInput').val());
if (e.keyCode == '13' && name != "" && name.length != 0) { if (e.keyCode == '13' && name != "" && name.length != 0) {
$('#type').val($('input[type=radio]:checked').val()); $('#type').val($('input[type=radio]:checked').val());
obj.parent().submit(); obj.parent().submit();
} }
} }
</script> </script>
<div class="fl" id="navHomepageSearch"> <div class="fl" id="navHomepageSearch">
<!--<form class="navHomepageSearchBox">--> <!--<form class="navHomepageSearchBox">-->
<% name = name%> <% name = name%>
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %> <%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词进行搜索" onkeypress="search_in_header_I(event,$(this));"/> <input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词进行搜索" onkeypress="search_in_header_I(event,$(this));"/>
<input type="hidden" name="search_type" id="type" value=""/> <input type="hidden" name="search_type" id="type" value=""/>
<input type="text" style="display: none;"/> <input type="text" style="display: none;"/>
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a> <a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>
<% end %> <% 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="courses" name="search_type" 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="projects" name="search_type" /> <input type="radio" value="projects" name="search_type" />
项目 项目
</div> </div>
<div class="fl mr15 mt8"> <div class="fl mr15 mt8">
<input type="radio" value="users" name="search_type" /> <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>
</div> </div>
<div id="loginSignButton" class="fr"> <div id="loginSignButton" class="fr">
<a href="<%= signin_path(:login=>false) %>" class="c_white db">注册</a> <a href="<%= signin_path(:login=>false) %>" class="c_white db">注册</a>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
//搜索相关 //搜索相关
$("#navHomepageSearch").mouseover(function(){ $("#navHomepageSearch").mouseover(function(){
$("#navHomepageSearchType").show(); $("#navHomepageSearchType").show();
}).mouseout(function(){ }).mouseout(function(){
$("#navHomepageSearchType").hide(); $("#navHomepageSearchType").hide();
}); });
</script> </script>

View File

@ -4,7 +4,7 @@
.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;} .homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;}
.navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;} .navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;}
.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;} .navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;}
.navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle; padding:0px 10px;} .navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle;}
.navHomepageMenu:hover {background-color:#297fb8;} .navHomepageMenu:hover {background-color:#297fb8;}
.navHomepageSearchBoxcontainer {margin-top:11px; } .navHomepageSearchBoxcontainer {margin-top:11px; }
.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; margin-top:11px; background-color:#ffffff;} .navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; margin-top:11px; background-color:#ffffff;}
@ -43,9 +43,9 @@ a.homepageImageNumber:hover {color:#15bccf;}
.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;} .homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;}
.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;} .homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;}
.homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;} .homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;}
.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;} .homepageLeftMenuCoursesLine {height:38px; line-height:38px; vertical-align:middle;}
.homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;} .homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;}
a.coursesLineGrey {color:#808080; display:block;} a.coursesLineGrey {padding-left:25px; color:#808080; display:block;}
a.coursesLineGrey:hover {color:#ffffff;} a.coursesLineGrey:hover {color:#ffffff;}
.homepageLeftMenuMore {height:18px;} .homepageLeftMenuMore {height:18px;}
.homepageLeftMenuMore:hover {background-color:#b3e0ee;} .homepageLeftMenuMore:hover {background-color:#b3e0ee;}

View File

@ -518,7 +518,7 @@ a.uploadIcon {background:url(images/resource_icon_list.png) 8px -60px no-repeat;
.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;} .homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;}
.navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;} .navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;}
.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;} .navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;}
.navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle; padding:0px 10px;} .navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle;}
.navHomepageMenu:hover {background-color:#297fb8;} .navHomepageMenu:hover {background-color:#297fb8;}
/*.navHomepageMenu:hover {background-color:#0ea6b7;}*/ /*.navHomepageMenu:hover {background-color:#0ea6b7;}*/
.navHomepageSearchBoxcontainer {margin-top:11px; } .navHomepageSearchBoxcontainer {margin-top:11px; }
@ -549,7 +549,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
.homepageImageSexMan {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;} .homepageImageSexMan {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
.homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;} .homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;}
a.UsersEditBtn{ display:block; width:55px; height:20px; border:1px solid #6d6d6d; color:#fff; background:#888888 url(../images/homepage_icon.png) -11px -35px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} a.UsersEditBtn{ display:block; width:55px; height:20px; border:1px solid #6d6d6d; color:#fff; background:#888888 url(../images/homepage_icon.png) -11px -35px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon.png) -11px -74px no-repeat;} a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon2.png) -11px -74px no-repeat;}
a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersAttBtn{border:1px solid #888888; } a:hover.UsersAttBtn{border:1px solid #888888; }
a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
@ -564,9 +564,9 @@ a.homepageImageNumber:hover {color:#269ac9;}
.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;} .homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;}
.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;} .homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;}
.homepageLeftMenuCourses {font-size:13px; border-bottom:1px solid #dddddd;} .homepageLeftMenuCourses {font-size:13px; border-bottom:1px solid #dddddd;}
.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;} .homepageLeftMenuCoursesLine {height:38px; line-height:38px; vertical-align:middle;}
.homepageLeftMenuCoursesLine:hover {background-color:#269ac9;} .homepageLeftMenuCoursesLine:hover {background-color:#269ac9;}
a.coursesLineGrey {color:#808080; display:block;} a.coursesLineGrey {padding-left:25px; color:#808080; display:block;}
a.coursesLineGrey:hover {color:#ffffff;} a.coursesLineGrey:hover {color:#ffffff;}
.homepageLeftMenuMore {height:18px;} .homepageLeftMenuMore {height:18px;}
.homepageLeftMenuMore:hover {background-color:#269ac9;} .homepageLeftMenuMore:hover {background-color:#269ac9;}
@ -1066,7 +1066,7 @@ a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflo
.DateBorder{border:1px solid #d9d9d9; border-left:none; padding:7px 6px 6px 6px;} .DateBorder{border:1px solid #d9d9d9; border-left:none; padding:7px 6px 6px 6px;}
a.UsersEditBtn{ display:block; width:55px; height:20px; border:1px solid #6d6d6d; color:#fff; background:#888888 url(../images/homepage_icon.png) -11px -35px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} a.UsersEditBtn{ display:block; width:55px; height:20px; border:1px solid #6d6d6d; color:#fff; background:#888888 url(../images/homepage_icon.png) -11px -35px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon.png) -11px -74px no-repeat;} a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon2.png) -11px -74px no-repeat;}
a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersAttBtn{border:1px solid #888888; } a:hover.UsersAttBtn{border:1px solid #888888; }
a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}

View File

@ -479,9 +479,9 @@ a.homepageImageNumber:hover {color:#15bccf;}
.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;} .homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;}
.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;} .homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;}
.homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;} .homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;}
.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;} .homepageLeftMenuCoursesLine {height:38px; line-height:38px; vertical-align:middle;}
.homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;} .homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;}
a.coursesLineGrey {color:#15bccf; display:block;} a.coursesLineGrey {padding-left:25px; color:#15bccf; display:block;}
a.coursesLineGrey:hover {color:#ffffff;} a.coursesLineGrey:hover {color:#ffffff;}
.homepageLeftMenuMore {height:18px;} .homepageLeftMenuMore {height:18px;}
.homepageLeftMenuMore:hover {background-color:#b3e0ee;} .homepageLeftMenuMore:hover {background-color:#b3e0ee;}