修改《托管平台中点击某项目进入该项目主页,右上角的搜索处不输入内容点击搜索按钮,给出的提示信息显示不合理》

增加《课程平台进入某一课程搜索风格保持与项目及竞赛的一致》
Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2015-01-19 11:01:05 +08:00
parent 0ed39fbcc7
commit 0b0b6c9b6e
3 changed files with 27 additions and 3 deletions

View File

@ -47,12 +47,36 @@
</td> </td>
<td rowspan="2" width="250px"> <td rowspan="2" width="250px">
<div class="top-content-search"> <div class="top-content-search">
<script type="text/javascript">
function regexName()
{
var name = $.trim($("#name").val());
if(name.length == 0)
{
$("#project_name_span").text("<%= l(:label_search_conditions_not_null) %>");
$("#project_name_span").css('color','#ff0000');
$("#project_name_span").focus();
return false;
}
else
{
$("#project_name_span").text("");
return true;
}
}
function submitSerch()
{
if(regexName()){$("#course_search_form").submit();}
}
</script>
<%= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get) do %> <%= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get) do %>
<%= text_field_tag 'name', params[:name], :size => 20, :style => "float:left" %> <%= text_field_tag 'name', params[:name], :size => 20, :style => "float:left" %>
<a href="#" onclick="$('#course_search_form').submit();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" > <a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
<%= l(:label_search)%> <%= l(:label_search)%>
</a> </a>
<br />
<span id="project_name_span" style="float: left"></span>
<%#= submit_tag l(:label_search), :class => "ButtonColor m3p10", :name => nil, :style => "float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" %> <%#= submit_tag l(:label_search), :class => "ButtonColor m3p10", :name => nil, :style => "float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" %>
<% end %> <% end %>
</div> </div>

View File

@ -70,7 +70,7 @@
<%= l(:label_search)%> <%= l(:label_search)%>
</a> </a>
<br /> <br />
<span id="contest_name_span_head"></span> <span id="contest_name_span_head" style="float: left"></span>
<% end %> <% end %>
</div> </div>
</td> </td>

View File

@ -71,7 +71,7 @@
<%= l(:label_search)%> <%= l(:label_search)%>
</a> </a>
<br /> <br />
<span id="project_name_span"></span> <span id="project_name_span" style="float: left"></span>
<% end %> <% end %>
</div> </div>
</td> </td>