[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. 82a6258e304ca7f987cd9e7451e20501dd3bad90

Evergreen Git git at git.evergreen-ils.org
Mon May 7 16:05:26 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_0 has been updated
       via  82a6258e304ca7f987cd9e7451e20501dd3bad90 (commit)
       via  4f91bb2ddab83ffc4777a894370770d49136589f (commit)
      from  c924ea4250046fb74e360c454961cab6f9f18f6c (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 82a6258e304ca7f987cd9e7451e20501dd3bad90
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 73eafbc..2a3bd31 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 4f91bb2ddab83ffc4777a894370770d49136589f
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