Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

Uploadify ImageGallery: Only allows single image to upload: FIX


Go to End


1601 Views

Avatar
pinkp

Community Member, 182 Posts

8 March 2012 at 11:42pm

Im adding this post as I keep getting this problem and for those of you who need help like I did this is what fixed my problem.

Basically when I installed ImageGallery and Uploadify I sometimes have an issue where the Pop Up box for uploading new images has two browse buttons overlapping and will then only allow me to choose a single image to be uploaded from my computer.

This was only occurring in image gallery and not Files & Images.

The issue was the 'javascript' folder. Obviously there is a conflict between releases and the versions I have. So if you have the same issue I suggest you update the 'javascript' folder with the files below.

Perhaps this is only an issue for people like me who have older versions which I use as templates for newer sites. Anyway that was the problem. Hope this helps someone.

This is the script that I used.

imagegallery_init.js

// We'll avoid relying on any specific JS framework to keep this open.
window.onload = function() {
	if(gallery = document.getElementById('gallery-list'))
		gallery.className = "gallery-layout loaded";
}

imagegallerymanager_popup.js

(function($) {
$(function() {
	$('.rotate-controls a').click(function() {
		link = $(this).attr('href');
		 $.ajax({
		   url: link,
		   success: function(html){
		   	$('#preview-image img.preview').attr('src', html);
		   }
		
		});
		return false;
	});
});

$().ajaxSend(function(r,s){  
 $(".ajax-loader").slideDown();  
});  
   
$().ajaxStop(function(r,s){  
  $(".ajax-loader").slideUp();  
}); 
})(jQuery);