want to cut the display text of sidebar facet in dspace 4.x XMLUI



sidebarfacet of dspace 4.x XMLUI


In the above, items under "DDC Subject" is showing with '::' like -> "DEWEY DECIMAL CLASSIFICATION::GENERALITIES::Bibliography (1)", I want to display it like -> "Bibliography (1)". For this purpose I have written the following script in the file [dspace-install]/webapps/xmlui/static/js/discovery/search-control.js->





function cutText(){

var headvalue = $('div#aspect_discovery_Navigation_list_discovery ul li h2').innerHTML;

if(headvalue.match('DDC Subject')){
var displaytext = $('#aspect_discovery_Navigation_list_discovery ul li ul li a').innerHTML;
var y = displaytext.split("::");
if(y.len>1)
var display = y[y.len-1];

alert(display);
$('#aspect_discovery_Navigation_list_discovery ul li ul li a').innerHTML = display;

}
}



But its not working. Can anyone help?


No comments:

Post a Comment