2012-09-04 04:31:27 +00:00
|
|
|
|
<div class="modal hide fade in banner-preview" id="<%= @preview_obj.id %>">
|
2012-09-04 01:24:12 +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-09-04 01:24:12 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
2012-09-07 09:55:59 +00:00
|
|
|
|
<p class="">
|
2012-09-04 04:31:27 +00:00
|
|
|
|
<iframe src=<%= @preview_obj.get_preview_link %> style="width:1024px;height:300px" >
|
2012-09-04 01:24:12 +00:00
|
|
|
|
|
|
|
|
|
</iframe>
|
|
|
|
|
|
|
|
|
|
<%# preview_block_ad_images_helper(news_bulletin).each do |ad_image| -%>
|
|
|
|
|
<%#= image_tag ad_image.file,:alt => (ad_image.title[locale] || " "),:time_to_next => news_bulletin.transition_msec,:link_open=> ad_image.link_open, :link_url =>((ad_image.out_link || news_bulletin.context || " ")) %>
|
|
|
|
|
<%# 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-09-04 01:24:12 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<script type="text/javascript" src="/static/kernel.js"></script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
|
|
// $("#news_bulletin-<%#=news_bulletin.title.dehumanize%>").on("show", function () {
|
|
|
|
|
// $("#news_bulletin-<%#=news_bulletin.title.dehumanize%>").find(".news_bulletin_slideshow").cycle({delay: -1000, fx: "<%#= news_bulletin.ad_fx.nil?? "fade": news_bulletin.ad_fx %>", timeoutFn: getTimeout });
|
|
|
|
|
// });
|
|
|
|
|
$(".modal").on("hidden", function () {
|
|
|
|
|
$("#show_preview").remove();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("iframe").load(function(){
|
|
|
|
|
// Get the body element
|
|
|
|
|
var frameBody = $("iframe").contents().find("body");
|
|
|
|
|
|
|
|
|
|
// Get all links inside the BODY tag
|
|
|
|
|
$('a', frameBody).click(function(e){
|
|
|
|
|
//Disable all default actions
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
});
|
|
|
|
|
$('input', frameBody).attr("disabled", true);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|