[open-ils-commits] [GIT] Evergreen ILS branch master updated. a2e9d7a1148109ecba504422be996aebfef879b7

Evergreen Git git at git.evergreen-ils.org
Fri Jan 27 17:09:15 EST 2017


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  a2e9d7a1148109ecba504422be996aebfef879b7 (commit)
      from  029deb6ce6cd2ac4a2858edf786d364909687fc0 (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 a2e9d7a1148109ecba504422be996aebfef879b7
Author: Bill Erickson <berickxx at gmail.com>
Date:   Tue Jan 10 12:19:35 2017 -0500

    LP#1655399 webstaff: User perm editor grantable fix
    
    Correctly handle the boolean grantable flag in the user permission
    editor.  In some cases, the boolean 0/1 values returned from storage are
    returned as strings.  Cast them to numbers before checking truthiness.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/xul/staff_client/server/patron/user_edit_xhtml.js b/Open-ILS/xul/staff_client/server/patron/user_edit_xhtml.js
index 3b78ad5..9a336bd 100644
--- a/Open-ILS/xul/staff_client/server/patron/user_edit_xhtml.js
+++ b/Open-ILS/xul/staff_client/server/patron/user_edit_xhtml.js
@@ -360,7 +360,7 @@ function display_perm (root,perm_def,staff_perms, r) {
 
 
     var dis = false;
-    if ((up && up.id() < 0) || !sp || !sp.grantable()) dis = true; 
+    if ((up && up.id() < 0) || !sp || !Number(sp.grantable())) dis = true; 
     if (all) dis = false; 
 
     var label_cell = findNodeByName(prow,'plabel');
@@ -391,7 +391,9 @@ function display_perm (root,perm_def,staff_perms, r) {
     
     var grant_cell = findNodeByName(prow,'pgrant');
     findNodeByName(grant_cell,'p.grantable').disabled = dis;
-    findNodeByName(grant_cell,'p.grantable').checked = up ? (up.grantable() ? true : false) : false;
+    findNodeByName(grant_cell,'p.grantable').checked = 
+        up ? (Number(up.grantable()) ? true : false) : false;
+
     if (r % 2) grant_cell.className += ' odd';
 
 }

-----------------------------------------------------------------------

Summary of changes:
 .../staff_client/server/patron/user_edit_xhtml.js  |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list