Trying to update patron CSS color fails here, so don't try
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 26 Jul 2012 20:45:24 +0000 (16:45 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 15 Aug 2012 18:25:53 +0000 (14:25 -0400)
After modifying user standing penalties ("messages" in the staff client
patron interface), you could get this error message in an alert() dialog:
    TypeError: patron.display is undefined.

We were apparently trying to use patron.util.set_patron_css() wrongly,
so the commented out changed verison of the call got farther, but stopped at
    ...penalties[i].standing_penalty().name is not a function.

Which probably has something to do with unfleshed data.  Somebody can
get to the bottom of this if they want, but for now it's easier just not
to try to do this and make the alert() dialog go away.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>

Open-ILS/xul/staff_client/server/patron/standing_penalties.js

index ce62e22..d36edf4 100644 (file)
@@ -226,7 +226,7 @@ function handle_remove_penalty(ev) {
                 */
                 document.getElementById('progress').hidden = true;
 
-                patron.util.set_penalty_css(xulG.patron, patron.display.w.document.documentElement);
+                //patron.util.set_penalty_css(xulG.patron);
             }
         );
         document.getElementById('progress').hidden = false;
@@ -311,7 +311,7 @@ function handle_edit_penalty(ev) {
                                     row_params.row.my.csp = p.standing_penalty();
                                     list.refresh_row( row_params );
 
-                                    patron.util.set_penalty_css(xulG.patron, patron.display.w.document.documentElement);
+                                    //patron.util.set_penalty_css(xulG.patron);
                                     document.getElementById('progress').hidden = true;
                                 } catch(E) {
                                     alert(E);
@@ -375,7 +375,7 @@ function handle_archive_penalty(ev) {
                             if (--outstanding_requests==0) {
                                 document.getElementById('progress').hidden = true;
 
-                                patron.util.set_penalty_css(xulG.patron, patron.display.w.document.documentElement);
+                                //patron.util.set_penalty_css(xulG.patron);
                             }
                         }
                     }(ids[i])