parent
8ad8395bfe
commit
58bf8a9947
@ -0,0 +1,30 @@
|
||||
<div class="task-popup" style="width:460px;">
|
||||
<div class=" task-popup-title clearfix task-popup-bggrey">
|
||||
重命名
|
||||
</div>
|
||||
<div class="task_popup_con">
|
||||
<%= form_for "", :url => rename_homework_homework_common_path(@homework), :remote => true, :html => {:id => "rename_shixun_homework_form"} do |f| %>
|
||||
<div class="df pl20 pr20 mb20 mt10">
|
||||
<span class="fl pt3">作业名称:</span>
|
||||
<div class="flex1">
|
||||
<input type="text" class="input-100-35 greyInput" maxlength="20" value="<%= @homework.name %>" name="name" id="rename_homework_name" placeholder="请输入作业名称"/>
|
||||
<p class="lineh-20" style="height: 20px;"><span class="color-orange-tip none" id="printNotice">请输入作业名称</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<li class="clearfix mt10 edu-txt-center">
|
||||
<a href="javascript:void(0);" class="task-btn mr20" onclick="hideModal()">取消</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange" onclick="surePutIn();">确定</a>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function surePutIn(){
|
||||
if($("#rename_homework_name").val() == "") {
|
||||
$("#printNotice").removeClass("none");
|
||||
} else {
|
||||
$("#rename_shixun_homework_form").submit();
|
||||
hideModal();
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,5 @@
|
||||
<% if @notice %>
|
||||
notice_box("作业名称不能为空");
|
||||
<% else %>
|
||||
$("#homework_name_<%= @homework.id %>").html(<%= @homework.name %>);
|
||||
<% end %>
|
@ -0,0 +1,2 @@
|
||||
var html = '<%= escape_javascript(render :partial => "homework_common/rename_shixun_homework") %>';
|
||||
pop_box_new(html, 460, 227);
|
Loading…
Reference in new issue