弹框增加滚动加载,“实训题”编辑块的显示变更

dev_local
杨树明 6 years ago
parent 27bdeb2aa8
commit d88139c12d

@ -1,35 +1,86 @@
<%= form_for("",:url => update_exercise_question_exercise_index_path(:exercise_question => exercise_question.id),:html => {:id => "update_exercise_question_#{exercise_question.id}"}) do |f|%>
<div class="user_bg_shadow bor-grey-e pl15 pr30 mb20 fillin_Temp" id="poll_answers_<%= exercise_question.id %>">
<p class="fl mt15 font-16 mb10">实训题</p>
<p class="clearfix mb10" style="margin-left: 78px;"><%= exercise_question.shixun.name %></p>
<li class="clearfix pr mb20">
<input name="question_type" value="5" type="hidden">
<label class="panel-form-label fl"><span class="mr10">要求</span></label>
<textarea maxlength="250" class="panel-form-width2-690 fl panel-box-sizing questionTitle undis" name="question_title" id="poll_questions_title_<%=exercise_question.id %>"><%=exercise_question.question_title.html_safe %></textarea>
</li>
<li class="clearfix pr mb10">
<label class="panel-form-label fl"><span class="mr10">序号</span></label>
<span class="fl with80 mt6 ml20 color-dark-grey" style="display: block;">关卡名称</span>
<span class="fl mt6 color-dark-grey" style="display: block;">分值</span>
</li>
<% exercise_question.exercise_shixun_challenges.each_with_index do |exercise_challenge,index| %>
<li class="clearfix pr mb10">
<label class="panel-form-label fl">
<span class="option-item fr ml6 color-grey select-choice" data-tip-left="第<%= index + 1 %>关"><%= index + 1 %></span>
</label>
<span class="fl ml20 mt6 with75 task-hide" style="display: block;"><%= exercise_challenge.challenge.subject %></span>
<input value="<%= exercise_challenge.question_score %>" type="text" class="with10 ml15 mr5 pl10 fl panel-box-sizing task-height-40" name="question_score[]" />
<label class="fl" style="line-height: 40px;">分</label>
</li>
<div class="cl"></div>
<% end %>
<li class="clearfix mb20">
<p class="fr">
<span class="font-12 color-grey mb10" style="display: block;">温馨提示:[实训题]属于客观题将由系统自动评分</span>
<a href="javascript:void(0)" class="fr task-btn task-btn-orange" onclick="edit_poll_question($(this),<%= exercise_question.id %>,5);">保存</a>
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$('#edit_poll_questions_<%=exercise_question.id %>').hide();$('#show_poll_questions_<%=exercise_question.id %>').show();">取消</a>
</p>
</li>
</div>
<!-- <div class="user_bg_shadow bor-grey-e pl15 pr30 mb20 fillin_Temp" id="poll_answers_<%#= exercise_question.id %>">-->
<!-- <p class="fl mt15 font-16 mb10">实训题</p>-->
<!-- <p class="clearfix mb10" style="margin-left: 78px;"><%#= exercise_question.shixun.name %></p>-->
<!-- <li class="clearfix pr mb20">-->
<!-- <input name="question_type" value="5" type="hidden">-->
<!-- <label class="panel-form-label fl"><span class="mr10">要求</span></label>-->
<!-- <textarea maxlength="250" class="panel-form-width2-690 fl panel-box-sizing questionTitle undis" name="question_title" id="poll_questions_title_<%#=exercise_question.id %>"><%#=exercise_question.question_title.html_safe %></textarea>-->
<!-- </li>-->
<!-- <li class="clearfix pr mb10">-->
<!-- <label class="panel-form-label fl"><span class="mr10">序号</span></label>-->
<!-- <span class="fl with80 mt6 ml20 color-dark-grey" style="display: block;">关卡名称</span>-->
<!-- <span class="fl mt6 color-dark-grey" style="display: block;">分值</span>-->
<!-- </li>-->
<%# exercise_question.exercise_shixun_challenges.each_with_index do |exercise_challenge,index| %>
<!-- <li class="clearfix pr mb10">-->
<!-- <label class="panel-form-label fl">-->
<!-- <span class="option-item fr ml6 color-grey select-choice" data-tip-left="第<%#= index + 1 %>关"><%#= index + 1 %></span>-->
<!-- </label>-->
<!-- <span class="fl ml20 mt6 with75 task-hide" style="display: block;"><%#= exercise_challenge.challenge.subject %></span>-->
<!-- <input value="<%#= exercise_challenge.question_score %>" type="text" class="with10 ml15 mr5 pl10 fl panel-box-sizing task-height-40" name="question_score[]" />-->
<!-- <label class="fl" style="line-height: 40px;">分</label>-->
<!-- </li>-->
<!-- <div class="cl"></div>-->
<%# end %>
<!-- <li class="clearfix mb20">-->
<!-- <p class="fr">-->
<!-- <span class="font-12 color-grey mb10" style="display: block;">温馨提示:[实训题]属于客观题将由系统自动评分</span>-->
<!-- <a href="javascript:void(0)" class="fr task-btn task-btn-orange" onclick="edit_poll_question($(this),<%#= exercise_question.id %>,5);">保存</a>-->
<!-- <a href="javascript:void(0)" class="fr task-btn mr10" onclick="$('#edit_poll_questions_<%=exercise_question.id %>').hide();$('#show_poll_questions_<%=exercise_question.id %>').show();">取消</a>-->
<!-- </p>-->
<!-- </li>-->
<!-- </div>-->
<% end %>
<div class="user_bg_shadow bor-grey-e mb20 answer_Temp edu-back-white practicalTemp" id="answer_Temp">
<div class="fl mt15 font-16 mb10 padding10 practicalTitlefont">实训题</div>
<div class="fl font-16 mb10 practicalTitle">
<span class="Titlefont">初级题</span>
<div class="fr mr40 shixun-title-font">
<span class="color-red mr5 shixun-title-font">*</span>分值:<input class="borderFF8121"/> 分/题
<div class="colorFF8121">*大于等于0且不能大于100</div>
</div>
<div class="fr mr40 shixun-title-font">
<span class="color-red mr5 shixun-title-font">*</span>
随机出题量:<input class="borderFF8121"/> 题
<div class="colorFF8121">*不能为空</div>
<div class="colorFF8121">*必须为正整数</div>
<div class="colorFF8121">*不能大于可用题数</div>
</div>
<div class="fr mr40 shixun-title-font">
<span class="color-orange mr5 shixun-title-font">3</span>
题可用
</div>
</div>
<div class="fl font-16 mb10 practicalTitle">
<span class="Titlefont">中级题</span>
</div>
<div class="fl font-16 mb10 practicalTitle">
<span class="Titlefont">高级题</span>
</div>
<div class="fl font-16 mb10 practicalTitle">
<span class="Titlefont">顶级题</span>
</div>
</div>

