创建实训作业中的选择实训,搜索框没有保存搜索关键字,搜索图标点击无效果
This commit is contained in:
parent
0dd677602d
commit
f3b8a5e952
|
|
@ -0,0 +1,11 @@
|
|||
<% @shixuns.each do |shixun| %>
|
||||
<tr>
|
||||
<td class="clearfix">
|
||||
<input name="shixun_homework" type="radio" class="magic-radio" id="shixun_input_<%= shixun.id %>" value="<%= shixun.id %>">
|
||||
<label for="shixun_input_<%= shixun.id %>"></label>
|
||||
<%= link_to shixun.name, shixun_path(shixun), :class => "edu-info-dark task-hide mt3" %>
|
||||
</td>
|
||||
<td><%= link_to shixun.owner.try(:show_name), user_path(shixun.owner), :class => "edu-txt-w140 mt3 task-hide" %></td>
|
||||
<td><%= shixun.myshixuns.count %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
@ -4,8 +4,8 @@
|
|||
<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
|
||||
</div>
|
||||
<div class="task_popup_con">
|
||||
<%= labelled_form_for @homework, :url =>{:controller=> 'homework_common', :action => 'shixuns', :course => @course.id}, :id => 'shixun_search_form', :method => "get", :remote => true do |f| %>
|
||||
<div class=" clearfix mb10">
|
||||
<%= labelled_form_for @homework, :url =>{:controller=> 'homework_common', :action => 'shixuns', :course => @course.id, :is_search => 1}, :html => {:id => 'shixun_search_form'}, :method => "get", :remote => true do |f| %>
|
||||
<div class="clearfix mb10">
|
||||
<div class="task-form-50 edu-position fr" style="padding:0;">
|
||||
<input class="task-form-100 panel-box-sizing" placeholder="输入实训名称的关键字搜索" type="text" name="search">
|
||||
<a href="javascript:void(0);" onclick="$('#shixun_search_form').submit()" class="edu-btn-search font-16 color-grey mt5"><i class="fa fa-search"></i></a>
|
||||
|
|
@ -22,18 +22,8 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<span id="homework_type_notice" class="c_red none">请至少选中一个实训</span>
|
||||
<tbody>
|
||||
<% @shixuns.each do |shixun| %>
|
||||
<tr>
|
||||
<td class="clearfix">
|
||||
<input name="shixun_homework" type="radio" class="magic-radio" id="shixun_input_<%= shixun.id %>" value="<%= shixun.id %>">
|
||||
<label for="shixun_input_<%= shixun.id %>"></label>
|
||||
<%= link_to shixun.name, shixun_path(shixun), :class => "edu-info-dark task-hide mt3" %>
|
||||
</td>
|
||||
<td><%= link_to shixun.owner.try(:show_name), user_path(shixun.owner), :class => "edu-txt-w140 mt3 task-hide" %></td>
|
||||
<td><%= shixun.myshixuns.count %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tbody id="new_shixun_homework_list">
|
||||
<%= render :partial => "new_shixun_homework_list" %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,6 @@
|
|||
<% if params[:is_search] %>
|
||||
$("#new_shixun_homework_list").html("<%= j(render :partial => 'new_shixun_homework_list') %>");
|
||||
<% else %>
|
||||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/shixuns') %>";
|
||||
pop_box_new(htmlvalue, 680, 454);
|
||||
pop_box_new(htmlvalue, 680, 454);
|
||||
<% end %>
|
||||
Loading…
Reference in New Issue