-
<%= render :partial => 'issues/detail'%>
-
-
- <%= render :partial => 'issues/edit'%>
-
+ <%= render :partial => 'issues/edit'%>
diff --git a/app/views/issues/update.js.erb b/app/views/issues/update.js.erb
index 7dba2aa5d..d5f213455 100644
--- a/app/views/issues/update.js.erb
+++ b/app/views/issues/update.js.erb
@@ -1,6 +1,20 @@
-$("#issue_detail").html('<%= escape_javascript(render :partial => 'issues/detail') %>')
-$("#issue_edit").html('<%= escape_javascript(render :partial => 'issues/edit') %>')
+$("#issue_detail").replaceWith('<%= escape_javascript(render :partial => 'issues/detail') %>')
+$("#issue_edit").replaceWith('<%= escape_javascript(render :partial => 'issues/edit') %>')
$("#issue_detail").show();
$("#issue_edit").hide();
$("#reply_div_<%= @issue.id %>").html("<%= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => @issue,:replies_all_i=>0}) %>");
-$(".homepagePostReplyBannerCount").html('回复(<%= @issue.journals.count %>)')
\ No newline at end of file
+$(".homepagePostReplyBannerCount").html('回复(<%= @issue.journals.count %>)')
+//edit里的编辑器貌似显示不出来,所以手动js生成。
+issue_desc_editor = KindEditor.create('#issue_description',
+ {"width":"87%",
+ "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"});
+