|
|
@@ -3,6 +3,7 @@ import {getCookie} from "./cookiehelper.js";
|
|
|
|
|
|
|
|
|
|
|
|
import {getData, getDataObj} from "./base.js";
|
|
|
|
import {getData, getDataObj} from "./base.js";
|
|
|
|
import {_serverUrl} from "./setting.js";
|
|
|
|
import {_serverUrl} from "./setting.js";
|
|
|
|
|
|
|
|
|
|
|
|
function createLoad(data) {
|
|
|
|
function createLoad(data) {
|
|
|
|
let html = "";
|
|
|
|
let html = "";
|
|
|
|
if (data.length != 0) {
|
|
|
|
if (data.length != 0) {
|
|
|
@@ -26,12 +27,16 @@ function createLoad(data) {
|
|
|
|
let pk_id = 0;
|
|
|
|
let pk_id = 0;
|
|
|
|
const cookie = getCookie("_idty");
|
|
|
|
const cookie = getCookie("_idty");
|
|
|
|
let fomrhtml = "";
|
|
|
|
let fomrhtml = "";
|
|
|
|
|
|
|
|
let width = iFrmeWdth();
|
|
|
|
if (cookie) {
|
|
|
|
if (cookie) {
|
|
|
|
const {unibaseId, tenantId, userId} = JSON.parse(cookie);
|
|
|
|
const {unibaseId, tenantId, userId} = JSON.parse(cookie);
|
|
|
|
fomrhtml = `<div class="frm-ifre frm-ifre-${number}" id="frm-ifre-${number}">
|
|
|
|
|
|
|
|
|
|
|
|
fomrhtml = `<div>
|
|
|
|
|
|
|
|
<div class="frm-ifre frm-ifre-${number}" id="frm-ifre-${number}" style="right:${width}px">
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<ul class="m-0 p-0">
|
|
|
|
<ul class="m-0 p-0">
|
|
|
|
<li class="frm-hdr">
|
|
|
|
<li class="frm-hdr">
|
|
|
|
<div>${appName}</div>
|
|
|
|
<div class="app-title-ifrm">${appName}</div>
|
|
|
|
<div class="ctrl">
|
|
|
|
<div class="ctrl">
|
|
|
|
<a href="javascript:;" class="minimize" data-unid="${number}" data-ispopup="true"><span><i class="la la-minus"></i></span></a>
|
|
|
|
<a href="javascript:;" class="minimize" data-unid="${number}" data-ispopup="true"><span><i class="la la-minus"></i></span></a>
|
|
|
|
<a href="javascript:;" class="maximum" data-unid="${number}"><span><i class="la la-expand"></i></span></a>
|
|
|
|
<a href="javascript:;" class="maximum" data-unid="${number}"><span><i class="la la-expand"></i></span></a>
|
|
|
@@ -44,59 +49,74 @@ function createLoad(data) {
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
<li class="frm-ftr"></li>
|
|
|
|
<li class="frm-ftr"></li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>`;
|
|
|
|
</div>`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$("#list-page").after(fomrhtml);
|
|
|
|
$("#list-page").append(fomrhtml);
|
|
|
|
window.window.postMessage("ld-frm-ifrme", "*");
|
|
|
|
window.window.postMessage("ld-frm-ifrme", "*");
|
|
|
|
hdrCrtnClckEvnt(number);
|
|
|
|
hdrCrtnClckEvnt(number);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function hdrCrtnClckEvnt(number) {
|
|
|
|
function hdrCrtnClckEvnt(number) {
|
|
|
|
$(`.frm-ifre-${number} .minimize`).on("click", function () {
|
|
|
|
$(`.frm-ifre-${number} .minimize`).on("click", function () {
|
|
|
|
let id = $(this).attr("data-unid");
|
|
|
|
let id = $(this).attr("data-unid");
|
|
|
|
let isPopUpState = $(this).attr("data-ispopup");
|
|
|
|
let isPopUpState = $(this).attr("data-ispopup");
|
|
|
|
let height = $(`.frm-ifre-${id}`).find(".frm-hdr").height();
|
|
|
|
let height = $(`.frm-ifre-${id}`).find(".frm-hdr").height();
|
|
|
|
|
|
|
|
$(".list-page").css({filter: "unset", opacity: 1});
|
|
|
|
$(`.frm-ifre-${id} .frm-bdy`).toggleClass("d-none");
|
|
|
|
$(`.frm-ifre-${id} .frm-bdy`).toggleClass("d-none");
|
|
|
|
if (isPopUpState == "true") {
|
|
|
|
if (isPopUpState == "true") {
|
|
|
|
// popup large
|
|
|
|
// popup large
|
|
|
|
$(this).attr("data-ispopup", "false");
|
|
|
|
$(this).attr("data-ispopup", "false");
|
|
|
|
|
|
|
|
$(`.frm-ifre-${id} .maximum`).addClass("d-none");
|
|
|
|
|
|
|
|
$(`.frm-ifre-${id}`).parent().removeClass("wrap-iframe");
|
|
|
|
|
|
|
|
$(`.frm-ifre-${id}`).attr("data-ispop_up", "false");
|
|
|
|
$(`.frm-ifre-${id}`).css({
|
|
|
|
$(`.frm-ifre-${id}`).css({
|
|
|
|
width: "22%",
|
|
|
|
width: "20%",
|
|
|
|
height: height,
|
|
|
|
height: height,
|
|
|
|
bottom: "0px",
|
|
|
|
bottom: "0px",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// popup small
|
|
|
|
// popup small
|
|
|
|
$(this).attr("data-ispopup", "true");
|
|
|
|
$(this).attr("data-ispopup", "true");
|
|
|
|
|
|
|
|
$(`.frm-ifre-${id} .maximum`).removeClass("d-none");
|
|
|
|
|
|
|
|
$(`.frm-ifre-${id}`).attr("data-ispop_up", "true");
|
|
|
|
$(`.frm-ifre-${id}`).css({
|
|
|
|
$(`.frm-ifre-${id}`).css({
|
|
|
|
width: "",
|
|
|
|
width: "",
|
|
|
|
height: "",
|
|
|
|
height: "",
|
|
|
|
bottom: "",
|
|
|
|
bottom: "",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resetwidth();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$(`.frm-ifre-${number} .maximum`).on("click", function () {
|
|
|
|
$(`.frm-ifre-${number} .maximum`).on("click", function () {
|
|
|
|
let id = $(this).attr("data-unid");
|
|
|
|
let id = $(this).attr("data-unid");
|
|
|
|
$(this).addClass("d-none");
|
|
|
|
$(this).addClass("d-none");
|
|
|
|
$(this).siblings(".compress").removeClass("d-none");
|
|
|
|
$(this).siblings(".compress").removeClass("d-none");
|
|
|
|
$(`.frm-ifre-${id}`).find(".ld-frm-src").attr("data-ispopup", "true");
|
|
|
|
$(`.frm-ifre-${id}`).find(".ld-frm-src").attr("data-ispopup", "true");
|
|
|
|
$(`.frm-ifre-${id}`).css({width: "75%", height: "", bottom: "auto"});
|
|
|
|
$(`.frm-ifre-${id}`).parent().addClass("wrap-iframe");
|
|
|
|
|
|
|
|
$(`.frm-ifre-${id}`).css({width: "75%", position: "unset"});
|
|
|
|
$(`.frm-ifre-${id} .ld-frm-src`).css({width: "100%"});
|
|
|
|
$(`.frm-ifre-${id} .ld-frm-src`).css({width: "100%"});
|
|
|
|
$(`.frm-ifre-${id} .frm-bdy`).removeClass("d-none");
|
|
|
|
$(`.frm-ifre-${id} .frm-bdy`).removeClass("d-none");
|
|
|
|
$("#list-page").css({filter: "blur(2px)", opacity: "0.5"});
|
|
|
|
$("#list-page").css({filter: "blur(2px)", opacity: "0.5"});
|
|
|
|
|
|
|
|
$(`.frm-ifre-${id}`).find(".minimize").toggleClass("d-none");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$(`.frm-ifre-${number} .compress`).on("click", function () {
|
|
|
|
$(`.frm-ifre-${number} .compress`).on("click", function () {
|
|
|
|
let id = $(this).attr("data-unid");
|
|
|
|
let id = $(this).attr("data-unid");
|
|
|
|
$(this).addClass("d-none");
|
|
|
|
$(this).addClass("d-none");
|
|
|
|
$(this).siblings(".maximum").removeClass("d-none");
|
|
|
|
$(this).siblings(".maximum").removeClass("d-none");
|
|
|
|
$(`.frm-ifre-${id}`).css({width: "", bottom: ""});
|
|
|
|
$(`.frm-ifre-${id}`).parent().removeClass("wrap-iframe");
|
|
|
|
|
|
|
|
$(`.frm-ifre-${id}`).css({width: "", position: ""});
|
|
|
|
$(`.frm-ifre-${id} .ld-frm-src`).css({width: ""});
|
|
|
|
$(`.frm-ifre-${id} .ld-frm-src`).css({width: ""});
|
|
|
|
$("#list-page").css({filter: "", opacity: ""});
|
|
|
|
$("#list-page").css({filter: "", opacity: ""});
|
|
|
|
|
|
|
|
$(`.frm-ifre-${id}`).find(".minimize").toggleClass("d-none");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$(`.frm-ifre-${number} .close`).on("click", function () {
|
|
|
|
$(`.frm-ifre-${number} .close`).on("click", function () {
|
|
|
|
let id = $(this).attr("data-unid");
|
|
|
|
let id = $(this).attr("data-unid");
|
|
|
|
$("#list-page").css({filter: "unset", opacity: "1"});
|
|
|
|
$("#list-page").css({filter: "unset", opacity: "1"});
|
|
|
|
$(`.frm-ifre-${id}`).remove();
|
|
|
|
$(`.frm-ifre-${id}`).parent().remove();
|
|
|
|
|
|
|
|
resetwidth();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function loadData() {
|
|
|
|
function loadData() {
|
|
|
@@ -284,6 +304,34 @@ function loadData() {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function iFrmeWdth() {
|
|
|
|
|
|
|
|
let width = 0,
|
|
|
|
|
|
|
|
erwdth = 20;
|
|
|
|
|
|
|
|
$(".frm-ifre").each(function (i, e) {
|
|
|
|
|
|
|
|
if ($(this).length == 0) {
|
|
|
|
|
|
|
|
erwdth = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (window.innerWidth > width) {
|
|
|
|
|
|
|
|
width = width + $(this).width() + erwdth;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return width;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function resetwidth() {
|
|
|
|
|
|
|
|
let width = 0,
|
|
|
|
|
|
|
|
erwdth = 20;
|
|
|
|
|
|
|
|
$(".frm-ifre").each(function (i, e) {
|
|
|
|
|
|
|
|
if (i == 0) {
|
|
|
|
|
|
|
|
$(this).css("right", width + "px");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (i != 0) {
|
|
|
|
|
|
|
|
$(this).css("right", width + "px");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (window.innerWidth > width) {
|
|
|
|
|
|
|
|
width = width + $(this).width() + erwdth;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
export function detailClick() {
|
|
|
|
export function detailClick() {
|
|
|
|
$(".detailBtn").click(function () {
|
|
|
|
$(".detailBtn").click(function () {
|
|
|
|
let serverUrl = _serverUrl();
|
|
|
|
let serverUrl = _serverUrl();
|
|
|
|