@ -3,40 +3,55 @@
<%= form_for(ExerciseQuestion.new,
:html => { :multipart => true, :id => "new_exercise_question"},
:url=>create_exercise_question_exercise_path(exercise.id)) do |f| %>
<div class="user_bg_shadow bor-grey-e pl15 pr30 mb20 answer_Temp" id="answer_Temp">
<p class="fl mt15 font-16 mb10">实训题</p>
<input name="question_type" value="5" type="hidden">
<input name="shixun" value="<%= @shixun.id %>" type="hidden">
<input name="quest_id" id="quest_id" value="0" type="hidden">
<p class="clearfix mb10" style="margin-left: 78px;"><%= @shixun.name %></p>
<li class="clearfix pr mb20">
<label class="panel-form-label fl"><span class="mr10">要求</span></label>
<textarea id="poll_questions_title" name="question_title" class="panel-form-width2-690 fl panel-box-sizing undis"></textarea>
</li>
<li class="clearfix pr mb10">
<label class="panel-form-label fl"><span class="mr10">序号</span></label>
<span class="fl with80 mt6 ml20 color-dark-grey" style="display: block;">关卡名称</span>
<span class="fl mt6 color-dark-grey" style="display: block;">分值</span>
</li>
<% @shixun.challenges.each_with_index do |challenge, i| %>
<li class="clearfix pr mb10">
<label class="panel-form-label fl">
<span class="option-item fr ml6 color-grey select-choice" data-tip-left="第<%= i + 1 %>关"><%= i + 1 %></span>
</label>
<span class="fl ml20 mt6 with75 task-hide" style="display: block;"><%= challenge.subject %></span>
<input value="" type="text" class="with10 ml15 mr5 pl10 fl panel-box-sizing task-height-40" name="question_score[]" />
<label class="fl" style="line-height: 40px;">分</label>
</li>
<% end %>
<li class="clearfix mb20">
<p class="fr">
<span class="font-12 color-grey mb10" style="display: block;">温馨提示:[实训题]属于客观题将由系统自动评分</span>
<a href="javascript:void(0)" class="fr task-btn task-btn-orange" id="add_new_question">保存</a>
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$(this).parent().parent().parent().parent().parent().remove();">取消</a>
</p>
</li>
</div>
<!-- <div class="user_bg_shadow bor-grey-e pl15 pr30 mb20 answer_Temp" id="answer_Temp">-->
<!-- <p class="fl mt15 font-16 mb10">实训题</p>-->
<!-- <input name="question_type" value="5" type="hidden">-->
<!-- <input name="shixun" value="<%#= @shixun.id %>" type="hidden">-->
<!-- <input name="quest_id" id="quest_id" value="0" type="hidden">-->
<!-- <p class="clearfix mb10" style="margin-left: 78px;"><%#= @shixun.name %></p>-->
<!-- <li class="clearfix pr mb20">-->
<!-- <label class="panel-form-label fl"><span class="mr10">要求</span></label>-->
<!-- <textarea id="poll_questions_title" name="question_title" class="panel-form-width2-690 fl panel-box-sizing undis"></textarea>-->
<!-- </li>-->
<!-- <li class="clearfix pr mb10">-->
<!-- <label class="panel-form-label fl"><span class="mr10">序号</span></label>-->
<!-- <span class="fl with80 mt6 ml20 color-dark-grey" style="display: block;">关卡名称</span>-->
<!-- <span class="fl mt6 color-dark-grey" style="display: block;">分值</span>-->
<!-- </li>-->
<%# @shixun.challenges.each_with_index do |challenge, i| %>
<!-- <li class="clearfix pr mb10">-->
<!-- <label class="panel-form-label fl">-->
<!-- <span class="option-item fr ml6 color-grey select-choice" data-tip-left="第<%#= i + 1 %>关"><%#= i + 1 %></span>-->
<!-- </label>-->
<!-- <span class="fl ml20 mt6 with75 task-hide" style="display: block;"><%#= challenge.subject %></span>-->
<!-- <input value="" type="text" class="with10 ml15 mr5 pl10 fl panel-box-sizing task-height-40" name="question_score[]" />-->
<!-- <label class="fl" style="line-height: 40px;">分</label>-->
<!-- </li>-->
<%# end %>
<!-- <li class="clearfix mb20">-->
<!-- <p class="fr">-->
<!-- <span class="font-12 color-grey mb10" style="display: block;">温馨提示:[实训题]属于客观题将由系统自动评分</span>-->
<!-- <a href="javascript:void(0)" class="fr task-btn task-btn-orange" id="add_new_question">保存</a>-->
<!-- <a href="javascript:void(0)" class="fr task-btn mr10" onclick="$(this).parent().parent().parent().parent().parent().remove();">取消</a>-->
<!-- </p>-->
<!-- </li>-->
<!-- </div>-->
<% end %>
<div class="user_bg_shadow bor-grey-e mb20 answer_Temp edu-back-white practicalTemp" id="answer_Temp">
<p class="fl mt15 font-16 mb10 practicalTitle padding10 practicalTitlefont">实训题</p>
<p class="fl mt15 font-16 mb10 practicalTitle">
</p>
</div>
</div>
<% end %>
<script type="text/javascript">

