[open-ils-commits] [GIT] Evergreen ILS branch rel_2_4 updated. fc23b4ec5c6846b0b31a25c0f708d9409d22bcb0
Evergreen Git
git at git.evergreen-ils.org
Thu Sep 12 18:13:23 EDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_4 has been updated
via fc23b4ec5c6846b0b31a25c0f708d9409d22bcb0 (commit)
from 199f25958dcccb992e3b62ed9fc605c792396414 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fc23b4ec5c6846b0b31a25c0f708d9409d22bcb0
Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
Date: Thu Aug 29 17:36:37 2013 +0300
Fix PCrudFilterPane generating illegal queries when using the "not like" and "not between" operators.
Make the window remember the user-input value even when changing the operator.
[LFW: whitespace fixes - the original commit had real tabs, which we avoid
in some files, including .js ones.]
Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
diff --git a/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js b/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js
index 4c6af87..0a66d37 100644
--- a/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js
+++ b/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js
@@ -165,9 +165,9 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) {
var ops = openils.Util.objectProperties(clause);
var op = ops.pop();
- var matches = op.match(/^not [lb].+$/); /* "not in" needs no change */
+ var matches = op.match(/^(not) ([lb].+)$/); /* "not in" needs no change */
if (matches) {
- clause[matches[1]] = clause[op];
+ clause[matches[2]] = clause[op];
delete clause[op];
return true;
}
@@ -531,15 +531,20 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) {
};
this._clear_value_slot = function() {
+ var old_widget_values = [];
if (this.value_widgets) {
this.value_widgets.forEach(
function(autowidg) {
- if (autowidg.widget)
+ if (autowidg.widget) {
+ old_widget_values.push({'value' : autowidg.widget.attr("value"),
+ 'type' : autowidg.widget.attr("type") });
autowidg.widget.destroy();
+ }
}
);
delete this.value_widgets;
}
+ this.old_widget_values = old_widget_values;
dojo.empty(this.value_slot);
};
@@ -575,8 +580,14 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) {
this.value_widgets.push(
this._build_one_value_widget(constr)
);
+ if (typeof this.old_widget_values != "undefined" &&
+ typeof this.old_widget_values[i] != "undefined" &&
+ this.value_widgets[i].widget.attr("type") == this.old_widget_values[i].type) {
+ this.value_widgets[i].widget.attr("value", this.old_widget_values[i].value);
+ }
}
}
+ delete this.old_widget_values;
};
this._build_set_value_widgets = function(constr) {
-----------------------------------------------------------------------
Summary of changes:
.../web/js/dojo/openils/widget/PCrudFilterPane.js | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list