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

@ -11,7 +11,10 @@
<script type="text/javascript"> <script type="text/javascript">
var modal = $("#approvalModal"); var modal = $("#approvalModal");
$(document).on("click", ".approval_button",function(){ $(document).on("click", ".approval_button",function(){
var url = $(this).attr("href"); var url = $(this).attr("href");
if(window.location.protocol === "https:"){
url = url.replace("http:","https:");
}
modal.find("iframe").attr("src", url); modal.find("iframe").attr("src", url);
modal.find("#object_id").val($(this).data("id")); modal.find("#object_id").val($(this).data("id"));
modal.modal("show"); modal.modal("show");