[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. df268ea7d48b210eb564ff33ba0c7ba0f4f05b6f
Evergreen Git
git at git.evergreen-ils.org
Wed Aug 22 12:58:40 EDT 2018
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_3_1 has been updated
via df268ea7d48b210eb564ff33ba0c7ba0f4f05b6f (commit)
from e112c316136a6068effa549b6aaff4e1113b2796 (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 df268ea7d48b210eb564ff33ba0c7ba0f4f05b6f
Author: a. bellenir <ab at grpl.org>
Date: Wed Aug 22 11:33:55 2018 -0400
LP#1788417: boolean fields should say 'Yes'/'No' instead of true/false
boolean fields on egGrid use tt2-translated strings for "Yes" and "No"
instead of letting the browser translate the values 'true' and 'false'
(in accordance with the prophecy of XUL)
Signed-off-by: a. bellenir <ab at grpl.org>
Signed-off-by: Jason Stephenson <jason at sigio.com>
Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
diff --git a/Open-ILS/src/templates/staff/base_js.tt2 b/Open-ILS/src/templates/staff/base_js.tt2
index e68d12e..b7b22f3 100644
--- a/Open-ILS/src/templates/staff/base_js.tt2
+++ b/Open-ILS/src/templates/staff/base_js.tt2
@@ -153,6 +153,8 @@ UpUp.start({
s.CONFIRM_IN_HOUSE_NUM_USES_COUNT_TITLE = "[% l('Are you sure you want to record {{num_uses}} uses for this?') %]";
s.PAGE_TITLE_DEFAULT = "[% l('Evergreen Staff Client') %]";
s.PAGE_TITLE_DYNAMIC_AND_CONTEXT = "[% l('[_1] - [_2]', '{{dynamic}}', '{{context}}') %]";
+ s.YES = "[% l('Yes') %]";
+ s.NO = "[% l('No') %]";
}]);
</script>
diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js
index 47e8b27..3238663 100644
--- a/Open-ILS/web/js/ui/default/staff/services/grid.js
+++ b/Open-ILS/web/js/ui/default/staff/services/grid.js
@@ -2140,11 +2140,10 @@ angular.module('egGridMod',
/**
* Translates bare IDL object values into display values.
* 1. Passes dates through the angular date filter
- * 2. Translates bools to Booleans so the browser can display translated
- * value. (Though we could manually translate instead..)
+ * 2. Converts bools to translated Yes/No strings
* Others likely to follow...
*/
-.filter('egGridValueFilter', ['$filter','egCore', function($filter,egCore) {
+.filter('egGridValueFilter', ['$filter','egCore', 'egStrings', function($filter,egCore,egStrings) {
function traversePath(obj,path) {
var list = path.split('.');
for (var part in path) {
@@ -2162,11 +2161,11 @@ angular.module('egGridMod',
case 't' :
case '1' : // legacy
case true:
- return ''+true;
+ return egStrings.YES;
case 'f' :
case '0' : // legacy
case false:
- return ''+false;
+ return egStrings.NO;
// value may be null, '', etc.
default : return '';
}
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/templates/staff/base_js.tt2 | 2 ++
Open-ILS/web/js/ui/default/staff/services/grid.js | 9 ++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list