Ext.define("EgChangeUserProfile.view.ElementAssociationForm",{extend:"Ext.form.Panel",alias:"widget.elementassociationform",id:"elementassociationform",name:"elementassociationform",requires:["utilities.ScrollCombo"],border:false,layout:{type:"vbox",align:"stretch"},flex:1,items:[{xtype:"container",layout:{type:"hbox",pack:"center"},margin:"15 0 0 0",items:[{xtype:"displayfield",fieldLabel:"<b>"+userIDValidationMsg59+"</b>",labelAlign:"top",labelSeparator:" ",value:"",id:"elementUserID",width:150,hidden:true},{xtype:"scrollcombo",cls:"dropdown",editable:false,fieldLabel:orgTypeLabel,name:"orgType",id:"orgType",submitValue:false,store:new Ext.data.Store({fields:["displayField","valueField"],data:[]}),displayField:"displayField",valueField:"valueField",queryMode:"local",hidden:true,labelAlign:"top",labelSeparator:" ",width:230,margin:"0 20 0 0"},{xtype:"scrollcombo",cls:"dropdown",editable:false,fieldLabel:"Associate",name:"associate",id:"associate",store:new Ext.data.Store({fields:["displayField","valueField"],data:[]}),displayField:"displayField",valueField:"valueField",queryMode:"local",labelAlign:"top",labelSeparator:" ",width:230},{xtype:"scrollcombo",cls:"dropdown",fieldLabel:"Component type",name:"compType",id:"compType",store:new Ext.data.Store({fields:["displayField","valueField"],data:[]}),displayField:"displayField",valueField:"valueField",queryMode:"local",hidden:true,labelAlign:"top",labelSeparator:" ",width:230,margin:"0 0 0 20"}]},{xtype:"container",layout:{type:"hbox",pack:"center"},margin:"15 0 0 0",items:[{xtype:"scrollcombo",cls:"dropdown",editable:false,id:"virtualTypes",name:"virtualTypes",fieldLabel:"Vitual type",store:new Ext.data.Store({fields:["displayField","valueField"],data:[]}),displayField:"displayField",valueField:"valueField",queryMode:"local",hidden:true,labelAlign:"top",labelSeparator:" ",width:230,margin:"0 20 0 0"},{xtype:"container",id:"virtualServersContainer",hidden:true,width:230,items:[{xtype:"label",id:"vmTypeLabel",text:"Hypervisor Hosts"},{xype:"container",layout:{type:"hbox",align:"center"},items:[{xype:"container",cls:"multisearchlist",items:[{xtype:"trigger",labelAlign:"top",name:"compSearch",emptyText:"Search Components",cls:"whitedropdown_search",width:198,listeners:{"change":function(a){if(Ext.isEmpty(EgChangeUserProfile.app.erUtils)){EgChangeUserProfile.app.erUtils=Ext.widget("erutils");
}EgChangeUserProfile.app.erUtils.filterComboStore(a,Ext.getCmp("virtualServers"),EgChangeUserProfile.compRawData);}}}]},{xtype:"container",margin:"0 0 0 2",items:[{xtype:"button",iconCls:"iconMultiselectExpand",listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"Components"});
},"click":function(a){if(Ext.isEmpty(EgChangeUserProfile.app.erUtils)){EgChangeUserProfile.app.erUtils=Ext.widget("erutils");}EgChangeUserProfile.app.erUtils.expandMultiComboButton(Ext.getCmp("virtualServers"),"Hypervisor Hosts",a);}},style:{background:"none",border:"0px"}}]}]},{xtype:"multiselectfield",autoScroll:true,scroll:true,labelAlign:"left",width:210,height:100,id:"virtualServers",name:"virtualServers",store:Ext.data.Store({fields:["displayField","valueField"],data:[{displayField:"",valueField:""}]}),displayField:"displayField",valueField:"valueField",queryMode:"local"},{hidden:true,xtype:"button",text:"Get VMs",id:"getVm",ui:"newButtonSmall",width:100,margin:"5 0 0 0"}]},{xtype:"container",margin:"0 0 0 20",width:230,items:[{xtype:"radiogroup",id:"vmSelection",fieldLabel:"",cls:"radiobt",columns:1,vertical:true,hidden:true,items:[{boxLabel:"Associate specific VMs",name:"vmselectiongrp",id:"vmselectionspecific",inputValue:1},{boxLabel:"Associate VMs by Names/Patterns",name:"vmselectiongrp",id:"vmselectionpattern",inputValue:2},{boxLabel:"All VMs",name:"vmselectiongrp",id:"vmselectionall",inputValue:3}]},{xtype:"container",id:"patternContainer",layout:{type:"hbox",pack:"start"},hidden:true,margin:"10 0 0 0",items:[{xtype:"textfield",cls:"textbox",id:"patternName",name:"patternName",fieldLabel:"Names/Patterns",labelAlign:"top",labelSeparator:"",width:230,submitValue:false,value:""},{xtype:"button",iconCls:"iconAdd",tooltip:"Add patterns",style:{background:"none",border:"0px"},hidden:true,listeners:{click:function(){appCnt.configPatternTypes();
}}}]}]}]},{xtype:"container",layout:{type:"hbox",pack:"center"},items:[{xtype:"container",layout:{type:"vbox",pack:"start",align:"left"},width:500,items:[{xtype:"checkboxfield",id:"compAssociation",name:"compAssociation",inputValue:"on",boxLabel:"Auto associate all components",width:350,cls:"checkbt",checked:false,hidden:true}]}]},{xtype:"container",id:"selectorFieldContainer",layout:{type:"hbox",pack:"center",align:"stretch"},flex:1,margin:"0 0 20 0",items:[{xtype:"itemselector",id:"otherHosts",name:"otherHosts",cls:"itemselector",submitValue:false,style:{"background":"none"},buttons:["add","remove"],buttonsText:{add:"Disassociate",remove:"Associate",},fromTitle:"Associated",toTitle:"Available",titleAlign:"center",multiSelect:true,height:250,width:800,displayField:"displayField",valueField:"valueField",store:Ext.create("Ext.data.Store",{fields:["valueField","displayField"],data:[]}),onRemoveBtnClick:function(){appCnt.onItemSelection();
var b=this,a=b.getSelections(b.toField.boundList);b.moveRec(false,a);b.fromField.boundList.getSelectionModel().select(a);},onAddBtnClick:function(){appCnt.onItemSelection();var b=this,a=b.getSelections(b.fromField.boundList);b.moveRec(true,a);b.toField.boundList.getSelectionModel().select(a);},onItemDblClick:function(a,b){appCnt.onItemSelection();
this.moveRec(a===this.fromField.boundList,b);}}]},{xtype:"container",id:"elementsHiddenContainer",hidden:true}],dockedItems:[{xtype:"toolbar",padding:10,dock:"bottom",ui:"toolbarBgWithTopBorder",layout:{pack:"center"},items:[{xtype:"button",text:pageIntnl84,id:"apply",ui:"newButtonSmall",width:150},{xtype:"button",text:pageIntnl85,width:80,id:"finish",ui:"newButtonSmall",margin:"0 0 0 20"},{xtype:"button",text:pageIntnl86,id:"btnViewElements",ui:"newButtonSmall",margin:"0 0 0 20",width:180}]}]});
