Ext.define("egindex.view.QuicklinkMenuItem",{extend:"Ext.form.Panel",alias:"widget.quicklinkmenuitem",requires:["utilities.ScrollCombo","utilities.CommonPanel"],margin:0,border:false,frame:false,listeners:{"boxready":function(){this.loadQuickLinks();}},items:[{xtype:"scrollcombo",fieldLabel:"Module",labelAlign:"left",hidden:true,labelSeparator:"",margin:"5 0 10 0",cls:"dropdown",id:"reportType",editable:false,width:260,labelWidth:"60px",name:"reportType",vertical:true,store:Ext.data.Store({fields:["displayField","valueField"],data:[]}),displayField:"displayField",valueField:"valueField",queryMode:"local"},{xtype:"commonPanel",margin:"5 3 3 3",scroll:true,autoScroll:true,bodyPadding:"0",id:"commonPanel",layout:{type:"vbox",align:"stretch"},frame:false,items:[{xtype:"container",scroll:true,cls:"border-theme",autoScroll:true,flex:1,width:"100%",height:300,margin:"0 0 0 0",id:"enabledLinkContainer",name:"enabledLinkContainer"}]},{xtyle:"container",hidden:false,id:"config_errorpan",style:{"text-align":"middle","vertical-align":"middle"}}],loadQuickLinks:function(){var a=new Ext.LoadMask(this,{msg:"Loading .."});
a.show();var b=this;Ext.Ajax.request({url:"/final/scripts/EgIndexApp/data/EgQuickLinks.jsp?newwindow="+newwin,method:"post",scope:this,success:function(c){a.hide();var e=c.responseText;var d=Ext.decode(e);Ext.getCmp("configModQuickLink").setTitle(d["QLinkHeader"]);var g=Ext.getCmp("reportType");var f=d["comboFlag"];
if(f!=null&&f=="true"){g.show();Ext.getCmp("commonPanel").setHeight(300);Ext.getCmp("commonPanel").setAutoScroll(true);g.getStore().loadRawData(d["modulesList"]);g.setValue(d["entrySet"]);Ext.get("configureQuickmenuLink").on("click",function(){quicklinkclicked=false;Ext.get("quicklinks").removeCls("circleSelected");
Ext.getCmp("configModQuickLink").destroy();});}else{g.hide();Ext.getCmp("commonPanel").hide();Ext.getCmp("config_errorpan").update(d["configureLink"]);Ext.get("config_errorpan").on("click",function(){quicklinkclicked=false;Ext.get("quicklinks").removeCls("circleSelected");Ext.getCmp("configModQuickLink").destroy();
});}}});}});