单选题样式调整

This commit is contained in:
Tim 2015-11-26 10:27:32 +08:00
parent 6f4b6a6b67
commit a0c73a5a54
4 changed files with 233 additions and 234 deletions

View File

@ -1,63 +1,62 @@
<%= form_for("",:url => update_exercise_question_exercise_index_path(:exercise_question => exercise_question.id),:remote => true) do |f|%> <%= form_for("",:url => update_exercise_question_exercise_index_path(:exercise_question => exercise_question.id),:remote => true) do |f|%>
<!--编辑单选start--> <!--编辑单选start-->
<script type="text/javascript"> <script type="text/javascript">
function resetQuestion<%=exercise_question.id%>() function resetQuestion<%=exercise_question.id%>()
{ {
$("#poll_questions_title_<%=exercise_question.id%>").val("<%= exercise_question.question_title%>") $("#poll_questions_title_<%=exercise_question.id%>").val("<%= exercise_question.question_title%>")
$("#poll_question_score_<%=exercise_question.id %>").val("<%= exercise_question.question_score%>") $("#poll_question_score_<%=exercise_question.id %>").val("<%= exercise_question.question_score%>")
$("#poll_question_standard_answer_<%=exercise_question.id %>").val("<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s)%>") $("#poll_question_standard_answer_<%=exercise_question.id %>").val("<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s)%>")
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>" + $("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>" +
"<li class='ur_item'>" + "<li class='ur_item'>" +
"<label>选项<%=convert_to_char (index+1).to_s %><span class='ur_index'></span>&nbsp;&nbsp;&nbsp;</label>" + "<input type='radio' style='width: 15px;' />"+
"<input maxlength='200' type='text' name='question_answer[<%=exercise_choice.id %>]' placeholder='输入选项内容' value='<%=exercise_choice.choice_text %>'/>" + "<label>选项<%=convert_to_char (index+1).to_s %><span class='ur_index'></span>&nbsp;&nbsp;&nbsp;</label>" +
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>" + "<input maxlength='200' type='text' name='question_answer[<%=exercise_choice.id %>]' placeholder='输入选项内容' value='<%=exercise_choice.choice_text %>'/>" +
"<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>" + "<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>" +
"</li>" + "<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>" +
"<div class='cl'></div>" + "</li>" +
"<% end%>"); "<div class='cl'></div>" +
} "<% end%>");
</script> }
</script>
<div class="questionContainer" style="width: 680px;">
<div class="ur_editor_title"> <div class="questionContainer" style="width: 680px;">
<label>问题:&nbsp;&nbsp;</label> <div class="ur_editor_title">
<input name="question_type" value="<%=exercise_question.question_type %>" type="hidden"> <label>问题:&nbsp;&nbsp;</label>
<input name="question_title" id="poll_questions_title_<%=exercise_question.id %>" class="questionTitle" placeholder="请输入单选题题目" type="text" value="<%=exercise_question.question_title %>"> <input name="question_type" value="<%=exercise_question.question_type %>" type="hidden">
</div> <input name="question_title" id="poll_questions_title_<%=exercise_question.id %>" class="questionTitle" placeholder="请输入单选题题目" type="text" value="<%=exercise_question.question_title %>">
<div class="ur_editor_content"> </div>
<ul> <div class="ur_editor_content">
<li class="ur_item"> <ul>
<label>分数<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label> <li class="ur_item">
<input type="text" id="poll_question_score_<%=exercise_question.id %>" name="question_score" style="width:40px; text-align:center; padding-left:0px;" value="<%= exercise_question.question_score %>">分 <label>分数<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>
</li> <input type="text" id="poll_question_score_<%=exercise_question.id %>" name="question_score" style="width:40px; text-align:center; padding-left:0px;" value="<%= exercise_question.question_score %>">分
<div class="cl"></div> <span class="ml10">标准答案:请点击正确选项前面单选按钮</span>
<div id="poll_answers_<%=exercise_question.id%>"> </li>
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %> <div class="cl"></div>
<li class="ur_item"> <div id="poll_answers_<%=exercise_question.id%>">
<label>选项<%=convert_to_char (index+1).to_s %><span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label> <% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
<input maxlength="200" type='text' name='question_answer[<%=exercise_choice.id %>]' placeholder='输入选项内容' value="<%=exercise_choice.choice_text %>"> <li class="ur_item">
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a> <label>选项<%=convert_to_char (index+1).to_s %><span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a> <input type="radio" style="width: 15px;" />
</li> <input maxlength="200" type='text' name='question_answer[<%=exercise_choice.id %>]' placeholder='输入选项内容' value="<%=exercise_choice.choice_text %>">
<div class="cl"></div> <a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
<% end %> <a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
</div> </li>
<li class="ur_item"> <div class="cl"></div>
<label>标准答案<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label> <% end %>
<input id="poll_question_standard_answer_<%=exercise_question.id %>" name="exercise_choice" placeholder="若标准答案为A在此输入A即可" type="text" value="<%=convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>"> </div>
</li> <div class="cl"></div>
<div class="cl"></div> </ul>
</ul> </div>
</div> <div class="ur_editor_footer">
<div class="ur_editor_footer"> <a class="btn btn_dark btn_submit c_white" data-button="ok" onclick="edit_poll_question($(this),<%= exercise_question.id %>,1);">
<a class="btn btn_dark btn_submit c_white" data-button="ok" onclick="edit_poll_question($(this),<%= exercise_question.id %>,1);"> 保存
保存 </a>
</a> <a class="btn btn_light btn_cancel" data-button="cancel" onclick="resetQuestion<%=exercise_question.id%>();pollQuestionCancel(<%= exercise_question.id%>);">
<a class="btn btn_light btn_cancel" data-button="cancel" onclick="resetQuestion<%=exercise_question.id%>();pollQuestionCancel(<%= exercise_question.id%>);"> <%= l(:button_cancel)%>
<%= l(:button_cancel)%> </a>
</a> </div>
</div> <div class="cl"></div>
<div class="cl"></div> </div>
</div> <!--编辑单选 end-->
<!--编辑单选 end-->
<% end%> <% end%>

