N°3857 Replace old welcome popup

This commit is contained in:
Stephen Abello
2021-03-24 17:18:34 +01:00
parent e759124bd8
commit 8204dbb6ae
8 changed files with 90 additions and 27 deletions

View File

@@ -0,0 +1,14 @@
<div id="welcome_popup">
<div class="ibo-welcome-popup--image ibo-svg-illustration--container">
{{ source("images/illustrations/undraw_relaunch_day.svg") }}
</div>
<div class="ibo-welcome-popup--text">
<div>
{{ 'UI:WelcomeMenu:Text'| dict_s|raw }}
</div>
<div class="ibo-welcome-popup--text--options">
<input type="checkbox" checked id="display_welcome_popup"/><label for="display_welcome_popup">{{'UI:DisplayThisMessageAtStartup'| dict_s}}</label>
</div>
</div>
</div>

View File

@@ -0,0 +1,16 @@
console.log('a');
$('#welcome_popup').dialog( { width:'60%', height: 'auto', title: '{{ 'UI:WelcomeMenu:Title'|dict_s }}', autoOpen: true, modal:true,
close: function() {
var bDisplay = $('#display_welcome_popup:checked').length;
SetUserPreference('welcome_popup', bDisplay, true);
},
buttons: [{
text: "{{ 'UI:Button:Ok'|dict_s }}", click: function() {
$(this).dialog( "close" ); $(this).remove();
}}],
});
if ($('#welcome_popup').height() > ($(window).height()-70))
{
$('#welcome_popup').height($(window).height()-70);
}