issue的修改如果更改issue的类型,那么就会有问题。需要重新新建editor

This commit is contained in:
lizanle 2015-12-17 11:28:28 +08:00
parent c183574a5e
commit 31c57b78bf
2 changed files with 41 additions and 27 deletions

View File

@ -8,11 +8,11 @@
});
</script>
<div class="homepageRight mt0 ml10" >
<div class="homepageRightBanner">
<div class="NewsBannerName">问题跟踪</div>
</div>
<div class="homepageRightBanner">
<div class="NewsBannerName">问题跟踪</div>
</div>
<div class="resources mt10" style="min-height:619px;">
<div class="resources mt10" >
<div class="pro_page_box">
<div class="problem_main borderBottomNone">
<%= render :partial => 'issues/detail'%>
@ -22,30 +22,32 @@
<!--problem_main end-->
<div style="clear: both;"></div>
<div class="homepagePostReply">
<div class="topBorder" style="display: <%= @issue.journals.count>0 ? 'none': '' %>"></div>
<div class="homepagePostReplyBanner" >
<div class="homepagePostReplyBannerCount" >回复(<%= @issue.journals.count %></div>
<div class="homepagePostReplyBannerTime"></div>
</div>
<div class="topBorder" style="display: <%= @issue.journals.count>0 ? 'none': '' %>"></div>
<div class="homepagePostReplyBanner" >
<div class="homepagePostReplyBannerCount" >回复(<%= @issue.journals.count %></div>
<div class="homepagePostReplyBannerTime"></div>
</div>
<div class="" id="reply_div_<%= @issue.id %>" >
<%= render :partial => 'issue_replies',:locals => {:issue=>@issue,:replies_all_i=>0} %>
</div>
<div class="" id="reply_div_<%= @issue.id %>" >
<%= render :partial => 'issue_replies',:locals => {:issue=>@issue,:replies_all_i=>0} %>
</div>
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>">
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
</div>
<input type="hidden" name="issue_id" value="<%=@issue.id%>">
<div class="homepagePostReplyInputContainer mb10">
<%= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
<div class="cl"></div>
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>">
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
</div>
<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>
<div class="cl"></div>
<% end %>
</div>
</div>
<!--<div style="clear:both;"></div>-->
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
<div class="homepagePostReplyInputContainer mb10">
<%= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
<div class="cl"></div>
</div>
<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>
<div class="cl"></div>
<% end %>
</div>
</div>
</div>
</div>
</div>

View File

@ -9,3 +9,15 @@ $('#all_attributes').html('<%= escape_javascript(render :partial => 'form') %>')
<% else %>
$('#log_time').hide();
<% end %>
issue_desc_editor = KindEditor.create('#issue_description',
{"width":"85%",
"resizeType":0,
"no_label":true,
"autoHeightMode":true,
"afterCreate":"eval(function(){ if(typeof enablePasteImg ==='function'){enablePasteImg(self);} if(typeof enableAt ==='function'){enableAt(self);} this.loadPlugin(\"autoheight\"),$(this.toolbar.div).hide();})",
"afterFocus":"eval(function(){$(this.toolbar.div).show();})",
"afterBlur":"eval(function(){$(this.toolbar.div).hide();})",
"emotionsBasePath":"http://localhost:3000",
"height":300,"allowFileManager":true,
"uploadJson":"/kindeditor/upload",
"fileManagerJson":"/kindeditor/filemanager"});