details: https://code.openbravo.com/erp/devel/pi/rev/9708bd1d96eb
changeset: 20497:9708bd1d96eb
user: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date: Thu May 30 15:37:49 2013 +0530
summary: Fixes Issue 23925: Filter does not work properly when using ^
After forming criteria from current filter, the operator symbols were removed
and only the value is retained.
Added the appropriate operator symbol, based on the operator.
Ignored contains case alone as normal values will be replaced with ~value.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
| 15 +++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diffs (28 lines):
diff -r ff813ef90a4e -r 9708bd1d96eb
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
Thu May 30 09:30:09 2013 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
Thu May 30 15:37:49 2013 +0530
@@ -269,10 +269,23 @@
setCriterion: function (criterion) {
var i, value, values = [],
+ operator, operators, valueSet = false,
criteria = criterion ? criterion.criteria : null;
if (criteria && criteria.length && criterion.operator === 'or') {
for (i = 0; i < criteria.length; i++) {
- values.push(criteria[i].value);
+ operators = isc.DataSource.getSearchOperators();
+ if (criteria[i].operator !== "iContains" && criteria[i].operator !==
"contains") {
+ for (operator in operators) {
+ if (operators[operator].ID === criteria[i].operator &&
operators[operator].symbol && criteria[i].value &&
criteria[i].value.indexOf(operators[operator].symbol) === -1) {
+ values.push(operators[operator].symbol + criteria[i].value);
+ valueSet = true;
+ }
+ }
+ }
+ if (valueSet == false) {
+ values.push(criteria[i].value);
+ }
+ valueSet = false;
}
this.setValue(values);
} else {
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits