Skip to content
Snippets Groups Projects
Commit a3974f77 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

ExtJS 4.2: fixed bugs in the directstore.

parent 275ff08a
No related branches found
No related tags found
No related merge requests found
...@@ -56,10 +56,10 @@ Ext.define('App.data.DirectStore', { ...@@ -56,10 +56,10 @@ Ext.define('App.data.DirectStore', {
} }
// copy of the initial where condition // copy of the initial where condition
if (this.extraParams && this.extraParams.where) { if (config.extraParams && config.extraParams.where) {
this.initialWhere = []; this.initialWhere = [];
for (i = 0; i < this.extraParams.where.length; i += 1) { for (i = 0; i < config.extraParams.where.length; i += 1) {
this.initialWhere.push(this.extraParams.where[i]); this.initialWhere.push(config.extraParams.where[i]);
} }
} }
...@@ -112,18 +112,20 @@ Ext.define('App.data.DirectStore', { ...@@ -112,18 +112,20 @@ Ext.define('App.data.DirectStore', {
"use strict"; "use strict";
var i; var conditions = [],
i;
if (this.extraParams.where) { if (this.extraParams.where) {
if (this.initialWhere) { if (this.initialWhere) {
this.extraParams.where = [];
for (i = 0; i < this.initialWhere.length; i += 1) { for (i = 0; i < this.initialWhere.length; i += 1) {
this.extraParams.where.push(this.initialWhere[i]); conditions.push(this.initialWhere[i]);
} }
this.getProxy().setExtraParam('where', conditions);
} else { } else {
delete this.extraParams.where; delete this.getProxy().extraParams.where;
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment