From: phasefx 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%2Fbjwebb.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 3cb28bf1f..df0b8a7ee 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 @@ + + @@ -1955,6 +1957,8 @@ + + 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 3e8cb1b19..cd5fab472 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 bcda2645f..98db9fed8 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 56731f596..d239dbeb5 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 @@ + @@ -237,6 +238,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/cat/util.js b/Open-ILS/xul/staff_client/server/cat/util.js index 8e9a18736..89d5bb38f 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 c895f0c8d..80441ec79 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 ed4acecd4..1561a684b 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 @@ + @@ -50,6 +51,7 @@ + @@ -120,6 +122,7 @@ + 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 000000000..99eca3987 --- /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 000000000..6e0602ba4 --- /dev/null +++ b/Open-ILS/xul/staff_client/server/circ/missing_pieces.xul @@ -0,0 +1,37 @@ + + + + + + + + + + + + +]> + + + + + + + + + + + + +