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

cxt_course
huang 10 years ago
commit 73f0d70e23

@ -12,12 +12,25 @@ issue_desc_editor = KindEditor.create('#issue_description',
{"width":"85%", {"width":"85%",
"resizeType":0, "resizeType":0,
"no_label":true, "no_label":true,
"at_id":<%= @issue.project_id%>,
"at_type":"Project",
"autoHeightMode":true, "autoHeightMode":true,
"afterCreate":"eval(function(){ if(typeof enablePasteImg ==='function'){enablePasteImg(self);} if(typeof enableAt ==='function'){enableAt(self);} this.loadPlugin(\"autoheight\")})", "afterCreate":"eval(function(){ if(typeof enablePasteImg ==='function'){enablePasteImg(self);};if(typeof enableAt ==='function'){enableAt(self, \"<%=@issue.project_id %>\", 'Project');}; this.loadPlugin('autoheight')})",
"emotionsBasePath":"http://localhost:3000","height":300, "emotionsBasePath":'<%= Setting.host_name%>',
"height":300,
"allowFileManager":true, "allowFileManager":true,
"uploadJson":"/kindeditor/upload", "uploadJson":"/kindeditor/upload",
"fileManagerJson":"/kindeditor/filemanager"}); "fileManagerJson":"/kindeditor/filemanager"});
//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\")})",
// "emotionsBasePath":"http://localhost:3000","height":300,
// "allowFileManager":true,
// "uploadJson":"/kindeditor/upload",
// "fileManagerJson":"/kindeditor/filemanager"});
<%else%> <%else%>
alert('<%= @issue.errors.full_messages[0].to_s%>') alert('<%= @issue.errors.full_messages[0].to_s%>')
<%end %> <%end %>

@ -13,11 +13,12 @@ issue_desc_editor = KindEditor.create('#issue_description',
{"width":"85%", {"width":"85%",
"resizeType":0, "resizeType":0,
"no_label":true, "no_label":true,
"at_id":<%= @issue.project_id%>,
"at_type":"Project",
"autoHeightMode":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();})", "afterCreate":"eval(function(){ if(typeof enablePasteImg ==='function'){enablePasteImg(self);};if(typeof enableAt ==='function'){enableAt(self, "<%=@issue.project_id %>", 'Project');}; this.loadPlugin('autoheight')})",
"afterFocus":"eval(function(){$(this.toolbar.div).show();})", "emotionsBasePath":'<%= Setting.host_name%>',
"afterBlur":"eval(function(){$(this.toolbar.div).hide();})", "height":300,
"emotionsBasePath":"http://localhost:3000", "allowFileManager":true,
"height":300,"allowFileManager":true,
"uploadJson":"/kindeditor/upload", "uploadJson":"/kindeditor/upload",
"fileManagerJson":"/kindeditor/filemanager"}); "fileManagerJson":"/kindeditor/filemanager"});

@ -299,12 +299,12 @@ function regexDescription()
$("#description_notice_span").focus(); $("#description_notice_span").focus();
return false; return false;
} }
else if(name.length >=6000){ /*else if(name.length >=6000){
$("#description_notice_span").text("描述最多3000个汉字(或6000个英文字符)"); $("#description_notice_span").text("描述最多3000个汉字(或6000个英文字符)");
$("#description_notice_span").css('color','#ff0000'); $("#description_notice_span").css('color','#ff0000');
$("#description_notice_span").focus(); $("#description_notice_span").focus();
return false; return false;
} }*/
else else
{ {
$("#description_notice_span").text("填写正确"); $("#description_notice_span").text("填写正确");

@ -248,13 +248,13 @@ function regexDescription() {
$("#description_notice_span").focus(); $("#description_notice_span").focus();
return false; return false;
} }
else if (name.length > 10000) /*else if (name.length > 10000)
{ {
$("#description_notice_span").text("描述超过10000个字符"); $("#description_notice_span").text("描述超过10000个字符");
$("#description_notice_span").css('color', '#ff0000'); $("#description_notice_span").css('color', '#ff0000');
$("#description_notice_span").focus(); $("#description_notice_span").focus();
return false; return false;
} }*/
else { else {
$("#description_notice_span").text("填写正确"); $("#description_notice_span").text("填写正确");
$("#description_notice_span").css('color', '#008000'); $("#description_notice_span").css('color', '#008000');

Loading…
Cancel
Save