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; }
24 table.dijitTooltipTable { border-collapse: separate; } // else the tooltip-table is ugly
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; }
42 .progress {margin: 20px;}
46 border: 1px solid red;
49 <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:false" src="/js/dojo/dojo/dojo.js"></script>
50 <script type="text/javascript" src='/js/dojo/openils/MarcXPathParser.js'></script>
51 <script type="text/javascript" src='vandelay.js'></script>
53 <body class="tundra tall">
54 <div dojoType="dijit.layout.LayoutContainer" orientation="vertical" class="tall">
57 <!-- navigation toolbar -->
58 <div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
59 <div dojoType="dijit.Toolbar" id='toolbar'>
60 <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"
61 onclick='displayGlobalDiv("vl-marc-upload-div");' showLabel="true">Import Records</div>
62 <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"
63 onclick='vlShowQueueSelect();' showLabel="true">Inspect Queue</div>
65 <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"
66 onclick="vlShowBibAttrDefs();" showLabel="true">Bib Attr Definitions</div>
70 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id="vl-generic-progress" class='progress'>
71 <div dojoType="dijit.ProgressBar" style="width:300px" indeterminate="true"></div>
73 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id="vl-generic-progress-with-total" class='hidden progress'>
74 <div dojoType="dijit.ProgressBar" jsId='vlControlledProgressBar' style="width:300px"></div>
77 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-marc-upload-status-div' class='hidden'>
78 <h1>Upload Status</h1><br/>
79 <div id='vl-upload-status-uploading'><h3>Uploading...</h3></div>
80 <div id='vl-upload-status-processing' class='hidden'>
81 <h3>Processing... <span id='vl-upload-status-count'/></h3>
85 <!-- MARC upload form -->
86 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-marc-upload-div' class='hidden'>
87 <h1>Evergreen MARC File Upload</h1><br/>
88 <form id="vl-marc-upload-form" enctype="multipart/form-data">
89 <input type='hidden' name='ses' id='vl-ses-input'/>
91 <table class='form_table'>
95 <select id='vl-record-type' dojoType='dijit.form.FilteringSelect'
96 jsId='vlUploadRecordType' onchange='vlShowUploadForm();'>
97 <option value='bib' selected='selected'>Bibliographic Records</option>
98 <option value='auth'>Authority Records</option>
103 <td>Create a New Upload Queue</td>
105 <input type='text' dojoType='dijit.form.TextBox' id='vl-queue-name' size='32'></input>
107 <td>or Add to an Existing Queue</td>
109 <select jsId='vlUploadQueueSelector' dojoType='dijit.form.FilteringSelect'>
114 <td>Auto-Import Non-Colliding Records</td>
116 <input jsId='vlUploadQueueAutoImport' dojoType='dijit.form.CheckBox'/>
121 <span id="vl-file-label">File to Upload:</span>
123 <td id='vl-input-td' colspan='4'>
124 <input size='48' type="file" name="marc_upload"/>
128 <td align='center' colspan='4'>
129 <button dojoType="dijit.form.Button" onclick="batchUpload()">Upload</button>
136 <!-- record queue grid -->
137 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-queue-div' class='tall hidden'>
138 <h1>Record Queue</h1><br/>
140 var vlQueueGridLayout;
141 function resetVlQueueGridLayout() {
142 vlQueueGridLayout = [{
143 defaultCell: {styles: 'text-align: center;'},
145 {name: '<input id="vl-queue-grid-row-selector" type="checkbox" onclick="vlToggleQueueGridSelect();"/>',
146 get: vlQueueGridDrawSelectBox },
149 value:'<a href="javascript:void(0);" onclick="vlLoadMARCHtml(RECID, false, '+
150 'function(){displayGlobalDiv(\'vl-queue-div\');});">View MARC</a>'
153 get: vlGetViewMatches,
154 value:'<a href="javascript:void(0);" onclick="vlLoadMatchUI(RECID);">Matches</a>'
156 {name: 'Import Time', field:'import_time', get:vlGetDateTimeField, selectableColumn:true}
161 <div id='vl-queue-div-grid' class='tall' dojoType="dijit.layout.ContentPane" layoutAlign='client'>
163 <!-- column picker dialog -->
164 <div dojoType="dijit.Dialog" jsId='vlQueueGridColumePickerDialog' title="Column Picker" execute="alert(2);">
165 <table class='form_table'>
167 <tr><th width='33%'>Column</th><th width='33%'>Display</th><th width='33%'>Auto Width</th></tr>
171 <td colspan='3' align='center'>
172 <button jsId='vlQueueGridColumnPickerButton'
173 onclick='vlQueueGridColumePickerDialog.hide();vlQueueGridColumePicker.update();'
174 dojoType='dijit.form.Button'>Done</button>
181 <!-- queue grid navigation row -->
182 <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
183 <table width='100%' style='margin-bottom:0px;'>
186 <button dojoType='dijit.form.Button' onclick='vlImportSelectedRecords();'>Import Selected</button>
187 <button dojoType='dijit.form.Button' onclick='
188 if(confirm("Are you sure want to delete this queue?")) {
189 vlDeleteQueue(currentType, currentQueueId,
190 function() { displayGlobalDiv("vl-marc-upload-div"); });
191 }'>Delete Queue</button>
194 <style>.filter_td { padding-right: 5px; border-right: 2px solid #e8e1cf; } </style>
196 <td class='filter_td'>
197 Limit to Collision Matches
198 <input dojoType='dijit.form.CheckBox' jsId='vlQueueGridShowMatches' checked='checked'/>
200 <td class='filter_td' style='padding-left:5px;'>
202 <select style='width:68px;' jsId='vlQueueDisplayLimit' dojoType='dijit.form.FilteringSelect' value='10'>
203 <option value='10'>10</option>
204 <option value='20'>20</option>
205 <option value='50'>50</option>
206 <option value='100'>100</option>
209 <td class='filter_td' style='padding-left:5px;'>
210 Page <input style='width:36px;' dojoType='dijit.form.TextBox' jsId='vlQueueDisplayPage' value='1'/>
211 </td style='padding-left:5px;'>
212 <td style='padding-left:5px;'>
213 <button dojoType='dijit.form.Button'
214 onclick='retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords)'>Refresh</button>
218 <td align='right' valign='bottom'>
219 <span style='padding-right:4px;'>
220 <a href='javascript:void(0);' onclick='
221 var page = parseInt(vlQueueDisplayPage.getValue());
223 vlQueueDisplayPage.setValue(page - 1);
224 retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords);'>« Previous Page</a>
226 <span style='padding-right:10px;'>
227 <a href='javascript:void(0);' onclick='
228 vlQueueDisplayPage.setValue(parseInt(vlQueueDisplayPage.getValue())+1);
229 retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords);'>Next Page »</a>
231 <span style='background:#e8e1cf;padding:3px 0px 0px 6px;-moz-border-radius:6px 0px 0px 0px;'>
232 <a href='javascript:void(0);' onclick='vlQueueGridColumePickerDialog.show();'>Select Columns</a>
240 <div class='' style='height:90%;' dojoType="dijit.layout.ContentPane" layoutAlign='client'>
241 <div dojoType='dojox.Grid' jsId='vlQueueGrid'> </div>
246 <!-- Grid of record matches -->
247 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-match-div' class='tall hidden'>
249 var vlMatchGridLayout;
250 function resetVlMatchGridLayout() {
251 vlMatchGridLayout = [{
252 defaultCell: {styles: 'text-align: center;'},
255 name: 'Overlay Target',
256 get: vlGetOverlayTargetSelector,
257 value: '<input type="radio" name="overlay_target" '+
258 'onclick="vlHandleOverlayTargetSelected();" id="vl-overlay-target-ID"/>'
260 {name:'Source Match Point', field:'src_matchpoint'},
261 {name:'Destination Match Point', field:'dest_matchpoint'},
262 {name: 'ID', field:'id'},
265 value:'<a href="javascript:void(0);" onclick="vlLoadMARCHtml(RECID, '+
266 'true, function(){displayGlobalDiv(\'vl-match-div\');});">View MARC</a>'
268 {name: 'Creator', get: vlGetCreator},
269 {name: 'Create Date', field:'create_date', get: vlGetDateTimeField},
270 {name: 'Last Edit Date', field:'edit_date', get: vlGetDateTimeField},
271 {name: 'Source', field:'source'},
272 {name: 'TCN Source', field:'tcn_source'},
273 {name: 'TCN Value', field:'tcn_value'}
278 <h1>Import Matches</h1><br/>
280 <button dojoType='dijit.form.Button'
281 onclick='displayGlobalDiv("vl-queue-div");'>↖ Back To Import Queue</button>
282 <span style='padding-left:20px;'>
283 <input dojoType='dijit.form.CheckBox' jsId='vlOverlayTargetEnable' onclick='vlHandleOverlayTargetSelected'/>
284 Overlay selected record with imported record
288 <div dojoType='dojox.Grid' jsId='vlMatchGrid'> </div>
292 <!-- MARC as HTML -->
293 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-marc-html-div' class='tall hidden'>
294 <h1>MARC Record</h1><br/>
296 <button id='vl-marc-html-done-button' dojoType='dijit.form.Button'>↖ Return</button>
299 <style>#vl-marc-record-html td {padding:0px;}</style>
300 <div id='vl-marc-record-html'> </div>
304 <!-- Form for choosing which queue to view -->
305 <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-queue-select-div' class='tall hidden'>
306 <h1>Select a Queue to Inspect</h1><br/>
307 <table class='form_table'>
311 <select jsId='vlQueueSelectType' dojoType='dijit.form.FilteringSelect' onchange='vlShowQueueSelect();'>
312 <option value='bib' selected='selected'>Bibliographic Records</option>
313 <option value='auth'>Authority Records</option>
320 <select jsId='vlQueueSelectQueueList' dojoType='dijit.form.FilteringSelect'>
326 <button dojoType='dijit.form.Button' onclick='vlFetchQueueFromForm();'>Retrieve Queue</button>
332 <!-- bib attribute definitions -->
333 <div dojoType="dijit.layout.ContentPane" id="vl-bib-attr-defs-div"
334 class='hidden bib-attr-detail-content-pane' title="Bib Attr Definition" style='height:400px;' layoutAlign="client">
336 <div class='vl-bib-attr-defs-actions-div' style='margin:8px;'>
338 <div dojoType="dijit.form.DropDownButton" id="vl-create-bib-attr-button">
339 <span name="create">Create Attribute Definition</span>
340 <span name="update" class="hidden">Update Attribute Definition</span>
342 <div dojoType="dijit.TooltipDialog" execute="saveNewBibAttrRecord(arguments[0]);" id="bib-attr-dialog">
343 <script type='dojo/connect' event='onOpen'>onAttrEditorOpen();</script>
344 <script type='dojo/connect' event='onClose'>onAttrEditorClose();</script>
345 <table class='dijitTooltipTable'>
347 <td><label for="code">Code: </label></td>
348 <td><input id='oils-bib-attr-code' name="code" dojoType="dijit.form.TextBox"/></td>
351 <td><label for="description">Description: </label></td>
352 <td><input id='bib-attr-description' dojoType="dijit.form.TextBox" name="description"> </input></td>
355 <td><label for="amount">Tag(s): </label></td>
356 <td><input id="bib-attr-tag" dojoType="dijit.form.TextBox" name="tag"></input>
357 <div class="hidden" id="bib-attr-tag-tip">
358 <p>You can enter multiple tags, separated by spaces and/or commas.</p>
359 <p>Example: <code>120, 220, 300</code> or <code>120 220 330</code></p></div>
364 <td><label for="amount">Subfield(s): </label></td>
365 <td><input dojoType="dijit.form.TextBox" name="subfield" id="bib-attr-subfield"></input></td>
366 <div class="hidden" id="bib-attr-subfield-tip">
367 <p>You can enter multiple subfields, separated by spaces and/or commas.</p>
368 <p>Example: <code>a, b, j, x</code> or <code>a b j x</code></p></div>
372 <td><label for="ident">Identifer Field?: </label></td>
374 <select dojoType="dijit.form.FilteringSelect" name="ident" id="bib-attr-ident-selector">
375 <option value='f' selected='selected'>False</option>
376 <option value='t'>True</option>
381 <td><label for="amount">XPath (advanced): </label></td>
383 <td><input dojoType="dijit.form.TextBox" id="bib-attr-xpath" name="xpath"></input></td>
386 <td><label for="amount">Remove (advanced): </label></td>
388 <td><input dojoType="dijit.form.TextBox" id="bib-attr-remove" name="remove"></input></td>
390 <tr class="create_bar">
391 <td colspan='2' align='center'>
392 <button dojoType="dijit.form.Button" type="submit"
393 id="bib-attr-create-button">Create</button>
394 <button type="button" dojoType="dijit.form.Button"
395 onclick="dijit.byId('bib-attr-dialog').onCancel();">Cancel</button>
398 <tr class="update_bar">
399 <td colspan='2' align='center'>
400 <button dojoType="dijit.form.Button" type="submit"
401 id="bib-attr-update-button">Update</button>
402 <button type="button" dojoType="dijit.form.Button"
403 onclick="dijit.byId('bib-attr-dialog').onCancel();">Cancel</button>
404 <button dojoType="dijit.form.Button"
406 id="bib-attr-delete-button"
407 style="padding-left: 2em;">Delete record</button>
417 var bibAttrGridLayout = [{
419 {name: 'ID', field: 'id'},
420 {name: 'Code', field:'code', width:'auto'},
421 {name: 'Description', field: "description", width:'auto'},
422 {name: 'Tag', get:getTag},
423 {name: 'Subfield', get: getSubfield},
424 {name: 'Identifier', field:'ident'},
425 {name: 'XPath', field:'xpath', width:'auto'},
426 {name: 'Remove', field:'remove', width:'auto'}
432 <div dojoType='dojox.Grid' jsId='bibAttrGrid'> </div>
437 <div style='text-align:center;width:100%;' dojoType="dijit.layout.ContentPane" layoutAlign='bottom'>
438 Powered by Evergreen!