@ -7,7 +7,7 @@
<th>学员数</th>
</tr>
</thead>
<tbody>
<tbody class="selecshixun" onscroll="contentViewScroll">
<% @shixuns.each do |shixun| %>
<tr>
<td class="clearfix" style="padding-left: 20px">
@ -28,10 +28,35 @@
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" onclick="new_shixun_exercise();">选择</a>
<a href="javascript:void(0);" class="task-btn fr pop_close mr10" onclick="hideModal();">取消</a>
</div>
<!--<div class="fl pages_user_show mt10">-->
<!--<ul>-->
<!--<%#= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>-->
<!--</ul>-->
<!--<div class="cl"></div>-->
<!--</div>-->
<!-- <div class="fl pages_user_show mt10">-->
<!-- <ul>-->
<%#= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
<!-- </ul>-->
<!-- <div class="cl"></div>-->
<!-- </div>-->
</div>
<script>
//滑动到底加载
function contentViewScroll(){
//滑动到底加载
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
<!-- var url= www.xxx.com-->
<!-- $.ajax({-->
<!-- type: "post",-->
<!-- url: url,-->
<!-- data: {-->
<!-- poll_question_id: <%#= poll_question.id %>,-->
<!-- poll_answer_id: <%#= poll_answer.id %>,-->
<!-- vote_text: obj.value-->
<!-- },-->
<!-- success: function (data) {-->
<!-- 填充到 tbody标签里-->
<!-- }-->
<!-- });-->
}
}
</script>