View File

@ -1,62 +1,62 @@
<%= form_for(ExerciseQuestion.new, <%= form_for(ExerciseQuestion.new,
:html => { :multipart => true }, :html => { :multipart => true },
:url=>create_exercise_question_exercise_path(exercise.id), :url=>create_exercise_question_exercise_path(exercise.id),
:remote=>true ) do |f| %> :remote=>true ) do |f| %>
<div class="questionContainer"> <div class="questionContainer">
<div class="ur_editor_title"> <div class="ur_editor_title">
<label>问题:&nbsp;&nbsp;</label> <label>问题:&nbsp;&nbsp;</label>
<input name="question_type" value="1" type="hidden"> <input name="question_type" value="1" type="hidden">
<input name="question_title" id="poll_questions_title" class="questionTitle" placeholder="请输入单选题题目" type="text"> <input name="question_title" id="poll_questions_title" class="questionTitle" placeholder="请输入单选题题目" type="text">
</div> </div>
<div class="ur_editor_content"> <div class="ur_editor_content">
<ul> <ul>
<li class="ur_item"> <li class="ur_item">
<% score = exercise.exercise_questions.where("question_type=1").last.nil? ? "": exercise.exercise_questions.where("question_type=1").last.question_score %> <% score = exercise.exercise_questions.where("question_type=1").last.nil? ? "": exercise.exercise_questions.where("question_type=1").last.question_score %>
<label>分数<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label> <label>分数<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>
<input id="question_score" value="<%=score %>" type="text" name="question_score" style="width:40px; text-align:center; padding-left:0px;">分 <input id="question_score" value="<%=score %>" type="text" name="question_score" style="width:40px; text-align:center; padding-left:0px;">分
</li> <span class="ml15">标准答案:请选择</span>
<div class="cl"></div> </li>
<div> <div class="cl"></div>
<li class="ur_item"> <div>
<label>选项A<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label> <li class="ur_item">
<input maxlength="200" type='text' name='question_answer[0]' placeholder='输入选项内容'> <label>选项A<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a> <input type="radio" style="width: 15px;" />
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a> <input maxlength="200" type='text' name='question_answer[0]' placeholder='输入选项内容'>
</li> <a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
<div class="cl"></div> <a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
<li class="ur_item"> </li>
<label>选项B<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label> <div class="cl"></div>
<input maxlength="200" type='text' name='question_answer[1]' placeholder='输入选项内容'> <li class="ur_item">
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a> <label>选项B<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a> <input type="radio" style="width: 15px;" />
</li> <input maxlength="200" type='text' name='question_answer[1]' placeholder='输入选项内容'>
<div class="cl"></div> <a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
<li class="ur_item"> <a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
<label>选项C<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label> </li>
<input maxlength="200" type='text' name='question_answer[2]' placeholder='输入选项内容'/> <div class="cl"></div>
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a> <li class="ur_item">
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a> <label>选项C<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>
</li> <input type="radio" style="width: 15px;" />
<div class="cl"></div> <input maxlength="200" type='text' name='question_answer[2]' placeholder='输入选项内容'/>
<li class="ur_item"> <a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
<label>选项D<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label> <a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
<input maxlength="200" type='text' name='question_answer[3]' placeholder='输入选项内容'/> </li>
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a> <div class="cl"></div>
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a> <li class="ur_item">
</li> <label>选项D<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>
</div> <input type="radio" style="width: 15px;" />
<div class="cl"></div> <input maxlength="200" type='text' name='question_answer[3]' placeholder='输入选项内容'/>
<li class="ur_item"> <a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
<label>标准答案<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label> <a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
<input id="question_standard_ans" name="exercise_choice" placeholder="若标准答案为A在此输入A即可" type="text"> </li>
</li> </div>
<div class="cl"></div> <div class="cl"></div>
</ul> </ul>
</div> </div>
<div class="ur_editor_footer"> <div class="ur_editor_footer">
<a class="btn btn_dark btn_submit c_white" data-button="ok" onclick="add_poll_question($(this),1);"> 保存 </a> <a class="btn btn_dark btn_submit c_white" data-button="ok" onclick="add_poll_question($(this),1);"> 保存 </a>
<a class="btn btn_light btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();"> 取消 </a> <a class="btn btn_light btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();"> 取消 </a>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% end %> <% end %>

