Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
ETD Framework JQuery listing
$(document).ready(function(){
if (($.trim($('#Frameworks').find(":selected").text())) == "Electronic Theses and Dissertations"){
$('a:contains("LEADER")').append('<span class="etd"> ( dc.type - set position 6 to "a" [or "m" for multimedia ETD], position 7 as "m" )</span>');
$('a:contains("FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION")').append('<span class="etd"> | THESIS DATE ( dc.date - positions 7-10 )</span>');
$('a:contains("MAIN ENTRY--PERSONAL NAME")').replaceWith('<span class="etd"> AUTHOR OF THESIS / DISSERTATION ( dc.creator ) </span>');
$('div[id^="subfield100a"] > label > span.subfield').text('Name (first, last)');
$('a:contains("TITLE STATEMENT")').replaceWith('<span class="etd"> TITLE OF THESIS / DISSERTATION ( dc.title ) </span>');
$('a:contains("TRANSLATION OF TITLE BY CATALOGING AGENCY")').replaceWith('<span class="etd"> TRANSLATED TITLE ( dc.title.translated ) </span>');
$('a:contains("VARYING FORM OF TITLE")').replaceWith('<span class="etd"> ALTERNATIVE TITLE ( dc.title.alternative ) </span>');
$('a:contains("PUBLICATION, DISTRIBUTION, ETC.")').replaceWith('<span class="etd"> INSTITUTION PRODUCING THESIS / DISSERTATION ( dc.publisher ) </span>');
$('a:contains("DISSERTATION NOTE")').replaceWith('<span class="etd"> NAME OF DEGREE AWARDED ( thesis.degree.name ) </span>');
$('div[id^="subfield502a"] > label > span.subfield').text('Degree');
$('div[id^="subfield260a"] > label > span.subfield').text('Place (e.g. Mumbai)');
$('div[id^="subfield260b"] > label > span.subfield').text('Institution Name');
$('a:contains("INDEX TERM--UNCONTROLLED")').append('<span class="etd"> | SUBJECT ( dc.subject ) </span>');
$('div[id^="subfield653a"] > label > span.subfield').text('Subject');
$('a:contains("SUMMARY, ETC")').replaceWith('<span class="etd"> ABSTRACT ( dc.description.abstract ) </span>');
$('div[id^="subfield520a"] > label > span.subfield').text('Abstract');
$('a:contains("BIBLIOGRAPHY, ETC. NOTE")').replaceWith('<span class="etd"> BIBLIOGRAPHIC NOTE ( dc.description.note ) </span>');
$('div[id^="subfield504a"] > label > span.subfield').text('Bibliographic note');
$('a:contains("INDEX TERM--GENRE/FORM")').append('<span class="etd"> ( dc.type ) </span>');
$('a:contains("ADDED ENTRY--CORPORATE NAME")').replaceWith('<span class="etd"> INSTITUTION / DEPARTMENT ( thesis.degree.grantor / thesis.degree.discipline ) </span>');
$('input[name^="tag_710_subfield_4"]').attr('readonly', true);
$('div[id^="subfield710a"] > label > span.subfield').text('Institution name');
$('div[id^="subfield710b"] > label > span.subfield').text('Department');
$('select[name^="tag_710_subfield_e"] option:not(:selected)').remove();
$('a:contains("ADDED ENTRY--UNCONTROLLED NAME")').replaceWith('<span class="etd"> DETAILS OF GUIDE / SUPERVISOR ( dc.contributor ) </span>');
$('div[id^="subfield720a"] > label > span.subfield').text('Name');
$('div[id^="subfield720e"] > label > span.subfield').text('Role');
$('div[id^="subfield260a"] > label > span.subfield').text('Place (e.g. Mumbai)');
$('a:contains("ELECTRONIC LOCATION AND ACCESS")').append('<span class="etd"> | UPLOAD THESIS / DISSERTATION </span>');
$('div[id^="subfield856u"] > label > span.subfield').text('Thesis / Dissertation URL / File upload');
$('a[id^="buttonDot_tag_856_subfield_u"]').addClass('tag_editor_upload').removeClass('tag_editor');
$('a[id^="buttonDot_tag_856_subfield_u"]').text('Upload Thesis / Dissertation');
$('a[id^="buttonDot_tag_856_subfield_u"]').attr('title','Upload Thesis / Dissertation');
$('select[name^="tag_942_subfield_c"] option:not(:selected)').remove();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment