1 //加载回复编辑框
2  KE.init({
3 id : 'Comments',
4 afterCreate : function(id) {
5 KE.util.focus(id);
6 },
7 resizeMode : 1,
8 allowPreviewEmoticons : false,
9 allowUpload : false,
10 autoSetDataMode : true,
11 items : [
12 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
13 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
14 'insertunorderedlist', '|', 'emoticons', 'image', 'link'],
15 afterSetData : function(id) {
16 if(KE.count(id, 'text')>=10){
17 $("#btn_comment").unbind('click').removeAttr('onclick').click(function(){ });
18 }else{
19
20 }
21 if(KE.count(id, 'text')>=300){
22 KE.$('comment_result').innerHTML = '<span class="redfont">输入的字数不能多于300个</span>';
23 $("#btn_comment").unbind('click').removeAttr('onclick').click(function(){ alert('输入的字数不能多于300个');return false;});
24 }else if(KE.count(id, 'text')<=10){
25 KE.$('comment_result').innerHTML = '当前输入' + KE.count(id, 'text') + '个字<span class="redfont">不能少于10个字</span>';
26 }else{
27 $("#btn_comment").unbind('click').removeAttr('onclick').click(function(){ });
28 KE.$('comment_result').innerHTML = '当前输入' + KE.count(id, 'text') + '个字';
29 }
30 }
31 });
32 //回复引用
33 function groupquote(id,sign){
34 javascript:KE.remove('Comments');
35 $("#Comments").val($("#gbody_"+id).html());
36 javascript:KE.create('Comments');
37 }
38 </script>

posted on 2011-01-28 11:44  Dufe王彬  阅读(246)  评论(0编辑  收藏  举报