Initial import.
This commit is contained in:
parent
bce93523ca
commit
d3b4793113
308 changed files with 23679 additions and 0 deletions
49
WebContent/slideshow.jsp
Normal file
49
WebContent/slideshow.jsp
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<%@ page import="zall.bean.*" %>
|
||||
<%@ page import="java.util.List" %>
|
||||
<%
|
||||
List<Image> imgs = (List<Image>)request.getAttribute("images");
|
||||
Image start_img = (Image)request.getAttribute("image");
|
||||
int start_id = 0;
|
||||
%>
|
||||
<DIV id="main">
|
||||
<DIV id="container">
|
||||
<DIV id="content">
|
||||
<div id="slideshow">
|
||||
<%
|
||||
int i = 0;
|
||||
for( Image image : imgs ){
|
||||
if( image == start_img )
|
||||
start_id = i;
|
||||
i++;
|
||||
%>
|
||||
<a href="media?type=<%=image.getType() %>&id=<%=image.getId() %>">
|
||||
<img src="content?type=<%=image.getType() %>&&id=<%=image.getId()%>&size=medium" alt="<%=image.getTitle()%>">
|
||||
<span class="desc"><%=( image.getDescription()!=null ? image.getDescription() : "No description available" ) %></span>
|
||||
</a>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Load theme
|
||||
Galleria.loadTheme('js/galleria/themes/classic/galleria.classic.min.js');
|
||||
|
||||
// run galleria and add some options
|
||||
jQuery('#slideshow').galleria({
|
||||
show: <%=start_id %>,
|
||||
imageCrop: false,
|
||||
transition: 'slide',
|
||||
popupLinks: false,
|
||||
autoplay: true,
|
||||
carousel: true,
|
||||
height: 450,
|
||||
dataConfig: function(img) {
|
||||
return {
|
||||
title: $(img).attr('alt'), // sets title to "John Doe",
|
||||
description: $(img).next('.desc').html() // sets description to "My picture"
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</DIV><!-- #content -->
|
||||
</DIV><!-- #container -->
|
||||
</DIV><!-- #main -->
|
||||
Loading…
Add table
Add a link
Reference in a new issue