@ -149,7 +149,8 @@ a.decoration{text-decoration: underline}
.padding20-15{padding: 20px 15px;box-sizing: border-box}
.padding20-10{padding: 20px 10px;box-sizing: border-box}
.padding20-25{padding: 20px 25px;box-sizing: border-box}
.padding10{padding: 10px;box-sizing: border-box}
.padding20{padding: 20px;box-sizing: border-box}
.padding30{padding: 30px;box-sizing: border-box}
.padding30-20{padding: 30px 20px;box-sizing: border-box}
.padding30-40{padding: 30px 40px;box-sizing: border-box}
@ -883,3 +884,58 @@ html>body #ajax-indicator { position: fixed; }
margin-top: 60px;
margin-left: -26px;
}
.selecshixun{
overflow-y: scroll;
}
.practicalTemp{
width:1200px;
height:950px;
background:rgba(255,255,255,1);
border:1px solid rgba(238,238,238,1);
}
.practicalTitlefont{
font-size:18px;
font-family:MicrosoftYaHei;
font-weight:400;
color:rgba(102,102,102,1);
width: 1200px;
height: 60px;
line-height: 25px;
padding-left: 10px;
border-bottom: 1px solid rgba(238,238,238,1);
}
.practicalTitle{
width: 1160px;
padding: 20px;
border-bottom:1px solid rgba(238,238,238,1);
}
.Titlefont{
width: 48px;
height: 30px;
font-size: 15px;
font-family: MicrosoftYaHei;
font-weight: 400;
color: rgba(5,16,26,1);
}
.shixun-title-font{
font-size:16px;
font-family:MicrosoftYaHei;
font-weight:400;
color:#828282;
}
.colorFF8121{
color: #FF8121;
font-size: 12px;
text-align: left;
width: 110px;
margin-left: 117px;
}
.borderFF8121{
border:1px solid #FF8121
}
Loading…
Cancel
Save