2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Select AOU 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_aou_win" title="&staff.select_aou.title;"
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); }
35 function $c(n) { return document.createElement(n); }
39 if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
40 JSAN.errorLevel = "die"; // none, warn, or die
41 JSAN.addRepository('/xul/server/');
42 JSAN.use('util.error'); g.error = new util.error();
43 g.error.sdump('D_TRACE','my_init() for serial/select_aou.xul');
45 JSAN.use('util.file'); JSAN.use('util.widgets');
47 var file; var list_data; var ml;
49 file = new util.file('offline_ou_list');
50 var server_unadorned = xul_param('server_unadorned');
51 if (file._file.exists()) {
52 list_data = file.get_object(); file.close();
53 ml = util.widgets.make_menulist( list_data[0], list_data[1] );
54 ml.setAttribute('id','lib_menu');
55 document.getElementById('x_lib_menu').appendChild(ml);
59 //if (document.getElementById('refresh_button')) document.getElementById('refresh_button').focus();
60 JSAN.use('util.file'); var file = new util.file('mfhd_create_prefs.'+server_unadorned);
61 util.widgets.save_attributes(file, { 'lib_menu' : [ 'value' ] });
66 throw(document.getElementById('catStrings').getString('staff.cat.copy_browser.missing_library') + '\n'); //TODO: different error?
69 file = new util.file('mfhd_create_prefs.'+server_unadorned);
70 util.widgets.load_attributes(file);
71 ml.value = ml.getAttribute('value');
74 g.error.standard_unexpected_error_alert('', E);
78 g.select_aou = function() {
79 xulG.create_mfhd_aou = $('lib_menu').value;
86 <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
88 <vbox flex="1" style="overflow: auto">
90 <!--TODO: label strings -->
91 <caption label="&staff.select_aou.caption;"/>
92 <description id="desc">&staff.select_aou.desc;</description>
93 <hbox id="x_lib_menu"/>
95 <button label="&staff.select_aou.select_btn.label;"
96 accesskey="&staff.select_aou.select_btn.accesskey;" oncommand="g.select_aou()"/>
97 <button label="&staff.cat.record_buckets_quick.cancel.label;"
98 accesskey="&staff.cat.record_buckets_quick.cancel.accesskey;" oncommand="window.close()"/>