[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 3c631c0c156024a627e44aae77d260d5253659a7

Evergreen Git git at git.evergreen-ils.org
Mon May 7 16:04:33 EDT 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, rel_2_1 has been updated
       via  3c631c0c156024a627e44aae77d260d5253659a7 (commit)
       via  d5f4a15d2a99de85707cf0bd30e2ac09c82af6fb (commit)
      from  3c54cf5d5431ef5d2eefaf045d679944a689fbea (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 3c631c0c156024a627e44aae77d260d5253659a7
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Mon Mar 26 16:17:03 2012 -0400

    Small fix to Holding Code wizard widget
    
    The issuance editor has a wizard widget for the holding code field
    which expected a 'grid' as an argument, but then referenced a global
    'iss_grid' variable.  This hurt reusability of this widget.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/js/ui/default/serial/subscription/issuance.js b/Open-ILS/web/js/ui/default/serial/subscription/issuance.js
index eb4fae4..3f4dfcf 100644
--- a/Open-ILS/web/js/ui/default/serial/subscription/issuance.js
+++ b/Open-ILS/web/js/ui/default/serial/subscription/issuance.js
@@ -21,7 +21,7 @@ function fresh_scap_selector(grid) {
                     selector, "onChange", null, function() {
                         if (this.item) {
                             var widget =
-                                iss_grid.overrideEditWidgets.holding_type;
+                                grid.overrideEditWidgets.holding_type;
                             widget.attr("value", this.item.type);
                             widget.attr("disabled", true);
                         }

commit d5f4a15d2a99de85707cf0bd30e2ac09c82af6fb
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Mon Mar 26 16:07:58 2012 -0400

    Serial Control: Refresh node map on edit
    
    While it would be nice to redraw any affected tree nodes when
    editing, we should at least replace the map data in case it is
    used in other functions.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/server/serial/manage_subs.js b/Open-ILS/xul/staff_client/server/serial/manage_subs.js
index 9ab35da..d0ac4d5 100644
--- a/Open-ILS/xul/staff_client/server/serial/manage_subs.js
+++ b/Open-ILS/xul/staff_client/server/serial/manage_subs.js
@@ -53,16 +53,40 @@ serial.manage_subs.prototype = {
 
             params.do_edit = true;
             params.handle_update = true;
+            params.trigger_refresh = true;
             if (mode == 'add') {
-                params.trigger_refresh = true;
                 params.refresh_command = function () {obj.refresh_list();};
+            } else {
+                params.refresh_command = function () {obj.remap_node(type, this);};
             }
+   
             obj[editor_type].init(params);
         } catch(E) {
             obj.error.standard_unexpected_error_alert('editor_init() error',E);
         }
     },
 
+    // while not a true tree node repace, this should at least prevent
+    // non-display side-effects.  True node replace is TODO
+    'remap_node' : function(type, editor_obj) {
+        var obj = this;
+        try {
+            for (i = 0; i < editor_obj[editor_obj.fm_type_plural].length; i++) {
+                var new_obj = editor_obj[editor_obj.fm_type_plural][i];
+                var old_obj = obj['map_' + type][type + '_' + new_obj.id()];
+                if (type == 'ssub') { // add children back on
+                    new_obj.distributions(old_obj.distributions());
+                    new_obj.issuances(old_obj.issuances());
+                    new_obj.scaps(old_obj.scaps());
+                }
+                obj['map_' + type][type + '_' + new_obj.id()] = new_obj;
+            }
+            editor_obj.render();
+        } catch(E) {
+            obj.error.standard_unexpected_error_alert('remap_node() error',E);
+        }
+    },
+
     'do_delete' : function(type, method, overridable_events) {
         var obj = this;
         try {

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

Summary of changes:
 .../js/ui/default/serial/subscription/issuance.js  |    2 +-
 .../xul/staff_client/server/serial/manage_subs.js  |   26 +++++++++++++++++++-
 2 files changed, 26 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list