[Commits] r166 - sandbox/opengeo/drake/trunk/apps/drake
commits at geoext.org
commits at geoext.org
Fri Feb 13 20:50:12 CET 2009
Author: sbenthall
Date: 2009-02-13 20:50:12 +0100 (Fri, 13 Feb 2009)
New Revision: 166
Modified:
sandbox/opengeo/drake/trunk/apps/drake/index.html
Log:
checkbox to turn filter on and off (patch from dwins)
Modified: sandbox/opengeo/drake/trunk/apps/drake/index.html
===================================================================
--- sandbox/opengeo/drake/trunk/apps/drake/index.html 2009-02-13 19:08:38 UTC (rev 165)
+++ sandbox/opengeo/drake/trunk/apps/drake/index.html 2009-02-13 19:50:12 UTC (rev 166)
@@ -209,19 +209,26 @@
url: this.getWFSLayerURL(this.getFullType()),
ignore: {name: "the_geom"}
}),
- addToToolbar: ["->", {
- text: "Set Filter",
- handler: function() {
- this.proxy.setOGCFilter(this.filterBuilder.getFilter());
+ addToToolbar: ["->", new Ext.form.Checkbox({
+ boxLabel: "Use Filter",
+ enableToggle: true,
+ handler: function(checkbox, checked) {
+ if (checked){
+ this.proxy.setOGCFilter(this.filterBuilder.getFilter());
+ this.filterBuilder.on("change", this.updateQueryFilter, this);
+ } else {
+ this.proxy.setOGCFilter(null);
+ this.filterBuilder.un("change", this.updateQueryFilter, this);
+ }
this.grid.store.load({
params: {
start: 0,
limit: 7
}
- });
+ });
},
scope: this
- }]
+ })]
});
},
@@ -520,6 +527,11 @@
this.grid.colModel.setConfig(columnize(this.fields));
this.store.load({params: {start: 0, limit: 7}});
+ },
+
+ updateQueryFilter: function(builder){
+ this.proxy.setOGCFilter(builder.getFilter());
+ this.store.load({params: {start: 0, limit: 7}});
}
};
More information about the Commits
mailing list