[open-ils-commits] [GIT] Evergreen ILS branch master updated. 8a1ea82f1cc9d72a053e01d1a800155399f95f73
Evergreen Git
git at git.evergreen-ils.org
Fri May 24 14:44:19 EDT 2019
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, master has been updated
via 8a1ea82f1cc9d72a053e01d1a800155399f95f73 (commit)
via 3ec417c4fe0f95694b1c4e4158128b7a452d0158 (commit)
via cd31046e2412348a5ea8992c4f5474be13ac3433 (commit)
from f82b25f495f12dcc3b181252b38d2746bf2a2749 (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 8a1ea82f1cc9d72a053e01d1a800155399f95f73
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date: Thu May 23 10:32:44 2019 -0400
LP#1642337: more tweaks to the patch series
This patch makes the following changes:
- ensures that the Boolean values get saved as 't' or 'f', as
the reporter builder doesn't recognize JSON true or false in
this context.
- pretty-prints the current filter value in the dialog
- removes a logging line
To test
-------
[1] Apply the patch.
[2] Create or clone one or more report templates and add Boolean
column filters. Change the filter value and verify that
it displays the current value and lets you change it.
[3] Run reports from the template(s) created in step 2 and
verify that the reports produce the expected results.
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Signed-off-by: Dawn Dale <ddale at georgialibraries.org>
diff --git a/Open-ILS/web/js/ui/default/staff/reporter/template/app.js b/Open-ILS/web/js/ui/default/staff/reporter/template/app.js
index 25ee4ccfc2..0fa3d29a99 100644
--- a/Open-ILS/web/js/ui/default/staff/reporter/template/app.js
+++ b/Open-ILS/web/js/ui/default/staff/reporter/template/app.js
@@ -497,14 +497,17 @@ function($scope , $q , $routeParams , $location , $timeout , $window, egCore ,
$scope.changeFilterValue = function (items) {
items.forEach(function(item) {
var l = null;
- console.log(item);
if (item.datatype == "bool") {
- egConfirmDialog.open(egCore.strings.TEMPLATE_CONF_DEFAULT, (typeof item.value === "undefined" ? egCore.strings.TEMPLATE_CONF_UNSET : item.value.toString()),
+ var displayVal = typeof item.value === "undefined" ? egCore.strings.TEMPLATE_CONF_UNSET :
+ item.value === 't' ? egCore.strings.TEMPLATE_CONF_TRUE :
+ item.value === 'f' ? egCore.strings.TEMPLATE_CONF_FALSE :
+ item.value.toString();
+ egConfirmDialog.open(egCore.strings.TEMPLATE_CONF_DEFAULT, displayVal,
{ok : function() {
- egReportTemplateSvc.filter_fields[item.index].value = true;
+ egReportTemplateSvc.filter_fields[item.index].value = 't';
},
cancel : function() {
- egReportTemplateSvc.filter_fields[item.index].value = false;
+ egReportTemplateSvc.filter_fields[item.index].value = 'f';
}}, egCore.strings.TEMPLATE_CONF_TRUE, egCore.strings.TEMPLATE_CONF_FALSE
);
} else {
commit 3ec417c4fe0f95694b1c4e4158128b7a452d0158
Author: Jason Boyer <jboyer at library.in.gov>
Date: Tue Jan 29 12:15:25 2019 -0500
LP1642337: Reporter Boolean Filters
The dialog controller doesn't appreciate getting
a bare boolean as a message, so if the current item
is a boolean call toString() on it before calling
the egConfirmDialog.
An <Unset> string is also added to the reporter
strings for further use, but if there are no
strong feelings re: using it, it can be dumped and
a '' used in its place.
Signed-off-by: Jason Boyer <jboyer at library.in.gov>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Signed-off-by: Dawn Dale <ddale at georgialibraries.org>
diff --git a/Open-ILS/src/templates/staff/reporter/share/report_strings.tt2 b/Open-ILS/src/templates/staff/reporter/share/report_strings.tt2
index a6d50cb16f..cc49019002 100644
--- a/Open-ILS/src/templates/staff/reporter/share/report_strings.tt2
+++ b/Open-ILS/src/templates/staff/reporter/share/report_strings.tt2
@@ -139,6 +139,7 @@ s.TEMPLATE_CONF_BETWEEN = '[% l( "Field value is between (comma separated):") %]
s.TEMPLATE_CONF_NOT_IN = '[% l( "Field does not match one of list (comma separated):") %]';
s.TEMPLATE_CONF_IN = '[% l( "Field matches one of list (comma separated):") %]';
s.TEMPLATE_CONF_DEFAULT = '[% l( "Value:") %]';
+s.TEMPLATE_CONF_UNSET = '<[% l( "Unset") %]>';
s.TEMPLATE_CONF_CONFIRM_SAVE = '[% l( "Save Template?") %]';
s.TEMPLATE_CONF_SUCCESS_SAVE = '[% l( "Template was successfully saved.") %]';
s.TEMPLATE_CONF_FAIL_SAVE = '[% l( "Template save failed.") %]';
diff --git a/Open-ILS/web/js/ui/default/staff/reporter/template/app.js b/Open-ILS/web/js/ui/default/staff/reporter/template/app.js
index 4aeef637f8..25ee4ccfc2 100644
--- a/Open-ILS/web/js/ui/default/staff/reporter/template/app.js
+++ b/Open-ILS/web/js/ui/default/staff/reporter/template/app.js
@@ -499,7 +499,7 @@ function($scope , $q , $routeParams , $location , $timeout , $window, egCore ,
var l = null;
console.log(item);
if (item.datatype == "bool") {
- egConfirmDialog.open(egCore.strings.TEMPLATE_CONF_DEFAULT, item.value || '',
+ egConfirmDialog.open(egCore.strings.TEMPLATE_CONF_DEFAULT, (typeof item.value === "undefined" ? egCore.strings.TEMPLATE_CONF_UNSET : item.value.toString()),
{ok : function() {
egReportTemplateSvc.filter_fields[item.index].value = true;
},
commit cd31046e2412348a5ea8992c4f5474be13ac3433
Author: Kyle Huckins <khuckins at catalyte.io>
Date: Thu Nov 16 20:56:51 2017 +0000
lp1642337 Boolean Filters in Reporter
- Add condition check to see if filter is boolean, and if so,
substitute a confirm dialog for the default prompt, repalcing
the text input with buttons for True/False values.
Signed-off-by: Kyle Huckins <khuckins at catalyte.io>
Signed-off-by: Jason Boyer <jboyer at library.in.gov>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Signed-off-by: Dawn Dale <ddale at georgialibraries.org>
diff --git a/Open-ILS/web/js/ui/default/staff/reporter/template/app.js b/Open-ILS/web/js/ui/default/staff/reporter/template/app.js
index c79a54bf37..4aeef637f8 100644
--- a/Open-ILS/web/js/ui/default/staff/reporter/template/app.js
+++ b/Open-ILS/web/js/ui/default/staff/reporter/template/app.js
@@ -497,11 +497,23 @@ function($scope , $q , $routeParams , $location , $timeout , $window, egCore ,
$scope.changeFilterValue = function (items) {
items.forEach(function(item) {
var l = null;
- egPromptDialog.open(egCore.strings.TEMPLATE_CONF_DEFAULT, item.value || '',
- {ok : function(value) {
- if (value) egReportTemplateSvc.filter_fields[item.index].value = value;
- }}
- );
+ console.log(item);
+ if (item.datatype == "bool") {
+ egConfirmDialog.open(egCore.strings.TEMPLATE_CONF_DEFAULT, item.value || '',
+ {ok : function() {
+ egReportTemplateSvc.filter_fields[item.index].value = true;
+ },
+ cancel : function() {
+ egReportTemplateSvc.filter_fields[item.index].value = false;
+ }}, egCore.strings.TEMPLATE_CONF_TRUE, egCore.strings.TEMPLATE_CONF_FALSE
+ );
+ } else {
+ egPromptDialog.open(egCore.strings.TEMPLATE_CONF_DEFAULT, item.value || '',
+ {ok : function(value) {
+ if (value) egReportTemplateSvc.filter_fields[item.index].value = value;
+ }}
+ );
+ }
});
fgrid.refresh();
}
-----------------------------------------------------------------------
Summary of changes:
.../staff/reporter/share/report_strings.tt2 | 1 +
.../js/ui/default/staff/reporter/template/app.js | 25 +++++++++++++++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list