From: phasefx Date: Thu, 24 Sep 2009 05:59:27 +0000 (+0000) Subject: Remove Standing Penalty summary. This was an incomplete experiment that didn't pan... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4c05ae2b08a09122ab4cfb3e7b974767b1ec0eac;p=contrib%2FConifer.git Remove Standing Penalty summary. This was an incomplete experiment that didn't pan out. There's a desire for the information in the patron summary to be in the same locations all the time (for the layout not to shift dynamically), and variable length data like a list is not conducive to that. The penalties themselves are in the Messages sub-interface, and we need to decide whether to style on or around that button when there are interesting messages to view, or rely on the "stop sign" page that comes up instead of Check Out. git-svn-id: svn://svn.open-ils.org/ILS/trunk@14142 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/patron/summary.js b/Open-ILS/xul/staff_client/server/patron/summary.js index ccfb7c0a4e..d326a44b50 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary.js +++ b/Open-ILS/xul/staff_client/server/patron/summary.js @@ -83,86 +83,6 @@ patron.summary.prototype = { }; } ], - 'patron_standing_penalties' : [ - ['render'], - function(e) { - return function() { - util.widgets.remove_children(e); - var penalties = obj.patron.standing_penalties(); - if (penalties.length == 0) { - var row = document.createElement('row'); - var label = document.createElement('label'); - util.widgets.set_text(label,patronStrings.getString('staff.patron.summary.standing_penalty.none')); - addCSSClass(label,'NO_PENALTY'); - row.appendChild(label); - e.appendChild(row); - } - for (var i = 0; i < penalties.length; i++) { - - var row = document.createElement('row'); - var label = document.createElement('label'); - - //util.widgets.set_text(e,penalties[i].penalty_type()); - util.widgets.set_text(label,penalties[i].standing_penalty().label()); - row.appendChild(label); - - var button = document.createElement('button'); - button.setAttribute('label', patronStrings.getString('staff.patron.summary.standing_penalty.remove')); - button.setAttribute('image','/xul/server/skin/media/images/icon_delete.gif'); - button.setAttribute('disabled','true'); - button.setAttribute('hidden','true'); - button.setAttribute('retrieve_ausp_id',penalties[i].id()); - row.appendChild(button); - - // XXX check a permission here? How to fire the remove action ??? XXX - if (penalties[i].standing_penalty().id() > 100) { - button.setAttribute('disabled','false'); - button.setAttribute('hidden','false'); - button.addEventListener( - 'command', - function(ev) { - try { - JSAN.use('util.functional'); - var id = ev.target.getAttribute('retrieve_ausp_id'); - var penalty = util.functional.find_list( obj.patron.standing_penalties(), function(o) { return o.id() == id; } ); - penalty.isdeleted(1); - - var req = obj.network.simple_request( 'FM_AUSP_REMOVE', [ ses(), penalty ] ); - if (typeof req.ilsevent != 'undefined' || String(req) != '1') { - obj.error.standard_unexpected_error_alert( - patronStrings.getFormattedString( - 'staff.patron.standing_penalty.remove_error', - [obj.data.hash.csp[id].name()] - ), - req - ); - } - if (typeof xulG.refresh == 'function') { xulG.refresh(); } - } catch(F) { - obj.error.standard_unexpected_error_alert( - patronStrings.getFormattedString( - 'staff.patron.standing_penalty.remove_error', - [ev.target.getAttribute('retrieve_ausp_id')] - ), - F - ); - } - }, - false - ); - } - - if (penalties[i].standing_penalty().block_list()) { - if (penalties[i].standing_penalty().block_list().match(/RENEW/)) addCSSClass(label,'PENALTY_RENEW'); - if (penalties[i].standing_penalty().block_list().match(/HOLD/)) addCSSClass(label,'PENALTY_HOLD'); - if (penalties[i].standing_penalty().block_list().match(/CIRC/)) addCSSClass(label,'PENALTY_CIRC'); - } - - e.appendChild(row); - } - }; - } - ], 'patron_credit' : [ ['render'], function(e) { diff --git a/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul b/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul index 69f71e8e17..4895afe7cd 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul @@ -19,15 +19,6 @@ - - - - - - - - -