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

Evergreen Git git at git.evergreen-ils.org
Mon Jun 6 12:09:02 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, master has been updated
       via  ea27fde5470d45bdbd73bf4ff8b0af2dfa0d8516 (commit)
       via  78e7d486a662069b06029c6ea7b6e681569f113d (commit)
       via  39ea274d3df9963eb084faf796e0a2d1e14f7e68 (commit)
      from  dfbf4956fc9ad4c19cda234f4468f23788cf862d (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 ea27fde5470d45bdbd73bf4ff8b0af2dfa0d8516
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 062665c..5351da1 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 78e7d486a662069b06029c6ea7b6e681569f113d
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 39ea274d3df9963eb084faf796e0a2d1e14f7e68
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