Fixes in popup

This commit is contained in:
Antonio de la Rosa 2021-03-21 22:58:39 +01:00
parent db37319c90
commit 3423a8f57c
2 changed files with 71 additions and 83 deletions

View file

@ -1,7 +1,7 @@
#layer_popup {
z-index:50000;
background-color:rgba(0,0,0,0.4);
/*background-color:rgba(0,0,0,0.4);*/
/*opacity:0.5;*/
position:absolute;
width:100%;
@ -42,7 +42,54 @@
-webkit-box-sizing:border-box;
-moz-box-sizing: border-box;
opacity:1;
-webkit-box-shadow: 0px 0px 160px 0px rgba(80,80,80,1);
/*-webkit-box-shadow: 0px 0px 160px 0px rgba(80,80,80,1);
-moz-box-shadow: 0px 0px 160px 0px rgba(80,80,80,1);
box-shadow: 0px 0px 160px 0px rgba(80,80,80,1);
box-shadow: 0px 0px 160px 0px rgba(80,80,80,1);*/
box-shadow: 0px 0px 5px 5px rgba(0,0,0,0.33);
-webkit-box-shadow: 0px 0px 5px 5px rgba(0,0,0,0.33);
-moz-box-shadow: 0px 0px 5px 5px rgba(0,0,0,0.33);
}
/* Css for animation loading */
/* Use this html tag */
/* Get from https://loading.io/css/ */
/*<div class="lds-facebook"><div></div><div></div><div></div></div>*/
.lds-facebook {
display: inline-block;
position: absolute;
left:50%;
top:50%;
width: 80px;
height: 80px;
}
.lds-facebook div {
display: inline-block;
position: absolute;
left: 8px;
width: 16px;
background: #000;
animation: lds-facebook 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;
}
.lds-facebook div:nth-child(1) {
left: 8px;
animation-delay: -0.24s;
}
.lds-facebook div:nth-child(2) {
left: 32px;
animation-delay: -0.12s;
}
.lds-facebook div:nth-child(3) {
left: 56px;
animation-delay: 0;
}
@keyframes lds-facebook {
0% {
top: 8px;
height: 64px;
}
50%, 100% {
top: 24px;
height: 32px;
}
}

View file

@ -43,39 +43,16 @@ $=jQuery;
$(this).on('click', function (e) {
if(pre_callback!=undefined)
{
r=pre_callback(popup, this);
if(r!=undefined)
{
if(r===false)
{
return false;
}
}
}
body_height=$("body").height();
$('#layer_popup').height(body_height);
//$('body').prepend('<div id="layer_popup"></div>');
$('body').prepend('<div id="layer_popup"></div>');
$('body').css('overflow', 'hidden');
//$('body').height();
$(popup_container).prepend('<div class="content_popup"></div>');
content_popup=$(popup_container).prepend('<div class="content_popup"><div class="lds-facebook"><div></div><div></div><div></div></div></div>');
$(popup).appendTo('.content_popup');
@ -112,40 +89,11 @@ $=jQuery;
if (popup_height>window_height)
{
/*$('.content_popup').css('top', 0);
$('.content_popup').css('transform', 'translate(-50%, 0%)');*/
$('.content_popup').css('margin-top', 0);
}
$('#error_insert_name').html('')
/*pos=$(document).scrollTop();
$('.content_popup').css('top', pos);
popup_height=$(popup).height();*/
/*
$("body").wrapInner($('<div id="height-helper"/>').css({
height: layer_height,
overflow: "hidden"
}));*/
/* old_height=$('body').height();
total_height=pos+popup_height+50;
if(total_height>old_height)
{
$('body').css('height', total_height);
}*/
$('.close_popup').click(function () {
@ -201,6 +149,25 @@ $=jQuery;
});
if(pre_callback!=undefined)
{
r=pre_callback(popup, this);
if(r!=undefined)
{
if(r===false)
{
return false;
}
}
}
if(!after_show)
{
@ -214,35 +181,9 @@ $=jQuery;
}
/*
$('.content_popup').click(function () {
$(popup).hide();
$(popup).appendTo('body');
$('#layer_popup').remove();
$('.content_popup').remove();
$("body > #height-helper").contents().unwrap();
$('.close_popup').unbind('click');
});*/
return false;
/*
$(popup).click( function () {
return false;
});*/
});
}