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.
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.
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 .container:after {content: ""; display: block; height: 0; clear: both; }
23 .form_table td { padding: 6px; }
24 table { border-collapse: collapse; }
33 .match_div a:visited {
37 .tall { height:100%; }
39 .hidden { display: none; }
40 #toolbar { margin-top: 0px; }
41 body { width:100%; height:100%; border:0; margin:0; padding:0; }
50 border: 1px solid red;
53 <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:true" src="/js/dojo/dojo/dojo.js"></script>
54 <script type="text/javascript" src='/js/dojo/openils/MarcXPathParser.js'></script>
55 <script type="text/javascript" src='vandelay.js'></script>
57 <body class="tundra tall">
58 <div dojoType="dijit.Toolbar" id='toolbar'>
59 <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"
60 onclick='displayGlobalDiv("vl-marc-upload-div");' showLabel="true">Import Records</div>
61 <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"
62 onclick='vlShowQueueSelect();' showLabel="true">Inspect Queue</div>
65 <div id="vl-generic-progress" class='progress'>
66 <div dojoType="dijit.ProgressBar" style="width:300px" indeterminate="true"></div>
68 <div id="vl-generic-progress-with-total" class='hidden progress'>
69 <div dojoType="dijit.ProgressBar" jsId='vlControlledProgressBar' style="width:300px"></div>
72 <div id='vl-marc-upload-status-div' class='hidden'>
73 <h1>Upload Status</h1><br/>
74 <div id='vl-upload-status-uploading'><h3>Uploading...</h3></div>
75 <div id='vl-upload-status-processing' class='hidden'><h3>Processing...</h3></div>
78 <!-- MARC upload form -->
79 <div id='vl-marc-upload-div' class='hidden'>
80 <h1>Evergreen MARC File Upload</h1><br/>
81 <form id="vl-marc-upload-form" enctype="multipart/form-data">
82 <input type='hidden' name='ses' id='vl-ses-input'/>
84 <table class='form_table'>
88 <select id='vl-record-type' dojoType='dijit.form.FilteringSelect'
89 jsId='vlUploadRecordType' onchange='vlShowUploadForm();'>
90 <option value='bib' selected='selected'>Bibliographic Records</option>
91 <option value='auth'>Authority Records</option>
96 <td>Create a Upload New Queue</td>
98 <input type='text' dojoType='dijit.form.TextBox' id='vl-queue-name' size='32'></input>
100 <td>or Add to an Existing Queue</td>
102 <select jsId='vlUploadQueueSelector' dojoType='dijit.form.FilteringSelect'>
109 <select name='purpose' dojoType='dijit.form.FilteringSelect'>
110 <option value='import'>Import</option>
111 <option value='overlay'>Overlay</option>
117 <span id="vl-file-label">File to Upload:</span>
119 <td id='vl-input-td' colspan='4'>
120 <input size='48' type="file" name="marc_upload"/>
124 <td align='center' colspan='4'>
125 <button dojoType="dijit.form.Button" onclick="batchUpload()">Upload</button>
132 <!-- record queue grid -->
133 <div id='vl-queue-div' class='tall hidden'>
134 <h1>Record Queue</h1><br/>
135 <div id='vl-queue-no-records' class='hidden'><h2>There are no records in the selected queue</h2></div>
137 var vlQueueGridLayout;
138 function resetVlQueueGridLayout() {
139 vlQueueGridLayout = [{
140 defaultCell: {styles: 'text-align: center;'},
142 {name: '<input id="vl-queue-grid-row-selector" type="checkbox" onclick="vlToggleQueueGridSelect();"/>',
143 get: vlQueueGridDrawSelectBox },
144 {name: 'Import Time', field:'import_time', get:vlGetDateTimeField, selectableColumn:true}
149 <div id='vl-queue-div-grid' class='tall'>
150 <!-- column picker dialog -->
151 <div dojoType="dijit.Dialog" jsId='vlQueueGridColumePickerDialog' title="Column Picker" execute="alert(2);">
152 <table class='form_table'>
154 <tr><th width='33%'>Column</th><th width='33%'>Dislapy</th><th width='33%'>Auto Width</th></tr>
158 <td colspan='3' align='center'>
159 <button jsId='vlQueueGridColumnPickerButton'
160 onclick='vlQueueGridColumePickerDialog.hide();vlQueueGridColumePicker.update();'
161 dojoType='dijit.form.Button'>Done</button>
168 <!-- queue grid navigation row -->
169 <table width='100%' style='margin-bottom:0px;'>
172 <button dojoType='dijit.form.Button' onclick='vlImportSelectedRecords();'>Import Selected</button>
175 <style>.filter_td { padding-right: 5px; border-right: 2px solid #e8e1cf; } </style>
177 <td class='filter_td'>
178 Only show records with possible matches
179 <input dojoType='dijit.form.CheckBox' jsId='vlQueueGridShowMatches' checked='checked'/>
181 <td class='filter_td' style='padding-left:5px;'>
183 <select style='width:50px;' jsId='vlQueueDisplayLimit' dojoType='dijit.form.FilteringSelect' value='10'>
184 <option value='10'>10</option>
185 <option value='20'>20</option>
186 <option value='50'>50</option>
187 <option value='100'>100</option>
190 <td class='filter_td' style='padding-left:5px;'>
191 Page <input style='width:36px;' dojoType='dijit.form.TextBox' jsId='vlQueueDisplayPage' value='1'/>
192 </td style='padding-left:5px;'>
193 <td style='padding-left:5px;'>
194 <button dojoType='dijit.form.Button'
195 onclick='retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords)'>Refresh</button>
199 <td align='right' valign='bottom'>
200 <span style='padding-right:4px;'>
201 <a href='javascript:void(0);' onclick='
202 var page = parseInt(vlQueueDisplayPage.getValue());
204 vlQueueDisplayPage.setValue(page - 1);
205 retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords);'>« Previous Page</a>
207 <span style='padding-right:10px;'>
208 <a href='javascript:void(0);' onclick='
209 vlQueueDisplayPage.setValue(parseInt(vlQueueDisplayPage.getValue())+1);
210 retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords);'>Next Page »</a>
212 <span style='background:#e8e1cf;padding:3px 0px 0px 6px;-moz-border-radius:6px 0px 0px 0px;'>
213 <a href='javascript:void(0);' onclick='vlQueueGridColumePickerDialog.show();'>Select Columns</a>
221 <div dojoType='dojox.Grid' jsId='vlQueueGrid' class='tall'> </div>
226 <!-- Grid of record matches -->
227 <div id='vl-match-div' class='tall hidden'>
229 var vlMatchGridLayout;
230 function resetVlMatchGridLayout() {
231 vlMatchGridLayout = [{
232 defaultCell: {styles: 'text-align: center;'},
235 name: 'Overlay Target',
236 get: vlGetOverlayTargetSelector,
237 value: '<input type="radio" name="overlay_target" onclick="vlHandleOverlayTargetSelected();" id="vl-overlay-target-ID"/>'
239 {name:'Match Point', field:'field_type'},
240 {name: 'ID', field:'id'},
243 value:'<a href="javascript:void(0);" onclick="vlLoadMARCHtml(RECID);">View MARC</a>'
245 {name: 'Creator', get: vlGetCreator},
246 {name: 'Create Date', field:'create_date', get: vlGetDateTimeField},
247 {name: 'Last Edit Date', field:'edit_date', get: vlGetDateTimeField},
248 {name: 'Source', field:'source'},
249 {name: 'TCN Source', field:'tcn_source'},
250 {name: 'TCN Value', field:'tcn_value'}
255 <h1>Import Matches</h1><br/>
257 <button dojoType='dijit.form.Button'
258 onclick='displayGlobalDiv("vl-queue-div");'>Back To Import Queue...</button>
259 <span style='padding-left:20px;'>
260 <input dojoType='dijit.form.CheckBox' jsId='vlOverlayTargetEnable' onclick='vlHandleOverlayTargetSelected'/>
261 Overlay selected record with imported record
265 <div dojoType='dojox.Grid' jsId='vlMatchGrid'> </div>
269 <!-- MARC as HTML for matched records -->
270 <div id='vl-match-html-div' class='tall hidden'>
271 <h1>MARC Record</h1><br/>
273 <button dojoType='dijit.form.Button'
274 onclick='displayGlobalDiv("vl-match-div");'>Back To Matches...</button>
277 <style>#vl-match-record-html td {padding:0px;}</style>
278 <div id='vl-match-record-html'> </div>
282 <!-- Form for choosing which queue to view -->
283 <div id='vl-queue-select-div' class='tall hidden'>
284 <h1>Select a Queue to Inspect</h1><br/>
285 <table class='form_table'>
289 <select jsId='vlQueueSelectType' dojoType='dijit.form.FilteringSelect' onchange='vlShowQueueSelect();'>
290 <option value='bib' selected='selected'>Bibliographic Records</option>
291 <option value='auth'>Authority Records</option>
298 <select jsId='vlQueueSelectQueueList' dojoType='dijit.form.FilteringSelect'>
304 <button dojoType='dijit.form.Button' onclick='vlFetchQueueFromForm();'>Retrieve Queue</button>