fix conflict
This commit is contained in:
parent
6851cc868b
commit
e25594cc98
|
@ -9,24 +9,26 @@
|
||||||
<%= render :partial=> "approval_modal" %>
|
<%= render :partial=> "approval_modal" %>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var modal = $("#approvalModal");
|
$(function{
|
||||||
$(document).on("click", ".approval_button",function(){
|
var modal = $("#approvalModal");
|
||||||
var url = $(this).attr("href");
|
$(document).on("click", ".approval_button",function(){
|
||||||
if(window.location.protocol === "https:"){
|
var url = $(this).attr("href");
|
||||||
url = url.replace("http:","https:");
|
if(window.location.protocol === "https:"){
|
||||||
}
|
url = url.replace("http:","https:");
|
||||||
modal.find("iframe").attr("src", url);
|
}
|
||||||
modal.find("#object_id").val($(this).data("id"));
|
modal.find("iframe").attr("src", url);
|
||||||
modal.modal("show");
|
modal.find("#object_id").val($(this).data("id"));
|
||||||
return false;
|
modal.modal("show");
|
||||||
})
|
return false;
|
||||||
|
})
|
||||||
|
|
||||||
var params = getUrlVars();
|
var params = getUrlVars();
|
||||||
console.log(params["url"])
|
console.log(params["url"])
|
||||||
if(typeof params["url"] != "undefined"){
|
if(typeof params["url"] != "undefined"){
|
||||||
modal.find("iframe").attr("src", params["url"]);
|
modal.find("iframe").attr("src", params["url"]);
|
||||||
modal.find("#object_id").val(params["id"]);
|
modal.find("#object_id").val(params["id"]);
|
||||||
modal.modal("show");
|
modal.modal("show");
|
||||||
}
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
<% end %>
|
<% end %>
|
Loading…
Reference in New Issue