From 66c21352d7f4161a60e3429b9f8938c46c0e2d72 Mon Sep 17 00:00:00 2001
From: Renaud Le Gac <renaud.legac@free.fr>
Date: Mon, 13 Dec 2010 19:39:38 +0000
Subject: [PATCH] Intermediate step with a reset button but it don't work. Need
 to redesign the gridfilter as a component.

---
 static/scripts/grid_2.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/static/scripts/grid_2.js b/static/scripts/grid_2.js
index 316607fd..0ef2362c 100755
--- a/static/scripts/grid_2.js
+++ b/static/scripts/grid_2.js
@@ -30,7 +30,7 @@ mainGrid = function(provider, response){
 	var cfg = response.result;
 	
 //	console.log("Grid Model");
-//	console.dir(cfg);
+	console.dir(cfg);
 
 	// instantiate the grid and the filter
 	var grid = Ext.ComponentMgr.create(cfg);
@@ -52,9 +52,13 @@ mainGrid = function(provider, response){
 			items: [grid.filter],
 			width: 300,
 			split: true,
+			buttons: [{text: 'reset',
+					   ref: '../../resetButton'}],  // expose at the panel level
 		}],
 	});
 	
+//	panel.resetButton.on('click', grid.filter.onReset);
+	
 	// the viewport to hold the grid
 	// 	using all space available in the browser
 	var vp = new Ext.Viewport({
-- 
GitLab