New notification option: notification life time

This commit is contained in:
bergware
2023-08-22 15:55:00 +02:00
parent e1beeb022e
commit 099fb3a2c6
3 changed files with 7 additions and 5 deletions

View File

@@ -124,8 +124,10 @@ _(Notifications display)_:
:notifications_display_help:
_(Notifications auto-closure time)_ (_(seconds)_):
: <input type="number" name="closure" class="a" min="0" max="60" value="<?=$notify['closure']?>"> _(a value of zero means no auto-closure)_
_(Notifications life time)_ (_(seconds)_):
: <input type="number" name="life" class="a" min="0" max="60" value="<?=$notify['life']?>"> _(a value of zero means no automatic closure)_
:notifications_life_time_help:
_(Date format)_:
: <select name="date" class="a">

View File

@@ -41,7 +41,7 @@ cron=""
write="NOCORRECT"
[notify]
display="0"
closure="3"
life="3"
date="d-m-Y"
time="H:i"
position="top-right"

View File

@@ -559,8 +559,8 @@ $(function() {
$.jGrowl.defaults.theme = '';
$.jGrowl.defaults.themeState = '';
$.jGrowl.defaults.pool = 10;
<?if ($notify['closure'] > 0):?>
$.jGrowl.defaults.life = <?=$notify['closure']*1000?>;
<?if ($notify['life'] > 0):?>
$.jGrowl.defaults.life = <?=$notify['life']*1000?>;
<?else:?>
$.jGrowl.defaults.sticky = true;
<?endif;?>