]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/web/vandelay/vandelay.html
added upload-to-existing-queue. styling records to overlay slightly differently
[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             .overlay_selected { 
45                 padding: 2px; 
46                 background: #d9e8f9;
47                 border: 1px solid red; 
48             }
49         </style>
50         <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:false" src="/js/dojo/dojo/dojo.js"></script>
51         <script type="text/javascript" src='vandelay.js'></script>
52     </head>
53     <body class="tundra tall">
54         <div dojoType="dijit.Toolbar" id='toolbar'>
55             <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy" 
56                 onclick='displayGlobalDiv("vl-marc-upload-div");' showLabel="true">Import Records</div>
57             <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy" 
58                 onclick='vlShowQueueSelect();' showLabel="true">Inspect Queue</div>
59         </div>
60
61         <div id="vl-generic-progress" class='progress'>
62             <div dojoType="dijit.ProgressBar" style="width:300px" indeterminate="true"></div>
63         </div>
64         <div id="vl-generic-progress-with-total" class='hidden progress'>
65             <div dojoType="dijit.ProgressBar" jsId='vlControlledProgressBar' style="width:300px"></div>
66         </div>
67
68         <!-- MARC upload form -->
69         <div id='vl-marc-upload-div' class='hidden'>
70             <h1>Evergreen MARC File Upload</h1><br/>
71             <form id="vl-marc-upload-form" enctype="multipart/form-data">
72                 <input type='hidden' name='ses' id='vl-ses-input'/>
73                 <br/>
74                 <table>
75                     <tr>
76                         <td>Record Type</td>
77                         <td colspan='4'>
78                             <select id='vl-record-type' dojoType='dijit.form.FilteringSelect' 
79                                     jsId='vlUploadRecordType' onchange='vlShowUploadForm();'>
80                                 <option value='bib' selected='selected'>Bibliographic Records</option>
81                                 <option value='auth'>Authority Records</option>
82                             </select>
83                         </td>
84                     </tr>
85                     <tr>
86                         <td>Create a Upload New Queue</td>
87                         <td>
88                             <input type='text' dojoType='dijit.form.TextBox' id='vl-queue-name' size='32'></input>
89                         </td>
90                         <td>or Add to an Existing Queue</td>
91                         <td>
92                             <select jsId='vlUploadQueueSelector' dojoType='dijit.form.FilteringSelect'>
93                             </select>
94                         </td>
95                     </tr>
96                     <tr>
97                         <td>Purpose</td>
98                         <td colspan='4'>
99                             <select name='purpose' dojoType='dijit.form.FilteringSelect'>
100                                 <option value='import'>Import</option>
101                                 <option value='overlay'>Overlay</option>
102                             </select>
103                         </td>
104                     </tr>
105                     <tr>
106                         <td>
107                             <span id="vl-file-label">File to Upload:</span>
108                             <span id="vl-file-uploading" class='hidden'>Uploading...</span>
109                         </td>
110                         <td id='vl-input-td' colspan='4'>
111                             <input size='48' type="file" name="marc_upload"/>
112                         </td>
113                     </tr>
114                     <tr>
115                         <td colspan='4'>
116                             <span id="vl-upload-progress-span" class='hidden'>
117                                 <div dojoType="dijit.ProgressBar" style="width:200px" indeterminate="true"></div>
118                             </span>
119                         </td>
120                     </tr>
121                     <tr>
122                         <td align='center' colspan='4'>
123                             <button dojoType="dijit.form.Button" onclick="batchUpload()">Upload</button>
124                         </td>
125                     </tr>
126                 </table>
127             </form>
128         </div>
129
130         <!-- record queue grid -->
131         <div id='vl-queue-div' class='tall hidden'>
132             <h1>Record Queue</h1><br/>
133             <div id='vl-queue-no-records' class='hidden'><h2>There are no records in the selected queue</h2></div>
134             <script>
135                 var vlQueueGridLayout;
136                 function resetVlQueueGridLayout() {
137                     vlQueueGridLayout = [{
138                         defaultCell: {styles: 'text-align: center;'},
139                         cells : [[
140                             {name: 'Selected', get: vlQueueGridDrawSelectBox },
141                             {name: 'Import Time', field:'import_time', get:vlGetDateTimeField}
142                         ]]
143                     }];
144                 }
145             </script>
146             <div id='vl-queue-div-grid' class='tall'>
147                 <button dojoType='dijit.form.Button' onclick='vlSelectAllGridRecords();'>Select All</button>
148                 <button dojoType='dijit.form.Button' onclick='vlSelectNoGridRecords();'>Select None</button>
149                 <button dojoType='dijit.form.Button' onclick='vlImportSelectedRecords();'>Import Selected</button>
150                 <div class='tall'>
151                     <div dojoType='dojox.Grid' jsId='vlQueueGrid' class='tall'> </div>
152                 </div>
153             </div>
154         </div>
155
156         <!-- Grid of record matches -->
157         <div id='vl-match-div' class='tall hidden'>
158             <script>
159                 var vlMatchGridLayout;
160                 function resetVlMatchGridLayout() {
161                     vlMatchGridLayout = [{
162                         defaultCell: {styles: 'text-align: center;'},
163                         cells : [[
164                             {
165                                 name: 'Overlay Target', 
166                                 get: vlGetOverlayTargetSelector,
167                                 value: '<input type="radio" name="overlay_target" onclick="vlHandleOverlayTargetSelected();" id="vl-overlay-target-ID"/>'
168                             },
169                             {name:'Match Point', field:'field_type'},
170                             {name: 'ID', field:'id'},
171                             {   name: 'View MARC', 
172                                 get: vlGetViewMARC, 
173                                 value:'<a href="javascript:void(0);" onclick="vlLoadMARCHtml(RECID);">View MARC</a>'
174                             },
175                             {name: 'Creator', get: vlGetCreator},
176                             {name: 'Create Date', field:'create_date', get: vlGetDateTimeField},
177                             {name: 'Last Edit Date', field:'edit_date', get: vlGetDateTimeField},
178                             {name: 'Source', field:'source'},
179                             {name: 'TCN Source', field:'tcn_source'},
180                             {name: 'TCN Value', field:'tcn_value'}
181                         ]]
182                     }];
183                 }
184             </script>
185             <h1>Import Matches</h1><br/>
186             <div>
187                 <button dojoType='dijit.form.Button' 
188                     onclick='displayGlobalDiv("vl-queue-div");'>Back To Import Queue...</button>
189                 <span style='padding-left:20px;'>
190                     <input dojoType='dijit.form.CheckBox' jsId='vlOverlayTargetEnable' onclick='vlHandleOverlayTargetSelected'/> 
191                     Overlay selected record with imported record
192                 </span>
193             </div>
194             <div class='tall'>
195                 <div dojoType='dojox.Grid' jsId='vlMatchGrid'> </div>
196             </div>
197         </div>
198
199         <!-- MARC as HTML for matched records -->
200         <div id='vl-match-html-div' class='tall hidden'>
201             <h1>MARC Record</h1><br/>
202             <div>
203                 <button dojoType='dijit.form.Button' 
204                     onclick='displayGlobalDiv("vl-match-div");'>Back To Matches...</button>
205             </div>
206             <div>
207                 <style>#vl-match-record-html td {padding:0px;}</style>
208                 <div id='vl-match-record-html'> </div>
209             </div>
210         </div>
211
212         <!-- Form for choosing which queue to view -->
213         <div id='vl-queue-select-div' class='tall hidden'>
214             <h1>Select a Queue to Inspect</h1><br/>
215             <table>
216                 <tr>
217                     <td>Queue Type</td>
218                     <td>
219                         <select jsId='vlQueueSelectType' dojoType='dijit.form.FilteringSelect' onchange='vlShowQueueSelect();'>
220                             <option value='bib' selected='selected'>Bibliographic Records</option>
221                             <option value='auth'>Authority Records</option>
222                         </select>
223                     </td>
224                 </tr>
225                 <tr>
226                     <td>Queue</td>
227                     <td>
228                         <select jsId='vlQueueSelectQueueList' dojoType='dijit.form.FilteringSelect'>
229                         </select>
230                     </td>
231                 </tr>
232                 <tr>
233                     <td colspan='2'>
234                         <button dojoType='dijit.form.Button' onclick='vlFetchQueueFromForm();'>Retrieve Queue</button>
235                     </td>
236                 </tr>
237             </table>
238         </div>
239     </body>
240 </html>