[open-ils-commits] r10776 - trunk/Open-ILS/web/vandelay
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Oct 7 08:48:40 EDT 2008
Author: erickson
Date: 2008-10-07 08:48:39 -0400 (Tue, 07 Oct 2008)
New Revision: 10776
Modified:
trunk/Open-ILS/web/vandelay/vandelay.js
Log:
only expose the marc editor for queued recs
Modified: trunk/Open-ILS/web/vandelay/vandelay.js
===================================================================
--- trunk/Open-ILS/web/vandelay/vandelay.js 2008-10-07 11:57:58 UTC (rev 10775)
+++ trunk/Open-ILS/web/vandelay/vandelay.js 2008-10-07 12:48:39 UTC (rev 10776)
@@ -384,23 +384,35 @@
grid.update();
}
+function showMe(id) {
+ dojo.style(dojo.byId(id), 'display', 'block');
+}
+function hideMe(id) {
+ dojo.style(dojo.byId(id), 'display', 'none');
+}
+
function vlLoadMARCHtml(recId, inCat, oncomplete) {
dijit.byId('vl-marc-html-done-button').onClick = oncomplete;
- dijit.byId('vl-marc-html-edit-button').onClick = function() {vlLoadMarcEditor(currentType, recId);};
displayGlobalDiv('vl-generic-progress');
var api;
var params = [recId, 1];
+
if(inCat) {
+ hideMe('vl-marc-html-edit-button'); // don't show marc editor button
+ dijit.byId('vl-marc-html-edit-button').onClick = function(){}
api = ['open-ils.search', 'open-ils.search.biblio.record.html'];
if(currentType == 'auth')
api = ['open-ils.search', 'open-ils.search.authority.to_html'];
} else {
+ showMe('vl-marc-html-edit-button'); // plug in the marc editor button
+ dijit.byId('vl-marc-html-edit-button').onClick = function() {vlLoadMarcEditor(currentType, recId);};
params = [authtoken, recId];
api = ['open-ils.vandelay', 'open-ils.vandelay.queued_bib_record.html'];
if(currentType == 'auth')
api = ['open-ils.vandelay', 'open-ils.vandelay.queued_authority_record.html'];
}
+
fieldmapper.standardRequest(
api,
{ async: true,
More information about the open-ils-commits
mailing list