FR.components.activityPanel = Ext.extend(Ext.ux.ListPanel, { paginated: true, locateOnSel: true, title: '', initComponent: function() { this.store = new Ext.data.JsonStore({ url: '?module=filelog§ion=ajax&page=all', root: 'records', totalProperty: 'totalCount', fields: [ {name:'date_added', type:'date'},'time_ago','path','filename', 'filename_short','isFolder','icon','thumb','details','n' ], listeners: { 'load': function() {this.updateStatus(0);}, scope: this } }); this.listViewCfg = { emptyText: '
'+FR.T('No activity records found for this folder')+'
', columns: [{ tpl: new Ext.XTemplate('
' + '{[this.getIconHTML(values)]}' + '
' + '' + '
{filename_short}
' + '
{details}
' + '
{time_ago}
' + '
' + '
', {getIconHTML: this.getIconHTML} ) }] }; FR.components.activityPanel.superclass.initComponent.apply(this, arguments); }, load: function() { this.path = FR.currentPath; this.store.setBaseParam('path', this.path); this.store.load(); }, 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.setTitleNumber(newCount, alert); }, onRender: function() { this.on('activate', function() {this.load();}, this); FR.components.activityPanel.superclass.onRender.apply(this, arguments); } });