[open-ils-commits] SPAM: r10749 - in trunk/Open-ILS/web:
opac/locale/en-US vandelay
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Oct 3 10:15:24 EDT 2008
Author: erickson
Date: 2008-10-03 10:15:22 -0400 (Fri, 03 Oct 2008)
New Revision: 10749
Added:
trunk/Open-ILS/web/opac/locale/en-US/vandelay.dtd
Modified:
trunk/Open-ILS/web/vandelay/vandelay.js
trunk/Open-ILS/web/vandelay/vandelay.xml
Log:
Graham's patch for finishing up the bib/auth attribute editor and DTD-ification for i18n. w00t*2
Added: trunk/Open-ILS/web/opac/locale/en-US/vandelay.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/vandelay.dtd (rev 0)
+++ trunk/Open-ILS/web/opac/locale/en-US/vandelay.dtd 2008-10-03 14:15:22 UTC (rev 10749)
@@ -0,0 +1,81 @@
+<!ENTITY vandelay.add.existing.queue "or Add to an Existing Queue">
+<!ENTITY vandelay.auth.attrs "Authority attributes">
+<!ENTITY vandelay.auth.records "Authority Records">
+<!ENTITY vandelay.auto.import.noncolliding "Auto-Import Non-Colliding Records">
+<!ENTITY vandelay.auto.width "Auto Width">
+<!ENTITY vandelay.back.to.import.queue "Back To Import Queue">
+<!ENTITY vandelay.bib.attrs "Bibliographic attributes">
+<!ENTITY vandelay.bib.records "Bibliographic Records">
+<!ENTITY vandelay.cancel "Cancel">
+<!ENTITY vandelay.code "Code">
+<!ENTITY vandelay.column "Column">
+<!ENTITY vandelay.create.attr.def "Create Attribute Definition">
+<!ENTITY vandelay.create "Create">
+<!ENTITY vandelay.create.date "Create Date">
+<!ENTITY vandelay.create.upload.queue "Create a New Upload Queue">
+<!ENTITY vandelay.creator "Creator">
+<!ENTITY vandelay.delete.queue "Delete Queue">
+<!ENTITY vandelay.delete.record "Delete record">
+<!ENTITY vandelay.descrip "Description">
+<!ENTITY vandelay.dest.match.point "Destination Match Point">
+<!ENTITY vandelay.display "Display">
+<!ENTITY vandelay.done "Done">
+<!ENTITY vandelay.edit.attributes "Edit Attributes">
+<!ENTITY vandelay.edit.attrs "Edit Attributes">
+<!ENTITY vandelay.false "False">
+<!ENTITY vandelay.file.to.upload "File to Upload:">
+<!ENTITY vandelay.for.example "Example">
+<!ENTITY vandelay.identifier "Identifier">
+<!ENTITY vandelay.id.field "Identifer Field?">
+<!ENTITY vandelay.id "ID">
+<!ENTITY vandelay.import.matches "Import Matches">
+<!ENTITY vandelay.import.records "Import Records">
+<!ENTITY vandelay.import.selected "Import Selected">
+<!ENTITY vandelay.import.time "Import Time">
+<!ENTITY vandelay.inspect.queue "Inspect Queue">
+<!ENTITY vandelay.last.edit.date "Last Edit Date">
+<!ENTITY vandelay.limit.to.collision.matches "Limit to Collision Matches">
+<!ENTITY vandelay.limit.to.non.imported "Limit to Non-Imported Records">
+<!ENTITY vandelay.marc.file.upload "Evergreen MARC File Upload">
+<!ENTITY vandelay.marc.record "MARC Record">
+<!ENTITY vandelay.matches "Matches">
+<!ENTITY vandelay.next.page "Next Page">
+<!ENTITY vandelay.overlay.selected.record "Overlay selected record with imported record">
+<!ENTITY vandelay.overlay.target "Overlay Target">
+<!ENTITY vandelay.page "Page">
+<!ENTITY vandelay.powered.by.evergreen "Powered by Evergreen!">
+<!ENTITY vandelay.prev.page "Previous Page">
+<!ENTITY vandelay.processing "Processing... ">
+<!ENTITY vandelay.queue "Queue">
+<!ENTITY vandelay.queue.type "Queue Type">
+<!ENTITY vandelay.record.queue "Record Queue">
+<!ENTITY vandelay.record.type "Record Type">
+<!ENTITY vandelay.refresh "Refresh">
+<!ENTITY vandelay.remove.advanced "Remove (advanced)">
+<!ENTITY vandelay.remove "Remove">
+<!ENTITY vandelay.results.per.page "Results Per Page">
+<!ENTITY vandelay.retrieve.queue "Retrieve Queue">
+<!ENTITY vandelay.return "Return">
+<!ENTITY vandelay.select.cols "Select Columns">
+<!ENTITY vandelay.select.queue "Select a Queue to Inspect">
+<!ENTITY vandelay.source.match.point "Source Match Point">
+<!ENTITY vandelay.source "Source">
+<!ENTITY vandelay.subfields "Subfield(s)">
+<!ENTITY vandelay.subfield "Subfield">
+<!ENTITY vandelay.sure.to.delete "Are you sure you want to delete this record?">
+<!ENTITY vandelay.sure.to.delete.queue "Are you sure you want to delete this queue?">
+<!ENTITY vandelay.tags "Tag(s)">
+<!ENTITY vandelay.tag "Tag">
+<!ENTITY vandelay.tcn.source "TCN Source">
+<!ENTITY vandelay.tcn.value "TCN Value">
+<!ENTITY vandelay.tooltip.subfields "You can enter multiple subfields, separated by spaces and/or commas.">
+<!ENTITY vandelay.tooltip.tags "You can enter multiple tags, separated by spaces and/or commas.">
+<!ENTITY vandelay.true "True">
+<!ENTITY vandelay.update "Update">
+<!ENTITY vandelay.uploading "Uploading...">
+<!ENTITY vandelay.upload.status "Upload Status">
+<!ENTITY vandelay.upload "Upload">
+<!ENTITY vandelay.vandelay "Vandelay">
+<!ENTITY vandelay.view.marc "View MARC">
+<!ENTITY vandelay.xpath.advanced "XPath (advanced)">
+<!ENTITY vandelay.xpath "XPath">
Modified: trunk/Open-ILS/web/vandelay/vandelay.js
===================================================================
--- trunk/Open-ILS/web/vandelay/vandelay.js 2008-10-03 02:10:36 UTC (rev 10748)
+++ trunk/Open-ILS/web/vandelay/vandelay.js 2008-10-03 14:15:22 UTC (rev 10749)
@@ -20,6 +20,7 @@
dojo.require("dijit.layout.LayoutContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.TabContainer");
+dojo.require("dijit.layout.LayoutContainer");
dojo.require('dijit.form.Button');
dojo.require('dijit.Toolbar');
dojo.require('dijit.Tooltip');
@@ -48,7 +49,7 @@
'vl-marc-html-div',
'vl-queue-select-div',
'vl-marc-upload-status-div',
- 'vl-bib-attr-defs-div',
+ 'vl-attr-editor-div',
];
var authtoken;
@@ -88,7 +89,43 @@
runStartupCommands();
}
- // Fetch the bib and authority attribute definitions
+ // Fetch the bib and authority attribute definitions
+ vlFetchBibAttrDefs(function () { checkInitDone(); });
+ vlFetchAuthAttrDefs(function () { checkInitDone(); });
+
+ vlRetrieveQueueList('bib', null,
+ function(list) {
+ allUserBibQueues = list;
+ for(var i = 0; i < allUserBibQueues.length; i++) {
+ if(allUserBibQueues[i].complete() == 'f')
+ userBibQueues.push(allUserBibQueues[i]);
+ }
+ checkInitDone();
+ }
+ );
+
+ vlRetrieveQueueList('auth', null,
+ function(list) {
+ allUserAuthQueues = list;
+ for(var i = 0; i < allUserAuthQueues.length; i++) {
+ if(allUserAuthQueues[i].complete() == 'f')
+ userAuthQueues.push(allUserAuthQueues[i]);
+ }
+ checkInitDone();
+ }
+ );
+
+ vlAttrEditorInit();
+}
+
+
+dojo.addOnLoad(vlInit);
+
+
+// fetch the bib and authority attribute definitions
+
+function vlFetchBibAttrDefs(postcomplete) {
+ bibAttrDefs = [];
fieldmapper.standardRequest(
['open-ils.permacrud', 'open-ils.permacrud.search.vqbrad'],
{ async: true,
@@ -107,11 +144,14 @@
return 0;
}
);
- checkInitDone();
+ postcomplete();
}
}
);
+}
+function vlFetchAuthAttrDefs(postcomplete) {
+ authAttrDefs = [];
fieldmapper.standardRequest(
['open-ils.permacrud', 'open-ils.permacrud.search.vqarad'],
{ async: true,
@@ -130,34 +170,10 @@
return 0;
}
);
- checkInitDone();
+ postcomplete();
}
}
);
-
- vlRetrieveQueueList('bib', null,
- function(list) {
- allUserBibQueues = list;
- for(var i = 0; i < allUserBibQueues.length; i++) {
- if(allUserBibQueues[i].complete() == 'f')
- userBibQueues.push(allUserBibQueues[i]);
- }
- checkInitDone();
- }
- );
-
- vlRetrieveQueueList('auth', null,
- function(list) {
- allUserAuthQueues = list;
- for(var i = 0; i < allUserAuthQueues.length; i++) {
- if(allUserAuthQueues[i].complete() == 'f')
- userAuthQueues.push(allUserAuthQueues[i]);
- }
- checkInitDone();
- }
- );
-
- bibAttrInit();
}
function vlRetrieveQueueList(type, filter, onload) {
@@ -193,8 +209,8 @@
currentType = cgi.param('qtype');
if(currentQueueId)
return retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords);
+ dojo.style('vl-nav-bar', 'visibility', 'visible');
vlShowUploadForm();
-
}
/**
@@ -235,7 +251,7 @@
}
/**
- * Tells vendelay to pull a batch of records from the cache and explode them
+ * Tells vandelay to pull a batch of records from the cache and explode them
* out into the vandelay tables
*/
function processSpool(key, queueId, type, onload) {
@@ -265,20 +281,19 @@
var method = 'open-ils.vandelay.'+type+'_queue.records.retrieve.atomic';
if(vlQueueGridShowMatches.checked)
method = method.replace('records', 'records.matches');
- var params = [authtoken, queueId, {clear_marc: 1, offset: offset, limit: limit}];
- if(vlQueueGridShowNonImport.checked)
- params[2].non_imported = 1;
-
-
var limit = parseInt(vlQueueDisplayLimit.getValue());
var offset = limit * parseInt(vlQueueDisplayPage.getValue()-1);
fieldmapper.standardRequest(
['open-ils.vandelay', method],
{ async: true,
- params: params,
-
+ params: [authtoken, queueId,
+ { clear_marc: 1,
+ offset: offset,
+ limit: limit
+ }
+ ],
/* intermittent bug in streaming, multipart requests prevents use of onreponse for now...
onresponse: function(r) {
var rec = r.recv().content();
@@ -356,13 +371,13 @@
}
// now populate the grid
- vlPopulateGrid(vlMatchGrid, dataStore);
+ vlPopulateMatchGrid(vlMatchGrid, dataStore);
}
}
);
}
-function vlPopulateGrid(grid, data) {
+function vlPopulateMatchGrid(grid, data) {
var store = new dojo.data.ItemFileReadStore({data:data});
var model = new dojox.grid.data.DojoData(
null, store, {rowsPerPage: 100, clientSort: true, query:{id:'*'}});
@@ -741,75 +756,182 @@
retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords);
}
-dojo.addOnLoad(vlInit);
//------------------------------------------------------------
-// bib-attr, auth-attr
+// attribute editors
-function bibAttrInit() {
- // set up tooltips on attr_record forms
- connectTooltip('bib-attr-tag');
- connectTooltip('bib-attr-subfield');
+// attribute-editor global variables
+
+var ATTR_EDITOR_IN_UPDATE_MODE = false; // true on 'edit', false on 'create'
+var ATTR_EDIT_ID = null; // id of current 'edit' attribute
+var ATTR_EDIT_GROUP = 'bib'; // bib-attrs or auth-attrs
+
+function vlAttrEditorInit() {
+ // set up tooltips on the edit form
+ connectTooltip('attr-editor-tags');
+ connectTooltip('attr-editor-subfields');
}
-function vlShowBibAttrDefs() {
- displayGlobalDiv('vl-bib-attr-defs-div');
- loadBibAttrGrid();
+function vlShowAttrEditor() {
+ displayGlobalDiv('vl-attr-editor-div');
+ loadAttrEditorGrid();
+ idHide('vl-generic-progress');
}
-function idStyle(obid, k, v) { document.getElementById(obid).style[k] = v; }
-function show(obid) { idStyle(obid, 'display', 'block'); }
-function hide(obid) { idStyle(obid, 'display' , 'none'); }
-function textOf(obid) { return document.getElementById(obid).innerHTML; }
-
-function saveNewBibAttrRecord(arg) {
- // pretend to save...
- hide('vl-bib-attr-defs-div');
- show('vl-generic-progress');
- // not really saving anything yet. For now, just remove the
- // progress bar after a moment and return to the table.
- setTimeout("show('vl-bib-attr-defs-div');hide('vl-generic-progress');", 1000);
+function setAttrEditorGroup(groupName) {
+ // put us into 'bib'-attr or 'auth'-attr mode.
+ if (ATTR_EDIT_GROUP != groupName) {
+ ATTR_EDIT_GROUP = groupName;
+ loadAttrEditorGrid();
+ }
}
function onAttrEditorOpen() {
+ // the "bars" have the create/update/cancel/etc. buttons.
+ var create_bar = document.getElementById('attr-editor-create-bar');
+ var update_bar = document.getElementById('attr-editor-update-bar');
+ if (ATTR_EDITOR_IN_UPDATE_MODE) {
+ update_bar.style.display='table-row';
+ create_bar.style.display='none';
+ // hide the dropdown-button
+ idStyle('vl-create-attr-editor-button', 'visibility', 'hidden');
+ } else {
+ dijit.byId('attr-editor-dialog').reset();
+ create_bar.style.display='table-row';
+ update_bar.style.display='none';
+ }
}
function onAttrEditorClose() {
- // reset the form to a "create" form. (We may have borrowed it for "editing".)
- var dialog = dojo.byId('bib-attr-dialog');
- var create_bar = dialog.getElementsByClassName('create_bar')[0];
- var update_bar = dialog.getElementsByClassName('update_bar')[0];
- create_bar.style.display='table-row';
- update_bar.style.display='none';
- idStyle('vl-create-bib-attr-button', 'visibility', 'visible');
- dijit.byId('bib-attr-dialog').reset();
+ // reset the form to a "create" form. (We may have borrowed it for editing.)
+ ATTR_EDITOR_IN_UPDATE_MODE = false;
+ // show the dropdown-button
+ idStyle('vl-create-attr-editor-button', 'visibility', 'visible');
}
-function loadBibAttrGrid() {
- var store = new dojo.data.ItemFileReadStore({data:vqbrad.toStoreData(bibAttrDefs)});
+function loadAttrEditorGrid() {
+ var _data = (ATTR_EDIT_GROUP == 'auth') ?
+ vqarad.toStoreData(authAttrDefs) : vqbrad.toStoreData(bibAttrDefs) ;
+
+ var store = new dojo.data.ItemFileReadStore({data:_data});
var model = new dojox.grid.data.DojoData(
null, store, {rowsPerPage: 100, clientSort: true, query:{id:'*'}});
- bibAttrGrid.setModel(model);
- bibAttrGrid.setStructure(bibAttrGridLayout);
- bibAttrGrid.onRowClick = onBibAttrClick;
- bibAttrGrid.update();
+ attrEditorGrid.setModel(model);
+ attrEditorGrid.setStructure(vlAttrGridLayout);
+ attrEditorGrid.onRowClick = onAttrEditorClick;
+ attrEditorGrid.update();
}
-var xpathParser = new openils.MarcXPathParser();
-
-function getTag(n) {
+function attrGridGetTag(n) {
// grid helper: return the tags from the row's xpath column.
var xp = this.grid.model.getRow(n);
return xp && xpathParser.parse(xp.xpath).tags;
}
-function getSubfield(n) {
+function attrGridGetSubfield(n) {
// grid helper: return the subfields from the row's xpath column.
var xp = this.grid.model.getRow(n);
return xp && xpathParser.parse(xp.xpath).subfields;
}
+function onAttrEditorClick(evt) {
+ var row = attrEditorGrid.model.getRow(evt.rowIndex);
+ ATTR_EDIT_ID = row.id;
+ ATTR_EDITOR_IN_UPDATE_MODE = true;
+
+ // populate the popup editor.
+ dojo.byId('attr-editor-code').value = row.code;
+ dojo.byId('attr-editor-description').value = row.description;
+ var parsed_xpath = xpathParser.parse(row.xpath);
+ dojo.byId('attr-editor-tags').value = parsed_xpath.tags;
+ dojo.byId('attr-editor-subfields').value = parsed_xpath.subfields;
+ dojo.byId('attr-editor-identifier').value = (row.ident ? 'True':'False');
+ dojo.byId('attr-editor-xpath').value = row.xpath;
+ dojo.byId('attr-editor-remove').value = row.remove;
+
+ // set up UI for editing
+ dojo.byId('vl-create-attr-editor-button').click();
+}
+
+function vlSaveAttrDefinition(data) {
+ idHide('vl-attr-editor-div');
+ idShow('vl-generic-progress');
+
+ data.id = ATTR_EDIT_ID;
+
+ // this ought to honour custom xpaths, but overwrite xpaths
+ // derived from tags/subfields.
+ if (data.xpath == '' || looksLikeDerivedXpath(data.xpath)) {
+ var _xpath = tagAndSubFieldsToXpath(data.tag, data.subfield);
+ data.xpath = _xpath;
+ }
+
+ // build up our permacrud params. Key variables here are
+ // "create or update" and "bib or auth".
+
+ var isAuth = (ATTR_EDIT_GROUP == 'auth');
+ var isCreate = (ATTR_EDIT_ID == null);
+ var rad = isAuth ? new vqarad() : new vqbrad() ;
+ var method = 'open-ils.permacrud' + (isCreate ? '.create.' : '.update.')
+ + (isAuth ? 'vqarad' : 'vqbrad');
+ var _data = rad.fromStoreItem(data);
+
+ _data.ischanged(1);
+
+ fieldmapper.standardRequest(
+ ['open-ils.permacrud', method],
+ { async: true,
+ params: [authtoken, _data ],
+ onresponse: function(r) { },
+ oncomplete: function(r) {
+ attrEditorFetchAttrDefs(vlShowAttrEditor);
+ ATTR_EDIT_ID = null;
+ },
+ onerror: function(r) {
+ alert('vlSaveAttrDefinition comms error: ' + r);
+ }
+ }
+ );
+}
+
+function attrEditorFetchAttrDefs(callback) {
+ var fn = (ATTR_EDIT_GROUP == 'auth') ? vlFetchAuthAttrDefs : vlFetchBibAttrDefs;
+ return fn(callback);
+}
+
+function vlAttrDelete() {
+ idHide('vl-attr-editor-div');
+ idShow('vl-generic-progress');
+
+ var isAuth = (ATTR_EDIT_GROUP == 'auth');
+ var method = 'open-ils.permacrud.delete.' + (isAuth ? 'vqarad' : 'vqbrad');
+ var rad = isAuth ? new vqarad() : new vqbrad() ;
+ fieldmapper.standardRequest(
+ ['open-ils.permacrud', method],
+ { async: true,
+ params: [authtoken, rad.fromHash({ id : ATTR_EDIT_ID }), ],
+ oncomplete: function() {
+ dijit.byId('attr-editor-dialog').onCancel(); // close the dialog
+ attrEditorFetchAttrDefs(vlShowAttrEditor);
+ ATTR_EDIT_ID = null;
+ },
+ onerror: function(r) {
+ alert('vlAttrDelete comms error: ' + r);
+ }
+ }
+ );
+}
+
+// ------------------------------------------------------------
+// utilities for attribute editors
+
+// dom utilities (maybe dojo does these, and these should be replaced)
+
+function idStyle(obId, k, v) { document.getElementById(obId).style[k] = v; }
+function idShow(obId) { idStyle(obId, 'display', 'block'); }
+function idHide(obId) { idStyle(obId, 'display' , 'none'); }
+
function connectTooltip(fieldId) {
// Given an element id, look up a tooltip element in the doc (same
// id with a '-tip' suffix) and associate the two. Maybe dojo has
@@ -821,26 +943,31 @@
dojo.connect(fld, 'onblur', function(evt) { dijit.hideTooltip(fld); });
}
+// xpath utilities
-function onBibAttrClick(evt) {
- var row = bibAttrGrid.model.getRow(evt.rowIndex);
- // populate the popup editor.
- dojo.byId('oils-bib-attr-code').value = row.code;
- dojo.byId('bib-attr-description').value = row.description;
- var _xpath = row.xpath;
- var xpath = xpathParser.parse(_xpath);
- dojo.byId('bib-attr-tag').value = xpath.tags;
- dojo.byId('bib-attr-subfield').value = xpath.subfields;
- dojo.byId('bib-attr-ident-selector').value = (row.ident ? 'True':'False');
- dojo.byId('bib-attr-xpath').value = _xpath;
- dojo.byId('bib-attr-remove').value = row.remove;
+var xpathParser = new openils.MarcXPathParser();
- // set up UI for editing
- var dialog = dojo.byId('bib-attr-dialog');
- var create_bar = dialog.getElementsByClassName('create_bar')[0];
- var update_bar = dialog.getElementsByClassName('update_bar')[0];
- create_bar.style.display='none';
- update_bar.style.display='table-row';
- idStyle('vl-create-bib-attr-button', 'visibility', 'hidden');
- dojo.byId('vl-create-bib-attr-button').click();
+function tagAndSubFieldsToXpath(tags, subfields) {
+ // given tags, and subfields, build up an XPath.
+ try {
+ var parts = {
+ 'tags':tags.match(/[\d]+/g),
+ 'subfields':subfields.match(/[a-zA-z]/g) };
+ return xpathParser.compile(parts);
+ } catch (err) {
+ return {'parts':null, 'tags':null, 'error':err};
+ }
}
+
+function looksLikeDerivedXpath(path) {
+ // Does this path look like it was derived from tags and subfields?
+ var parsed = xpathParser.parse(path);
+ if (parsed.tags == null)
+ return false;
+ var compiled = xpathParser.compile(parsed);
+ return (path == compiled);
+}
+
+// amazing xpath-util unit-tests
+if (!looksLikeDerivedXpath('//*[@tag="901"]/*[@code="c"]')) alert('vandelay xpath-utility error');
+if ( looksLikeDerivedXpath('ba-boo-ba-boo!')) alert('vandelay xpath-utility error');
Modified: trunk/Open-ILS/web/vandelay/vandelay.xml
===================================================================
--- trunk/Open-ILS/web/vandelay/vandelay.xml 2008-10-03 02:10:36 UTC (rev 10748)
+++ trunk/Open-ILS/web/vandelay/vandelay.xml 2008-10-03 14:15:22 UTC (rev 10749)
@@ -15,12 +15,12 @@
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
- <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/vandelay.dtd"-->
]>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
- <title>Vandelay</title>
+ <title>&vandelay.vandelay;</title>
<link type='text/css' rel='stylesheet' href="/vandelay/vandelay.css"/>
<script type="text/javascript" djConfig="parseOnLoad: true,isDebug:false" src="/js/dojo/dojo/dojo.js"></script>
<script type="text/javascript" src='/js/dojo/openils/MarcXPathParser.js'></script>
@@ -31,15 +31,15 @@
<!-- navigation toolbar -->
- <div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
+ <div dojoType="dijit.layout.ContentPane" layoutAlign='top' id="vl-nav-bar" style="visibility: hidden;">
<div dojoType="dijit.Toolbar" id='toolbar'>
<div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"
- onclick="displayGlobalDiv('vl-marc-upload-div');" showLabel="true">Import Records</div>
+ onclick="displayGlobalDiv('vl-marc-upload-div');" showLabel="true">&vandelay.import.records;</div>
<div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"
- onclick="vlShowQueueSelect();" showLabel="true">Inspect Queue</div>
+ onclick="vlShowQueueSelect();" showLabel="true">&vandelay.inspect.queue;</div>
<div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"
- onclick="vlShowBibAttrDefs();" showLabel="true">Bib Attr Definitions</div>
+ onclick="vlShowAttrEditor();" showLabel="true">&vandelay.edit.attributes;</div>
</div>
</div>
@@ -51,49 +51,49 @@
</div>
<div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-marc-upload-status-div' class='hidden'>
- <h1>Upload Status</h1><br/>
- <div id='vl-upload-status-uploading'><h3>Uploading...</h3></div>
+ <h1>&vandelay.upload.status;</h1><br/>
+ <div id='vl-upload-status-uploading'><h3>&vandelay.uploading;</h3></div>
<div id='vl-upload-status-processing' class='hidden'>
- <h3>Processing... <span id='vl-upload-status-count'/></h3>
+ <h3>&vandelay.processing;<span id='vl-upload-status-count'/></h3>
</div>
</div>
<!-- MARC upload form -->
<div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-marc-upload-div' class='hidden'>
- <h1>Evergreen MARC File Upload</h1><br/>
+ <h1>&vandelay.marc.file.upload;</h1><br/>
<form id="vl-marc-upload-form" enctype="multipart/form-data">
<input type='hidden' name='ses' id='vl-ses-input'/>
<table class='form_table'>
<tr>
- <td>Record Type</td>
+ <td>&vandelay.record.type;</td>
<td colspan='4'>
<select id='vl-record-type' dojoType='dijit.form.FilteringSelect'
jsId='vlUploadRecordType' onchange='vlShowUploadForm();'>
- <option value='bib' selected='selected'>Bibliographic Records</option>
- <option value='auth'>Authority Records</option>
+ <option value='bib' selected='selected'>&vandelay.bib.records;</option>
+ <option value='auth'>&vandelay.auth.records;</option>
</select>
</td>
</tr>
<tr>
- <td>Create a New Upload Queue</td>
+ <td>&vandelay.create.upload.queue;</td>
<td>
<input type='text' dojoType='dijit.form.TextBox' id='vl-queue-name' size='32'></input>
</td>
- <td>or Add to an Existing Queue</td>
+ <td>&vandelay.add.existing.queue;</td>
<td>
<select jsId='vlUploadQueueSelector' dojoType='dijit.form.FilteringSelect'>
</select>
</td>
</tr>
<tr>
- <td>Auto-Import Non-Colliding Records</td>
+ <td>&vandelay.auto.import.noncolliding;</td>
<td colspan='4'>
<input jsId='vlUploadQueueAutoImport' dojoType='dijit.form.CheckBox'/>
</td>
</tr>
<tr>
<td>
- <span id="vl-file-label">File to Upload:</span>
+ <span id="vl-file-label">&vandelay.file.to.upload;</span>
</td>
<td id='vl-input-td' colspan='4'>
<input size='48' type="file" name="marc_upload"/>
@@ -101,7 +101,7 @@
</tr>
<tr>
<td align='center' colspan='4'>
- <button dojoType="dijit.form.Button" onclick="batchUpload()">Upload</button>
+ <button dojoType="dijit.form.Button" onclick="batchUpload()">&vandelay.upload;</button>
</td>
</tr>
</table>
@@ -110,7 +110,7 @@
<!-- record queue grid -->
<div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-queue-div' class='tall hidden'>
- <h1>Record Queue</h1><br/>
+ <h1>&vandelay.record.queue;</h1><br/>
<script>
var vlQueueGridLayout;
function resetVlQueueGridLayout() {
@@ -119,16 +119,16 @@
cells : [[
{name: '<input id="vl-queue-grid-row-selector" type="checkbox" onclick="vlToggleQueueGridSelect();"/>',
get: vlQueueGridDrawSelectBox },
- { name: 'View MARC',
+ { name: '&vandelay.view.marc;',
get: vlGetViewMARC,
value:'<a href="javascript:void(0);" onclick="vlLoadMARCHtml(RECID, false, '+
- 'function(){displayGlobalDiv(\'vl-queue-div\');});">View MARC</a>'
+ 'function(){displayGlobalDiv(\'vl-queue-div\');});">&vandelay.view.marc;</a>'
},
- { name: 'Matches',
+ { name: '&vandelay.matches;',
get: vlGetViewMatches,
- value:'<a href="javascript:void(0);" onclick="vlLoadMatchUI(RECID);">Matches</a>'
+ value:'<a href="javascript:void(0);" onclick="vlLoadMatchUI(RECID);">&vandelay.matches;</a>'
},
- {name: 'Import Time', field:'import_time', get:vlGetDateTimeField, selectableColumn:true}
+ {name: '&vandelay.import.time;', field:'import_time', get:vlGetDateTimeField, selectableColumn:true}
]]
}];
}
@@ -139,14 +139,14 @@
<div dojoType="dijit.Dialog" jsId='vlQueueGridColumePickerDialog' title="Column Picker" execute="alert(2);">
<table class='form_table'>
<thead>
- <tr><th width='33%'>Column</th><th width='33%'>Display</th><th width='33%'>Auto Width</th></tr>
+ <tr><th width='33%'>&vandelay.column;</th><th width='33%'>&vandelay.display;</th><th width='33%'>&vandelay.auto.width;</th></tr>
</thead>
<tbody>
<tr>
<td colspan='3' align='center'>
<button jsId='vlQueueGridColumnPickerButton'
onclick='vlQueueGridColumePickerDialog.hide();vlQueueGridColumePicker.update();'
- dojoType='dijit.form.Button'>Done</button>
+ dojoType='dijit.form.Button'>&vandelay.done;</button>
</td>
</tr>
</tbody>
@@ -158,26 +158,26 @@
<table width='100%' style='margin-bottom:0px;'>
<tr>
<td align='left'>
- <button dojoType='dijit.form.Button' onclick='vlImportSelectedRecords();'>Import Selected</button>
+ <button dojoType='dijit.form.Button' onclick='vlImportSelectedRecords();'>&vandelay.import.selected;</button>
<button dojoType='dijit.form.Button' onclick="
- if(confirm('Are you sure want to delete this queue?')) {
+ if(confirm('&vandelay.sure.to.delete.queue;')) {
vlDeleteQueue(currentType, currentQueueId,
function() { displayGlobalDiv('vl-marc-upload-div'); });
- }">Delete Queue</button>
+ }">&vandelay.delete.queue;</button>
</td>
<td align='middle'>
<style>.filter_td { padding-right: 5px; border-right: 2px solid #e8e1cf; } </style>
<table><tr>
<td class='filter_td'>
- Limit to Collision Matches
+ &vandelay.limit.to.collision.matches;
<input dojoType='dijit.form.CheckBox' jsId='vlQueueGridShowMatches'/>
</td>
<td class='filter_td' style='padding-left:5px;'>
- Limit to Non-Imported Records
+ &vandelay.limit.to.non.imported;
<input dojoType='dijit.form.CheckBox' jsId='vlQueueGridShowNonImport' checked='checked'/>
</td>
<td class='filter_td' style='padding-left:5px;'>
- Results Per Page
+ &vandelay.results.per.page;
<select style='width:68px;' jsId='vlQueueDisplayLimit' dojoType='dijit.form.FilteringSelect' value='10'>
<option value='10'>10</option>
<option value='20'>20</option>
@@ -186,23 +186,23 @@
</select>
</td>
<td class='filter_td' style='padding-left:5px;'>
- Page <input style='width:36px;' dojoType='dijit.form.TextBox' jsId='vlQueueDisplayPage' value='1'/>
+ &vandelay.page; <input style='width:36px;' dojoType='dijit.form.TextBox' jsId='vlQueueDisplayPage' value='1'/>
</td>
<td style='padding-left:5px;'>
<button dojoType='dijit.form.Button'
- onclick='retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords)'>Refresh</button>
+ onclick='retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords)'>&vandelay.refresh;</button>
</td>
</tr></table>
</td>
<td align='right' valign='bottom'>
<span style='padding-right:4px;'>
- <a href='javascript:void(0);' onclick='vlQueueGridPrevPage();'>« Previous Page</a>
+ <a href='javascript:void(0);' onclick='vlQueueGridPrevPage();'>« &vandelay.prev.page;</a>
</span>
<span style='padding-right:10px;'>
- <a href='javascript:void(0);' onclick='vlQueueGridNextPage();'>Next Page »</a>
+ <a href='javascript:void(0);' onclick='vlQueueGridNextPage();'>&vandelay.next.page; »</a>
</span>
<span style='background:#e8e1cf;padding:3px 0px 0px 6px;-moz-border-radius:6px 0px 0px 0px;'>
- <a href='javascript:void(0);' onclick='vlQueueGridColumePickerDialog.show();'>Select Columns</a>
+ <a href='javascript:void(0);' onclick='vlQueueGridColumePickerDialog.show();'>&vandelay.select.cols;</a>
</span>
</td>
</tr>
@@ -225,36 +225,36 @@
defaultCell: {styles: 'text-align: center;'},
cells : [[
{
- name: 'Overlay Target',
+ name: '&vandelay.overlay.target;',
get: vlGetOverlayTargetSelector,
value: '<input type="radio" name="overlay_target" '+
'onclick="vlHandleOverlayTargetSelected();" id="vl-overlay-target-ID"/>'
},
- {name:'Source Match Point', field:'src_matchpoint'},
- {name:'Destination Match Point', field:'dest_matchpoint'},
- {name: 'ID', field:'id'},
- { name: 'View MARC',
+ {name:'&vandelay.source.match.point;', field:'src_matchpoint'},
+ {name:'&vandelay.dest.match.point;', field:'dest_matchpoint'},
+ {name: '&vandelay.id;', field:'id'},
+ { name: '&vandelay.view.marc;',
get: vlGetViewMARC,
value:'<a href="javascript:void(0);" onclick="vlLoadMARCHtml(RECID, '+
- 'true, function(){displayGlobalDiv(\'vl-match-div\');});">View MARC</a>'
+ 'true, function(){displayGlobalDiv(\'vl-match-div\');});">&vandelay.view.marc;</a>'
},
- {name: 'Creator', get: vlGetCreator},
- {name: 'Create Date', field:'create_date', get: vlGetDateTimeField},
- {name: 'Last Edit Date', field:'edit_date', get: vlGetDateTimeField},
- {name: 'Source', field:'source'},
- {name: 'TCN Source', field:'tcn_source'},
- {name: 'TCN Value', field:'tcn_value'}
+ {name: '&vandelay.creator;', get: vlGetCreator},
+ {name: '&vandelay.create.date;', field:'create_date', get: vlGetDateTimeField},
+ {name: '&vandelay.last.edit.date;', field:'edit_date', get: vlGetDateTimeField},
+ {name: '&vandelay.source;', field:'source'},
+ {name: '&vandelay.tcn.source;', field:'tcn_source'},
+ {name: '&vandelay.tcn.value;', field:'tcn_value'}
]]
}];
}
</script>
- <h1>Import Matches</h1><br/>
+ <h1>&vandelay.import.matches;</h1><br/>
<div>
<button dojoType='dijit.form.Button'
- onclick="displayGlobalDiv('vl-queue-div');">↖ Back To Import Queue</button>
+ onclick="displayGlobalDiv('vl-queue-div');">↖ &vandelay.back.to.import.queue;</button>
<span style='padding-left:20px;'>
<input dojoType='dijit.form.CheckBox' jsId='vlOverlayTargetEnable' onclick='vlHandleOverlayTargetSelected'/>
- Overlay selected record with imported record
+ &vandelay.overlay.selected.record;
</span>
</div>
<div class='tall'>
@@ -264,9 +264,9 @@
<!-- MARC as HTML -->
<div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-marc-html-div' class='tall hidden'>
- <h1>MARC Record</h1><br/>
+ <h1>&vandelay.marc.record;</h1><br/>
<div>
- <button id='vl-marc-html-done-button' dojoType='dijit.form.Button'>↖ Return</button>
+ <button id='vl-marc-html-done-button' dojoType='dijit.form.Button'>↖ &vandelay.return;</button>
</div>
<div>
<style>#vl-marc-record-html td {padding:0px;}</style>
@@ -276,19 +276,19 @@
<!-- Form for choosing which queue to view -->
<div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-queue-select-div' class='tall hidden'>
- <h1>Select a Queue to Inspect</h1><br/>
+ <h1>&vandelay.select.queue;</h1><br/>
<table class='form_table'>
<tr>
- <td>Queue Type</td>
+ <td>&vandelay.queue.type;</td>
<td>
<select jsId='vlQueueSelectType' dojoType='dijit.form.FilteringSelect' onchange='vlShowQueueSelect();'>
- <option value='bib' selected='selected'>Bibliographic Records</option>
- <option value='auth'>Authority Records</option>
+ <option value='bib' selected='selected'>&vandelay.bib.records;</option>
+ <option value='auth'>&vandelay.auth.records;</option>
</select>
</td>
</tr>
<tr>
- <td>Queue</td>
+ <td>&vandelay.queue;</td>
<td>
<select jsId='vlQueueSelectQueueList' dojoType='dijit.form.FilteringSelect'>
</select>
@@ -296,88 +296,94 @@
</tr>
<tr>
<td colspan='2'>
- <button dojoType='dijit.form.Button' onclick='vlFetchQueueFromForm();'>Retrieve Queue</button>
+ <button dojoType='dijit.form.Button' onclick='vlFetchQueueFromForm();'>&vandelay.retrieve.queue;</button>
</td>
</tr>
</table>
</div>
- <!-- bib attribute definitions -->
- <div dojoType="dijit.layout.ContentPane" id="vl-bib-attr-defs-div"
- class='hidden bib-attr-detail-content-pane' title="Bib Attr Definition" style='height:400px;' layoutAlign="client">
+ <!-- attribute editor -->
+ <div dojoType="dijit.layout.ContentPane" id="vl-attr-editor-div"
+ class='hidden attr-editor-detail-content-pane' title='&vandelay.edit.attrs;' style='height:400px;' layoutAlign="client">
- <div class='vl-bib-attr-defs-actions-div' style='margin:8px;'>
-
- <div dojoType="dijit.form.DropDownButton" id="vl-create-bib-attr-button">
- <span name="create">Create Attribute Definition</span>
- <span name="update" class="hidden">Update Attribute Definition</span>
-
- <div dojoType="dijit.TooltipDialog" execute="saveNewBibAttrRecord(arguments[0]);" id="bib-attr-dialog">
+ <div style='margin:8px;'>
+ <div style='float: left; margin-top: 8px;'>
+ <input dojoType="dijit.form.RadioButton" name="attrEditorGroup" value="bib"
+ id="aegB" onclick="setAttrEditorGroup('bib');" checked="checked"/>
+ <label for="aegB" style="margin-right: 1em;">&vandelay.bib.attrs;</label>
+ <input dojoType="dijit.form.RadioButton" name="attrEditorGroup" value="auth"
+ id="aegA" onclick="setAttrEditorGroup('auth');"/>
+ <label for="aegA" style="margin-right: 1em;">&vandelay.auth.attrs;</label>
+ </div>
+ <div dojoType="dijit.form.DropDownButton" id="vl-create-attr-editor-button">
+ <span name="create">&vandelay.create.attr.def;</span>
+ <div dojoType="dijit.TooltipDialog" execute="vlSaveAttrDefinition(arguments[0]);" id="attr-editor-dialog">
<script type='dojo/connect' event='onOpen'>onAttrEditorOpen();</script>
<script type='dojo/connect' event='onClose'>onAttrEditorClose();</script>
<table class='dijitTooltipTable'>
<tr>
- <td><label for="code">Code: </label></td>
- <td><input id='oils-bib-attr-code' name="code" dojoType="dijit.form.TextBox"/></td>
+ <td><label for="code">&vandelay.code;:</label></td>
+ <td><input id='attr-editor-code' name="code" dojoType="dijit.form.TextBox"/></td>
</tr>
<tr>
- <td><label for="description">Description: </label></td>
- <td><input id='bib-attr-description' dojoType="dijit.form.TextBox" name="description"> </input></td>
+ <td><label for="description">&vandelay.descrip;:</label></td>
+ <td><input id='attr-editor-description' dojoType="dijit.form.TextBox" name="description"> </input></td>
</tr>
<tr>
- <td><label for="amount">Tag(s): </label></td>
- <td><input id="bib-attr-tag" dojoType="dijit.form.TextBox" name="tag"></input>
- <div class="hidden" id="bib-attr-tag-tip">
- <p>You can enter multiple tags, separated by spaces and/or commas.</p>
- <p>Example: <code>120, 220, 300</code> or <code>120 220 330</code></p></div>
+ <td><label for="amount">&vandelay.tags;:</label></td>
+ <td><input id="attr-editor-tags" dojoType="dijit.form.TextBox" name="tag"></input>
+ <div class="hidden" id="attr-editor-tags-tip">
+ <p>&vandelay.tooltip.tags;</p>
+ <p>&vandelay.for.example;:<code>120, 220, 300</code> or <code>120 220 330</code></p></div>
</td>
</tr>
<tr>
- <td><label for="amount">Subfield(s): </label></td>
- <td><input dojoType="dijit.form.TextBox" name="subfield" id="bib-attr-subfield"></input></td>
- <div class="hidden" id="bib-attr-subfield-tip">
- <p>You can enter multiple subfields, separated by spaces and/or commas.</p>
- <p>Example: <code>a, b, j, x</code> or <code>a b j x</code></p></div>
+ <td><label for="amount">&vandelay.subfields;:</label></td>
+ <td><input dojoType="dijit.form.TextBox" name="subfield" id="attr-editor-subfields"></input></td>
+ <div class="hidden" id="attr-editor-subfields-tip">
+ <p>&vandelay.tooltip.subfields;</p>
+ <p>&vandelay.for.example;: <code>a, b, j, x</code> or <code>a b j x</code></p></div>
</tr>
<tr>
- <td><label for="ident">Identifer Field?: </label></td>
+ <td><label for="ident">&vandelay.id.field;: </label></td>
<td>
- <select dojoType="dijit.form.FilteringSelect" name="ident" id="bib-attr-ident-selector">
- <option value='f' selected='selected'>False</option>
- <option value='t'>True</option>
+ <select dojoType="dijit.form.FilteringSelect" name="ident" id="attr-editor-identifier">
+ <option value='f' selected='selected'>&vandelay.false;</option>
+ <option value='t'>&vandelay.true;</option>
</select>
</td>
</tr>
<tr>
- <td><label for="amount">XPath (advanced): </label></td>
+ <td><label for="attr-editor-xpath">&vandelay.xpath.advanced;: </label></td>
- <td><input dojoType="dijit.form.TextBox" id="bib-attr-xpath" name="xpath"></input></td>
+ <td><input dojoType="dijit.form.TextBox" id="attr-editor-xpath" name="xpath"></input></td>
</tr>
<tr>
- <td><label for="amount">Remove (advanced): </label></td>
+ <td><label for="attr-editor-remove">&vandelay.remove.advanced;: </label></td>
- <td><input dojoType="dijit.form.TextBox" id="bib-attr-remove" name="remove"></input></td>
+ <td><input dojoType="dijit.form.TextBox" id="attr-editor-remove" name="remove"></input></td>
</tr>
- <tr class="create_bar">
+ <tr id="attr-editor-create-bar">
<td colspan='2' align='center'>
<button dojoType="dijit.form.Button" type="submit"
- id="bib-attr-create-button">Create</button>
+ id="attr-editor-create-button">&vandelay.create;</button>
<button type="button" dojoType="dijit.form.Button"
- onclick="dijit.byId('bib-attr-dialog').onCancel();">Cancel</button>
+ onclick="dijit.byId('attr-editor-dialog').onCancel();">&vandelay.cancel;</button>
</td>
</tr>
- <tr class="update_bar">
+ <tr id="attr-editor-update-bar">
<td colspan='2' align='center'>
<button dojoType="dijit.form.Button" type="submit"
- id="bib-attr-update-button">Update</button>
+ id="attr-editor-update-button">&vandelay.update;</button>
<button type="button" dojoType="dijit.form.Button"
- onclick="dijit.byId('bib-attr-dialog').onCancel();">Cancel</button>
+ onclick="dijit.byId('attr-editor-dialog').onCancel();">&vandelay.cancel;</button>
<button dojoType="dijit.form.Button"
type="button"
- id="bib-attr-delete-button"
- style="padding-left: 2em;">Delete record</button>
+ id="attr-editor-delete-button"
+ style="padding-left: 2em;"
+ onclick="if(confirm('&vandelay.sure.to.delete;')) { vlAttrDelete(); }">&vandelay.delete.record;</button>
</td>
</tr>
</table>
@@ -387,29 +393,29 @@
</div>
<script>
- var bibAttrGridLayout = [{
+ var vlAttrGridLayout = [{
cells : [[
- {name: 'ID', field: 'id'},
- {name: 'Code', field:'code', width:'auto'},
- {name: 'Description', field: "description", width:'auto'},
- {name: 'Tag', get:getTag},
- {name: 'Subfield', get: getSubfield},
- {name: 'Identifier', field:'ident'},
- {name: 'XPath', field:'xpath', width:'auto'},
- {name: 'Remove', field:'remove', width:'auto'}
+ {name: '&vandelay.id;', field: 'id'},
+ {name: '&vandelay.code;', field:'code', width:'auto'},
+ {name: '&vandelay.descrip;', field: "description", width:'auto'},
+ {name: '&vandelay.tag;', get:attrGridGetTag},
+ {name: '&vandelay.subfield;', get: attrGridGetSubfield},
+ {name: '&vandelay.identifier;', field:'ident'},
+ {name: '&vandelay.xpath;', field:'xpath', width:'auto'},
+ {name: '&vandelay.remove;', field:'remove', width:'auto'}
]]
}];
</script>
<div class='tall'>
- <div dojoType='dojox.Grid' jsId='bibAttrGrid'> </div>
+ <div dojoType='dojox.Grid' jsId='attrEditorGrid'> </div>
</div>
</div>
<!--
<div style='text-align:center;width:100%;' dojoType="dijit.layout.ContentPane" layoutAlign='bottom'>
- Powered by Evergreen!
+ &vandelay.powered.by.evergreen;
</div>
-->
</div>
More information about the open-ils-commits
mailing list