Fix disable notification on smartphone

This commit is contained in:
Laurent Destailleur 2017-04-30 23:39:35 +02:00
parent 1e3384a842
commit 1dd462d947

View File

@ -1271,9 +1271,10 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
{
$enablebrowsernotif=false;
if (! empty($conf->agenda->enabled) && ! empty($conf->global->AGENDA_NOTIFICATION)) $enablebrowsernotif=true;
if ($conf->browser->layout == 'phone') $enablebrowsernotif=false;
if ($enablebrowsernotif)
{
print '<!-- Includes JS of Dolibarr -->'."\n";
print '<!-- Includes JS of Dolibarr (brwoser layout = '.$conf->browser->layout.')-->'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_notification.js.php?version='.urlencode(DOL_VERSION).($ext?'&amp;'.$ext:'').'"></script>'."\n";
}
}