Fixes in popup
This commit is contained in:
parent
db37319c90
commit
3423a8f57c
2 changed files with 71 additions and 83 deletions
101
popup.js
101
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('<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');
|
||||
|
||||
|
|
@ -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($('<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;
|
||||
|
||||
});*/
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue