修复重复编辑问卷头会使问卷头信息显示不正确的BUG
This commit is contained in:
parent
517c3d1ca5
commit
4996b9a546
|
@ -4,7 +4,7 @@
|
|||
<input type="text" name="polls_name" id="polls_title" value="<%= @poll.polls_name %>" class="input_title" placeholder="问卷标题"/>
|
||||
</div>
|
||||
<div class="ur_title_editor_prefix">
|
||||
<textarea name="polls_description" class="textarea_editor"><%= @poll.polls_description%></textarea>
|
||||
<textarea name="polls_description" id="polls_description" class="textarea_editor"><%= @poll.polls_description%></textarea>
|
||||
</div>
|
||||
<div class="ur_editor_footer">
|
||||
<a class="btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">确定</a>
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
function add_single(){$("#poll_content").append("<%= escape_javascript(render :partial => 'edit_single') %>");}
|
||||
function add_mulit(){$("#poll_content").append("<%= escape_javascript(render :partial => 'edit_mulit') %>");}
|
||||
//问卷头
|
||||
function pollsCancel(){$("#polls_head").html("<%= escape_javascript(render :partial => 'show_head', :locals => {:poll => @poll}) %>");}
|
||||
function pollsEdit(){$("#polls_head").html("<%= escape_javascript(render :partial => 'edit_head', :locals => {:poll => @poll}) %>");}
|
||||
function pollsCancel(){$("#polls_head_edit").hide();$("#polls_head_show").show();}
|
||||
function pollsEdit(){$("#polls_head_edit").show();$("#polls_head_show").hide();}
|
||||
//单选题
|
||||
function add_single_answer(doc)
|
||||
{
|
||||
|
@ -63,9 +63,13 @@
|
|||
<div class="cl"></div>
|
||||
</div><!--选项 end-->
|
||||
|
||||
<div id="polls_head">
|
||||
<!-- 头部 -->
|
||||
<div id="polls_head_show">
|
||||
<%= render :partial => 'show_head', :locals => {:poll => @poll}%>
|
||||
</div>
|
||||
<div id="polls_head_edit" style="display: none;">
|
||||
<%= render :partial => 'edit_head', :locals => {:poll => @poll}%>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<% @poll.poll_questions.each do |poll_question|%>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<div class="ur_page_head ur_editor02"><!--头部显示 start-->
|
||||
<a href="#" class="ur_icon_edit" title="编辑" onclick="pollsEdit();"></a>
|
||||
<h1 class="ur_page_title">
|
||||
<h1 class="ur_page_title" id="polls_name_h">
|
||||
<%= poll.polls_name%>
|
||||
</h1>
|
||||
<p class="ur_prefix_content">
|
||||
<p class="ur_prefix_content" id="polls_description_p">
|
||||
<%= @poll.polls_description%>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1 +1,6 @@
|
|||
$("#polls_head").html("<%= escape_javascript(render :partial => 'show_head', :locals => {:poll => @poll}) %>");
|
||||
$("#polls_title").val("<%= @poll.polls_name%>");
|
||||
$("#polls_description").val("<%= @poll.polls_description %>");
|
||||
$("#polls_name_h").html("<%= @poll.polls_name %>");
|
||||
$("#polls_description_p").html("<%= @poll.polls_description %>");
|
||||
$("#polls_head_edit").hide();
|
||||
$("#polls_head_show").show();
|
Loading…
Reference in New Issue