鼠标点入“请输入作业标题”后,才显示kindeditor及其下面的内容,及导入作业右侧的时间框,应该显示“提交截止日期”的tip

This commit is contained in:
cxt 2015-08-31 17:35:47 +08:00
parent 1113a7938c
commit 90b8d25424
1 changed files with 28 additions and 26 deletions

View File

@ -1,20 +1,21 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
<div class="HomeWorkCon">
<div>
<input type="text" name="homework_common[name]" id="homework_name" class="InputBox W700" maxlength="255" onkeyup="regex_homework_name();" placeholder="请输入作业标题" value="<%= homework.name%>" >
<input type="text" name="homework_common[name]" id="homework_name" class="InputBox W700" maxlength="255" onfocus="$('#homework_editor').show()" onkeyup="regex_homework_name();" placeholder="请输入作业标题" value="<%= homework.name%>" >
<p id="homework_name_span" class="c_red mt5"></p>
</div>
<div class="cl"></div>
<div class=" mt10">
<%= link_to "导入作业", user_import_homeworks_user_path(User.current.id),:class => "BlueCirBtn fl mr10",:remote => true%>
<span class="fl mt5 ml10">截止日期:</span>
<div class="calendar_div fl">
<input type="text" name="homework_common[end_time]" id="homework_end_time" placeholder="截止日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.end_time || (Time.now + 3600 * 24).strftime('%Y-%m-%d')%>" >
<%= calendar_for('homework_end_time')%>
</div>
</div>
<div class="cl"></div>
<div id="homework_editor" style="display: none">
<div class="mt10">
<% if edit_mode %>
<%= f.kindeditor :description, :editor_id => 'homework_description_editor', :height => "150px", :owner_id => homework.id, :owner_type => OwnerTypeHelper::HOMEWORKCOMMON %>
@ -42,3 +43,4 @@
</div>
</div>
<div class="cl"></div>
</div>