Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
movePanel:function(prf, col, basePrf, before,type){
var profile=this.get(0);
if(!type)type="manual";
prf.ColLayoutColumn=parseInt(col,10)-1;
var old=prf.ColLayoutSize;
prf.ColLayoutSize=profile._warr?profile._warr[prf.ColLayoutColumn]:300;
if(prf["xui.UI"])prf=prf.get(0);
if(basePrf && basePrf["xui.UI"])basePrf=basePrf.get(0);
if(prf && prf!=basePrf){
var flag2,items=profile.children;
// add to collayout, or move to the right container first
if(prf.parent!=profile || prf.childrenId != col){
this.append(prf, col);
flag2=1;
}
var node,
tnode=prf.getRootNode();
// reposition
if(!basePrf){
node=this.getSubNodeByItemId('PANEL', col);
_.arr.each(self._nodes,function(o){
if(o.box && o.box["xui.UI"] && !o.box.$initRootHidden){
(o.$afterDestroy=(o.$afterDestroy||{}))["comDestroyTrigger"]=function(){
if(self.autoDestroy && !self.destroyed)
self.destroy();
self=null;
};
return false;
}
});
self._fireEvent('afterIniComponents');
xui.each(prf.$allPops,function(pop){
if(pop && !pop.$noDestroyByParentMenu){
if(pop['xui.UI'] && !pop.isEmpty() && !pop.isDestroyed()){
pop.destroy();
}else if(pop['xui.UIProfile'] && !pop.destroyed){
pop.__gc();
}else if(pop['xui.Dom'] && !pop.isEmpty() ){
pop.remove();
}
}
});
};