[UPDATE] autohide notifications and settings update
This commit is contained in:
parent
963b76ed80
commit
50de3925ca
@ -60,6 +60,13 @@ $aSettings['website'][] = array(
|
|||||||
'name' => 'website_news_style', 'value' => $setting->getValue('website_news_style'),
|
'name' => 'website_news_style', 'value' => $setting->getValue('website_news_style'),
|
||||||
'tooltip' => 'How News are displayed on Main Page.'
|
'tooltip' => 'How News are displayed on Main Page.'
|
||||||
);
|
);
|
||||||
|
$aSettings['website'][] = array(
|
||||||
|
'display' => 'Auto Hide Notifications', 'type' => 'select',
|
||||||
|
'options' => array( 0 => 'Notifications always visible', 1 => 'Hide Notifications automatically' ),
|
||||||
|
'default' => 0,
|
||||||
|
'name' => 'website_notification_autohide', 'value' => $setting->getValue('website_notification_autohide'),
|
||||||
|
'tooltip' => 'Hides Notifications after 5 seconds.'
|
||||||
|
);
|
||||||
$aSettings['blockchain'][] = array(
|
$aSettings['blockchain'][] = array(
|
||||||
'display' => 'Disable Blockexplorer', 'type' => 'select',
|
'display' => 'Disable Blockexplorer', 'type' => 'select',
|
||||||
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||||
|
|||||||
@ -101,6 +101,7 @@ $aGlobal['website']['title'] = $setting->getValue('website_title');
|
|||||||
$aGlobal['website']['slogan'] = $setting->getValue('website_slogan');
|
$aGlobal['website']['slogan'] = $setting->getValue('website_slogan');
|
||||||
$aGlobal['website']['email'] = $setting->getValue('website_email');
|
$aGlobal['website']['email'] = $setting->getValue('website_email');
|
||||||
$aGlobal['website']['newsstyle'] = $setting->getValue('website_news_style');
|
$aGlobal['website']['newsstyle'] = $setting->getValue('website_news_style');
|
||||||
|
$aGlobal['website']['notificationshide'] = $setting->getValue('website_notification_autohide');
|
||||||
$aGlobal['website']['api']['disabled'] = $setting->getValue('disable_api');
|
$aGlobal['website']['api']['disabled'] = $setting->getValue('disable_api');
|
||||||
$aGlobal['website']['blockexplorer']['disabled'] = $setting->getValue('website_blockexplorer_disabled');
|
$aGlobal['website']['blockexplorer']['disabled'] = $setting->getValue('website_blockexplorer_disabled');
|
||||||
$aGlobal['website']['transactionexplorer']['disabled'] = $setting->getValue('website_transactionexplorer_disabled');
|
$aGlobal['website']['transactionexplorer']['disabled'] = $setting->getValue('website_transactionexplorer_disabled');
|
||||||
|
|||||||
@ -27,13 +27,26 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
|
// auto hide notification messages if set in config
|
||||||
|
// starting timeout in ms before first message is hidden
|
||||||
|
var hide_delay = 3000;
|
||||||
|
// time in ms to wait before hiding next message
|
||||||
|
var hide_next = 800;
|
||||||
|
$(".autohide").slideDown().each( function(index,el) {
|
||||||
|
window.setTimeout( function(){
|
||||||
|
$(el).slideUp(); // hide the message
|
||||||
|
}, hide_delay + hide_next*index);
|
||||||
|
});
|
||||||
|
|
||||||
// Check if lastlogin alert has been closed
|
// Check if lastlogin alert has been closed
|
||||||
if( $.cookie('lastlogin-box') === 'closed' ){
|
if( $.cookie('lastlogin-box') === 'closed' ){
|
||||||
$('#lastlogin').hide();
|
$('#lastlogin').hide();
|
||||||
}
|
}
|
||||||
|
// Check if MOTD alert has been closed
|
||||||
if( $.cookie('motd-box') === 'closed' ){
|
if( $.cookie('motd-box') === 'closed' ){
|
||||||
$('#motd').hide();
|
$('#motd').hide();
|
||||||
}
|
}
|
||||||
|
// Check if Backend Issues alert has been closed
|
||||||
if( $.cookie('backend-box') === 'closed' ){
|
if( $.cookie('backend-box') === 'closed' ){
|
||||||
$('#backend').hide();
|
$('#backend').hide();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
{nocache}
|
{nocache}
|
||||||
{if is_array($smarty.session.POPUP|default)}
|
{if is_array($smarty.session.POPUP|default)}
|
||||||
{section popup $smarty.session.POPUP}
|
{section popup $smarty.session.POPUP}
|
||||||
<div class="{if $smarty.session.POPUP[popup].DISMISS|default:"" == "yes"}alert-dismissable{/if} {$smarty.session.POPUP[popup].TYPE|default:"alert alert-info"}" id="{$smarty.session.POPUP[popup].ID|default:"static"}">
|
<div class="{if $smarty.session.POPUP[popup].DISMISS|default:"" == "yes"}alert-dismissable {/if} {$smarty.session.POPUP[popup].TYPE|default:"alert alert-info"} {if $smarty.session.POPUP[popup].ID|default:"static" == "static" AND $GLOBAL.website.notificationshide == 1}autohide{/if}" id="{$smarty.session.POPUP[popup].ID|default:"static"}">
|
||||||
{if $smarty.session.POPUP[popup].DISMISS|default:"no" == "yes"}
|
{if $smarty.session.POPUP[popup].DISMISS|default:"no" == "yes"}
|
||||||
<button id="{$smarty.session.POPUP[popup].ID|default:"static"}" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button id="{$smarty.session.POPUP[popup].ID|default:"static"}" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user