This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/shared/preview/_modal_preview.html.erb

35 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="modal hide fade in banner-preview" id="<%= @preview_obj.id %>">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3><%= t(:preview) %></h3>
</div>
<div class="modal-body">
<iframe src=<%= @preview_obj.get_preview_link %>></iframe>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal"><%= t(:close) %></a>
</div>
<div>
<script type="text/javascript" src="/assets/kernel.js"></script>
<script type="text/javascript">
$(function() {
$("iframe").load(function() {
// Get the body element
var frameBody = $("iframe").contents().find('body');
// Get all links inside the BODY tag
$("iframe").contents().find('#orbit-bar').hide();
frameBody.find('a').click(function(e){
//Disable all default actions
e.preventDefault();
});
$('input', frameBody).attr("disabled", true);
});
$(".modal").on("hidden", function () {
$("#show_preview").remove();
});
});
</script>
</div>
</div>