function ChannelCopy(n){var o;function l(){o.remove()}(o=$(".dialog-for-copy-channel")).length||(o=function(){var o="";if(o+='

Copy To

',$("body").append(o),o="",n.canCopyChannels)for(var c=n.canCopyChannels;0!=c.length;)e=(a=c.shift())<9?"0"+(a+1):a+1,o+='
  • ";else for(var a=0;a ")}$(".dialog-for-copy-channel ul").append(o);var d,h=$(".dialog-content-mod");return h.css({marginTop:-h.height()/2,marginLeft:-h.width()/2}),(d=$(".dialog-for-copy-channel")).on("click",".channel-for-all-copy input",(function(){$(this).is(":checked")?d.find('.dialog-content-main input[type="checkbox"]').prop("checked","true"):d.find('.dialog-content-main input[type="checkbox"]').removeAttr("checked")})),d.on("click",".dialog-content-main ul input",(function(){$(this).is(":checked")&&$(".dialog-content-main").find("input:checked").length==$(".dialog-content-main ul input").length?$(".channel-for-all-copy input").prop("checked","true"):$(".channel-for-all-copy input").removeAttr("checked")})),d.on("click","#dialog-for-cancle, .dialog-content-title .ui-close",(function(){l()})),d.on("click","#dialog-for-ok",(function(){var o=[];$(".channel-for-copy-input:checked").each((function(){o.push($(this).data("id"))})),n.callback&&n.callback(o),l()})),$(".dialog-for-copy-channel")}())}