2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Select Serial Unit Dialog -->
5 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
7 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
8 <?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
9 <?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
10 <?xml-stylesheet href="/xul/server/skin/cat.css" type="text/css"?>
12 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
14 <!DOCTYPE window PUBLIC "" ""[
15 <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
18 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
20 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
22 <window id="select_serial_unit_win" title="Select Serial Unit"
23 onload="try { my_init(); font_helper(); persist_helper(); } catch(E) { alert(E); }" oils_persist="height width"
24 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
26 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
28 <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
29 <scripts id="openils_util_scripts"/>
31 <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
34 function $(id) { return document.getElementById(id); }
38 if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
39 JSAN.errorLevel = "die"; // none, warn, or die
40 JSAN.addRepository('/xul/server/');
41 JSAN.use('util.error'); g.error = new util.error();
42 g.error.sdump('D_TRACE','my_init() for serial/select_unit.xul');
44 JSAN.use('util.widgets');
47 JSAN.use('util.network'); g.network = new util.network();
48 var sdist_ids = xul_param('sdist_ids',{'modal_xulG':true});
49 //TODO: unit_list.retrieve option for binding units only (that is, units containing bound items only)
50 var robj = g.network.request(
52 'open-ils.serial.unit_list.retrieve',
55 if (typeof robj.ilsevent != 'undefined') throw(robj);
56 ml = util.widgets.make_menulist(robj);
57 ml.setAttribute('id','unit_menu');
58 document.getElementById('x_unit_menu').appendChild(ml);
61 g.error.standard_unexpected_error_alert('', E);
65 g.select_unit = function() {
66 var selection = JSON2js($('unit_menu').value);
67 selection.label = $('unit_menu').selectedItem.label;
68 update_modal_xulG({'sunit_selection' : selection});
75 <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
77 <vbox flex="1" style="overflow: auto">
79 <!--TODO: label strings -->
80 <caption label="Select a Serial Unit"/>
81 <description id="desc">Please select a Serial Unit</description>
82 <hbox id="x_unit_menu"/>
84 <button label="Select"
85 accesskey="s" oncommand="g.select_unit()"/>
86 <button label="&staff.cat.record_buckets_quick.cancel.label;"
87 accesskey="&staff.cat.record_buckets_quick.cancel.accesskey;" oncommand="window.close()"/>