1 <!-- # Copyright (C) 2008 Georgia Public Library Service
2 # Bill Erickson <erickson@esilibrary.com>
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
15 <title>Vandelay</title>
16 <style type="text/css">
17 @import "/js/dojo/dojo/resources/dojo.css";
18 @import "/js/dojo/dijit/themes/tundra/tundra.css";
19 @import "/js/dojo/dijit/tests/css/dijitTests.css";
20 @import "/js/dojo/dojox/grid/_grid/Grid.css";
21 .container:after {content: ""; display: block; height: 0; clear: both; }
22 .form_table td { padding: 6px; }
23 table { border-collapse: collapse; }
32 .match_div a:visited {
36 .tall { height:100%; }
38 .hidden { display: none; }
39 #toolbar { margin-top: 0px; }
40 body { width:100%; height:100%; border:0; margin:0; padding:0; }
49 border: 1px solid red;
52 <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:false" src="/js/dojo/dojo/dojo.js"></script>
53 <script type="text/javascript" src='/js/dojo/openils/MarcXPathParser.js'></script>
54 <script type="text/javascript" src='vandelay.js'></script>
56 <body class="tundra tall">
57 <div dojoType="dijit.Toolbar" id='toolbar'>
58 <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"
59 onclick='displayGlobalDiv("vl-marc-upload-div");' showLabel="true">Import Records</div>
60 <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"
61 onclick='vlShowQueueSelect();' showLabel="true">Inspect Queue</div>
64 <div id="vl-generic-progress" class='progress'>
65 <div dojoType="dijit.ProgressBar" style="width:300px" indeterminate="true"></div>
67 <div id="vl-generic-progress-with-total" class='hidden progress'>
68 <div dojoType="dijit.ProgressBar" jsId='vlControlledProgressBar' style="width:300px"></div>
71 <div id='vl-marc-upload-status-div' class='hidden'>
72 <h1>Upload Status</h1><br/>
73 <div id='vl-upload-status-uploading'><h3>Uploading...</h3></div>
74 <div id='vl-upload-status-processing' class='hidden'>
75 <h3>Processing... <span id='vl-upload-status-count'/></h3>
79 <!-- MARC upload form -->
80 <div id='vl-marc-upload-div' class='hidden'>
81 <h1>Evergreen MARC File Upload</h1><br/>
82 <form id="vl-marc-upload-form" enctype="multipart/form-data">
83 <input type='hidden' name='ses' id='vl-ses-input'/>
85 <table class='form_table'>
89 <select id='vl-record-type' dojoType='dijit.form.FilteringSelect'
90 jsId='vlUploadRecordType' onchange='vlShowUploadForm();'>
91 <option value='bib' selected='selected'>Bibliographic Records</option>
92 <option value='auth'>Authority Records</option>
97 <td>Create a Upload New Queue</td>
99 <input type='text' dojoType='dijit.form.TextBox' id='vl-queue-name' size='32'></input>
101 <td>or Add to an Existing Queue</td>
103 <select jsId='vlUploadQueueSelector' dojoType='dijit.form.FilteringSelect'>
108 <td>Auto-Import Non-Colliding Records</td>
110 <input jsId='vlUploadQueueAutoImport' dojoType='dijit.form.CheckBox'/>
115 <span id="vl-file-label">File to Upload:</span>
117 <td id='vl-input-td' colspan='4'>
118 <input size='48' type="file" name="marc_upload"/>
122 <td align='center' colspan='4'>
123 <button dojoType="dijit.form.Button" onclick="batchUpload()">Upload</button>
130 <!-- record queue grid -->
131 <div id='vl-queue-div' class='tall hidden'>
132 <h1>Record Queue</h1><br/>
134 var vlQueueGridLayout;
135 function resetVlQueueGridLayout() {
136 vlQueueGridLayout = [{
137 defaultCell: {styles: 'text-align: center;'},
139 {name: '<input id="vl-queue-grid-row-selector" type="checkbox" onclick="vlToggleQueueGridSelect();"/>',
140 get: vlQueueGridDrawSelectBox },
141 {name: 'Import Time', field:'import_time', get:vlGetDateTimeField, selectableColumn:true}
146 <div id='vl-queue-div-grid' class='tall'>
147 <!-- column picker dialog -->
148 <div dojoType="dijit.Dialog" jsId='vlQueueGridColumePickerDialog' title="Column Picker" execute="alert(2);">
149 <table class='form_table'>
151 <tr><th width='33%'>Column</th><th width='33%'>Dislapy</th><th width='33%'>Auto Width</th></tr>
155 <td colspan='3' align='center'>
156 <button jsId='vlQueueGridColumnPickerButton'
157 onclick='vlQueueGridColumePickerDialog.hide();vlQueueGridColumePicker.update();'
158 dojoType='dijit.form.Button'>Done</button>
165 <!-- queue grid navigation row -->
166 <table width='100%' style='margin-bottom:0px;'>
169 <button dojoType='dijit.form.Button' onclick='vlImportSelectedRecords();'>Import Selected</button>
170 <button dojoType='dijit.form.Button' onclick='
171 if(confirm("Are you sure want to delete this queue?")) {
172 vlDeleteQueue(currentType, currentQueueId,
173 function() { displayGlobalDiv("vl-marc-upload-div"); });
174 }'>Delete Queue</button>
177 <style>.filter_td { padding-right: 5px; border-right: 2px solid #e8e1cf; } </style>
179 <td class='filter_td'>
180 Limit to Collision Matches
181 <input dojoType='dijit.form.CheckBox' jsId='vlQueueGridShowMatches' checked='checked'/>
183 <td class='filter_td' style='padding-left:5px;'>
185 <select style='width:68px;' jsId='vlQueueDisplayLimit' dojoType='dijit.form.FilteringSelect' value='10'>
186 <option value='10'>10</option>
187 <option value='20'>20</option>
188 <option value='50'>50</option>
189 <option value='100'>100</option>
192 <td class='filter_td' style='padding-left:5px;'>
193 Page <input style='width:36px;' dojoType='dijit.form.TextBox' jsId='vlQueueDisplayPage' value='1'/>
194 </td style='padding-left:5px;'>
195 <td style='padding-left:5px;'>
196 <button dojoType='dijit.form.Button'
197 onclick='retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords)'>Refresh</button>
201 <td align='right' valign='bottom'>
202 <span style='padding-right:4px;'>
203 <a href='javascript:void(0);' onclick='
204 var page = parseInt(vlQueueDisplayPage.getValue());
206 vlQueueDisplayPage.setValue(page - 1);
207 retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords);'>« Previous Page</a>
209 <span style='padding-right:10px;'>
210 <a href='javascript:void(0);' onclick='
211 vlQueueDisplayPage.setValue(parseInt(vlQueueDisplayPage.getValue())+1);
212 retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords);'>Next Page »</a>
214 <span style='background:#e8e1cf;padding:3px 0px 0px 6px;-moz-border-radius:6px 0px 0px 0px;'>
215 <a href='javascript:void(0);' onclick='vlQueueGridColumePickerDialog.show();'>Select Columns</a>
223 <div dojoType='dojox.Grid' jsId='vlQueueGrid' class='tall'> </div>
228 <!-- Grid of record matches -->
229 <div id='vl-match-div' class='tall hidden'>
231 var vlMatchGridLayout;
232 function resetVlMatchGridLayout() {
233 vlMatchGridLayout = [{
234 defaultCell: {styles: 'text-align: center;'},
237 name: 'Overlay Target',
238 get: vlGetOverlayTargetSelector,
239 value: '<input type="radio" name="overlay_target" onclick="vlHandleOverlayTargetSelected();" id="vl-overlay-target-ID"/>'
241 {name:'Match Point', field:'field_type'},
242 {name: 'ID', field:'id'},
245 value:'<a href="javascript:void(0);" onclick="vlLoadMARCHtml(RECID);">View MARC</a>'
247 {name: 'Creator', get: vlGetCreator},
248 {name: 'Create Date', field:'create_date', get: vlGetDateTimeField},
249 {name: 'Last Edit Date', field:'edit_date', get: vlGetDateTimeField},
250 {name: 'Source', field:'source'},
251 {name: 'TCN Source', field:'tcn_source'},
252 {name: 'TCN Value', field:'tcn_value'}
257 <h1>Import Matches</h1><br/>
259 <button dojoType='dijit.form.Button'
260 onclick='displayGlobalDiv("vl-queue-div");'>Back To Import Queue...</button>
261 <span style='padding-left:20px;'>
262 <input dojoType='dijit.form.CheckBox' jsId='vlOverlayTargetEnable' onclick='vlHandleOverlayTargetSelected'/>
263 Overlay selected record with imported record
267 <div dojoType='dojox.Grid' jsId='vlMatchGrid'> </div>
271 <!-- MARC as HTML for matched records -->
272 <div id='vl-match-html-div' class='tall hidden'>
273 <h1>MARC Record</h1><br/>
275 <button dojoType='dijit.form.Button'
276 onclick='displayGlobalDiv("vl-match-div");'>Back To Matches...</button>
279 <style>#vl-match-record-html td {padding:0px;}</style>
280 <div id='vl-match-record-html'> </div>
284 <!-- Form for choosing which queue to view -->
285 <div id='vl-queue-select-div' class='tall hidden'>
286 <h1>Select a Queue to Inspect</h1><br/>
287 <table class='form_table'>
291 <select jsId='vlQueueSelectType' dojoType='dijit.form.FilteringSelect' onchange='vlShowQueueSelect();'>
292 <option value='bib' selected='selected'>Bibliographic Records</option>
293 <option value='auth'>Authority Records</option>
300 <select jsId='vlQueueSelectQueueList' dojoType='dijit.form.FilteringSelect'>
306 <button dojoType='dijit.form.Button' onclick='vlFetchQueueFromForm();'>Retrieve Queue</button>