View File

@ -1,111 +1,111 @@
<div> <div>
<div class="testEditTitle"> 第<%= exercise_question.question_number%>题.(<%= exercise_question.question_score %>分)<br /> <div class="testEditTitle"> 第<%= exercise_question.question_number%>题.(<%= exercise_question.question_score %>分)<br />
<%= exercise_question.question_title %> <%= exercise_question.question_title %>
<span class="ml10">(<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>)</span> <span class="ml10">(<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>)</span>
</div> </div>
<%= link_to("", delete_exercise_question_exercise_index_path(:exercise_question => exercise_question.id, :quest_num => exercise_question.question_number), <%= link_to("", delete_exercise_question_exercise_index_path(:exercise_question => exercise_question.id, :quest_num => exercise_question.question_number),
method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %> method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %>
<a class="ur_icon_edit" title="编辑" onclick="pollQuestionEdit(<%= exercise_question.id%>);"></a> <a class="ur_icon_edit" title="编辑" onclick="pollQuestionEdit(<%= exercise_question.id%>);"></a>
<a class='ur_icon_add' title='向下插入' id="add_mc_<%=exercise_question.id%>" onclick="dismiss('mc',<%=exercise_question.id%>);insert_MC('mc',<%=exercise_question.question_number%>,<%=exercise_question.id%>);"></a> <a class='ur_icon_add' title='向下插入' id="add_mc_<%=exercise_question.id%>" onclick="dismiss('mc',<%=exercise_question.id%>);insert_MC('mc',<%=exercise_question.question_number%>,<%=exercise_question.id%>);"></a>
<div class="cl"></div> <div class="cl"></div>
<div class="ur_inputs"> <div class="ur_inputs">
<table class="ur_table" style="width:675px;"> <table class="ur_table" style="width:675px;">
<tbody> <tbody>
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %> <% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
<tr> <tr>
<td> <td>
<label> <label>
<input class="ur_radio" type="radio" name="<%= exercise_question %>" value="<%= exercise_choice.choice_text%>" > <input class="ur_radio" type="radio" name="<%= exercise_question %>" value="<%= exercise_choice.choice_text%>" >
<%= convert_to_char((index+1).to_s)%>&nbsp;&nbsp;<%= exercise_choice.choice_text%> <%= convert_to_char((index+1).to_s)%>&nbsp;&nbsp;<%= exercise_choice.choice_text%>
</label> </label>
</td> </td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>
</table> </table>
</div> </div>
</div><!--单选题显示 end--> </div><!--单选题显示 end-->
<!-- 新增问题 --> <!-- 新增问题 -->
<div id="insert_new_poll_question_mc_<%=exercise_question.id%>"> <div id="insert_new_poll_question_mc_<%=exercise_question.id%>">
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
function insert_MC(quest_type,quest_num,quest_id){ function insert_MC(quest_type,quest_num,quest_id){
var forms = $("form.new_exercise_question"); var forms = $("form.new_exercise_question");
if($.trim($("#insert_new_poll_question_"+quest_type+"_"+quest_id).html()) == "") { if($.trim($("#insert_new_poll_question_"+quest_type+"_"+quest_id).html()) == "") {
if(forms.length > 0){ if(forms.length > 0){
alert("请先保存正在编辑的题目再新建。"); alert("请先保存正在编辑的题目再新建。");
} else{ } else{
<% score =exercise_question.question_score %> <% score =exercise_question.question_score %>
$("#insert_new_poll_question_"+quest_type+"_"+quest_id).html( $("#insert_new_poll_question_"+quest_type+"_"+quest_id).html(
'<%= form_for(ExerciseQuestion.new,:html=>{:multipart=>true},:url=>create_exercise_question_exercise_path(exercise_question.exercise.id),:remote=>true) do |f|%>'+ '<%= form_for(ExerciseQuestion.new,:html=>{:multipart=>true},:url=>create_exercise_question_exercise_path(exercise_question.exercise.id),:remote=>true) do |f|%>'+
' <div class="questionContainer" style="width: 680px;"> '+ ' <div class="questionContainer" style="width: 680px;"> '+
'<div class="ur_editor_title"> '+ '<div class="ur_editor_title"> '+
'<label>问题:&nbsp;&nbsp;</label>'+ '<label>问题:&nbsp;&nbsp;</label>'+
'<input type="hidden" name="quest_id" value="'+quest_id+'"/>'+ '<input type="hidden" name="quest_id" value="'+quest_id+'"/>'+
'<input type="hidden" name="quest_num" value="'+quest_num+'"/>'+ '<input type="hidden" name="quest_num" value="'+quest_num+'"/>'+
'<input type="hidden" name="question_type" value="1"/>'+ '<input type="hidden" name="question_type" value="1"/>'+
'<input name="question_title" id="poll_questions_title" class="questionTitle" placeholder="请输入单选题题目" type="text"/>'+ '<input name="question_title" id="poll_questions_title" class="questionTitle" placeholder="请输入单选题题目" type="text"/>'+
'</div>'+ '</div>'+
'<div class="ur_editor_content">'+ '<div class="ur_editor_content">'+
'<ul>'+ '<ul>'+
'<li class="ur_item">'+ '<li class="ur_item">'+
'<label>分数<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+ '<label>分数<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+
'<input value="<%=score %>" id="question_score" type="text" name="question_score" style="width:40px; text-align:center; padding-left:0px;"/>分'+ '<input value="<%=score %>" id="question_score" type="text" name="question_score" style="width:40px; text-align:center; padding-left:0px;"/>分'+
'</li><div>'+ '<span class="ml15">标准答案:请选择</span>'+
'<li class="ur_item">'+ '</li><div>'+
'<label>选项A<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+ '<li class="ur_item">'+
'<input maxlength="200" type="text" name="question_answer[0]" placeholder="输入选项内容"/>'+ '<label>选项A<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+ '<input type="radio" style="width: 15px;" />'+
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+ '<input maxlength="200" type="text" name="question_answer[0]" placeholder="输入选项内容"/>'+
'</li>'+ '<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
'<div class="cl"></div>'+ '<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
'<li class="ur_item">'+ '</li>'+
'<label>选项B<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+ '<div class="cl"></div>'+
'<input maxlength="200" type="text" name="question_answer[1]" placeholder="输入选项内容"/>'+ '<li class="ur_item">'+
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+ '<label>选项B<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+ '<input type="radio" style="width: 15px;" />'+
'</li>'+ '<input maxlength="200" type="text" name="question_answer[1]" placeholder="输入选项内容"/>'+
'<div class="cl"></div>'+ '<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
'<li class="ur_item">'+ '<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
'<label>选项C<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+ '</li>'+
'<input maxlength="200" type="text" name="question_answer[2]" placeholder="输入选项内容"/>'+ '<div class="cl"></div>'+
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+ '<li class="ur_item">'+
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+ '<label>选项C<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+
'</li>'+ '<input type="radio" style="width: 15px;" />'+
'<div class="cl"></div>'+ '<input maxlength="200" type="text" name="question_answer[2]" placeholder="输入选项内容"/>'+
'<li class="ur_item">'+ '<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
'<label>选项D<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+ '<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
'<input maxlength="200" type="text" name="question_answer[3]" placeholder="输入选项内容"/>'+ '</li>'+
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+ '<div class="cl"></div>'+
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+ '<li class="ur_item">'+
'</li></div>'+ '<label>选项D<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+
'<div class="cl"></div>'+ '<input type="radio" style="width: 15px;" />'+
'<li class="ur_item">'+ '<input maxlength="200" type="text" name="question_answer[3]" placeholder="输入选项内容"/>'+
'<label>标准答案<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>'+ '<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
'<input name="exercise_choice" id="question_standard_ans" placeholder="若标准答案为A在此输入A即可" type="text">'+ '<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
'</li>'+ '</li></div>'+
'<div class="cl"></div>'+ '<div class="cl"></div>'+
'</ul>'+ '</ul>'+
'</div>'+ '</div>'+
'<div class="ur_editor_footer">'+ '<div class="ur_editor_footer">'+
'<a class="btn btn_dark btn_submit c_white" data-button="ok" onclick="add_poll_question($(this),1);">'+ '<a class="btn btn_dark btn_submit c_white" data-button="ok" onclick="add_poll_question($(this),1);">'+
'保存'+ '保存'+
'</a>'+ '</a>'+
'<a class="btn btn_light btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">'+ '<a class="btn btn_light btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">'+
'<%= l(:button_cancel)%>'+ '<%= l(:button_cancel)%>'+
'</a>'+ '</a>'+
'</div>'+ '</div>'+
'<div class="cl"></div>'+ '<div class="cl"></div>'+
'</div>'+ '</div>'+
'<% end%>' '<% end%>'
); );
$("#poll_questions_title").focus(); $("#poll_questions_title").focus();
} }
} }
else { else {
$("#insert_new_poll_question_"+quest_type+"_"+quest_id).html(""); $("#insert_new_poll_question_"+quest_type+"_"+quest_id).html("");
} }
} }
</script> </script>

View File

@ -89,7 +89,7 @@ a:hover.btn_cancel{ color:#666;}
.ur_question_title{ width:534px; height:30px; border:1px solid #cbcbcb; padding-left:5px; margin-right:10px; background:#fff;} .ur_question_title{ width:534px; height:30px; border:1px solid #cbcbcb; padding-left:5px; margin-right:10px; background:#fff;}
.ur_editor_title{ margin-bottom:10px;} .ur_editor_title{ margin-bottom:10px;}
.ur_editor_content{ } .ur_editor_content{ }
.ur_item{ margin-bottom:5px; height:32px; } .ur_item{ margin-bottom:5px; height:32px; line-height: 32px; vertical-align: middle; }
.ur_item input{ width:324px; height:30px;border:1px solid #cbcbcb; padding-left:5px; float:left; margin-right:10px; background:#fff;} .ur_item input{ width:324px; height:30px;border:1px solid #cbcbcb; padding-left:5px; float:left; margin-right:10px; background:#fff;}
.ur_item label{ float:left;} .ur_item label{ float:left;}
.icon_add{ background:url(images/icons.png) 0px -310px no-repeat; width:16px; height:27px; display:block;float:left; margin-right:5px;} .icon_add{ background:url(images/icons.png) 0px -310px no-repeat; width:16px; height:27px; display:block;float:left; margin-right:5px;}