Ext.define("optionsfavoritereports.view.FavoriteList",{extend:"utilities.CustomGrid",requires:["Ext.ux.grid.FiltersFeature","Ext.ux.data.PagingMemoryProxy","utilities.CustomGrid"],alias:"widget.favoritelistgrid",id:"favoriteListGrid",ui:"newGridPanel withHeader withShade",border:true,autoScroll:false,scroll:true,screenLabels:null,dataArray:null,dummyArray:null,pageLimit:2,activePage:1,flex:1,margin:10,padding:10,viewConfig:{emptyText:'<table width="100%"><tr><td align="center" valign="middle"><div class="iconExclamation" style="margin:18% auto 0% auto"></div><div style="font-size:12px">No records<div></td></tr></table>'},initComponent:function(){var b={ftype:"filters",encode:false,local:true,filters:[{dataIndex:"FavoriteName",type:"string"},{dataIndex:"ReportType",type:"string"},{dataIndex:"CreationTime",type:"string"}]};
this.features=[b];this.addListener("viewready",this.showGridCellToolTip,this);this.selModel=new Ext.selection.CheckboxModel({checkOnly:true,headerWidth:26,injectCheckbox:"first"});this.dummyArray=this.dataArray.slice();this.store=Ext.create("Ext.data.Store",{fields:["FavoriteName","favID","favHrefUrl","ReportType","CreationTime","ModifyLink","modifyHrefUrl","ScheduleLink","scheduleHrefUrl"],proxy:{type:"pagingmemory",reader:{type:"json"}},pageSize:this.pageLimit,autoLoad:true,data:this.dataArray,id:"tmpStore"});
this.columns=[{dataIndex:"FavoriteName",header:this.screenLabels["reporter.common.FAVORITE NAME"],sortable:true,flex:2,renderer:function(j,e,i,l,g,k,d){var h=j;var f=i.get("favHrefUrl");f=f+"&com.eg.CSRF_NONCE="+csrfToken;if(!Ext.isEmpty(f)&&f!="-"){h='<a href="'+f+'">'+j+"</a>";}return h;}},{dataIndex:"ReportType",header:this.screenLabels["reporter.common.REPORT TYPE"],flex:2,sortable:true,renderer:function(h,e,d,j,g,f,i){if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}h=appConstants.erUtils.specialCharDecode(h);return h;}},{dataIndex:"CreationTime",header:this.screenLabels["reporter.common.CREATION TIME"],flex:0.75,sortable:false,align:"center",renderer:function(h,e,d,j,g,f,i){return h;}},{xtype:"actioncolumn",sortable:false,menuDisabled:true,style:{"border":"0px"},flex:0.1,align:"center",dataIndex:"ModifyLink",header:"",renderer:function(j,e,i,l,g,k,d){var f=i.get("modifyHrefUrl");
f=f+"&com.eg.CSRF_NONCE="+csrfToken;var h='<a href="'+f+'"><img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="iconModify"/></a>';return h;}},{xtype:"actioncolumn",sortable:false,menuDisabled:true,flex:0.1,align:"center",dataIndex:"ScheduleLink",header:"",renderer:function(j,e,i,l,g,k,d){var f=i.get("scheduleHrefUrl");
f=f+"&com.eg.CSRF_NONCE="+csrfToken;var h='<a href="'+f+'&showSchWindow=no"><img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="iconSchedule"/></a>';return h;}}];var a=this;this.dockedItems=[{xtype:"pagingtoolbar",cls:"newPagination",dock:"bottom",displayInfo:true,id:"FavListPaging",name:"FavListPaging",pageSize:this.pageLimit,store:this.store,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No topics to display",listeners:{change:function(d,e){if(!Ext.isEmpty(e)){a.activePage=e.currentPage;
}else{a.activePage=0;}}}},{xtype:"toolbar",items:[{xtype:"customtrigger",name:"livesearch",id:"livesearch",width:300,dock:"top",enableKeyEvents:true},"->",{xtype:"container",items:[{xtype:"button",id:"DeleteAll",ui:"newButtonSmall",margin:"0 0 0 0",name:"DeleteAll",text:"Delete"}]}]}];var c=publicJsonData["sharingGridArr"];
this.callParent();},listeners:{sortchange:function(c,d,f,b,a){this.getStore().loadPage(this.activePage);},}});