[Lada-commits] [PATCH 2 of 2] Added a variable which makes it possible to detect if a grid is dynamic
Wald Commits
scm-commit at wald.intevation.org
Wed Dec 2 17:53:41 CET 2015
# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1449075200 -3600
# Branch stammdatengrids
# Node ID 3c770fc7cf1940003293240dd6a322605943549d
# Parent fb99332bb48e799a6ddf08588d89cd937deba5de
Added a variable which makes it possible to detect if a grid is dynamic
diff -r fb99332bb48e -r 3c770fc7cf19 app.js
--- a/app.js Wed Dec 02 17:39:04 2015 +0100
+++ b/app.js Wed Dec 02 17:53:20 2015 +0100
@@ -63,7 +63,7 @@
Lada.userroles = '';
Lada.logintime = '';
Lada.mst = [];
- Lada.clientVersion = '2.1.2';
+ Lada.clientVersion = '2.2-STAMMDATEN';
Lada.serverVersion = '';
var queryString = document.location.href.split('?')[1];
diff -r fb99332bb48e -r 3c770fc7cf19 app/controller/Filter.js
--- a/app/controller/Filter.js Wed Dec 02 17:39:04 2015 +0100
+++ b/app/controller/Filter.js Wed Dec 02 17:53:20 2015 +0100
@@ -292,12 +292,19 @@
if (!store) {
store = Ext.create(sname);
}
- console.log(store);
if (store) {
store.addListener('beforeload', this.loadingAnimationOn, resultGrid);
store.addListener('load', this.loadingAnimationOff, resultGrid);
+
resultGrid.setStore(store);
- resultGrid.setupColumns(this.displayFields);
+ //TODO: Check if this is still necessary, as a Grid exists
+ // for each Type.
+
+ if (resultGrid.isDynamic) {
+ //only the dynamic resultgrid can and needs to do the following:
+ resultGrid.setupColumns(this.displayFields);
+ }
+
resultGrid.getStore().proxy.extraParams = searchParams;
resultGrid.getStore().load();
resultGrid.show();
diff -r fb99332bb48e -r 3c770fc7cf19 app/view/widget/DynamicGrid.js
--- a/app/view/widget/DynamicGrid.js Wed Dec 02 17:39:04 2015 +0100
+++ b/app/view/widget/DynamicGrid.js Wed Dec 02 17:53:20 2015 +0100
@@ -15,6 +15,9 @@
store: null,
multiSelect: true,
+ allowDeselect: true,
+
+ isDynamic: true,
viewConfig: {
deferEmptyText: false
More information about the Lada-commits
mailing list