summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app/views/browse/galleryView.gsp
blob: 8ffd167d96bc167c597c4f63137cf790c596de72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

<div id="gallery">

	<g:each in="${collection}" var="entry">
		<g:galleryEntryIfImage entry="${entry}">
			<img
				src="${createLink(controller:'image',action:'generateThumbnail',params:[absPath:entry.formattedAbsolutePath])}"
				alt="${entry.pathOrName}" abspath="${entry.formattedAbsolutePath}" />
				<div><h2>${entry.formattedAbsolutePath}</h2>
				<br/>
				<h2>Size: ${entry.dataSize}</h2>
				<br/>
				<h2>Click <a href="${resource(absolute:true,dir:'file/download',file:entry.formattedAbsolutePath)}"> here </a> to download full size image</h2>
				</div>

		</g:galleryEntryIfImage>
	</g:each>
</div>

<script type="text/javascript">
	jQuery(document).ready(function($) {
		   Galleria.loadTheme(context + '/js/themes/classic/galleria.classic.min.js');
		   $("#gallery").galleria({
		        width: 800,
		        height: 750,
		        dataConfig: function(img) {
		            return {
		                description: $(img).next('div').html()
		            }
		        }
		    });
	});
	
	function lightboxImageLoaded(data) {
		alert("loaded:" + data);
	}

	
</script>