var tabHelpTip="Please enter the exact name of the tab page in which the Application/Desktop is listed in the StoreFront console. Few examples of Tab Names are &quot;FAVORITES&quot; or &quot;APPS&quot; or &quot;DESKTOPS&quot;. Note that the Tab Name is not case-sensitive. If Tab Name is set to none, the simulator will look for the configured Application/Desktop in the &quot;FAVORITES&quot; tab. For further information, please refer to The eG Enterprise Express Logon Simulator for Citrix XenApp and XenDesktop document.";
var appHelpTip="Please enter the exact name of the Application/Desktop that is to be launched from StoreFront console. Note that the Application/Desktop Name is not case-sensitive. Few examples of applications/desktops are Adobe Reader XI, Internet Explorer, Microsoft Excel 2010, Desktop_VM1. For further information, please refer to The eG Enterprise Express Logon Simulator for Citrix XenApp and XenDesktop document.";
var winHelpTip="Please enter the partial or exact name that is displayed for the configured Application/Desktop in the session window's title bar. Note that the Window Title is not case-sensitive. Do not specify wildcard characters in the Window Title. For example, if your launched application window title is &quot;Untitled - Notepad&quot;, then you are allowed to provide just &quot;Notepad&quot; or &quot;Untitled - Notepad&quot; in the Window Title. If Window Title is set to none, then the simulator will assume that the configured Application/Desktop Name is the same as the Window Title. For further information, please refer to The eG Enterprise Express Logon Simulator for Citrix XenApp and XenDesktop document.";
Ext.define("LogonSimulator.controller.Main",{extend:"Ext.app.Controller",views:["Viewport","PublishedResources","AgentDownload","DownloadUtils","LogonSimulatorView"],refs:[{selector:"viewport",ref:"viewport"},{selector:"PublishedResources",ref:"PublishedResources"},{selector:"AgentDownload",ref:"AgentDownload"},{selector:"DownloadUtils",ref:"DownloadUtils"},{selector:"LogonSimulatorView",ref:"LogonSimulatorView"}],init:function(){thisController=this;
testViews=this;appCnt=this;userName="";this.buildFieldData();this.control({"viewport":{"afterrender":this.afterrender},'viewport button[id="addMultiSrcbtn"]':{"click":this.addMultiSource},'viewport button[id="clearMultiConfSrc"]':{"click":this.ClearMultiConfigSource},'viewport button[id="updateMultiConfSrc"]':{"click":this.UpdateMultiConfigSource},'PublishedResources combo[id="compType"]':{"select":this.compTypeLoad}});
},tabChange:function(b){var a=b;var c=Ext.getCmp("mainTab");if(a.toLowerCase()=="tab1"){testViews.logonSimView();Ext.getCmp("buttonCont").hide();c.child("#tab1").tab.show();}if(a.toLowerCase()=="tab2"){Ext.getCmp("backupmulticontainer").removeAll();testViews.interConfigMultiSource(compType);c.child("#tab2").tab.show();
Ext.getCmp("buttonCont").show();}if(a.toLowerCase()=="tab3"){testViews.agentView();Ext.getCmp("buttonCont").hide();c.child("#tab3").tab.show();}},afterrender:function(){Ext.get("video3").on("click",function(){testViews.showVideo("second");});Ext.get("video3_1").on("click",function(){testViews.showVideo("first");
});Ext.get("video4").on("click",function(){testViews.showVideo("second");});Ext.get("video4_1").on("click",function(){testViews.showVideo("first");});var a=Ext.getCmp("mainTab");if(defaultLS!=null&&defaultLS.toLowerCase()=="all"){a.child("#tab1").tab.show();Ext.getCmp("compType").show();Ext.getCmp("buttonCont").hide();
}else{a.child("#tab1").tab.hide();Ext.getCmp("compType").hide();Ext.getCmp("buttonCont").show();}if(tab!=null&&tab=="comp"){testViews.logonSimView();a.child("#tab1").tab.show();a.setActiveTab(0);Ext.getCmp("buttonCont").hide();}if(tab!=null&&tab=="configure"){Ext.getCmp("PublishedResources").getForm().reset();
Ext.getCmp("backupmulticontainer").removeAll();a.child("#tab2").tab.show();a.setActiveTab(1);Ext.getCmp("buttonCont").show();}else{if(tab!=null&&tab=="agentDownload"){testViews.agentView();a.child("#tab3").tab.show();a.setActiveTab(2);Ext.getCmp("buttonCont").hide();}else{if(defaultLS!=null&&defaultLS.toLowerCase()=="all"){testViews.logonSimView();
a.child("#tab1").tab.show();a.setActiveTab(0);Ext.getCmp("buttonCont").hide();}else{Ext.getCmp("PublishedResources").getForm().reset();Ext.getCmp("backupmulticontainer").removeAll();a.child("#tab2").tab.show();a.setActiveTab(1);Ext.getCmp("buttonCont").show();}}}Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/EgLogonSimulatorJson.jsp?comeFrom=getUserDetails",method:"POST",success:function(b){var c=b.responseText;
var d=Ext.decode(c);userName=d.userName;},failure:function(){}});if(help!=null&&help.toLowerCase()=="true"){testViews.iconEnable();Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/EgLogonSimulatorJson.jsp?comeFrom=sendMail",method:"POST",success:function(d){var b=d.responseText;var f=Ext.decode(b);
if(f.mailSent=="No"){var i=f.firstName;var k=f.lastName;var g=f.username;var c=f.phoneNo;var e=f.company;var j=f.timeZone;var h=f.password;var l=f.simulator;if(sendUserDataToCMS!=null&&sendUserDataToCMS=="true"){thisController.sendData(i,k,g,c,e,j,h,l,url,refurl);}}}});}else{if(help!=null&&help.toLowerCase()=="yes"){testViews.iconEnable();
}else{testViews.iconDisable();}}},showVideo:function(b){var c="";var a="";if(b!=null&&b=="first"){c="https://www.youtube.com/embed/bxzrpqTOEQ4";a="How to Set Up the Citrix Logon Simulator";}else{c="https://www.youtube.com/embed/YIV-n6fo38A";a="Quick Overview of Features";}if(Ext.isEmpty(Ext.getCmp("youtubewindow"))){Ext.create("Ext.window.Window",{title:"<span style='text-transform:none;'>"+a+"</span>",modal:true,ui:"lightwindow",ghost:false,id:"youtubewindow",closeAction:"destroy",height:500,width:800,border:true,padding:0,header:{padding:"8 10"},listeners:{show:function(d){if(this.modal){var e=Ext.dom.Query.select(".x-mask");
for(var i in e){this.dom=e[i];if(!Ext.isEmpty(this.dom.offsetParent)){if(this.dom.offsetParent.tagName=="BODY"){Ext.fly(this.dom).addCls("windowModal");}}}}},hide:function(d){if(this.modal){Ext.fly(this.dom).removeCls("windowModal");}},afterrender:function(){Ext.EventManager.onWindowResize(function(){var d=this;
d.center();},this);}},resizable:false,layout:"fit",html:'<iframe width="800" frameborder="0" height="465" src="'+c+'" frameborder="0" allowfullscreen></iframe>'}).show();}if(Ext.getCmp("youtubewindow")!=null&&Ext.getCmp("youtubewindow")!=undefined){Ext.getCmp("youtubewindow").on("close",function(){testViews.iconEnable();
});}},sendData:function(g,i,f,b,d,j,h,k,a,e){var c="";if(k=="Citrix_XcLogon_Emulation"){c="Citrix XenApp/XenDesktop";}else{if(k=="Hrzn_Logon_Emulation"){c="VMware Horizon";}}if(a=="null"||a==null){a="Non-PPC";}if(e=="null"||e==null){e="";}jQuery.ajax({type:"POST",url:"https://www.eginnovations.com/company/whs_reg_collector.php",data:{"First_Name":g,"Last_Name":i,"Email":f,"Phone":b,"Company_Name":d,"Time_Zone":j,"Password":h,"Confirm_Password":h,"Environment":c,"URL":a,"refurl":e},cache:false,success:function(l){},error:function(l){console.log(l);
}});},sendCompData:function(f,h,e,a,d,i,g,j,c){var b="";if(j=="Citrix_XcLogon_Emulation"){b="Citrix XenApp/XenDesktop";}else{if(j=="Hrzn_Logon_Emulation"){b="VMware Horizon";}}jQuery.ajax({type:"POST",url:"https://www.eginnovations.com/company/whs_reg_collector.php",data:{"First_Name":f,"Last_Name":h,"Email":e,"Phone":a,"Company_Name":d,"Time_Zone":i,"Password":g,"Confirm_Password":g,"Environment":b,"Status":c},cache:false});
},iconEnable:function(){Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/EgLogonSimulatorJson.jsp?comeFrom=getsimulator",method:"POST",success:function(a){var b=a.responseText;publicJSON=Ext.decode(b);compType=publicJSON["compType"];if(compType!=null&&compType=="Citrix_XcLogon_Emulation"){Ext.getCmp("video4link").show();
}else{if(compType!=null&&compType=="Hrzn_Logon_Emulation"){Ext.getCmp("video4link").hide();}else{Ext.getCmp("video4link").hide();}}}});if(defaultLS!=null&&defaultLS.toLowerCase()=="all"){Ext.getCmp("mainTab").setVisible(false);Ext.getCmp("getStarted").setVisible(true);Ext.getCmp("4stepView").setVisible(true);
Ext.getCmp("buttonCont").hide();}else{Ext.getCmp("mainTab").setVisible(false);Ext.getCmp("getStarted").setVisible(true);Ext.getCmp("3stepView").setVisible(true);Ext.getCmp("buttonCont").hide();}Ext.getCmp("2stepView").setVisible(false);},iconDisable:function(){if(defaultLS!=null&&defaultLS.toLowerCase()=="all"){Ext.getCmp("mainTab").setVisible(true);
Ext.getCmp("getStarted").setVisible(false);Ext.getCmp("4stepView").setVisible(false);}else{Ext.getCmp("mainTab").setVisible(true);Ext.getCmp("getStarted").setVisible(false);Ext.getCmp("3stepView").setVisible(false);}var a=Ext.getCmp("mainTab");if(a.getActiveTab().itemId!=null&&a.getActiveTab().itemId=="tab2"){Ext.getCmp("buttonCont").show();
}else{Ext.getCmp("buttonCont").hide();}Ext.getCmp("2stepView").setVisible(false);},citrixOrVdiTrial:function(){var c=Ext.getCmp("trial").html;var a="";if(c!=null&&c.indexOf("Citrix")!=-1){a="Citrix";}else{if(c!=null&&c.indexOf("VDI")!=-1){a="VDI";}}var b=window.open("https://www.eginnovations.com/solutions/login?email="+userName+"&page="+a,"_blank");
b.focus();},goToMonitor:function(){Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/EgLogonSimulatorJson.jsp?comeFrom=getMonURL",method:"POST",success:function(a){var c=a.responseText;var b=Ext.decode(c);window.parent.goToTestConfiguration(indexTabURL.monitorTabURL+"&monLayerUrl="+encodeURIComponent(window.parent.filterEncode(b.url)));
}});},compTypeLoad:function(){compType=Ext.getCmp("compType").getValue();inputsmultisrc=2;var a=Ext.getCmp("mainTab");a.child("#tab2").removeAll();a.child("#tab2").add({xtype:"PublishedResources"});Ext.getCmp("compType").show();testViews.interConfigMultiSource(compType);},logonSimView:function(){Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/EgLogonSimulatorJson.jsp?comeFrom=getsimulator",method:"POST",success:function(a){var b=a.responseText;
publicJSON=Ext.decode(b);Ext.getCmp("compname").getStore().loadRawData(publicJSON.listOfComp);var c=Ext.getCmp("mainTab");if(publicJSON["disabled"]==undefined&&publicJSON["disabled"]==null&&Ext.isEmpty(publicJSON["disabled"])){c.child("#tab2").tab.disable();c.child("#tab3").tab.disable();c.child("#tab1").tab.show();
c.setActiveTab(0);Ext.getCmp("buttonCont").hide();Ext.getCmp("trial").hide();}else{Ext.getCmp("buttonCont").hide();c.child("#tab2").tab.enable();c.child("#tab3").tab.enable();c.child("#tab2").tab.show();if(citrixOrVdiTrial!=null&&citrixOrVdiTrial==false){Ext.getCmp("trial").show();}compType=publicJSON["compType"];
if(compType!=null&&compType=="Citrix_XcLogon_Emulation"){Ext.getCmp("trial").update('<div style="text-align:center;width:177px;float:left">Ensure Citrix success with <br> eG Enterprise. Try it now.</div><div class="arrowRight" ></div>');}else{if(compType!=null&&compType=="Hrzn_Logon_Emulation"){Ext.getCmp("trial").update('<div style="text-align:center;width:177px;float:left">Ensure VDI success with <br> eG Enterprise. Try it now.</div><div class="arrowRight" ></div>');
}}}}});return;},agentView:function(){Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/EgLogonSimulatorJson.jsp?comeFrom=getsimulator",method:"POST",success:function(a){var b=a.responseText;publicJSON=Ext.decode(b);compType=publicJSON["compType"];if(compType!=null&&compType=="Citrix_XcLogon_Emulation"){Ext.getCmp("trial").update('<div style="text-align:center;width:177px;float:left">Ensure Citrix success with <br> eG Enterprise. Try it now.</div><div class="arrowRight" ></div>');
}else{if(compType!=null&&compType=="Hrzn_Logon_Emulation"){Ext.getCmp("trial").update('<div style="text-align:center;width:177px;float:left">Ensure VDI success with <br> eG Enterprise. Try it now.</div><div class="arrowRight" ></div>');}}}});Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/agentPackDownloadJson.jsp",method:"POST",success:function(a){var b=a.responseText;
publicJSON=Ext.decode(b);Ext.getCmp("osname").getStore().loadRawData(publicJSON.listOfOS.reverse());}});},downloadAgentPack:function(b){var a=Ext.widget("DownloadUtils");var c="../servlet/com.eg.AgentPackDownloadServlet?os="+b+"&unzipit=false&issueUID=no&from=logonSimulator";a.download(c,b);},createComponent:function(b,a){var c=new Ext.LoadMask(Ext.getBody(),{msg:"Creating "+a+"..."});
c.show();Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/EgLogonSimulatorJson.jsp?comeFrom=createsimulator&compType="+encodeURIComponent(b),method:"POST",success:function(d){c.hide();var f=d.responseText;var e=Ext.decode(f);if(e["success"]=="extagent"){Ext.Msg.show({title:alertCompTitle,msg:e["screenLabels"]["extAgentErr"],buttons:Ext.Msg.OK,icon:"iconExclamation"});
return false;}else{if(e["success"]=="comp"){Ext.Msg.show({title:alertCompTitle,msg:e["screenLabels"]["compErr"],buttons:Ext.Msg.OK,icon:"iconExclamation"});return false;}else{if(e["success"]=="false"){Ext.Msg.show({title:alertCompTitle,msg:e["screenLabels"]["compErr"],buttons:Ext.Msg.OK,icon:"iconExclamation"});
return false;}else{if(e["success"]=="true"){Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/EgLogonSimulatorJson.jsp?comeFrom=sendMail",method:"POST",success:function(i){var g=i.responseText;var k=Ext.decode(g);var n=k.firstName;var p=k.lastName;var l=k.username;var h=k.phoneNo;var j=k.company;
var o=k.timeZone;var m=k.password;var q=k.simulator;if(sendUserDataToCMS!=null&&sendUserDataToCMS=="true"){thisController.sendCompData(n,p,l,h,j,o,m,q,"EnvironmentChange");}}});Ext.Msg.show({title:alertCompTitle,msg:a+" "+compSuccessMsg,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){var g=Ext.getCmp("mainTab");
Ext.getCmp("PublishedResources").getForm().reset();Ext.getCmp("backupmulticontainer").removeAll();inputsmultisrc=2;g.child("#tab2").tab.enable();g.child("#tab3").tab.enable();g.child("#tab2").tab.show();if(b!=null&&b=="Citrix_XcLogon_Emulation"){Ext.getCmp("trial").update('<div style="text-align:center;width:177px;float:left">Ensure Citrix success with <br> eG Enterprise. Try it now.</div><div class="arrowRight" ></div>');
}else{if(b!=null&&b=="Hrzn_Logon_Emulation"){Ext.getCmp("trial").update('<div style="text-align:center;width:177px;float:left">Ensure VDI success with <br> eG Enterprise. Try it now.</div><div class="arrowRight" ></div>');}}if(citrixOrVdiTrial!=null&&citrixOrVdiTrial==false){Ext.getCmp("trial").show();
}g.setActiveTab(1);testViews.interConfigMultiSource(b);}});return false;}}}}},failure:function(){c.hide();}});},deleteComponent:function(b,a){Ext.Msg.show({title:alertCompTitle,msg:"Are you sure you want to delete "+a+"?",buttons:Ext.Msg.YESNO,icon:Ext.Msg.QUESTION,fn:function(c){if(c=="yes"){var d=new Ext.LoadMask(Ext.getBody(),{msg:"Deleting "+a+"..."});
d.show();Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/EgLogonSimulatorJson.jsp?comeFrom=deletesimulator&compType="+encodeURIComponent(b),method:"POST",success:function(e){d.hide();var g=e.responseText;var f=Ext.decode(g);if(f["success"]=="delSimulator"){Ext.Msg.show({title:alertCompTitle,msg:f["screenLabels"]["delSimulatorErr"],buttons:Ext.Msg.OK,icon:"iconExclamation"});
return false;}else{if(f["success"]=="true"){Ext.Msg.show({title:alertCompTitle,msg:a+" "+compDelSuccessMsg,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){var h=Ext.getCmp("mainTab");Ext.getCmp("PublishedResources").getForm().reset();Ext.getCmp("backupmulticontainer").removeAll();inputsmultisrc=2;
h.child("#tab2").tab.enable();h.child("#tab3").tab.enable();h.child("#tab2").tab.show();Ext.getCmp("trial").hide();testViews.logonSimView();}});return false;}}},failure:function(){d.hide();}});}}});},addMultiSource:function(a){addMultiSourceContact();},addMultiResource:function(a){addMultiResouceContact();
},ClearMultiConfigSource:function(){var a=Ext.getCmp("backupmulticontainer");a.removeAll();if(Ext.getCmp("conmulti_1")!=null||Ext.getCmp("conmulti_1")!=undefined){ismultisrc="true";}if(Ext.getCmp("publisresource1")!=undefined){Ext.getCmp("publisresource1").setValue("");Ext.getCmp("twofacttoken1").setValue("");
Ext.getCmp("domainmultiusr1").setValue("");Ext.getCmp("usermultiusr1").setValue("");Ext.getCmp("pwdmultiusr1").setValue("");Ext.getCmp("confpwdmultiusr1").setValue("");Ext.getCmp("twofactlabel1_2").setValue(true);Ext.getCmp("disclaimermultiusr1_2").setValue(true);}else{inputsmultisrc=1;addMultiSourceContact();
}},clearMultiResourceContact:function(){var a=Ext.getCmp("backupmultirescontainer");a.removeAll();inputs=1;addMultiResourceContact();},UpdateMultiConfigSource:function(){var G=inputsmultisrc;var V=Ext.getCmp("siteUrl").getValue();var i=Ext.getCmp("browserType").getValue();if(!checkblank(V)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterUrl,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("siteUrl").focus(true,true);
}});return;}else{if(V.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("siteUrl").focus(true,true);}});return;}else{if(V.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("siteUrl").focus(true,true);
}});return;}else{if(V.indexOf(" ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:urlSpace,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("siteUrl").focus(true,true);}});return;}else{if(V.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("siteUrl").focus(true,true);
}});return;}else{if(!validateSingleUrl(V,V)){Ext.Msg.show({title:alertMsgSrcTitle,msg:urlInValidMsg,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("siteUrl").focus(true,true);}});return;}}}}}}for(var d=1;d<G-1;d++){if(Ext.getCmp("domainmultiusr"+d)==undefined){continue;}var N=Ext.getCmp("publisresource"+d).getValue();
var O=Ext.getCmp("twofacttoken"+d).getValue();var p=Ext.getCmp("domainmultiusr"+d).getValue();var m=Ext.getCmp("usermultiusr"+d).getValue();var b=Ext.getCmp("pwdmultiusr"+d).getValue();var U=Ext.getCmp("confpwdmultiusr"+d).getValue();var R=Ext.getCmp("twofact"+d).getChecked()[0];var P=R.getGroupValue();
if(N.split(",").length>=appsCount+1){Ext.Msg.show({title:alertMsgSrcTitle,msg:appLimitMsg,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);}});return;}if(!checkblank(N)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPubRsrc,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);
}});return;}else{if(N.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);}});return;}else{if(!checkspecialExt(N,"`*=#.|;\"'<>/[]?")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);
}});return;}else{if(trim(N)==""){Ext.getCmp("publisresource"+d).focus();return;}else{if(N.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);}});return;}else{if(N.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);
}});return;}else{if(N.indexOf(":")>-1){var x=N;if(x.indexOf(",")!=-1){var T=x.split(",");for(var H=0;H<T.length;H++){var l=T[H];if(l.charAt(0)==":"||l.charAt(l.length-1)==":"){Ext.Msg.show({title:alertMsgSrcTitle,msg:"Published resource should not start or end with a colon",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);
}});return;}else{var C=new Array();for(var L=0;L<l.length;L++){if(l.charAt(L)==":"){C.push(L);}if(l.charAt(L)==":"&&l.charAt(L+1)==":"){Ext.Msg.show({title:pageName,msg:"Cannot have ':' in consecutive positions",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);
}});C=new Array();return;}else{continue;}}if(C.length>1){Ext.Msg.show({title:alertMsgSrcTitle,msg:"Please enter the application/desktop name in this format ApplicationOrDesktop[:WindowTitle].",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);}});
C=new Array();return;}}}}else{if(x.charAt(0)==":"||x.charAt(x.length-1)==":"){Ext.Msg.show({title:alertMsgSrcTitle,msg:"Published resource should not start or end with a colon",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);}});return;}else{var C=new Array();
for(var L=0;L<x.length;L++){if(x.charAt(L)==":"){C.push(L);}if(x.charAt(L)==":"&&x.charAt(L+1)==":"){Ext.Msg.show({title:alertMsgSrcTitle,msg:"Cannot have ':' in consecutive positions",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);}});C=new Array();
return;}else{continue;}}if(C.length>1){Ext.Msg.show({title:alertMsgSrcTitle,msg:"Please enter the application/desktop name in this format ApplicationOrDesktop[:WindowTitle].",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);}});C=new Array();return;
}}}}}}}}}}if(P=="true"){if(!checkblank(O)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enter2FAToken,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+d).focus(true,true);}});return;}else{if(O.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+d).focus(true,true);
}});return;}else{if(O.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+d).focus(true,true);}});return;}else{if(!checkspecial(O,"|")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+d).focus(true,true);
}});return;}}}}}else{O="none";}if(!checkblank(p)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterDomain,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+d).focus(true,true);}});return;}else{if(p.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+d).focus(true,true);
}});return;}else{if(!checkDomain(p,"true")){Ext.getCmp("domainmultiusr"+d).focus(true,true);return;}else{if(p.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+d).focus(true,true);}});return;}else{if(!checkHyphenText(p,p)){Ext.getCmp("domainmultiusr"+d).focus();
return;}else{if(p.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+d).focus(true,true);}});return;}}}}}}if(!checkblank(m)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true,true);
}});return;}else{if(m.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true,true);}});return;}else{if(!checkspecial(m,"*+=|:;\"'<>/[]?,")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true,true);
}});return;}else{if(trim(m)==""){Ext.getCmp("usermultiusr"+d).focus();return;}else{if(!checkHyphenText(m,m)){Ext.getCmp("usermultiusr"+d).focus();return;}else{if(m.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true,true);
}});return;}else{if(m.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true,true);}});return;}}}}}}}if(b==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+d).focus(true,true);
}});sub=false;return;}else{if(b.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+d).focus(true,true);}});return;}else{if(!checkspecial(b,"|")){Ext.Msg.show({title:alertMsgSrcTitle,msg:PwdNotContainPipe,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+d).focus(true,true);
}});sub=false;return;}else{if(b.indexOf("#~#")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkHashTildeHash,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+d).focus(true,true);}});sub=false;return;}else{if(!checkForPassValidity(b)){Ext.getCmp("pwdmultiusr"+d).focus();
sub=false;return;}else{if(U==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+d).focus(true,true);}});sub=false;return;}else{if(U.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+d).focus(true,true);
}});return;}else{if(b!=U){Ext.Msg.show({title:alertMsgSrcTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+d).focus(true,true);}});sub=false;return;}}}}}}}}}var h="";var I="";var A="";var D="";var Q="";var E="";var J="";for(var n=1;n<G;n++){if(Ext.getCmp("domainmultiusr"+n)==undefined){continue;
}var j=Ext.getCmp("publisresource"+n).getValue();if(j.split(",").length>=appsCount+1){Ext.Msg.show({title:alertMsgSrcTitle,msg:appLimitMsg,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+n).focus(true,true);}});return;}if(j!=null){if(!checkblank(j)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPubRsrc,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+n).focus(true,true);
}});return;}else{if(j.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+n).focus(true,true);}});return;}else{if(!checkspecialExt(j,"`*=#.|;\"'<>/[]?")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+n).focus(true,true);
}});return;}else{if(trim(j)==""){Ext.getCmp("publisresource"+n).focus();return;}else{if(j.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+n).focus(true,true);}});return;}else{if(j.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+n).focus(true,true);
}});return;}else{if(j.indexOf(":")>-1){var x=j;if(x.indexOf(",")!=-1){var T=x.split(",");for(var H=0;H<T.length;H++){var l=T[H];if(l.charAt(0)==":"||l.charAt(l.length-1)==":"){Ext.Msg.show({title:alertMsgSrcTitle,msg:"Published resource should not start or end with a colon",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+n).focus(true,true);
}});return;}else{var C=new Array();for(var L=0;L<l.length;L++){if(l.charAt(L)==":"){C.push(L);}if(l.charAt(L)==":"&&l.charAt(L+1)==":"){Ext.Msg.show({title:alertMsgSrcTitle,msg:"Cannot have ':' in consecutive positions",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+n).focus(true,true);
}});C=new Array();return;}else{continue;}}if(C.length>1){Ext.Msg.show({title:alertMsgSrcTitle,msg:"Please enter the application/desktop name in this format ApplicationOrDesktop[:WindowTitle].",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+n).focus(true,true);}});
C=new Array();return;}}}}else{if(x.charAt(0)==":"||x.charAt(x.length-1)==":"){Ext.Msg.show({title:alertMsgSrcTitle,msg:"Published resource should not start or end with a colon",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+n).focus(true,true);}});return;}else{var C=new Array();
for(var L=0;L<x.length;L++){if(x.charAt(L)==":"){C.push(L);}if(x.charAt(L)==":"&&x.charAt(L+1)==":"){Ext.Msg.show({title:alertMsgSrcTitle,msg:"Cannot have ':' in consecutive positions",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+n).focus(true,true);}});C=new Array();
return;}else{continue;}}if(C.length>1){Ext.Msg.show({title:alertMsgSrcTitle,msg:"Please enter the application/desktop name in this format ApplicationOrDesktop[:WindowTitle].",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+n).focus(true,true);}});C=new Array();return;
}}}}}}}}}}}var q=Ext.getCmp("disclaimermultiusr"+n+"_1").getValue();if(q==null){continue;}var e=Ext.getCmp("twofacttoken"+n).getValue();var s=Ext.getCmp("twofact"+n).getChecked()[0];var r=s.getGroupValue();if(e==null){continue;}if(e!=null){if(r=="true"){if(!checkblank(e)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enter2FAToken,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+d).focus(true,true);
}});return;}if(e.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+n).focus(true,true);}});return;}else{if(e.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+n).focus(true,true);
}});return;}else{if(!checkspecial(e,"|")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+n).focus(true,true);}});return;}}}}else{e="none";}}var z=Ext.getCmp("domainmultiusr"+n).getValue();if(z==null){continue;}if(z!=null){if(!checkblank(z)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterDomain,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+d).focus(true,true);
}});return;}else{if(z.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+d).focus(true,true);}});return;}else{if(!checkDomain(z,"true")){Ext.getCmp("domainmultiusr"+n).focus(true,true);
return;}else{if(z.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+n).focus(true,true);}});return;}else{if(z.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+n).focus(true,true);
}});return;}else{if(!checkHyphenText(z,z)){Ext.getCmp("domainmultiusr"+n).focus();return;}}}}}}}var w=Ext.getCmp("usermultiusr"+n).getValue();if(w!=null){if(!checkblank(w)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+n).focus(true,true);
}});return;}else{if(w.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+n).focus(true,true);}});return;}else{if(!checkspecial(w,"*+=|:;\"'<>/[]?,")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+n).focus(true,true);
}});return;}else{if(trim(w)==""){Ext.getCmp("usermultiusr"+n).focus();return;}else{if(w.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+n).focus(true,true);}});return;}else{if(w.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+n).focus(true,true);
}});return;}else{if(!checkHyphenText(w,w)){Ext.getCmp("usermultiusr"+n).focus();return;}}}}}}}}var a=Ext.getCmp("pwdmultiusr"+n).getValue();var c=Ext.getCmp("confpwdmultiusr"+n).getValue();if(a!=null&&c!=null){if(a==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+n).focus(true,true);
}});return;}else{if(a.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+n).focus(true,true);}});return;}else{if(!checkspecial(a,"|")){Ext.Msg.show({title:alertMsgSrcTitle,msg:PwdNotContainPipe,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+n).focus(true,true);
}});sub=false;return;}else{if(a.indexOf("#~#")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkHashTildeHash,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+n).focus(true,true);}});sub=false;return;}else{if(!checkForPassValidity(a)){Ext.getCmp("pwdmultiusr"+n).focus();
sub=false;return;}else{if(c==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+n).focus(true,true);}});return;}else{if(c.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+n).focus(true,true);
}});return;}else{if(a!=c){Ext.Msg.show({title:alertMsgSrcTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+n).focus(true,true);}});return;}}}}}}}}}if(h!=null&&e!=null&&z!=null&&q!=null&&w!=null&&a!=null&&c!=null){var g=Ext.getCmp("domainmultiusr"+n).getValue();
A+=g+"|";var S=Ext.getCmp("disclaimermultiusr"+n+"_1").getValue();var F="false";if(S){F="true";}J+=F+"|";var y=Ext.getCmp("twofacttoken"+n).getValue();var B=Ext.getCmp("twofact"+n).getChecked()[0];var u=B.getGroupValue();if(u=="false"){y="none";}E+=y+"#~#";var M=Ext.getCmp("publisresource"+n).getValue();
var K=M;if(!Ext.isEmpty(K)&&K.indexOf(",")!=-1){K=K.replace(/,/g,"~#~");}h+=M+",";I+=K+"|";var o=Ext.getCmp("usermultiusr"+n).getValue();D+=o+"|";var t=Ext.getCmp("pwdmultiusr"+n).getValue();Q+=t+"#~#";}}h=h.substring(0,h.length-1);I=I.substring(0,I.length-1);E=E.substring(0,E.length-3);A=A.substring(0,A.length-1);
J=J.substring(0,J.length-1);D=D.substring(0,D.length-1);Q=Q.substring(0,Q.length-3);compType=Ext.getCmp("compType").getValue();var f=Ext.getCmp("ctxCloudWrkSpace1_1").getValue();if(Ext.isEmpty(f)){f="false";}Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/EgLogonJson.jsp?hiddenPublishSrcVal="+encodeURIComponent(I)+"&Two_factor_auth_password="+encodeURIComponent(E)+"&multiUsrdomainVal="+encodeURIComponent(A)+"&multiUsrVal="+encodeURIComponent(D)+"&Password="+encodeURIComponent(Q)+"&multiUsrdisclaimVal="+encodeURIComponent(J)+"&siteUrl="+encodeURIComponent(V)+"&comeFrom=update&compType="+encodeURIComponent(compType)+"&browserType="+i+"&ctxCloudWrkSpace="+encodeURIComponent(f),method:"POST",success:function(v){var X=v.responseText;
var k=Ext.decode(X);var W=k["agentDownload"];Ext.Msg.show({title:alertMsgSrcTitle,msg:successMsg,width:500,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){var Y=Ext.getCmp("mainTab");Y.child("#tab2").removeAll();Y.child("#tab2").add({xtype:"PublishedResources"});if(defaultLS!=null&&defaultLS.toLowerCase()=="all"){Ext.getCmp("compType").show();
}testViews.interConfigMultiSource(compType);if(W!=null&&W!="undefined"&&W=="No"){var Y=Ext.getCmp("mainTab");Y.setActiveTab(2);}}});}});},updateMultiResourceContact:function(g){var a=inputs;var d="";for(var e=1;e<=a-1;e++){if(Ext.getCmp("folderName"+e)==undefined){continue;}var f=Ext.getCmp("folderName"+e).getValue();
var b=Ext.getCmp("resourceName"+e).getValue();var c=Ext.getCmp("winTitle"+e).getValue();if(!checkblank(f)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterFolderName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("folderName"+e).focus(true,true);}});return;}else{if(f.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("folderName"+e).focus(true,true);
}});return;}else{if(!checkspecialExt(f,"`*=#.|;:\"'<>,/[]{}()?\\")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("folderName"+e).focus(true,true);}});return;}else{if(trim(f)==""){Ext.getCmp("folderName"+e).focus();return;}else{if(f.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("folderName"+e).focus(true,true);
}});return;}else{if(f.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("folderName"+e).focus(true,true);}});return;}}}}}}if(!checkblank(b)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterResourceName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("resourceName"+e).focus(true,true);
}});return;}else{if(b.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("resourceName"+e).focus(true,true);}});return;}else{if(b.indexOf("none")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:validResourceName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("resourceName"+e).focus(true,true);
}});return;}else{if(!checkspecialExt(b,"`*=#.|;:\"'<>,/[]?\\")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("resourceName"+e).focus(true,true);}});return;}else{if(trim(b)==""){Ext.getCmp("resourceName"+e).focus();return;}else{if(b.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("resourceName"+e).focus(true,true);
}});return;}else{if(b.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("resourceName"+e).focus(true,true);}});return;}}}}}}}if(!checkblank(c)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterwinTitle,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("winTitle"+e).focus(true,true);
}});return;}else{if(c.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("winTitle"+e).focus(true,true);}});return;}else{if(!checkspecialExt(c,"`*=#.|;:\"'<>,/[]{}()?\\")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("winTitle"+e).focus(true,true);
}});return;}else{if(trim(c)==""){Ext.getCmp("winTitle"+e).focus();return;}else{if(c.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("winTitle"+e).focus(true,true);}});return;}else{if(c.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("winTitle"+e).focus(true,true);
}});return;}}}}}}if(f!="none"&&c!="none"){d+=f+"\\"+b+":"+c;}else{if(f=="none"&&c!="none"){d+=b+":"+c;}else{if(f!="none"&&c=="none"){d+=f+"\\"+b;}else{if(f=="none"&&c=="none"){d+=b;}}}}d+=",";}d=d.substring(0,d.lastIndexOf(","));Ext.getCmp(g).setValue(d);Ext.getCmp("egconfigureresource").close();},buildFieldData:function(){Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/EgLogonSimulatorJson.jsp?comeFrom=getsimulator&from=userSimulator",method:"POST",success:function(a){var b=a.responseText;
publicJSON=Ext.decode(b);var c=Ext.getCmp("mainTab");if(publicJSON["disabled"]==undefined&&publicJSON["disabled"]==null&&Ext.isEmpty(publicJSON["disabled"])){c.child("#tab2").tab.disable();c.child("#tab3").tab.disable();c.setActiveTab(0);tab="comp";}else{Ext.getCmp("buttonCont").hide();c.child("#tab2").tab.enable();
c.child("#tab3").tab.enable();c.child("#tab2").tab.show();}}});},interConfigMultiSource:function(b){var c=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});c.show();var a=b;Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/EgLogonSimulatorJson.jsp?comeFrom=getsimulator&from=userSimulator",method:"POST",success:function(d){var e=d.responseText;
publicJSON=Ext.decode(e);Ext.getCmp("compType").getStore().suspendEvents(true);Ext.getCmp("compType").getStore().loadRawData(publicJSON.listOfComp);Ext.getCmp("compType").getStore().resumeEvents();b=publicJSON.compType;Ext.getCmp("compType").setValue(b);b=Ext.getCmp("compType").getValue();if(b!=null&&b=="Citrix_XcLogon_Emulation"){Ext.getCmp("siteUrl").emptyText="URL for connecting to StoreFront/NetScaler/Web Interface";
Ext.getCmp("noteCont").hide();Ext.getCmp("ctxCloudWrkSpace").show();Ext.getCmp("trial").update('<div style="text-align:center;width:177px;float:left">Ensure Citrix success with <br> eG Enterprise. Try it now.</div><div class="arrowRight" ></div>');}else{if(b!=null&&b=="Hrzn_Logon_Emulation"){Ext.getCmp("siteUrl").emptyText="URL for connecting to VMware Access Point/Horizon Connection Server";
Ext.getCmp("noteCont").show();Ext.getCmp("ctxCloudWrkSpace").hide();Ext.getCmp("trial").update('<div style="text-align:center;width:177px;float:left">Ensure VDI success with <br> eG Enterprise. Try it now.</div><div class="arrowRight" ></div>');}}Ext.Ajax.request({url:"/final/portal/LogonSimulator/data/EgLogonJson.jsp?comeFrom=view&compType="+encodeURIComponent(b),method:"POST",success:function(g){c.hide();
var i="";inputsmultisrc=2;ismultisrc="false";var y=g.responseText;var j=Ext.decode(y);var r=j["Site_url"];var z=j["Browser_type"];var m=j["Published_resources"];var p=j["Two_FA"];var o=j["Domain"];var l=j["Username"];var h=j["Password"];var C=j["Disclaimer"];if(m!=null&&m!="undefined"){var s=m.split("|");
var q="";if(!Ext.isEmpty(p)){q=p.split("#~#");}var v=o.split("|");var u=l.split("|");var x=h.split("#~#");var B=C.split("|");}Ext.getCmp("browserType").getStore().loadRawData(j.listOfBrowser);Ext.getCmp("browserType").setValue(z);Ext.getCmp("compType").setReadOnly(true);Ext.getCmp("compType").disable();
Ext.getCmp("compType").inputEl.addCls("disabledField");Ext.getCmp("compType").inputEl.dom.style.cursor="inherit";if(j.listOfBrowser!=null&&j.listOfBrowser!="undefined"){if(j.listOfBrowser.length<=1){Ext.getCmp("browserType").hide();}}if(r!="$unconfigured"){Ext.getCmp("siteUrl").setValue(r);}else{Ext.getCmp("siteUrl").setValue("");
}if(b!=null&&b=="Citrix_XcLogon_Emulation"){var D=j["Citrix_cloud_workspace"];if(!Ext.isEmpty(D)){if(D.toLowerCase()=="true"){Ext.getCmp("ctxCloudWrkSpace1_1").setValue(true);}else{Ext.getCmp("ctxCloudWrkSpace1_2").setValue(true);}}else{Ext.getCmp("ctxCloudWrkSpace1_2").setValue(true);}}Ext.suspendLayouts();
if(o!=null||o!=undefined){var A=Ext.getCmp("mainContainer");var n=v.length-1;if(Ext.isEmpty(A)){inputsmultisrc=1;n=v.length;}for(var w=0;w<n;w++){addMultiSourceContact();}for(i=1;i<v.length+1;i++){if(!Ext.isEmpty(s[i-1])&&s[i-1].indexOf("~#~")!=-1){s[i-1]=s[i-1].replace(/~#~/g,",");}if(b!=null&&b=="Citrix_XcLogon_Emulation"){Ext.getCmp("noteCont").hide();
Ext.getCmp("ctxCloudWrkSpace").show();Ext.getCmp("publisresource"+i).setReadOnly(true);Ext.getCmp("publisresource"+i).columnWidth="0.97";Ext.getCmp("publisresource"+i).emptyText=ctxAppEmptyText;Ext.getCmp("confpublisresource"+i).setVisible(true);}else{if(b!=null&&b=="Hrzn_Logon_Emulation"){Ext.getCmp("noteCont").show();
Ext.getCmp("ctxCloudWrkSpace").hide();Ext.getCmp("publisresource"+i).setReadOnly(false);Ext.getCmp("publisresource"+i).columnWidth="1";Ext.getCmp("publisresource"+i).emptyText=hrznAppEmptyText;Ext.getCmp("confpublisresource"+i).setVisible(false);}}if(!Ext.isEmpty(q)){var t=q[i-1];var f=B[i-1];if(!Ext.isEmpty(t)&&Ext.getCmp("twofacttoken"+i)!=null&&Ext.getCmp("twofacttoken"+i)!=undefined){if(t!="none"){Ext.getCmp("twofactlabel"+i+"_1").setValue(true);
Ext.getCmp("twofacttoken"+i).setVisible(true);}else{Ext.getCmp("twofactlabel"+i+"_2").setValue(true);Ext.getCmp("twofacttoken"+i).setVisible(false);}if(Ext.getCmp("publisresource"+i)!=null&&Ext.getCmp("publisresource"+i)!=undefined&&s[i-1]!="$unconfigured"){if(t!="none"){Ext.getCmp("twofacttoken"+i).setValue(t);
}}else{Ext.getCmp("twofacttoken"+i).setValue("");}}if(!Ext.isEmpty(f)){if(f.toLowerCase()=="true"){Ext.getCmp("disclaimermultiusr"+i+"_1").setValue(true);}else{Ext.getCmp("disclaimermultiusr"+i+"_2").setValue(true);}}}if(Ext.getCmp("publisresource"+i)!=null&&Ext.getCmp("publisresource"+i)!=undefined&&s[i-1]!="$unconfigured"){Ext.getCmp("publisresource"+i).setValue(s[i-1]);
Ext.getCmp("domainmultiusr"+i).setValue(v[i-1]);Ext.getCmp("usermultiusr"+i).setValue(u[i-1]);Ext.getCmp("pwdmultiusr"+i).setValue(x[i-1]);Ext.getCmp("confpwdmultiusr"+i).setValue(x[i-1]);}else{if(Ext.getCmp("publisresource"+i)!=null&&Ext.getCmp("publisresource"+i)!=undefined){Ext.getCmp("publisresource"+i).setValue("");
Ext.getCmp("domainmultiusr"+i).setValue("");Ext.getCmp("usermultiusr"+i).setValue("");Ext.getCmp("pwdmultiusr"+i).setValue("");Ext.getCmp("confpwdmultiusr"+i).setValue("");}}}}Ext.resumeLayouts(true);},failure:function(){c.hide();}});},failure:function(){c.hide();}});},getPopUpView:function(e){if(Ext.getCmp("egconfigureresource")!=undefined){Ext.getCmp("egconfigureresource").removeAll();
Ext.getCmp("backupmultirescontainer").removeAll();Ext.getCmp("backupmultirescontainer").doLayout();}var h=Ext.getCmp(e).getValue();inputs=1;popUpWin=Ext.create("Ext.Window",{layout:"fit",border:false,title:pubResourceToolTip,id:"egconfigureresource",width:700,height:250,padding:"5 10 10 10",autoScroll:true,modal:true,listeners:{"close":function(j){var i=Ext.getCmp("fieldtoolTip");
if(!Ext.isEmpty(i)&&i.isVisible()){i.destroy();}},"hide":function(j){var i=Ext.getCmp("fieldtoolTip");if(!Ext.isEmpty(i)&&i.isVisible()){i.destroy();}}},layout:{type:"auto",pack:"start",align:"stretch"},dockedItems:[{dock:"bottom",layout:{type:"hbox",align:"stretch",pack:"center"},border:false,padding:"10 0 0 0",items:[{xtype:"button",cls:"quickMenuWhiteButton",id:"addMultiresbtn",width:80,text:"Add More",listeners:{"click":function(){addMultiResourceContact();
}}},{xtype:"button",cls:"quickMenuWhiteButton",text:"Update",width:80,id:"updateMultires",name:"updateMultires",margin:"0 0 0 10",listeners:{"click":function(){testViews.updateMultiResourceContact(e);}}},{xtype:"button",cls:"quickMenuWhiteButton",text:"Clear",width:80,id:"clearMultires",name:"clearMultires",margin:"0 0 0 10",listeners:{"click":function(){testViews.clearMultiResourceContact();
}}}]}],items:[{xtype:"container",id:"backupmultirescontainer",layout:{type:"vbox",pack:"center",align:"stretch"}},{xtype:"container",id:"NoMultiResPattern",hidden:true,layout:{type:"hbox",pack:"center",align:"center"},border:true,flex:1,columnWidth:1,style:{"height":"100%",},items:[{xtype:"label",html:'<table border="0px" height="300"><tr><td align="center"><table><tr><td align="center"><div class="iconInformation"></div><div class="commonErrorMsgText">'+noDataMsg+"</div></td></tr></table></td></tr></table>"}]}]});
popUpWin.show();var c="";var d=h.split(",");if(h!=null||h!=undefined){var g=d.length-1;for(var b=0;b<=d.length-1;b++){addMultiResourceContact();}for(c=1;c<d.length+1;c++){if(d[c-1].indexOf("\\")!=-1){var f=d[c-1].split("\\");Ext.getCmp("folderName"+c).setValue(d[c-1].split("\\")[0]);if(d[c-1].split("\\")[1].indexOf(":")!=-1){var a=d[c-1].split("\\")[1];
Ext.getCmp("resourceName"+c).setValue(a.split(":")[0]);Ext.getCmp("winTitle"+c).setValue(a.split(":")[1]);}else{Ext.getCmp("resourceName"+c).setValue(d[c-1].split("\\")[1]);Ext.getCmp("winTitle"+c).setValue("none");}}else{if(d[c-1].indexOf(":")!=-1){Ext.getCmp("folderName"+c).setValue("none");Ext.getCmp("resourceName"+c).setValue(d[c-1].split(":")[0]);
Ext.getCmp("winTitle"+c).setValue(d[c-1].split(":")[1]);}else{Ext.getCmp("folderName"+c).setValue("none");Ext.getCmp("resourceName"+c).setValue(d[c-1]);Ext.getCmp("winTitle"+c).setValue("none");}}}}}});function checkspecial(d,b){var c=d;for(var a=0;a<c.length;a++){check_char=b.indexOf(c.charAt(a));if(check_char>=0){return false;
}}return true;}function addMultiSourceContact(){var a=Ext.getCmp("PublishedResources");var d=Ext.getCmp("backupmulticontainer");if(Ext.getCmp("mainContainer")!=undefined){if(d.items.length==simulationsCount-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:SimulationsLimitMsg,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}}else{if(d.items.length==simulationsCount){Ext.Msg.show({title:alertMsgSrcTitle,msg:SimulationsLimitMsg,buttons:Ext.Msg.OK,icon:"iconExclamation"});return;}}var c=Ext.getCmp("compType").getValue();var e="";if(c!=null&&c=="Citrix_XcLogon_Emulation"){e=ctxAppEmptyText;}else{if(c!=null&&c=="Hrzn_Logon_Emulation"){e=hrznAppEmptyText;
}}var f="con_"+inputsmultisrc;var b={xtype:"fieldset",id:f,style:{"background":"#ffffff","border":"1px solid lightGrey","box-shadow":"none"},padding:"10 0 10 10",margin:"10 10 0 10",items:[{xtype:"container",layout:"column",defaults:{labelSeparator:" ",labelWidth:150},items:[{xtype:"fieldcontainer",layout:"column",defaults:{labelSeparator:" ",labelWidth:150},columnWidth:1,items:[{xtype:"textfield",cls:"textbox",fieldLabel:appNameLabel,style:{"white-space":"nowrap"},id:"publisresource"+inputsmultisrc,emptyText:e,margin:"10 0 10 10",columnWidth:0.97,enableKeyEvents:true,readOnly:true,listeners:{"change":function(g){if(g.getValue().split(",").length>=appsCount+1){Ext.Msg.show({title:alertMsgSrcTitle,msg:appLimitMsg,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){g.focus(true,true);
}});return;}}}},{xtype:"button",columnWidth:0.03,tooltip:pubResourceToolTip,id:"confpublisresource"+inputsmultisrc,iconCls:"iconConfigure",style:{background:"none",border:"0px"},margin:"14 0 0 2",listeners:{click:function(){var g=this.getId().replace("confpublisresource","publisresource");testViews.getPopUpView(g);
}}}]},{xtype:"textfield",cls:"textbox",fieldLabel:"Domain",style:{"white-space":"nowrap"},id:"domainmultiusr"+inputsmultisrc,emptyText:"Domain name",margin:"10 50 10 10",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:"User",style:{"white-space":"nowrap"},id:"usermultiusr"+inputsmultisrc,emptyText:"Username",margin:"10 0 10 50",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:"Password",style:{"white-space":"nowrap"},id:"pwdmultiusr"+inputsmultisrc,inputType:"password",emptyText:"Password",margin:"10 50 10 10",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:"Confirm Password",style:{"white-space":"nowrap"},id:"confpwdmultiusr"+inputsmultisrc,inputType:"password",emptyText:"Confirm password",margin:"10 0 10 50",columnWidth:0.5},{xtype:"fieldcontainer",id:"twofaCont"+inputsmultisrc,fieldLabel:"Is 2FA enabled?",columnWidth:0.5,layout:"column",margin:"10 50 10 10",items:[{xtype:"radiogroup",columnWidth:0.6,cls:"radiobt",id:"twofact"+inputsmultisrc,vertical:false,columns:2,items:[{boxLabel:"Yes",name:"twofactlabel"+inputsmultisrc,id:"twofactlabel"+inputsmultisrc+"_1",inputValue:"true"},{boxLabel:"No",name:"twofactlabel"+inputsmultisrc,id:"twofactlabel"+inputsmultisrc+"_2",inputValue:"false",checked:true}],listeners:{"change":function(i,h){var h=this.getChecked()[0];
var g=this.getId().replace("twofact","twofacttoken");if(h.getGroupValue()=="false"){Ext.getCmp(g).setVisible(false);}else{Ext.getCmp(g).setVisible(true);}}}},{xtype:"textfield",cls:"textbox",style:{"white-space":"nowrap"},id:"twofacttoken"+inputsmultisrc,inputType:"password",emptyText:"2FA code",margin:"0 0 0 5",hidden:true,columnWidth:0.4,fieldHelp:"Please provide static 2FA code.",listeners:{scope:this,focus:onFieldFocus,blur:onFieldBlur}}]},{xtype:"radiogroup",columnWidth:0.5,cls:"radiobt",id:"disclaimer_radioGrp"+inputsmultisrc,fieldLabel:"Is disclaimer enabled?",vertical:false,columns:2,margin:"10 0 10 50",items:[{boxLabel:"Yes",name:"disclaimermultiusr"+inputsmultisrc,id:"disclaimermultiusr"+inputsmultisrc+"_1",inputValue:"true"},{boxLabel:"No",name:"disclaimermultiusr"+inputsmultisrc,id:"disclaimermultiusr"+inputsmultisrc+"_2",inputValue:"false",checked:true}]},{xtype:"container",style:{"position":"absolute","top":"2px","right":"2px","width":"20px","height":"20px"},margin:"0 0 0 0",items:[{xtype:"button",iconCls:"fieldsetClose",tooltip:"<b>Remove</b>",style:{background:"none",border:"0px"},handler:function(){removeMultiSrc(f);
}}]}]}]};d.add(b);a.doLayout();var c=Ext.getCmp("compType").getValue();if(c!=null&&c=="Citrix_XcLogon_Emulation"){Ext.getCmp("publisresource"+inputsmultisrc).setReadOnly(true);Ext.getCmp("publisresource"+inputsmultisrc).columnWidth="0.97";Ext.getCmp("publisresource"+inputsmultisrc).emptyText=ctxAppEmptyText;
Ext.getCmp("confpublisresource"+inputsmultisrc).setVisible(true);Ext.getCmp("noteCont").hide();Ext.getCmp("ctxCloudWrkSpace").show();}else{if(c!=null&&c=="Hrzn_Logon_Emulation"){Ext.getCmp("publisresource"+inputsmultisrc).setReadOnly(false);Ext.getCmp("publisresource"+inputsmultisrc).columnWidth="1";
Ext.getCmp("publisresource"+inputsmultisrc).emptyText=hrznAppEmptyText;Ext.getCmp("confpublisresource"+inputsmultisrc).setVisible(false);Ext.getCmp("noteCont").show();Ext.getCmp("ctxCloudWrkSpace").hide();}}Ext.getCmp("publisresource"+inputsmultisrc).focus(true);Ext.getCmp("addMultiSrcbtn").setText("Add More");
Ext.getCmp("updateMultiConfSrc").enable();Ext.getCmp("clearMultiConfSrc").enable();Ext.getCmp("NoMultiUsrPattern").hide();inputsmultisrc++;}function addMultiResourceContact(){var a=Ext.getCmp("egconfigureresource");var c=Ext.getCmp("backupmultirescontainer");if(c.items.length==appsCount){Ext.Msg.show({title:alertMsgSrcTitle,msg:appLimitMsg,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}var d="conRes_"+inputs;var b={xtype:"fieldset",id:d,style:{"background":"#ffffff","border":"1px solid lightGrey","box-shadow":"none"},padding:"10 0 10 10",margin:"10 10 0 10",items:[{xtype:"container",layout:"column",defaults:{labelSeparator:" ",labelWidth:150},items:[{xtype:"fieldcontainer",layout:"column",columnWidth:1,defaults:{margin:5,labelSeparator:" ",labelAlign:"top",},items:[{xtype:"textfield",cls:"textbox",style:{"white-space":"nowrap"},id:"folderName"+inputs,fieldLabel:"Tab Name",fieldHelp:tabHelpTip,value:"none",columnWidth:0.33,listeners:{scope:this,focus:onFieldFocus,blur:onFieldBlur}},{xtype:"textfield",cls:"textbox",style:{"white-space":"nowrap"},fieldLabel:"Application/Desktop Name",id:"resourceName"+inputs,fieldHelp:appHelpTip,columnWidth:0.34,listeners:{scope:this,focus:onFieldFocus,blur:onFieldBlur}},{xtype:"textfield",cls:"textbox",style:{"white-space":"nowrap"},fieldLabel:"Window Title",fieldHelp:winHelpTip,id:"winTitle"+inputs,value:"none",columnWidth:0.33,listeners:{scope:this,focus:onFieldFocus,blur:onFieldBlur}}]},{xtype:"container",style:{"position":"absolute","top":"2px","right":"2px","width":"20px","height":"20px"},margin:"0 0 0 0",items:[{xtype:"button",iconCls:"fieldsetClose",tooltip:"<b>Remove</b>",style:{background:"none",border:"0px"},handler:function(){removeMultiResource(d);
}}]}]}]};c.add(b);a.doLayout();Ext.getCmp("addMultiresbtn").setText("Add More");Ext.getCmp("updateMultires").enable();Ext.getCmp("clearMultires").enable();Ext.getCmp("NoMultiResPattern").hide();inputs++;}function onFieldFocus(d){var a=Ext.getCmp("viewport").getWidth();var c=a/2;var g=Ext.getCmp("viewport").getHeight();
var f=g/2;var e=d.fieldHelp;var b="Help";if(d.id.startsWith("folderName")){b="Help - Tab Name";}else{if(d.id.startsWith("resourceName")){b="Help - Application/Desktop Name";}else{if(d.id.startsWith("winTitle")){b="Help - Window Title";}else{if(d.id.startsWith("twofacttoken")){b="Help - 2FA Code";}}}}if(typeof e!=="undefined"){this.fieldHelp1=Ext.create("Ext.tip.Tip",{id:"fieldtoolTip",ui:"infobox",iconCls:"iconSimulatorInfo",title:b,width:700,height:130,maxWidth:900});
this.fieldHelp1.update(e);this.fieldHelp1.fieldId=d.id;this.fieldHelp1.showAt([c-350,f-260]);}}function onFieldBlur(a){var b=Ext.getCmp("fieldtoolTip");if(b.isVisible()){b.destroy();}}function removeMultiSrc(c){var d=Ext.getCmp("backupmulticontainer");var b=Ext.getCmp("conmulti_1");d.remove(c);var a=d.items.length;
if(c=="conmulti_1"){ismultisrc="true";Ext.getCmp("conmulti_1").removeAll();Ext.getCmp("conmulti_1").hide();Ext.getCmp("addMultiSrcbtn").setText("Add");}if(a==0){if(b.items.length==0){ismultisrc="true";inputsmultisrc=1;}if(ismultisrc=="true"){Ext.getCmp("NoMultiUsrPattern").show();Ext.getCmp("noteCont").hide();
Ext.getCmp("updateMultiConfSrc").disable();Ext.getCmp("clearMultiConfSrc").disable();Ext.getCmp("addMultiSrcbtn").setText("Add");}}}function removeMultiResource(b){var c=Ext.getCmp("backupmultirescontainer");c.remove(b);var a=c.items.length;if(a==0){inputs=1;Ext.getCmp("NoMultiResPattern").show();Ext.getCmp("updateMultires").disable();
Ext.getCmp("clearMultires").disable();Ext.getCmp("addMultiresbtn").setText("Add");}}function checkspecialExt(c,b){if(typeof(c)=="object"){obj_val=c.value;}else{obj_val=c;}for(var a=0;a<obj_val.length;a++){check_char=b.indexOf(obj_val.charAt(a));if(check_char>=0){return false;}}return true;}