Merge branch 'cxt_course' of https://git.trustie.net/jacknudt/trustieforge into cxt_course

This commit is contained in:
cxt 2016-11-07 17:13:10 +08:00
commit 85b1d145fe
7 changed files with 17 additions and 7 deletions

View File

@ -4,6 +4,7 @@
<span class="c_red questionLabel ml5" title="必答">*</span> <span class="c_red questionLabel ml5" title="必答">*</span>
<%end%> <%end%>
</p> </p>
<div id="toolbar" class="undis">
<% poll = poll_question.poll %> <% poll = poll_question.poll %>
<% count = poll.poll_questions.count %> <% count = poll.poll_questions.count %>
<% unless poll_question.question_number == 1 %> <% unless poll_question.question_number == 1 %>
@ -21,4 +22,13 @@
</div> </div>
<%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id), <%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id),
method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "poll-delete", :title => "删除") %> method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "poll-delete", :title => "删除") %>
</div>
<script>
$('.poll-container').mouseover(function(){
$(this).find("#toolbar, .poll-edit").show();
})
$('.poll-container').mouseout(function(){
$(this).find("#toolbar, .poll-edit").hide();
})
</script>

View File

@ -7,7 +7,7 @@
<span class="formatContainer m_w500"><%= poll_question.question_title %></span> <span class="formatContainer m_w500"><%= poll_question.question_title %></span>
<span class="fontBlue">[单选题]</span> <span class="fontBlue">[单选题]</span>
</div> </div>
<a class="poll-edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a> <a class="poll-edit" style="display:none;" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a>
<div class="cl"></div> <div class="cl"></div>
<div class="ur_inputs"> <div class="ur_inputs">

View File

@ -18,7 +18,7 @@
</p> </p>
<% end %> <% end %>
</div> </div>
<a class="poll-edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a> <a class="poll-edit" style="display:none;" title="编辑" onclick="pollQuestionEdit(<%= poll_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:647px;"> <table class="ur_table" style="width:647px;">

View File

@ -1,5 +1,5 @@
<div class="testStatus" onmouseover="$('#poll_head_edit_pen').show();" onmouseout="$('#poll_head_edit_pen').hide();"><!--头部显示 start--> <div class="testStatus" onmouseover="$('#poll_head_edit_pen').show();" onmouseout="$('#poll_head_edit_pen').hide();"><!--头部显示 start-->
<a href="javascript:" class="testEdit undis" id="poll_head_edit_pen" title="编辑" onclick="pollsEdit();" style="top:0;"></a> <a href="javascript:" class="testEdit" id="poll_head_edit_pen" title="编辑" onclick="pollsEdit();" style="top:0;display:none"></a>
<!-- <a class='ur_icon_add' title='导入' id="import_btn" onclick="importPoll();"></a> --> <!-- <a class='ur_icon_add' title='导入' id="import_btn" onclick="importPoll();"></a> -->
<h1 class="ur_page_title" id="polls_name_h" style="width:668px; margin:0 auto;"><%= poll.polls_name%></h1> <h1 class="ur_page_title" id="polls_name_h" style="width:668px; margin:0 auto;"><%= poll.polls_name%></h1>
<div class="testDesEdit mt5"><%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%></div> <div class="testDesEdit mt5"><%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%></div>

View File

@ -8,7 +8,7 @@
<span class="fontBlue">[多行主观题]</span> <span class="fontBlue">[多行主观题]</span>
</div> </div>
<a class="poll-edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a> <a class="poll-edit" style="display:none;" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a>
<div class="cl"></div> <div class="cl"></div>
<% poll_question.poll_answers.reorder("answer_position").each_with_index do |poll_answer, i| %> <% poll_question.poll_answers.reorder("answer_position").each_with_index do |poll_answer, i| %>
<div class="ml20 mb10"> <div class="ml20 mb10">

View File

@ -8,7 +8,7 @@
<span class="fontBlue">[主观题]</span> <span class="fontBlue">[主观题]</span>
</div> </div>
<a class="poll-edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a> <a class="poll-edit" style="display:none;" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a>
<div class="cl"></div> <div class="cl"></div>
<div class="ur_inputs"> <div class="ur_inputs">
<textarea type="text" size="" maxlength="" value="" style="width:640px; border:1px solid #ddd;" rows="3" readonly="readonly"></textarea> <textarea type="text" size="" maxlength="" value="" style="width:640px; border:1px solid #ddd;" rows="3" readonly="readonly"></textarea>

View File

@ -241,7 +241,7 @@
} }
} }
</script> </script>
<input class="fillInput" placeholder="在此填入答案" type="text" value="<%= get_anwser_vote_text(pq.id, User.current.id).html_safe %>" onblur="onblur_<%= pq.id %>(this);" <%= @can_edit_poll ? "" : "disabled=disabled" %>> <textarea class="fillInput" placeholder="在此填入答案" type="text" style="height:54px" value="<%= get_anwser_vote_text(pq.id, User.current.id).html_safe %>" onblur="onblur_<%= pq.id %>(this);" <%= @can_edit_poll ? "" : "disabled=disabled" %>></textarea>
</div> </div>
</div> </div>
</div> </div>