preapproval mobile markup fix
This commit is contained in:
parent
67063cc363
commit
719fb6b190
@ -113,6 +113,9 @@ function preapproval_form_check_errors()
|
||||
|
||||
(function InitApprove()
|
||||
{
|
||||
const wrap = $("#preapproval_block");
|
||||
const form = $(wrap).find("form");
|
||||
|
||||
if(window.innerWidth > 540)
|
||||
{
|
||||
$("#preapproval_block").find(".block_toggle")
|
||||
@ -127,13 +130,18 @@ function preapproval_form_check_errors()
|
||||
|
||||
setTimeout(function()
|
||||
{
|
||||
$("#preapproval_block").css("width", "100px");
|
||||
$("#preapproval_block_span_wrapper").css("margin-left", "-500px");
|
||||
$(".span_animate_out").removeClass("span_animate_out").addClass("span_hidden");
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
const wrap = $("#preapproval_block");
|
||||
const form = $(wrap).find("form");
|
||||
else
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
$("#preapproval_block").css("width", "100px");
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
const checkFields = () =>
|
||||
{
|
||||
@ -150,6 +158,21 @@ function preapproval_form_check_errors()
|
||||
return inputsFilled;
|
||||
}
|
||||
|
||||
$(wrap).on("click", ".block_open", function(e)
|
||||
{
|
||||
$("#preapproval_block").css("width", "initial");
|
||||
$(wrap).find(".block_open").css("width", "initial");
|
||||
});
|
||||
|
||||
$(wrap).on("click", ".block_close", function(e)
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
$("#preapproval_block").css("width", "100px");
|
||||
$(wrap).find(".block_open").css("width", "100px");
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
$(wrap).on("click", ".block_toggle", function(e)
|
||||
{
|
||||
$(".preapproval_exists").css("display", "none");
|
||||
@ -464,4 +487,34 @@ $(document).ready(function()
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
waitForElement('#chat21-launcher-button').then(() =>
|
||||
{
|
||||
$("#chat21-launcher-button").css("z-index", 999);
|
||||
});
|
||||
});
|
||||
|
||||
function waitForElement(selector)
|
||||
{
|
||||
return new Promise(resolve =>
|
||||
{
|
||||
if (document.querySelector(selector))
|
||||
{
|
||||
return resolve(document.querySelector(selector));
|
||||
}
|
||||
|
||||
const observer = new MutationObserver(mutations =>
|
||||
{
|
||||
if (document.querySelector(selector))
|
||||
{
|
||||
observer.disconnect();
|
||||
resolve(document.querySelector(selector));
|
||||
}
|
||||
});
|
||||
|
||||
observer.observe(document.body, {
|
||||
childList: true,
|
||||
subtree: true
|
||||
});
|
||||
});
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user