Fixed Trac #371: popup dialog's dimensions (welcome screen and create or lookup dialogs) are now adjusted to fit into the screen.

SVN:trunk[1183]
This commit is contained in:
Denis Flaven
2011-04-06 18:21:43 +00:00
parent 7908b87881
commit ee0fcdd42e
3 changed files with 25 additions and 2 deletions

View File

@@ -420,12 +420,16 @@ function DisplayWelcomePopup(WebPage $oP)
$sTitle = addslashes(Dict::S('UI:WelcomeMenu:Title'));
$oP->add_ready_script(
<<<EOF
$('#welcome_popup').dialog( { width:'80%', title: '$sTitle', autoOpen: true, modal:true,
$('#welcome_popup').dialog( { width:'80%', height: 'auto', title: '$sTitle', autoOpen: true, modal:true,
close: function() {
var bDisplay = $('#display_welcome_popup:checked').length;
SetUserPreference('welcome_popup', bDisplay, true);
}
});
if ($('#welcome_popup').height() > ($(window).height()-70))
{
$('#welcome_popup').height($(window).height()-70);
}
EOF
);
$_SESSION['welcome'] = 'ok';