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

Evergreen Git git at git.evergreen-ils.org
Fri Mar 9 12:55:40 EST 2012


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  f99e8feb43bf0df1f100016aa01f57fcbabd0bed (commit)
      from  aedcb627d299949274743a8dfb7669c8030ff345 (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 f99e8feb43bf0df1f100016aa01f57fcbabd0bed
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Feb 22 12:48:55 2012 -0500

    Fix OU Editor save bug
    
    The OU Editor has been flashing red and pretending that id didn't
    save your changes for ... quite some time.  This fixes that, which
    was caused by a change in the way the openils.PermaCrud dojo module
    passed results to the user-supplied oncomplete handler.
    
    Also, some unrelated whitespace changes.  Sorry, Dan.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/conify/global/actor/org_unit.html b/Open-ILS/web/conify/global/actor/org_unit.html
index e839bdd..6235e7f 100644
--- a/Open-ILS/web/conify/global/actor/org_unit.html
+++ b/Open-ILS/web/conify/global/actor/org_unit.html
@@ -353,29 +353,34 @@
 										var modified_ou = new aou().fromStoreItem( current_ou );
 										modified_ou.isdeleted( 1 );
 
-                                        var objs = [];
-                                        objs.push(modified_ou);
+										var objs = [];
+										objs.push(modified_ou);
 										if (!current_billing_address.isnew()) {
-                                            current_billing_address.isdeleted( 1 );
-                                            objs.push(current_billing_address);
-                                        }
+											current_billing_address.isdeleted( 1 );
+											objs.push(current_billing_address);
+										}
+
 										if (!current_mailing_address.isnew()) {
-                                            current_mailing_address.isdeleted( 1 );
-                                            objs.push(current_mailing_address);
-                                        }
+											current_mailing_address.isdeleted( 1 );
+											objs.push(current_mailing_address);
+										}
+
 										if (!current_holds_address.isnew()) {
-                                            current_holds_address.isdeleted( 1 );
-                                            objs.push(current_holds_address);
-                                        }
+											current_holds_address.isdeleted( 1 );
+											objs.push(current_holds_address);
+										}
+
 										if (!current_ill_address.isnew()) {
-                                            current_ill_address.isdeleted( 1 );
-                                            objs.push(current_ill_address);
-                                        }
-                                        if (!current_ou_hoo.isnew()) {
-                                            current_ou_hoo.isdeleted( 1 );
-                                            objs.push(current_ou_hoo);
-                                        }
-                                        pcrud.apply(objs, {
+											current_ill_address.isdeleted( 1 );
+											objs.push(current_ill_address);
+										}
+
+										if (!current_ou_hoo.isnew()) {
+											current_ou_hoo.isdeleted( 1 );
+											objs.push(current_ou_hoo);
+										}
+
+										pcrud.apply(objs, {
 											timeout : 10,
 											onerror : function (r) {
 												highlighter.editor_pane.red.play();
@@ -400,11 +405,11 @@
 													scope : ou_list_store
 												});
 
-                                                current_billing_address = null;
-                                                current_mailing_address = null;
-                                                current_holds_address = null;
-                                                current_ill_address = null;
-                                                current_ou_hoo = null;
+												current_billing_address = null;
+												current_mailing_address = null;
+												current_holds_address = null;
+												current_ill_address = null;
+												current_ou_hoo = null;
 												current_ou = null;
 
 												highlighter.editor_pane.green.play();
@@ -439,11 +444,11 @@
 										highlighter.editor_pane.red.play();
 										status_update( aou_strings.ERROR_CREATING_CHILD_AOU );
 									},
-									oncomplete : function (r) {
-										var res = r.recv();
-										if ( res && res.content() ) {
+									oncomplete : function (r, list) {
+										
+										if ( list.length ) {
 											ou_list_store.newItem(
-												res.content().toHash(),
+												list[0].toHash(),
 												{ parent : current_ou, attribute : 'children' }
 											);
 										} else {
@@ -595,11 +600,9 @@
                                                 highlighter.addresses_pane.red.play();
                                                 status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_PHYSICAL, [ou_list_store.getValue( current_ou, 'name' )] ) );
                                             },
-                                            oncomplete : function (r) {
-                                                var res = r.recv();
-                                                if (res && res.content()
-                                                    && (current_billing_address.isnew() == 1)) {
-                                                    current_billing_address = res.content();
+                                            oncomplete : function (r, list) {
+                                                if (list[0] && (current_billing_address.isnew() == 1)) {
+                                                    current_billing_address = list[0];
 
                                                     ou_list_store.setValue( current_ou, "billing_address", current_billing_address.id());
                                                     save_org();
@@ -665,11 +668,9 @@
                                                 highlighter.addresses_pane.red.play();
                                                 status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_HOLDS, [ou_list_store.getValue( current_ou, 'name' )] ) );
                                             },
-                                            oncomplete : function (r) {
-                                                var res = r.recv();
-                                                if (res && res.content()
-                                                    && (current_holds_address.isnew() == 1)) {
-                                                    current_holds_address = res.content();
+                                            oncomplete : function (r, list) {
+                                                if (list[0] && (current_holds_address.isnew() == 1)) {
+                                                    current_holds_address = list[0];
 
                                                     ou_list_store.setValue( current_ou, "holds_address", current_holds_address.id());
                                                     save_org();
@@ -734,11 +735,9 @@
                                                 highlighter.addresses_pane.red.play();
                                                 status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_MAILING, [ou_list_store.getValue( current_ou, 'name' )] ) );
                                             },
-                                            oncomplete : function (r) {
-                                                var res = r.recv();
-                                                if (res && res.content()
-                                                    && (current_mailing_address.isnew() == 1)) {
-                                                    current_mailing_address = res.content();
+                                            oncomplete : function (r, list) {
+                                                if (list[0] && (current_mailing_address.isnew() == 1)) {
+                                                    current_mailing_address = list[0];
 
                                                     ou_list_store.setValue( current_ou, "mailing_address", current_mailing_address.id());
                                                     save_org();
@@ -803,11 +802,9 @@
                                                 highlighter.addresses_pane.red.play();
                                                 status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_ILL, [ou_list_store.getValue( current_ou, 'name' )] ) );
                                             },
-                                            oncomplete : function (r) {
-                                                var res = r.recv();
-                                                if (res && res.content()
-                                                    && (current_ill_address.isnew() == 1)) {
-                                                    current_ill_address = res.content();
+                                            oncomplete : function (r, list) {
+                                                if (list[0] && (current_ill_address.isnew() == 1)) {
+                                                    current_ill_address = list[0];
 
                                                     ou_list_store.setValue( current_ou, "ill_address", current_ill_address.id());
                                                     save_org();
diff --git a/Open-ILS/web/conify/global/actor/org_unit.js b/Open-ILS/web/conify/global/actor/org_unit.js
index 066dedd..41cc5e8 100644
--- a/Open-ILS/web/conify/global/actor/org_unit.js
+++ b/Open-ILS/web/conify/global/actor/org_unit.js
@@ -71,9 +71,8 @@ function save_org () {
             highlighter.editor_pane.red.play();
             status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_DATA, [ou_list_store.getValue( current_ou, 'name' )] ) );
         },
-        oncomplete : function (r) {
-            var res = r.recv();
-            if ( res && res.content() ) {
+        oncomplete : function (r, list) {
+            if ( list[0] ) {
                 ou_list_store.setValue( current_ou, 'ischanged', 0 );
                 highlighter.editor_pane.green.play();
                 status_update( dojo.string.substitute( aou_strings.SUCCESS_SAVE, [ou_list_store.getValue( current_ou, 'name' )] ) );

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

Summary of changes:
 Open-ILS/web/conify/global/actor/org_unit.html |   93 ++++++++++++------------
 Open-ILS/web/conify/global/actor/org_unit.js   |    5 +-
 2 files changed, 47 insertions(+), 51 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list