From aeb0b2d41530a15eaf322630a366b43cff2e5bc2 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Fri, 30 Mar 2012 10:44:14 +0200 Subject: [PATCH] fix store filter on reload --- .../js/repository/sonia.repository.grid.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.grid.js b/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.grid.js index 49816ec683..13219adfd3 100644 --- a/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.grid.js +++ b/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.grid.js @@ -41,6 +41,8 @@ Sonia.repository.Grid = Ext.extend(Sonia.rest.Grid, { formTitleText: 'Repository Form', unknownType: 'Unknown', + archiveIcon: 'resources/images/archive.png', + filterRequest: null, /** @@ -155,7 +157,9 @@ Sonia.repository.Grid = Ext.extend(Sonia.rest.Grid, { header: this.colArchiveText, dataIndex: 'archived', width: 40, - hidden: true //! state.clientConfig.enableRepositoryArchive + hidden: ! state.clientConfig.enableRepositoryArchive, + renderer: this.renderArchive, + scope: this },{ id: 'group', dataIndex: 'group', @@ -207,6 +211,10 @@ Sonia.repository.Grid = Ext.extend(Sonia.rest.Grid, { } }, + renderArchive: function(v){ + return v ? ' + v + ' : ''; + }, + convertToGroup: function(v, data){ var name = data.name; var i = name.lastIndexOf('/'); @@ -238,6 +246,9 @@ Sonia.repository.Grid = Ext.extend(Sonia.rest.Grid, { if (this.searchValue){ this.filterStore(); } + if (this.filterRequest){ + this.filterByRequest(); + } }, onFallBelowMinHeight: function(height, minHeight){