[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 0559e324b511ec570feefbc03619eb1b7d121de3

Evergreen Git git at git.evergreen-ils.org
Mon Jun 6 12:11:40 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_1 has been updated
       via  0559e324b511ec570feefbc03619eb1b7d121de3 (commit)
       via  d6ce27b3c5ec2c953dd2d8d7c043076719c18563 (commit)
       via  5af6401f5f4f2fbffdb77c5abb7c04e8f361600c (commit)
      from  3b4a844b1c00936a37a8b1cfc0fe96a2463eaa31 (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 0559e324b511ec570feefbc03619eb1b7d121de3
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Wed Jun 1 03:21:06 2011 -0400

    for the Circulate as Type column in xul lists, display the actual citm value instead of the code
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
index e3effb5..bfb015c 100644
--- a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
+++ b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
@@ -178,7 +178,13 @@ function load_item() {
                     set("call_number", acn_obj.label());
                 });
             }
-            set("circ_as_type", details.copy.circ_as_type()); 
+            set("circ_as_type", details.copy.circ_as_type() != null && details.copy.circ_as_type() == 'object'
+                ? details.copy.circ_as_type()
+                : ( typeof data.hash.citm[ details.copy.circ_as_type() ] != 'undefined'
+                    ? data.hash.citm[ details.copy.circ_as_type() ].value
+                    : ''
+                )
+            ); 
             set("copy_circ_lib" , typeof details.copy.circ_lib() == 'object' ? details.copy.circ_lib().shortname() : data.hash.aou[ details.copy.circ_lib() ].shortname()); 
             set_tooltip("copy_circ_lib" , typeof details.copy.circ_lib() == 'object' ? details.copy.circ_lib().name() : data.hash.aou[ details.copy.circ_lib() ].name()); 
             var cm = details.copy.circ_modifier();
diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js
index 979bc5e..2d2a562 100644
--- a/Open-ILS/xul/staff_client/server/circ/util.js
+++ b/Open-ILS/xul/staff_client/server/circ/util.js
@@ -1074,7 +1074,14 @@ circ.util.columns = function(modify,params) {
             'flex' : 1,
             'primary' : false,
             'hidden' : true,
-            'editable' : false, 'render' : function(my) { return my.acp.circ_as_type(); }
+            'editable' : false, 'render' : function(my) {
+                return my.acp.circ_as_type() != null && my.acp.circ_as_type() == 'object'
+                    ? my.acp.circ_as_type()
+                    : ( typeof data.hash.citm[ my.acp.circ_as_type() ] != 'undefined'
+                        ? data.hash.citm[ my.acp.circ_as_type() ].value
+                        : ''
+                    );
+            }
         },
         {
             'persist' : 'hidden width ordinal',

commit d6ce27b3c5ec2c953dd2d8d7c043076719c18563
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Wed Jun 1 03:17:17 2011 -0400

    Fix Circulate as Type in the item editor.
    
    The citm retrieval method was changed to use open-ils.fielder, which
    doesn't return actual fieldmapper objects, so when data.js went to
    convert the retrieved list to a hash, it broke.
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
index 17a1ac9..6b4894d 100644
--- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
+++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
@@ -500,7 +500,8 @@ OpenILS.data.prototype = {
                         if (obj.list[classname].constructor.name == 'Array') {
                             obj.hash[classname] = 
                                 util.functional.convert_object_list_to_hash(
-                                    obj.list[classname]
+                                    obj.list[classname],
+                                    classname == 'citm' ? 'code' : null
                                 );
                         }
                     } catch(E) {

commit 5af6401f5f4f2fbffdb77c5abb7c04e8f361600c
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Wed Jun 1 03:16:05 2011 -0400

    Allow util.functional.convert_object_list_to_hash to handle more than fieldmapper-like objects
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/chrome/content/util/functional.js b/Open-ILS/xul/staff_client/chrome/content/util/functional.js
index 776a7f4..0dc9eb1 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/functional.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/functional.js
@@ -89,11 +89,17 @@ util.functional.map_object_to_list = function(obj,f) {
     return new_list;
 }
 
-util.functional.convert_object_list_to_hash = function(list) {
+util.functional.convert_object_list_to_hash = function(list,key_field) {
     var my_hash = new Object();
     if (list) {
         for (var i = 0; i < list.length; i++) {
-            if (typeof list[i].id == 'function') {
+            if (key_field && typeof list[i][key_field] != 'undefined') {
+                if (typeof list[i][key_field] == 'function') {
+                    my_hash[ list[i][key_field]() ] = list[i];
+                } else {
+                    my_hash[ list[i][key_field] ] = list[i];
+                }
+            } else if (typeof list[i].id == 'function') {
                 my_hash[ list[i].id() ] = list[i];
             } else if (typeof list[i].code == 'function') {
                 my_hash[ list[i].code() ] = list[i];

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

Summary of changes:
 .../staff_client/chrome/content/OpenILS/data.js    |    3 ++-
 .../staff_client/chrome/content/util/functional.js |   10 ++++++++--
 .../server/circ/alternate_copy_summary.js          |    8 +++++++-
 Open-ILS/xul/staff_client/server/circ/util.js      |    9 ++++++++-
 4 files changed, 25 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list