问卷编辑icon显示效果调整

This commit is contained in:
daiao 2016-11-07 16:03:04 +08:00
parent 4c9a3b769e
commit 6dbf031d3b
6 changed files with 16 additions and 6 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 %>
@ -22,3 +23,12 @@
<%= 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>