parent
f90c750826
commit
44af3aadf4
@ -0,0 +1,25 @@
|
||||
<li class="clearfix" id="require_<%= requirement.id %>">
|
||||
<p class="clearfix df">
|
||||
<span class="fl column-second"><%= requirement.position %></span>
|
||||
<span class="fl flex1 font-bd lineh-20 pt3"><%= requirement.content %></span>
|
||||
<span class="lineh-20 pt5">
|
||||
<% if template_major %>
|
||||
<% if requirement.position == @ec_graduation_requirements.count %>
|
||||
<a href="javascript:void(0)" class="newAddSubentry" onclick="ShowPanel();" data-tip-down="添加"><i class="iconfont icon-tianjiafangda color-green ml15"></i></a>
|
||||
<% end %>
|
||||
<a href="javascript:void(0)" onclick="delete_confirm_box_2('<%= ec_graduation_requirement_path(requirement) %>','是否确认删除?')" data-remote="true" data-method="DELETE" class="mr15 fl" data-tip-down="删除"><i class="iconfont icon-shanchu color-grey-c font-15 fl mt2"></i></a>
|
||||
<a href="<%= edit_ec_graduation_requirement_path(requirement) %>" class="fl" data-tip-down="编辑" data-remote="true"><i class="iconfont icon-bianjidaibeijing color-green "></i></a>
|
||||
<% end %>
|
||||
</span>
|
||||
</p>
|
||||
<% if requirement.ec_graduation_subitems.present? %>
|
||||
<div class="mt10">
|
||||
<% requirement.ec_graduation_subitems.each do |sub| %>
|
||||
<p class="clearfix df pr48 mb5 lineh-20">
|
||||
<span class="fl column-second"><%= "#{requirement.position}-#{sub.position}" %></span>
|
||||
<span class="fl flex1"><%= sub.content %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</li>
|
@ -0,0 +1,9 @@
|
||||
$("#edit_subitem_<%= @ec_graduation_subitem.id %>").remove();
|
||||
var num=$("#sequenceNum").html();
|
||||
var sub=$(".sequence");
|
||||
for(var i=0;i<parseInt(sub.length);i++){
|
||||
$(sub).eq(i).html(num+"-"+(i+1));
|
||||
}
|
||||
LeaveTitle($("[data-tip-down]"),$(".data-tip-down"));
|
||||
$("#require_<%= @ec_graduation_requirement.id %>").replaceWith("<%= j(render :partial => "ec_graduation_requirements/requirement_item",
|
||||
:locals => {:requirement => @ec_graduation_requirement, :template_major => true}) %>");
|
Loading…
Reference in new issue