[open-ils-commits] r14142 - trunk/Open-ILS/xul/staff_client/server/patron (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Sep 24 01:59:31 EDT 2009


Author: phasefx
Date: 2009-09-24 01:59:27 -0400 (Thu, 24 Sep 2009)
New Revision: 14142

Modified:
   trunk/Open-ILS/xul/staff_client/server/patron/summary.js
   trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul
   trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul
Log:
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.



Modified: trunk/Open-ILS/xul/staff_client/server/patron/summary.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/summary.js	2009-09-24 05:23:03 UTC (rev 14141)
+++ trunk/Open-ILS/xul/staff_client/server/patron/summary.js	2009-09-24 05:59:27 UTC (rev 14142)
@@ -83,86 +83,6 @@
 							};
 						}
 					],
-					'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) {

Modified: trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul	2009-09-24 05:23:03 UTC (rev 14141)
+++ trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul	2009-09-24 05:59:27 UTC (rev 14142)
@@ -19,15 +19,6 @@
 		<caption id="psagbc" label="&staff.patron.summary_overlay.psagbc.alert.label;" class="shrinkable_groupbox"/>
 		<description id="patron_alert"/>
 	</groupbox>
-	<groupbox id="PatronSummaryStanding_groupbox" flex="0" class="standing">
-		<caption id="pssgbc" label="&staff.patron.summary_overlay.pssgbc.standing.label;" class="shrinkable_groupbox"/>
-        <vbox id="pssgbvb">
-            <grid><columns><column/><column/></columns>
-                <rows id="patron_standing_penalties"/>
-            </grid>
-        </vbox>
-        <spacer/>
-	</groupbox>
 	<groupbox id="PatronSummaryStatus_groupbox" flex="0" class="status"/>
 	<!--
 	<groupbox id="PatronSummarySurvey_groupbox" flex="0">

Modified: trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul	2009-09-24 05:23:03 UTC (rev 14141)
+++ trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul	2009-09-24 05:59:27 UTC (rev 14142)
@@ -83,9 +83,6 @@
                     <column/>
                 </columns>
                 <rows>
-                    <row hidden="true">
-                        <description id="patron_standing" />
-                    </row>
                     <row id="pdsgr1">
                         <description id="patron_profile" class="profile value"/>
                     </row>



More information about the open-ils-commits mailing list