]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/cat/bib_brief.xul
*** empty log message ***
[Evergreen.git] / Open-ILS / xul / staff_client / server / cat / bib_brief.xul
1 <?xml version="1.0"?>
2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Brief Bib Display -->
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 <?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
10
11 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
12 <!-- LOCALIZATION -->
13 <!DOCTYPE window PUBLIC "" ""[
14         <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
15 ]>
16
17 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
18 <!-- OVERLAYS -->
19 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
20
21 <window id="cat_bib_brief_win" 
22         onload="my_init()"
23         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
24
25         <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
26         <!-- BEHAVIOR -->
27         <script type="text/javascript">
28                 var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
29         </script>
30         <scripts id="openils_util_scripts"/>
31
32         <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
33         <script>
34         <![CDATA[
35                 function my_init() {
36                         try {
37                                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
38                                 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is 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 cat_bib_brief.xul');
43
44                                 g.cgi = new CGI();
45                                 var docid = g.cgi.param('docid');
46
47                                 JSAN.use('util.network'); g.network = new util.network();
48                                 JSAN.use('util.date');
49
50                                 g.network.request(
51                                         api.MODS_SLIM_RECORD_RETRIEVE.app,
52                                         api.MODS_SLIM_RECORD_RETRIEVE.method,
53                                         [ docid ],
54                                         function (req) {
55                                                 var mods = req.getResultObject();
56                                                 
57                                                 if (mods.title()) document.getElementById('title').appendChild(
58                                                         document.createTextNode(mods.title())
59                                                 );
60                                                 if (mods.author()) document.getElementById('author').appendChild(
61                                                         document.createTextNode(mods.author())
62                                                 );
63                                                 if (mods.edition()) document.getElementById('edition').appendChild(
64                                                         document.createTextNode(mods.edition())
65                                                 );
66                                                 if (mods.pubdate()) document.getElementById('pubdate').appendChild(
67                                                         document.createTextNode(mods.pubdate())
68                                                 );
69                                                 if (mods.tcn()) document.getElementById('tcn').appendChild(
70                                                         document.createTextNode(mods.tcn())
71                                                 );
72
73                                                 if (window.xulG && typeof window.xulG.set_tab_name == 'function') {
74                                                         try {
75                                                                 window.xulG.set_tab_name(mods.tcn());
76                                                         } catch(E) {
77                                                                 g.error.sdump('D_ERROR','bib_brief.xul, set_tab: ' + E);
78                                                         }
79                                                 }
80
81                                                 g.network.request(
82                                                         api.FM_BRE_RETRIEVE_VIA_ID.app,
83                                                         api.FM_BRE_RETRIEVE_VIA_ID.method,
84                                                         [ docid ],
85                                                         function (req) {
86                                                                 var meta = req.getResultObject()[0];
87                                                                 document.getElementById('creator').appendChild(
88                                                                         document.createTextNode(meta.creator())
89                                                                 );
90                                                                 document.getElementById('editor').appendChild(
91                                                                         document.createTextNode(meta.editor())
92                                                                 );
93                                                                 document.getElementById('edit_date').appendChild(
94                                                                         document.createTextNode(
95                                                                                 util.date.formatted_date(meta.edit_date(),"%D")
96                                                                         )
97                                                                 );
98                                                         }
99                                                 );
100
101                                         }
102                                 );
103
104
105
106                         } catch(E) {
107                                 var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
108                                         "system administrator or software developer the following:\ncat/bib_brief.xul\n" + E + '\n';
109                                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
110                                 alert(err_msg);
111                         }
112                 }
113
114         ]]>
115         </script>
116
117         <groupbox flex="1">
118                 <caption label="Record Details"/>
119                         <label style="font-weight: bold;" value="Title:"/><description id="title" />
120                         <label style="font-weight: bold;" value="Author:"/><description id="author" />
121                         <label style="font-weight: bold;" value="Edition:"/><description id="edition" />
122                         <label style="font-weight: bold;" value="Pub Date:"/><description id="pubdate" />
123                         <label style="font-weight: bold;" value="TCN:"/><description id="tcn" /></hbox>
124                         <label style="font-weight: bold;" value="Created By:"/><description id="creator" />
125                         <label style="font-weight: bold;" value="Last Edited By:"/><description id="editor" />
126                         <label style="font-weight: bold;" value="Last Edited On:"/><description id="edit_date" />
127         </groupbox>
128
129 </window>
130