Ext.define("floatingContainer",{alias:"widget.floatingContainer",extend:"Ext.window.Window"});Ext.define("citrixDashboard.view.TransactionsChartPanel",{extend:"Ext.panel.Panel",alias:"widget.transactionschartpanel",jsonData:null,itemId:"transactionschartpanel",id:"transactionschartpanel",layout:"fit",timeLine:"",ui:"eg-x-panel",frame:false,border:false,element:null,tools:[{xtype:"button",iconCls:"iconTimeline",id:"settingBt",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"Settings"});
}},style:{background:"none",border:"0px"}}],collapsed:false,collapsible:true,hideCollapseTool:true,initComponent:function(){var b=this.jsonData;if(b!=undefined&&b!=null&&!Ext.isEmpty(b.GraphScreenLabels["GraphHeader"])){this.title=b.GraphScreenLabels["GraphHeader"];}this.setAutoScroll(true);var a=this.createTimePanel(b);
if(Ext.isEmpty(Ext.getCmp("timeWindow"))){new Ext.create("floatingContainer",{id:"timeWindow",title:"Settings",width:700,height:80,flotable:true,closeAction:"hide",padding:"6 6 6 6",items:[{xtype:"panel",layout:"hbox",padding:13,ui:"footer",items:a}]});}this.callParent();},createTimePanel:function(d){if(!Ext.isEmpty(d.graphFilters&&d.graphFilters.length>0)){var a=new Array();
for(var c=0;c<d.graphFilters.length;c++){var e=d.graphFilters[c];var b=null;switch(e.type){case"combo":b=this.createCombo(e);break;case"date":b=this.createDateField(e);break;case"button":b={xtype:"button",text:e.label,action:"transactionGraphBtn",margin:"0 0 0 2",width:60,height:20,cls:"button20"};break;
}if(!Ext.isEmpty(b)){a.push(b);}}return a;}},handleScrollBars:function(b){var a=b.body.id;},createCombo:function(a){var c=Ext.create("Ext.data.Store",{fields:["value","name"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:a});var b={xtype:"combo",editable:false,margin:"0 5 0 0",store:c,cls:"dropdown",displayField:"name",valueField:"value",trigerAction:"all",fieldLabel:a.label,value:a.selectedValue,itemId:a.combo};
if(a.combo=="timeline"){b.labelWidth=55;b.width=145;b.defaultListConfig={maxHeight:200};this.timeLine=a.selectedValue;}else{if(a.combo=="fromhr"||a.combo=="tohr"){b.labelWidth=20;b.width=75;b.defaultListConfig={minWidth:55,loadingHeight:55,maxHeight:200};if(this.timeLine!="Any"){b.disabled=true;}}else{if(a.combo=="frommin"||a.combo=="tomin"){b.labelWidth=20;
b.width=75;b.hidden=true;b.defaultListConfig={minWidth:55,loadingHeight:55,maxHeight:200};if(this.timeLine!="Any"){b.disabled=true;}}else{if(a.combo=="mode"){b.labelWidth=40;b.width=100;b.defaultListConfig={minWidth:10,loadingHeight:90};}}}}return b;},createDateField:function(a){var b={xtype:"datefield",cls:"datepicker",fieldLabel:a.label,format:"M d, Y",value:a.value,labelWidth:50,width:210,margin:"0 5 0 0",itemId:a.field,name:a.dateError,editable:false};
if(a.field=="from"){b.labelWidth=35;b.padding="4 0 0 0";b.width=150;}else{if(a.field=="to"){b.labelWidth=20;b.width=135;}}if(this.timeLine!="Any"){b.disabled=true;}return b;}});