[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. a6f9b1f51c10d03d4063a808260ee8c996d8bf96

Evergreen Git git at git.evergreen-ils.org
Fri Jun 10 11:50:31 EDT 2011


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_0 has been updated
       via  a6f9b1f51c10d03d4063a808260ee8c996d8bf96 (commit)
      from  ec80ae0f14d4454fbc39c7724e7e0b61dccce7fa (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 a6f9b1f51c10d03d4063a808260ee8c996d8bf96
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Fri Jun 10 09:22:56 2011 -0400

    Mark invalid home ous as such in patron editor
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js
index 3d4125b..3832c97 100644
--- a/Open-ILS/web/js/ui/default/actor/user/register.js
+++ b/Open-ILS/web/js/ui/default/actor/user/register.js
@@ -45,6 +45,7 @@ var stageUser;
 var optInSettings;
 var allCardsTemplate;
 var uEditCloneCopyAddr; // if true, copy addrs on clone instead of link
+var homeOuTypes = {};
 
 var dupeUsrname = false;
 var dupeBarcode = false;
@@ -118,6 +119,12 @@ function load() {
         fieldDoc[doc.fm_class()][doc.field()] = doc;
     }
 
+    list = pcrud.search('aout', {can_have_users: 'true'});
+    for(var i in list) {
+        var type = list[i];
+        homeOuTypes[type.id()] = true;
+    }
+
     tbody = dojo.byId('uedit-tbody');
 
     addrTemplateRows = dojo.query('tr[type=addr-template]', tbody);
@@ -919,6 +926,15 @@ function attachWidgetEvents(fmcls, fmfield, widget) {
                 return;
 
             case 'home_ou':
+                widget.widget.isValid = function() {
+                    if(this.item) {
+                        if(homeOuTypes[this.store.getValue(this.item, 'ou_type')]) {
+                            return true;
+                        }
+                        return false;
+                    }
+                    return true;
+                };
                 dojo.connect(widget.widget, 'onChange',
                     function(newVal) { 
                         checkClaimsReturnCountPerm(); 

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

Summary of changes:
 Open-ILS/web/js/ui/default/actor/user/register.js |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list