]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/chrome/content/cat/details.xul
should be the last re/un-naming
[Evergreen.git] / Open-ILS / xul / staff_client / chrome / content / cat / details.xul
1 <?xml version="1.0"?>
2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Cataloger's Search Result Screen -->
4
5 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
6 <!-- STYLESHEETS -->
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
10 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
11 <!-- LOCALIZATION -->
12 <!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
13
14 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
15 <!-- OVERLAYS -->
16 <?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
17
18 <window id="details_win"
19         onload="try { my_init(); } catch(E) { alert(E); }"
20         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
21
22         <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
23         <!-- BEHAVIOR -->
24         <script type="text/javascript">
25                 var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
26                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
27         </script>
28         <scripts id="openils_util_scripts"/>
29
30         <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
31         <script>
32         <![CDATA[
33
34                 var session; var docid; var marc_html; var top_pane; var bottom_pane;
35
36                 function my_init() {
37                         try {
38                                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
39                                 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
40                                 JSAN.errorLevel = "die"; // none, warn, or die
41                                 JSAN.addRepository('..');
42                                 JSAN.use('util.error'); g.error = new util.error();
43                                 g.error.sdump('D_TRACE','my_init() for cat/details.xul');
44
45                                 g.cgi = new CGI();
46                                 session = g.cgi.param('session');
47                                 docid = g.cgi.param('docid');
48
49                                 JSAN.use('util.deck');
50                                 top_pane = new util.deck('top_pane');
51
52                                 setTimeout(
53                                         function() {
54                                                 set_brief_view();
55                                         }, 0
56                                 );
57                                 
58                                 JSAN.use('util.network'); g.network = new util.network();
59                                 bottom_pane = new util.deck('bottom_pane');
60
61                                 set_marc_view();
62
63                         } catch(E) {
64                                 var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
65                                         "system administrator or software developer the following:\ncat/details.xul\n" + E + '\n';
66                                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
67                                 alert(err_msg);
68                         }
69                 }
70
71                 function set_brief_view() {
72                         top_pane.set_iframe( 
73                                 xulG.url_prefix( urls.XUL_BIB_BRIEF ) + '?docid=' + window.escape(docid), 
74                                 {}, 
75                                 { 
76                                         'set_tab_name' : function(n) { 
77                                                 if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
78                                                         try { window.xulG.set_tab_name('Bib Record: ' + n); } catch(E) { alert(E); }
79                                                 } else {
80                                                         dump('no set_tab_name\n');
81                                                 }
82                                         }
83                                 }  
84                         );
85                 }
86
87                 function set_marc_view() {
88                         bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_MARC_VIEW ) + '?docid=' + window.escape(docid),{},xulG);
89                 }
90
91                 function set_marc_edit() {
92                         bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_MARC_EDIT ) + '?session=' + window.escape(session) 
93                                 + '&docid=' + window.escape(docid),{},xulG);
94                 }
95
96                 function set_copy_browser() {
97                         bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_COPY_VOLUME_BROWSE ) + '?session=' + window.escape(session) 
98                                 + '&docid=' + window.escape(docid),{},xulG);
99                 }
100
101         ]]>
102         </script>
103
104         <vbox flex="1">
105                 <deck id="top_pane"/>
106                 <hbox>
107                         <button label="MARC View" id="marc_view" oncommand="set_marc_view();"/>
108                         <button label="MARC Edit" id="marc_edit" oncommand="set_marc_edit();"/>
109                         <button label="Copy Browser" id="copy_browse" oncommand="set_copy_browser();"/>
110                 </hbox>
111                 <deck id="bottom_pane" flex="1"/>
112         </vbox>
113
114 </window>
115