FR.components.activityPanel=Ext.extend(Ext.ux.ListPanel,{lastReq:false,cls:"fr-activity-panel",bodyCssClass:"fr-activity-panel-body",paginated:true,locateOnSel:true,icon:"fa-bolt",title:"Activity",initComponent:function(){this.store=new Ext.data.JsonStore({url:"?module=filelog&section=ajax&page=all",root:"records",totalProperty:"totalCount",fields:[{name:"date_added",type:"date"},"countActions","time_ago","path","filename","filename_short","objectType","ext","thumb","details","n"],listeners:{load:function(){this.updateStatus(0)},exception:function(p,t,a,opt,response){var d=opt.reader.jsonData;if(d&&d.msg){FR.UI.feedback(d.msg,true)}},scope:this}});this.listViewCfg={emptyText:'<img class="illustration" src="'+FR.illustrationsURL+'/empty.svg" />'+FR.T("There are no activity records"),columns:[],itemSelector:"div.eventItem",tpl:new Ext.XTemplate('<tpl for="rows">'+'<div class="eventItem">'+'<tpl if="filename">{[this.getIconHTML(values)]}</tpl>'+'<div class="txt">'+'<tpl if="filename"><div class="fn"><tpl if="n &gt; 0"><i class="fa fa-bolt colorDanger new"></i></tpl> {filename}</div></tpl>'+'<div class="d">{details}</div>'+'<div class="t" title="{date_added}">{time_ago}</div>'+'<tpl if="countActions &gt; 1"><div class="andMore">['+FR.T("%1 more actions").replace("%1","{countActions}")+"]</div></tpl>"+"</div>"+"</div>"+"</tpl>",{getIconHTML:this.getIconHTML})};Ext.apply(this,{listeners:{activate:function(p){p.onInfoPanelRefresh()}}});FR.components.activityPanel.superclass.initComponent.apply(this,arguments)},updateStatus:function(newCount,add){var alert;if(add){newCount+=this.titleNumber}if(add||newCount>this.titleNumber&&this.titleNumber>0){if(FR.localSettings.get("sound-notif",Settings.sound_notification?"enabled":"disabled")=="enabled"){FR.audioNotification();alert=true}}this.setTabBubble(newCount,alert)},onInfoPanelRefresh:function(){if(!this.active){return false}var fileInfo=this.infoPanel.fileInfo,mode=fileInfo.objectType=="file"?"focused":"broad",path=fileInfo.path;var req=mode+":"+path;if(req==this.lastReq){return false}this.store.removeAll(true);this.listView.refresh();this.store.setBaseParam("mode",mode);this.store.setBaseParam("path",path);this.store.load();this.lastReq=req}});