GO.log.EntriesGrid=function(a){if(!a){a={}}a.title=GO.log.lang.log;a.layout="fit";a.autoScroll=true;a.split=true;a.store=new GO.data.JsonStore({url:GO.settings.modules.log.url+"json.php",baseParams:{task:"entries"},root:"results",id:"id",totalProperty:"total",fields:["id","link_id","link_type","time","user_name","text"],remoteSort:true});a.paging=true;var b=new Ext.grid.ColumnModel({defaults:{sortable:true},columns:[{header:GO.log.lang.time,dataIndex:"time"},{header:GO.lang.strDescription,dataIndex:"text"},{header:GO.lang.strUser,dataIndex:"user_name",sortable:false},{header:GO.lang.strType,dataIndex:"link_type"}]});a.cm=b;a.view=new Ext.grid.GridView({autoFill:true,forceFit:true,emptyText:GO.lang.strNoItems});a.sm=new Ext.grid.RowSelectionModel();a.loadMask=true;this.searchField=new GO.form.SearchField({store:a.store,width:320});a.tbar=[GO.lang.strSearch+":",this.searchField,"-",{iconCls:"btn-export",text:GO.lang.cmdExport,cls:"x-btn-text-icon",handler:function(){var c={};c.colModel=this.getColumnModel();c.title=this.ownerCt.title;var d=this.searchField.getValue();if(!GO.util.empty(d)){c.subtitle=GO.lang.searchQuery+": "+d}else{c.subtitle=""}if(!this.exportDialog){this.exportDialog=new GO.ExportQueryDialog({query:"log"})}this.exportDialog.show(c)},scope:this}];GO.log.EntriesGrid.superclass.constructor.call(this,a)};Ext.extend(GO.log.EntriesGrid,GO.grid.GridPanel,{loaded:false,afterRender:function(){GO.log.EntriesGrid.superclass.afterRender.call(this);if(this.isVisible()){this.onGridShow()}},onGridShow:function(){if(!this.loaded&&this.rendered){this.store.load();this.loaded=true}}});GO.moduleManager.addModule("log",GO.log.EntriesGrid,{title:GO.log.lang.log,iconCls:"go-tab-icon-log",admin:true});