Merge branch 'master' of https://code.bizgaze.com/dsaisudheer3772/BizgazeUI
# Conflicts: # assets/js/setting.js
Este commit está contenido en:
+69
-21
@@ -3,6 +3,7 @@ import {getCookie} from "./cookiehelper.js";
|
||||
|
||||
import {getData, getDataObj} from "./base.js";
|
||||
import {_serverUrl} from "./setting.js";
|
||||
|
||||
function createLoad(data) {
|
||||
let html = "";
|
||||
if (data.length != 0) {
|
||||
@@ -26,77 +27,96 @@ function createLoad(data) {
|
||||
let pk_id = 0;
|
||||
const cookie = getCookie("_idty");
|
||||
let fomrhtml = "";
|
||||
let width = iFrmeWdth();
|
||||
if (cookie) {
|
||||
const {unibaseId, tenantId, userId} = JSON.parse(cookie);
|
||||
fomrhtml = `<div class="frm-ifre frm-ifre-${number}" id="frm-ifre-${number}">
|
||||
<ul class="m-0 p-0">
|
||||
<li class="frm-hdr">
|
||||
<div>${appName}</div>
|
||||
<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="maximum" data-unid="${number}"><span><i class="la la-expand"></i></span></a>
|
||||
<a href="javascript:;" class="compress d-none" data-unid="${number}"><span><i class="las la-compress"></i></span></a>
|
||||
<a href="javascript:;" class="close" data-unid="${number}"><span><i class="la la-times"></i></span></a>
|
||||
|
||||
fomrhtml = `<div>
|
||||
<div class="frm-ifre frm-ifre-${number}" id="frm-ifre-${number}" style="right:${width}px">
|
||||
<div>
|
||||
<ul class="m-0 p-0">
|
||||
<li class="frm-hdr">
|
||||
<div class="app-title-ifrm">${appName}</div>
|
||||
<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="maximum" data-unid="${number}"><span><i class="la la-expand"></i></span></a>
|
||||
<a href="javascript:;" class="compress d-none" data-unid="${number}"><span><i class="las la-compress"></i></span></a>
|
||||
<a href="javascript:;" class="close" data-unid="${number}"><span><i class="la la-times"></i></span></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="frm-bdy">
|
||||
<iframe class="ld-frm-src" data-ispopup="false" src="${serverUrl}#/${unibaseId}/${tenantId}/${userId}/${installedAppId}/${formId}/${pk_id}/${appConfigurationId}/loadform"></iframe>
|
||||
</li>
|
||||
<li class="frm-ftr"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class="frm-bdy">
|
||||
<iframe class="ld-frm-src" data-ispopup="false" src="${serverUrl}#/${unibaseId}/${tenantId}/${userId}/${installedAppId}/${formId}/${pk_id}/${appConfigurationId}/loadform"></iframe>
|
||||
</li>
|
||||
<li class="frm-ftr"></li>
|
||||
</ul>
|
||||
</div>`;
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
$("#list-page").after(fomrhtml);
|
||||
$("#list-page").append(fomrhtml);
|
||||
window.window.postMessage("ld-frm-ifrme", "*");
|
||||
hdrCrtnClckEvnt(number);
|
||||
});
|
||||
}
|
||||
|
||||
function hdrCrtnClckEvnt(number) {
|
||||
$(`.frm-ifre-${number} .minimize`).on("click", function () {
|
||||
let id = $(this).attr("data-unid");
|
||||
let isPopUpState = $(this).attr("data-ispopup");
|
||||
let height = $(`.frm-ifre-${id}`).find(".frm-hdr").height();
|
||||
$(".list-page").css({filter: "unset", opacity: 1});
|
||||
$(`.frm-ifre-${id} .frm-bdy`).toggleClass("d-none");
|
||||
if (isPopUpState == "true") {
|
||||
// popup large
|
||||
$(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({
|
||||
width: "22%",
|
||||
width: "20%",
|
||||
height: height,
|
||||
bottom: "0px",
|
||||
});
|
||||
} else {
|
||||
// popup small
|
||||
$(this).attr("data-ispopup", "true");
|
||||
$(`.frm-ifre-${id} .maximum`).removeClass("d-none");
|
||||
$(`.frm-ifre-${id}`).attr("data-ispop_up", "true");
|
||||
$(`.frm-ifre-${id}`).css({
|
||||
width: "",
|
||||
height: "",
|
||||
bottom: "",
|
||||
});
|
||||
}
|
||||
resetwidth();
|
||||
});
|
||||
$(`.frm-ifre-${number} .maximum`).on("click", function () {
|
||||
let id = $(this).attr("data-unid");
|
||||
$(this).addClass("d-none");
|
||||
$(this).siblings(".compress").removeClass("d-none");
|
||||
$(`.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} .frm-bdy`).removeClass("d-none");
|
||||
$("#list-page").css({filter: "blur(2px)", opacity: "0.5"});
|
||||
$(`.frm-ifre-${id}`).find(".minimize").toggleClass("d-none");
|
||||
});
|
||||
$(`.frm-ifre-${number} .compress`).on("click", function () {
|
||||
let id = $(this).attr("data-unid");
|
||||
$(this).addClass("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: ""});
|
||||
$("#list-page").css({filter: "", opacity: ""});
|
||||
$(`.frm-ifre-${id}`).find(".minimize").toggleClass("d-none");
|
||||
});
|
||||
$(`.frm-ifre-${number} .close`).on("click", function () {
|
||||
let id = $(this).attr("data-unid");
|
||||
$("#list-page").css({filter: "unset", opacity: "1"});
|
||||
$(`.frm-ifre-${id}`).remove();
|
||||
$(`.frm-ifre-${id}`).parent().remove();
|
||||
resetwidth();
|
||||
});
|
||||
}
|
||||
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() {
|
||||
$(".detailBtn").click(function () {
|
||||
let serverUrl = _serverUrl();
|
||||
|
||||
Referencia en una nueva incidencia
Block a user