mardi 27 janvier 2015

Sharepoint 2013 picture library slideshow image size in view



I Want to use picture library slideshow web part in my share point 2013 portal but the size of pictures are too small I found a solution over here a script when I use it, slideshow working find but whenever I create a view of this library and used this view to show images in slideshow. Same issue occurs. I used following script to resolve this:



<script type="text/javascript">


function SlideshowObjectInitializer() {

ShowPic = (function(ShowPicOrig) {
return function() {

var ssObj = arguments[0]; //SlideShow object
var curPicIdx=ssObj.index; //current picture index

ShowPicOrig.apply(this, arguments); //call original ShowPic

//apply some changes to display original picture in SlideShow control
ssObj.image.src = ssObj.linkArray[curPicIdx]; //display original image instead of web image
//change picture & container size to auto instead of fixed (by default web image size is used)
ssObj.image.setAttribute('height','100%');
ssObj.image.setAttribute('width','100%');
var cell = ssObj.cell;
cell.style.width = 'auto';
cell.style.height = 'auto';
cell.style.display = '';
var pcell = ssObj.cell.parentNode;
pcell.style.width = 'auto';
pcell.style.height = 'auto';
};
})(ShowPic);

ExecuteOrDelayUntilScriptLoaded(SlideshowObjectInitializer, 'imglib.js');
</script>


but this is not working if I create a view. Please help me to resolve it.








0 commentaires:

Enregistrer un commentaire