shortname vs id in volume wizard
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 7 Sep 2005 14:59:59 +0000 (14:59 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 7 Sep 2005 14:59:59 +0000 (14:59 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1810 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/chrome/content/evergreen/cat/volume.js
Evergreen/staff_client/chrome/content/evergreen/util/error.js

index 7442ff7..2c3decc 100644 (file)
@@ -169,9 +169,9 @@ function build_page_one() {
                switch( ti.getAttribute('object_type') ) {
                        case 'org_unit' :
                                if (params.shortcut == 'volume_add') {
-                                       var shortname = ti.getAttribute('id').split('_')[2];
-                                       var ou = find_ou_by_shortname(mw.G['org_tree'],shortname);
-                                       var check_ou = check_volume_ou_perm( shortname );
+                                       var id = ti.getAttribute('id').split('_')[2];
+                                       var ou = mw.G.org_tree_hash[id];
+                                       var check_ou = check_volume_ou_perm( id );
                                        if ( check_ou ) {
                                                page1_add_volume_row( check_ou );
                                        }
@@ -188,9 +188,9 @@ function build_page_two() {
                mw.sdump('D_CAT','Considering item with object_type = ' + ti.getAttribute('object_type') + '\n');
                switch( ti.getAttribute('object_type') ) {
                        case 'org_unit' :
-                               var shortname = ti.getAttribute('id').split('_')[2];
-                               var ou = find_ou_by_shortname(mw.G['org_tree'],shortname);
-                               var check_ou = check_volume_ou_perm( shortname );
+                               var id = ti.getAttribute('id').split('_')[2];
+                               var ou = mw.G.org_tree_hash[id];
+                               var check_ou = check_volume_ou_perm( id );
                                if ( check_ou ) {
                                        page2_add_volume_row( check_ou, ti );
                                }
@@ -270,7 +270,7 @@ function build_page_four() {
        for (var ou_id in new_data) {
                for (var cnum in new_data[ou_id]) {
                        //var ou_shortname = find_ou(mw.G['org_tree'],ou_id).shortname();
-                       var ou_shortname = mw.G.org_tree_hash[ou_id].shortname();
+                       //var ou_shortname = mw.G.org_tree_hash[ou_id].shortname();
                        var cn = new acn();
                        cn.label(cnum);
                        cn.owning_lib(ou_id);
@@ -345,9 +345,9 @@ function restore_data() {
        data = data_backup;
 }
 
-function check_volume_ou_perm(shortname) {
-       var top_ou = find_ou(mw.G['org_tree'],mw.G.user_ou.id());
-       var check_ou = find_ou_by_shortname(top_ou, shortname);
+function check_volume_ou_perm(id) {
+       var top_ou = mw.G.org_tree_hash[ mw.G.user_ou.id() ];
+       var check_ou = find_ou(top_ou, id);
        return check_ou;
 }
 
index d4b26c4..7d82039 100644 (file)
@@ -9,7 +9,7 @@ var arg_dump_full = false;
 
 var sdump_levels = {
        'D_NONE' : false,
-       'D_ALL' : true,
+       'D_ALL' : false,
        'D_ERROR' : true,
        'D_TRACE' :  false,
        'D_TRACE_ENTER' :  false,
@@ -60,7 +60,7 @@ var sdump_levels = {
        'D_PRINT' : true,
        'D_SES' : true,
        'D_SES_FUNC' : false,
-       'D_SES_RESULT' : false,
+       'D_SES_RESULT' : true,
        'D_SPAWN' : false,
        'D_STRING' : false,
        'D_UTIL' : false,