Question

SP 2007 / Moss: I have a picture library where I want to show the thumbnail in the list view but make it unclickable. Right now when I click on it, it goes to the display form.

When I go into the picture library settings, there isn't a thumbnail column to edit. I can't even see it in the Picture content type.

Could / Should I use CSS, jQuery or JavaScript to make the link unclickable?

Is there another way without resorting to code?

Was it helpful?

Solution

No 2007 handy but depending on your browser coverage you can easily do that with CSS:

.ms-vb-icon a { 
    pointer-events: none
}

.ms-vb-icon is a sample selector from icons in document libraries, you need to identify how to target the column that contains the link with the thumbnail using your Web Developer Tools/Inspector.

https://jsfiddle.net/dmhLc3rx/

EDIT: jquery alternative

$(".ms-vb2 a").on("click", function(e) { 
    e.stopPropagation(); // this stops other click events from firing
    return false; // this stops the browser from following the href attribute
});
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top