(function(c,d,$,f,g){$.extend(d,{FileClean:null,myInit:function(){this.FileClean=this.winApp.getComponent("Waste");$("#main table").fixTableHead();this.stopAutoFireCheckbox=true;this.activeDrag(".dialogHead","mousedown");var a=this.FileClean.getAllSuffixName(),htmlbuilder=[],checkeNum=0,listitem;this.helper.total=a.count;for(var i=0;i<a.count;i++){listitem=a.getItem(i);listitem.select&&checkeNum++;if(i%2==1)htmlbuilder.push("<tr class=\"item even\">");else htmlbuilder.push("<tr class=\"item\">");htmlbuilder.push("<td><p class =\"");htmlbuilder.push(listitem.select==0?"uncheck":"checked");htmlbuilder.push(listitem.defaultSelect?" isDefault":"");htmlbuilder.push("\" val=\"");htmlbuilder.push(listitem.index);htmlbuilder.push("\"><span>");htmlbuilder.push(listitem.name);htmlbuilder.push("</span></p></td><td><span>");htmlbuilder.push(listitem.description);htmlbuilder.push("</span></td></tr>")}$("#trustList").find("tbody").html(htmlbuilder.join(""));this.checkDefault();$("#checkAll").click(function(){d.checkAll(!$(this).hasClass("checked"))});this.show(450,415,0,1);this.initTableClick()},resize:d.commonResize,checkAll:function(s){s?$("#trustList .uncheck").removeClass("uncheck").addClass("checked"):$("#trustList .checked").removeClass("checked").addClass("uncheck");s?$("#checkAll").removeClass().addClass("checked"):$("#checkAll").removeClass().addClass("uncheck")},syncAll:function(){var a=$("#trustList .checked").length;$("#checkAll").removeClass().addClass(a==0?"uncheck":a==this.helper.total?"checked":"checke")},checkDefault:function(){this.checkAll(false);$("#trustList .isDefault").removeClass("uncheck").addClass("checked");this.syncAll()},settingSave:function(){var b=[];$("p[val]").each(function(){var a=$(this).attr("val")+"|"+($(this).hasClass("checked")?"s":"n");b.push(a)});this.FileClean.setAllSuffixName(b.join("|"));this.close()},helper:{total:0,hoverTr:null},initTableClick:function(){var b=this;$("#trustList").click(function(e){var a=$(e.target),p=a.closest("p"),tr=a.closest("tr");if(p[0]){p.hasClass("uncheck")?p.removeClass("uncheck").addClass("checked"):p.removeClass("checked").addClass("uncheck");b.syncAll()}if(!tr[0])return;if(b.helper.hoverTr===tr[0])return;tr.addClass("selected");b.helper.hoverTr&&$(b.helper.hoverTr).removeClass("selected");b.helper.hoverTr=tr[0]})}});$(function(){d.init()})})(window,Core,jQuery,LangPack);