Sha256: b7f1d7a9426fdd9dbe6a77cd49b350b32caef39f1ea9091ef68097fb53e2715d
Contents?: true
Size: 1.78 KB
Versions: 25
Compression:
Stored size: 1.78 KB
Contents
$(document).on("hidden.bs.modal shown.bs.modal shown.bs.tab", resize_iframe); let height_prev; function resize_iframe() { if (typeof(hallwayPrefix) !== "undefined") { workflow_canvas = document.getElementById('canvas'); if (workflow_canvas !== null) { height = window.innerHeight - $(".new_navbar").height() - $("#breadcrumbs").height() - $(".nav.tab-header").height() - $(".green-header").height() - $(".new_navbar_footer").height() - 35; workflow_canvas.setAttribute("style", "height: " + height + "px;"); } return; } var height = 0; if ($(".modal-dialog").height() + 100 > $("body").height()) { height = $(".modal-dialog").height() + 100; } else if ( $(".dropdown-menu.table_visiblity.ui-sortable:visible").height() + 150 > $("body").height() ) { height = $(".dropdown-menu.table_visiblity.ui-sortable:visible").height() + 150; } else if ($("#canvas").is(":visible")) { var canvas_height = window.innerHeight - ($("#breadcrumbs").height() + $(".green-header").height() + 20); $("#canvas").css("height", "500px"); height = $("body").height(); } else if ($("#canvas-swimlane").is(":visible")) { $("#canvas-swimlane").css("height", "300px"); height = $("body").height() + $("#task_data").height() - 160; } else { height = $("body").height() + 25; } if (height_prev != height) { window.parent.postMessage({ func: "resizeIframe", height: height }, "*"); } height_prev = height; } // Function to be called from iframe function receiveMessage(event) { if (event.origin !== window.location.origin) return; var data = event.data; if (typeof window[data.func] == "function") { window[data.func].call(null, data.type, data.url); } else { console.log("Function not found: " + data.func); } }
Version data entries
25 entries across 25 versions & 1 rubygems