|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
function init_editor(params){
|
|
|
|
|
// var minHeight; //最小高度
|
|
|
|
|
// var minHeight; //最小高度
|
|
|
|
|
var paramsHeight = params.height; //设定的高度
|
|
|
|
|
var paramsWidth = params.width == undefined ? "100%" : params.width;
|
|
|
|
|
|
|
|
|
@ -7,7 +7,7 @@ function init_editor(params){
|
|
|
|
|
resizeType : 1,minWidth:"1px",width:paramsWidth,
|
|
|
|
|
height:"30px",// == undefined ? "30px":paramsHeight+"px",
|
|
|
|
|
minHeight:"30px",// == undefined ? "30px":paramsHeight+"px",
|
|
|
|
|
items:['emoticons'],
|
|
|
|
|
items:['emoticons'],
|
|
|
|
|
afterChange:function(){//按键事件
|
|
|
|
|
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
|
|
|
|
var edit = this.edit;
|
|
|
|
@ -49,6 +49,9 @@ function nh_check_field(params){
|
|
|
|
|
if(params.content.isEmpty()){
|
|
|
|
|
params.contentmsg.html('内容不能为空');
|
|
|
|
|
params.contentmsg.css({color:'#ff0000'});
|
|
|
|
|
params.submit_btn.one('click', function(){
|
|
|
|
|
params.form.submit();
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
params.contentmsg.html('填写正确');
|
|
|
|
|
params.contentmsg.css({color:'#008000'});
|
|
|
|
@ -68,7 +71,9 @@ function init_form(params){
|
|
|
|
|
issubmit:true,
|
|
|
|
|
content:params.editor,
|
|
|
|
|
contentmsg:params.contentmsg,
|
|
|
|
|
textarea:params.textarea
|
|
|
|
|
textarea:params.textarea,
|
|
|
|
|
submit_btn:params.submit_btn,
|
|
|
|
|
form:params.form
|
|
|
|
|
});
|
|
|
|
|
if(is_checked){
|
|
|
|
|
if(flag){
|
|
|
|
@ -115,7 +120,7 @@ function init_KindEditor_data(id){
|
|
|
|
|
params.cancel_btn.click(function () {
|
|
|
|
|
nh_reset_form(params);
|
|
|
|
|
});
|
|
|
|
|
params.submit_btn.click(function () {
|
|
|
|
|
params.submit_btn.one('click', function () {
|
|
|
|
|
params.form.submit();
|
|
|
|
|
});
|
|
|
|
|
params.textarea.data('init', 1);
|
|
|
|
|