added Mark Item Damaged to checkin
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 30 Sep 2006 11:10:36 +0000 (11:10 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 30 Sep 2006 11:10:36 +0000 (11:10 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6295 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/checkin.js
Open-ILS/xul/staff_client/server/circ/checkin.xul
Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul

index 93d9ad7..9e52a5e 100644 (file)
@@ -58,6 +58,7 @@ circ.checkin.prototype = {
                                                        obj.controller.view.sel_spine.setAttribute('disabled','true');
                                                        obj.controller.view.sel_transit_abort.setAttribute('disabled','true');
                                                        obj.controller.view.sel_clip.setAttribute('disabled','true');
+                                                       obj.controller.view.sel_mark_items_damaged.setAttribute('disabled','true');
                                                } else {
                                                        obj.controller.view.sel_edit.setAttribute('disabled','false');
                                                        obj.controller.view.sel_opac.setAttribute('disabled','false');
@@ -67,6 +68,7 @@ circ.checkin.prototype = {
                                                        obj.controller.view.sel_spine.setAttribute('disabled','false');
                                                        obj.controller.view.sel_transit_abort.setAttribute('disabled','false');
                                                        obj.controller.view.sel_clip.setAttribute('disabled','false');
+                                                       obj.controller.view.sel_mark_items_damaged.setAttribute('disabled','false');
                                                }
                                        } catch(E) {
                                                alert('FIXME: ' + E);
@@ -132,7 +134,14 @@ circ.checkin.prototype = {
                                                        }
                                                }
                                        ],
-
+                                       'sel_mark_items_damaged' : [
+                                               ['command'],
+                                               function() {
+                                                       var funcs = [];
+                                                       JSAN.use('cat.util'); JSAN.use('util.functional');
+                                                       cat.util.mark_item_damaged( util.functional.map_list( obj.selection_list, function(o) { return o.copy_id; } ) );
+                                               }
+                                       ],
                                        'sel_bucket' : [
                                                ['command'],
                                                function() {
index 7a4d896..ee0e102 100644 (file)
@@ -93,6 +93,7 @@
                <command id="sel_bucket" disabled="true"/>
                <command id="sel_spine" disabled="true"/>
                <command id="sel_transit_abort" disabled="true"/>
+               <command id="sel_mark_items_damaged" disabled="true"/>
 
        </commandset>
 
index 5625bdb..a8dbe31 100644 (file)
                <menuitem command="sel_patron" label="Show Last Few Circulations" accesskey="L"/>
                <menuseparator/>
                <menuitem command="sel_edit" label="Edit Item Attributes" accesskey="E" />
-               <menuitem command="sel_transit_abort" label="Abort Transits" />
                <menuseparator />
-               <menuitem command="sel_spine" label="Print Spine Label" accesskey="P"/>
+               <menuitem command="sel_mark_items_damaged" label="Mark Item Damaged" accesskey="D"/>
+               <menuseparator />
+               <menuitem command="sel_transit_abort" label="Abort Transit" />
                <menuseparator />
+               <menuitem command="sel_spine" label="Print Spine Label" accesskey="P"/>
                <menuitem command="save_columns" label="Save Columns"/>
        </popup>
 </popupset>
                                        <menuitem command="sel_patron" label="Show Last Few Circulations" accesskey="L"/>
                                        <menuseparator />
                                        <menuitem command="sel_edit" label="Edit Item Attributes" accesskey="E" />
-                                       <menuitem command="sel_transit_abort" label="Abort Transits" />
                                        <menuseparator />
-                                       <menuitem command="sel_spine" label="Print Spine Label" accesskey="P"/>
+                                       <menuitem command="sel_mark_items_damaged" label="Mark Item Damaged" accesskey="D"/>
+                                       <menuseparator />
+                                       <menuitem command="sel_transit_abort" label="Abort Transit" />
                                        <menuseparator />
+                                       <menuitem command="sel_spine" label="Print Spine Label" accesskey="P"/>
                                        <menuitem command="save_columns" label="Save Columns"/>
                                </menupopup>
                        </menu>