fix new ui announcement preview
This commit is contained in:
1 parent
3a3f913ae6
commit
27a238a2eb
10 files changed
+156
-111
No files matched your search
@@ -4,37 +4,32 @@
|
||||
<h3><%= t(:preview) %></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p class="">
|
||||
<iframe src=<%= @preview_obj.get_preview_link %> style="width:1024px;height:300px" >
|
||||
|
||||
</iframe>
|
||||
</p>
|
||||
<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="/static/kernel.js"></script>
|
||||
<script type="text/javascript" src="/assets/kernel.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
$(".modal").on("hidden", function () {
|
||||
$("#show_preview").remove();
|
||||
});
|
||||
|
||||
$("iframe").load(function(){
|
||||
$(function() {
|
||||
$("iframe").load(function() {
|
||||
// Get the body element
|
||||
var frameBody = $("iframe").contents().find("body");
|
||||
|
||||
var frameBody = $("iframe").contents().find('body');
|
||||
// Get all links inside the BODY tag
|
||||
$('a', frameBody).click(function(e){
|
||||
//Disable all default actions
|
||||
e.preventDefault();
|
||||
$("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>
|
||||
@@ -2,11 +2,8 @@
|
||||
<textarea>
|
||||
<% end %>
|
||||
$('#show_preview').html('<%=escape_javascript(render :partial=>"/shared/preview/modal_preview") %>');
|
||||
var start_modal_with_id = "<%= @preview_obj.id %>";
|
||||
$("#"+start_modal_with_id).css("width","1050px");
|
||||
$("#"+start_modal_with_id).css("height","768px");
|
||||
$("#"+start_modal_with_id).css("margin","-270px 0 0 -550px");
|
||||
$("#"+start_modal_with_id).modal();
|
||||
<!-- var start_modal_with_id = "<%= @preview_obj.id %>"; -->
|
||||
<!-- $("#"+start_modal_with_id).modal(); -->
|
||||
<% if !request.xhr? %>
|
||||
</textarea>
|
||||
<% end %>
|
||||
Reference in new issue
Block a user