]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/web/vandelay/vandelay.html
added a toolbar for choosing interfaces. added a queue picker interface to pick...
[Evergreen.git] / Open-ILS / web / vandelay / vandelay.html
1 <!--
2 # Copyright (C) 2008  Georgia Public Library Service
3 # Bill Erickson <erickson@esilibrary.com>
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 -->
14 <html>
15     <head>
16         <title>Vandelay</title>
17         <style type="text/css">
18             @import "/js/dojo/dojo/resources/dojo.css";
19             @import "/js/dojo/dijit/themes/tundra/tundra.css";
20             @import "/js/dojo/dijit/tests/css/dijitTests.css"; 
21             @import "/js/dojo/dojox/grid/_grid/Grid.css";
22             td { padding: 6px; }
23             .match_div {
24                 height: 95%;
25                 width: 95%;
26             }
27             .match_div a {
28                 color: red;
29                 font-weight:bold;
30             }
31             .match_div a:visited {
32                 color: red;
33                 font-weight:bold;
34             }
35             .tall { height:100%; }
36             .hidden { display: none; }
37             #toolbar { margin-top: 0px; }
38             body { width:100%; height:100%; border:0; margin:0; padding:0; }
39             .progress { 
40                 width:100%;
41                 text-align:center;
42                 margin: 20px;
43             }
44         </style>
45         <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:true" src="/js/dojo/dojo/dojo.js"></script>
46         <script type="text/javascript" src='vandelay.js'></script>
47     </head>
48     <body class="tundra tall">
49
50         <div dojoType="dijit.Toolbar" id='toolbar'>
51             <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy" 
52                 onclick='displayGlobalDiv("vl-marc-upload-div");' showLabel="true">Import Records</div>
53             <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy" 
54                 onclick='vlShowQueueSelect();' showLabel="true">Inspect Queue</div>
55         </div>
56
57         <div id="vl-generic-progress" class='progress'>
58             <div dojoType="dijit.ProgressBar" style="width:200px" indeterminate="true"></div>
59         </div>
60         <div id="vl-generic-progress-with-total" class='hidden progress'>
61             <div dojoType="dijit.ProgressBar" jsId='vlControlledProgressBar' style="width:200px"></div>
62         </div>
63
64         <!-- MARC upload form -->
65         <div id='vl-marc-upload-div' class='hidden'>
66             <h1>Evergreen MARC File Upload</h1><br/>
67             <form id="vl-marc-upload-form" enctype="multipart/form-data">
68                 <input type='hidden' name='ses' id='vl-ses-input'/>
69                 <br/>
70                 <table>
71                     <tr>
72                         <td>Queue Name</td>
73                         <td>
74                             <input type='text' dojoType='dijit.form.TextBox' id='vl-queue-name' size='32'></input>
75                         </td>
76                     </tr>
77                     <tr>
78                         <td>Record Type</td>
79                         <td>
80                             <select id='vl-record-type' dojoType='dijit.form.FilteringSelect'>
81                                 <option value='bib'>Bibliographic Records</option>
82                                 <option value='auth'>Authority Records</option>
83                             </select>
84                         </td>
85                     </tr>
86                     <tr>
87                         <td>Purpose</td>
88                         <td>
89                             <select name='purpose' dojoType='dijit.form.FilteringSelect'>
90                                 <option value='import'>Import</option>
91                                 <option value='overlay'>Overlay</option>
92                             </select>
93                         </td>
94                     </tr>
95                     <tr>
96                         <td>
97                             <span id="vl-file-label">File to Upload:</span>
98                             <span id="vl-file-uploading" class='hidden'>Uploading...</span>
99                         </td>
100                         <td id='vl-input-td'>
101                             <input size='48' type="file" name="marc_upload"/>
102                         </td>
103                     </tr>
104                     <tr>
105                         <td colspan='2'>
106                             <span id="vl-upload-progress-span" class='hidden'>
107                                 <div dojoType="dijit.ProgressBar" style="width:200px" indeterminate="true"></div>
108                             </span>
109                         </td>
110                     </tr>
111                     <tr>
112                         <td colspan='2' align='center'>
113                             <button dojoType="dijit.form.Button" onclick="batchUpload()">Upload</button>
114                         </td>
115                     </tr>
116                 </table>
117             </form>
118         </div>
119
120         <!-- record queue grid -->
121         <div id='vl-queue-div' class='tall hidden'>
122             <h1>Record Queue</h1><br/>
123             <div id='vl-queue-no-records' class='hidden'><h2>There are no records in the selected queue</h2></div>
124             <script>
125                 var vlQueueGridLayout;
126                 function resetVlQueueGridLayout() {
127                     vlQueueGridLayout = [{
128                         defaultCell: {styles: 'text-align: center;'},
129                         cells : [[
130                             {name: 'Selected', get: vlQueueGridDrawSelectBox },
131                             {name: 'Import Time', field:'import_time', get:vlGetDateTimeField}
132                         ]]
133                     }];
134                 }
135             </script>
136             <div id='vl-queue-div-grid' class='tall'>
137                 <button dojoType='dijit.form.Button' onclick='vlSelectAllGridRecords();'>Select All</button>
138                 <button dojoType='dijit.form.Button' onclick='vlSelectNoGridRecords();'>Select None</button>
139                 <button dojoType='dijit.form.Button' onclick='vlImportSelectedRecords();'>Import Selected</button>
140                 <div class='tall'>
141                     <div dojoType='dojox.Grid' jsId='vlQueueGrid' class='tall'> </div>
142                 </div>
143             </div>
144         </div>
145
146         <!-- Grid of record matches -->
147         <div id='vl-match-div' class='tall hidden'>
148             <script>
149                 var vlMatchGridLayout;
150                 function resetVlMatchGridLayout() {
151                     vlMatchGridLayout = [{
152                         defaultCell: {styles: 'text-align: center;'},
153                         cells : [[
154                             {
155                                 name: 'Overlay Target', 
156                                 get: vlGetOverlayTargetSelector,
157                                 value: '<input type="radio" name="overlay_target" onclick="vlHandleOverlayTargetSelected();" id="vl-overlay-target-ID"/>'
158                             },
159                             {name:'Match Point', field:'field_type'},
160                             {name: 'ID', field:'id'},
161                             {   name: 'View MARC', 
162                                 get: vlGetViewMARC, 
163                                 value:'<a href="javascript:void(0);" onclick="vlLoadMARCHtml(RECID);">View MARC</a>'
164                             },
165                             {name: 'Creator', get: vlGetCreator},
166                             {name: 'Create Date', field:'create_date', get: vlGetDateTimeField},
167                             {name: 'Last Edit Date', field:'edit_date', get: vlGetDateTimeField},
168                             {name: 'Source', field:'source'},
169                             {name: 'TCN Source', field:'tcn_source'},
170                             {name: 'TCN Value', field:'tcn_value'}
171                         ]]
172                     }];
173                 }
174             </script>
175             <h1>Import Matches</h1><br/>
176             <div>
177                 <button dojoType='dijit.form.Button' 
178                     onclick='displayGlobalDiv("vl-queue-div");'>Back To Import Queue...</button>
179                 <span style='padding-left:20px;'>
180                     <input dojoType='dijit.form.CheckBox' jsId='vlOverlayTargetEnable' onclick='vlHandleOverlayTargetSelected'/> 
181                     Overlay selected record with imported record
182                 </span>
183             </div>
184             <div class='tall'>
185                 <div dojoType='dojox.Grid' jsId='vlMatchGrid'> </div>
186             </div>
187         </div>
188
189         <!-- MARC as HTML for matched records -->
190         <div id='vl-match-html-div' class='tall hidden'>
191             <h1>MARC Record</h1><br/>
192             <div>
193                 <button dojoType='dijit.form.Button' 
194                     onclick='displayGlobalDiv("vl-match-div");'>Back To Matches...</button>
195             </div>
196             <div>
197                 <style>#vl-match-record-html td {padding:0px;}</style>
198                 <div id='vl-match-record-html'> </div>
199             </div>
200         </div>
201
202         <!-- Form for choosing which queue to view -->
203         <div id='vl-queue-select-div' class='tall hidden'>
204             <h1>Select a Queue to Inspect</h1><br/>
205             <table>
206                 <tr>
207                     <td>Queue Type</td>
208                     <td>
209                         <select jsId='vlQueueSelectType' dojoType='dijit.form.FilteringSelect' onchange='alert(1);'>
210                             <option value='bib' selected='selected'>Bibliographic Records</option>
211                             <option value='auth'>Authority Records</option>
212                         </select>
213                     </td>
214                 </tr>
215                 <tr>
216                     <td>Queue</td>
217                     <td>
218                         <select jsId='vlQueueSelectQueueList' dojoType='dijit.form.FilteringSelect'>
219                         </select>
220                     </td>
221                 </tr>
222                 <tr>
223                     <td colspan='2'>
224                         <button dojoType='dijit.form.Button' onclick='vlFetchQueueFromForm();'>Retrieve Queue</button>
225                     </td>
226                 </tr>
227             </table>
228         </div>
229     </body>
230 </html>