2012-04-17 03:34:25 +00:00
|
|
|
|
<% if ad_banner -%>
|
|
|
|
|
|
2012-04-25 03:38:45 +00:00
|
|
|
|
<div class="modal hide fade in banner-preview" id="slideshow-<%=ad_banner.title.dehumanize%>">
|
2012-04-17 03:34:25 +00:00
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<a class="close" data-dismiss="modal">×</a>
|
2012-11-27 03:15:15 +00:00
|
|
|
|
<h3><%= t(:preview) %></h3>
|
2012-04-17 03:34:25 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<p class="ad_banner_slideshow">
|
|
|
|
|
<% preview_block_ad_images_helper(ad_banner).each do |ad_image| -%>
|
2012-07-25 21:58:09 +00:00
|
|
|
|
<%= image_tag ad_image.file,:alt => (ad_image.title || " "),:time_to_next => ad_banner.transition_msec,:link_open=> ad_image.link_open, :link_url =>((ad_image.out_link || ad_banner.context || " ")) %>
|
2012-04-17 03:34:25 +00:00
|
|
|
|
<% end -%>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
2012-11-27 03:15:15 +00:00
|
|
|
|
<a href="#" class="btn" data-dismiss="modal"><%= t(:close) %></a>
|
2012-04-17 03:34:25 +00:00
|
|
|
|
</div>
|
2012-04-25 03:38:45 +00:00
|
|
|
|
<div>
|
|
|
|
|
<script type="text/javascript" src="/static/kernel.js"></script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
|
|
$("#slideshow-<%=ad_banner.title.dehumanize%>").on("show", function () {
|
|
|
|
|
$("#slideshow-<%=ad_banner.title.dehumanize%>").find(".ad_banner_slideshow").cycle({delay: -1000, fx: "<%= ad_banner.ad_fx.nil?? "fade": ad_banner.ad_fx %>", timeoutFn: getTimeout });
|
|
|
|
|
});
|
|
|
|
|
$(".modal").on("hidden", function () {
|
|
|
|
|
$("#show_preview").remove();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
</div>
|
2012-04-17 03:34:25 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
2012-04-25 03:38:45 +00:00
|
|
|
|
|
|
|
|
|
<% end -%>
|