From: erickson Date: Tue, 7 Oct 2008 12:48:39 +0000 (+0000) Subject: only expose the marc editor for queued recs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=36bc484ccd7aa999b9cf586d7db97df6ec8abe06;p=Evergreen.git only expose the marc editor for queued recs git-svn-id: svn://svn.open-ils.org/ILS/trunk@10776 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/vandelay/vandelay.js b/Open-ILS/web/vandelay/vandelay.js index c13a90e327..7ad50b3e31 100644 --- a/Open-ILS/web/vandelay/vandelay.js +++ b/Open-ILS/web/vandelay/vandelay.js @@ -384,23 +384,35 @@ function vlPopulateMatchGrid(grid, data) { 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,