fix for http and https in index page for loading page

This commit is contained in:
Bomrah Harry 2018-10-25 16:44:49 +08:00
parent 87f853242e
commit ee215cfadb
1 changed files with 4 additions and 1 deletions

View File

@ -12,6 +12,9 @@
var modal = $("#approvalModal");
$(document).on("click", ".approval_button",function(){
var url = $(this).attr("href");
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.modal("show");