!function(){function e(){(r=this).init()}var r,l=$G("J_title"),d=$G("J_titleCol"),i=$G("J_caption"),a=$G("J_sorttable"),c=$G("J_autoSizeContent"),m=$G("J_autoSizePage"),s=$G("J_tone"),u=$G("J_preview");e.prototype={init:function(){var e=new UE.ui.ColorPicker({editor:editor}),t=new UE.ui.Popup({editor:editor,content:e});l.checked=-1==editor.queryCommandState("inserttitle"),d.checked=-1==editor.queryCommandState("inserttitlecol"),i.checked=-1==editor.queryCommandState("insertcaption"),a.checked=1==editor.queryCommandState("enablesort");var o=editor.queryCommandState("enablesort"),n=editor.queryCommandState("disablesort");a.checked=!!(o<0&&0<=n),a.disabled=!!(o<0&&n<0),a.title=o<0&&n<0?lang.errorMsg:"",r.createTable(l.checked,d.checked,i.checked),r.setAutoSize(),r.setColor(r.getColor()),domUtils.on(l,"click",r.titleHanler),domUtils.on(d,"click",r.titleColHanler),domUtils.on(i,"click",r.captionHanler),domUtils.on(a,"click",r.sorttableHanler),domUtils.on(c,"click",r.autoSizeContentHanler),domUtils.on(m,"click",r.autoSizePageHanler),domUtils.on(s,"click",function(){t.showAnchor(s)}),domUtils.on(document,"mousedown",function(){t.hide()}),e.addListener("pickcolor",function(){r.setColor(arguments[1]),t.hide()}),e.addListener("picknocolor",function(){r.setColor(""),t.hide()})},createTable:function(e,t,o){var n=[];if(n.push("
"+lang.titleName+" | ");for(var i=0;i<5;i++)n.push(""+lang.titleName+" | ");n.push("
---|---|
"+lang.titleName+" | ");for(var r=0;r<5;r++)n.push(""+lang.cellsName+" | ");n.push("