From: phasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4> Date: Tue, 27 Jul 2010 22:32:56 +0000 (+0000) Subject: entry point and function stub for Mark Item as Missing Pieces X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3e49b40ec28d3999f6d13da7876a2cceb8d80129;p=evergreen%2Fpines.git entry point and function stub for Mark Item as Missing Pieces entry point for scanning item as missing pieces and stub dialog git-svn-id: svn://svn.open-ils.org/ILS/trunk@17044 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 3cb28bf1ff..df0b8a7eed 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -882,6 +882,8 @@ <!ENTITY staff.main.menu.circ.hold_pull.label "Pull List for Hold Requests"> <!ENTITY staff.main.menu.circ.in_house.accesskey "I"> <!ENTITY staff.main.menu.circ.in_house.label "Record In-House Use"> +<!ENTITY staff.main.menu.circ.scan_item_as_missing_pieces.accesskey "M"> +<!ENTITY staff.main.menu.circ.scan_item_as_missing_pieces.label "Scan Item as Missing Pieces"> <!ENTITY staff.main.menu.circ.accesskey "C"> <!ENTITY staff.main.menu.circ.label "Circulation"> <!ENTITY staff.main.menu.circ.lost.key "L"> @@ -1955,6 +1957,8 @@ <!ENTITY staff.circ.checkin_overlay.sel_backdate.accesskey "B"> <!ENTITY staff.circ.checkin_overlay.sel_mark_items_damaged.label "Mark Item Damaged"> <!ENTITY staff.circ.checkin_overlay.sel_mark_items_damaged.accesskey "D"> +<!ENTITY staff.circ.checkin_overlay.sel_mark_missing_pieces.label "Mark Item as Missing Pieces"> +<!ENTITY staff.circ.checkin_overlay.sel_mark_missing_pieces.accesskey "M"> <!ENTITY staff.circ.checkin_overlay.sel_transit_abort.label "Abort Transit"> <!ENTITY staff.circ.checkin_overlay.sel_spine.label "Print Spine Label"> <!ENTITY staff.circ.checkin_overlay.sel_spine.accesskey "P"> diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index 3e8cb1b19a..cd5fab472b 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -402,6 +402,7 @@ var urls = { 'XUL_STANDING_PENALTIES' : '/xul/server/patron/standing_penalties.xul', 'XUL_NEW_STANDING_PENALTY' : '/xul/server/patron/new_standing_penalty.xul', 'XUL_EDIT_STANDING_PENALTY' : '/xul/server/patron/edit_standing_penalty.xul', + 'XUL_SCAN_ITEM_AS_MISSING_PIECES' : '/xul/server/circ/missing_pieces.xul', 'XUL_STAT_CAT_EDIT' : '/xul/server/admin/stat_cat_editor.xhtml', 'XUL_SURVEY_WIZARD' : 'chrome://open_ils_staff_client/content/admin/survey_wizard.xul', 'XUL_TIMESTAMP_DIALOG' : '/xul/server/util/timestamp.xul', diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js index bcda2645f1..98db9fed87 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js @@ -504,6 +504,13 @@ main.menu.prototype = { } ], + 'cmd_scan_item_as_missing_pieces' : [ + ['oncommand'], + function() { + xulG.window.open(obj.url_prefix(urls.XUL_SCAN_ITEM_AS_MISSING_PIECES),'scan_missing_pieces','chrome'); + } + ], + 'cmd_standalone' : [ ['oncommand'], function() { diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul b/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul index 56731f596e..d239dbeb51 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul @@ -33,6 +33,7 @@ <command id="cmd_browse_holds" /> <command id="cmd_browse_holds_shelf" /> <command id="cmd_in_house_use" key="circ-in-house-use" /> + <command id="cmd_scan_item_as_missing_pieces" label="&staff.main.menu.circ.scan_item_as_missing_pieces.label;" accesskey="&staff.main.menu.circ.scan_item_as_missing_pieces.accesskey;" /> <command id="cmd_copy_status" key="copy-status-key" /> <command id="cmd_search_opac" key="search-opac-key" /> <command id="cmd_public_opac" /> @@ -237,6 +238,7 @@ <menuitem label="&staff.main.menu.circ.verify_credentials;" accesskey="&staff.main.menu.circ.verify_credentials.accesskey;" command="cmd_verify_credentials"/> <menuitem label="&staff.main.menu.replace_barcode.label;" command="cmd_replace_barcode"/> <menuitem label="&staff.main.menu.circ.in_house.label;" accesskey="&staff.main.menu.circ.in_house.accesskey;" key="circ-in-house-use-key" command="cmd_in_house_use"/> + <menuitem command="cmd_scan_item_as_missing_pieces"/> <menuseparator /> <menuitem label="&staff.main.menu.circ.reprint.label;" accesskey="&staff.main.menu.circ.reprint.accesskey;" key="reprint-receipt-key" command="cmd_reprint"/> <menuitem label="&staff.main.menu.circ.offline.label;" command="cmd_standalone" accesskey="&staff.main.menu.circ.offline.accesskey;"/> diff --git a/Open-ILS/xul/staff_client/server/cat/util.js b/Open-ILS/xul/staff_client/server/cat/util.js index 8e9a187367..89d5bb38fb 100644 --- a/Open-ILS/xul/staff_client/server/cat/util.js +++ b/Open-ILS/xul/staff_client/server/cat/util.js @@ -9,7 +9,7 @@ cat.util.EXPORT_OK = [ 'spawn_copy_editor', 'add_copies_to_bucket', 'show_in_opac', 'spawn_spine_editor', 'transfer_copies', 'transfer_title_holds', 'mark_item_missing', 'mark_item_damaged', 'replace_barcode', 'fast_item_add', 'make_bookable', 'edit_new_brsrc', 'edit_new_bresv', 'batch_edit_volumes', 'render_fine_level', - 'render_loan_duration' + 'render_loan_duration', 'mark_item_as_missing_pieces' ]; cat.util.EXPORT_TAGS = { ':all' : cat.util.EXPORT_OK }; @@ -739,4 +739,7 @@ cat.util.render_loan_duration = function(value) { return text; } +cat.util.mark_item_as_missing_pieces = function(copy_ids) { +} + dump('exiting cat/util.js\n'); diff --git a/Open-ILS/xul/staff_client/server/circ/checkin.js b/Open-ILS/xul/staff_client/server/circ/checkin.js index c895f0c8d8..80441ec79a 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkin.js +++ b/Open-ILS/xul/staff_client/server/circ/checkin.js @@ -70,6 +70,7 @@ circ.checkin.prototype = { 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'); + obj.controller.view.sel_mark_missing_pieces.setAttribute('disabled','true'); } else { obj.controller.view.sel_edit.setAttribute('disabled','false'); obj.controller.view.sel_backdate.setAttribute('disabled','false'); @@ -82,6 +83,7 @@ circ.checkin.prototype = { 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'); + obj.controller.view.sel_mark_missing_pieces.setAttribute('disabled','false'); } } catch(E) { alert('FIXME: ' + E); @@ -222,6 +224,14 @@ circ.checkin.prototype = { cat.util.mark_item_damaged( util.functional.map_list( obj.selection_list, function(o) { return o.copy_id; } ) ); } ], + 'sel_mark_missing_pieces' : [ + ['command'], + function() { + var funcs = []; + JSAN.use('cat.util'); JSAN.use('util.functional'); + cat.util.mark_item_as_missing_pieces( util.functional.map_list( obj.selection_list, function(o) { return o.copy_id; } ) ); + } + ], 'sel_bucket' : [ ['command'], function() { diff --git a/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul b/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul index ed4acecd45..1561a684b4 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul +++ b/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul @@ -29,6 +29,7 @@ <command id="sel_spine" disabled="true"/> <command id="sel_transit_abort" disabled="true"/> <command id="sel_mark_items_damaged" disabled="true"/> + <command id="sel_mark_missing_pieces" disabled="true" label="&staff.circ.checkin_overlay.sel_mark_missing_pieces.label;" accesskey="&staff.circ.checkin_overlay.sel_mark_missing_pieces.accesskey;"/> <command id="cmd_do_not_alert_on_precat" /> <command id="cmd_suppress_holds_and_transits" /> @@ -50,6 +51,7 @@ <menuitem command="sel_backdate" label="&staff.circ.checkin_overlay.sel_backdate.label;" accesskey="&staff.circ.checkin_overlay.sel_backdate.accesskey;" /> <menuseparator /> <menuitem command="sel_mark_items_damaged" label="&staff.circ.checkin_overlay.sel_mark_items_damaged.label;" accesskey="&staff.circ.checkin_overlay.sel_mark_items_damaged.accesskey;"/> + <menuitem command="sel_mark_missing_pieces" /> <menuseparator /> <menuitem command="sel_transit_abort" label="&staff.circ.checkin_overlay.sel_transit_abort.label;" /> <menuseparator /> @@ -120,6 +122,7 @@ <menuitem command="sel_backdate" label="&staff.circ.checkin_overlay.sel_backdate.label;" accesskey="&staff.circ.checkin_overlay.sel_backdate.accesskey;" /> <menuseparator /> <menuitem command="sel_mark_items_damaged" label="&staff.circ.checkin_overlay.sel_mark_items_damaged.label;" accesskey="&staff.circ.checkin_overlay.sel_mark_items_damaged.accesskey;"/> + <menuitem command="sel_mark_missing_pieces" /> <menuseparator /> <menuitem command="sel_transit_abort" label="&staff.circ.checkin_overlay.sel_transit_abort.label;" /> <menuseparator /> diff --git a/Open-ILS/xul/staff_client/server/circ/missing_pieces.js b/Open-ILS/xul/staff_client/server/circ/missing_pieces.js new file mode 100644 index 0000000000..99eca39871 --- /dev/null +++ b/Open-ILS/xul/staff_client/server/circ/missing_pieces.js @@ -0,0 +1,35 @@ +var error; + +function my_init() { + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); } + JSAN.errorLevel = "die"; // none, warn, or die + JSAN.addRepository('/xul/server/'); + JSAN.use('util.error'); error = new util.error(); + error.sdump('D_TRACE','my_init() for main_test.xul'); + + dojo.require('openils.PermaCrud'); + + var types = new openils.PermaCrud( + { + authtoken :ses() + } + ).retrieveAll('coust'); + + dojo.forEach(types, + function(type) { + alert( js2JSON(type) ); + } + ); + + if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') { + try { window.xulG.set_tab_name('Test'); } catch(E) { alert(E); } + } + + } catch(E) { + try { error.standard_unexpected_error_alert('main/test.xul',E); } catch(F) { alert(E); } + } +} + + diff --git a/Open-ILS/xul/staff_client/server/circ/missing_pieces.xul b/Open-ILS/xul/staff_client/server/circ/missing_pieces.xul new file mode 100644 index 0000000000..6e0602ba42 --- /dev/null +++ b/Open-ILS/xul/staff_client/server/circ/missing_pieces.xul @@ -0,0 +1,37 @@ +<?xml version="1.0"?> +<!-- Application: Evergreen Staff Client --> +<!-- Screen: Example Template for remote xul --> + +<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// --> +<!-- STYLESHEETS --> +<?xml-stylesheet href="chrome://global/skin/" type="text/css"?> +<?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?> + +<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// --> +<!-- LOCALIZATION --> +<!DOCTYPE window PUBLIC "" ""[ + <!--#include virtual="/opac/locale/${locale}/lang.dtd"--> +]> + +<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// --> +<!-- OVERLAYS --> +<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?> + +<window id="main_test_win" + onload="try { my_init(); font_helper(); } catch(E) { alert(E); }" + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + + <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// --> + <!-- BEHAVIOR --> + <script type="text/javascript"> + var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; + </script> + <scripts id="openils_util_scripts"/> + + <script type="text/javascript" src="/xul/server/main/JSAN.js"/> + <script type="text/javascript" src="missing_pieces.js"/> + + <label value="retrieving coust's with dojo and PermaCrud..."/> + +</window> +