diff --git a/css/popup.css b/css/popup.css index 074f82f..02dee18 100644 --- a/css/popup.css +++ b/css/popup.css @@ -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/ */ +/*
*/ + +.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; + } } diff --git a/popup.js b/popup.js index 987b7a7..1012757 100644 --- a/popup.js +++ b/popup.js @@ -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('
'); $('body').prepend('
'); $('body').css('overflow', 'hidden'); - - //$('body').height(); - - $(popup_container).prepend('
'); + content_popup=$(popup_container).prepend('
'); $(popup).appendTo('.content_popup'); @@ -111,41 +88,12 @@ $=jQuery; if (popup_height>window_height) { - - - /*$('.content_popup').css('top', 0); - - $('.content_popup').css('transform', 'translate(-50%, 0%)');*/ - - $('.content_popup').css('margin-top', 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($('
').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; - - });*/ - }); }