浏览代码

Fix disable notification on smartphone

Laurent Destailleur 8 年之前
父节点
当前提交
1dd462d947
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      htdocs/main.inc.php

+ 2 - 1
htdocs/main.inc.php

@@ -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";
                 }
             }