Remove Standing Penalty summary. This was an incomplete experiment that didn't pan...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 24 Sep 2009 05:59:27 +0000 (05:59 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 24 Sep 2009 05:59:27 +0000 (05:59 +0000)
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

Open-ILS/xul/staff_client/server/patron/summary.js
Open-ILS/xul/staff_client/server/patron/summary_overlay.xul
Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul

index ccfb7c0..d326a44 100644 (file)
@@ -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) {
index 69f71e8..4895afe 100644 (file)
                <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">
index 211d9a2..a1b5f5f 100644 (file)
@@ -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>