diff --git a/module/index/js/index.ui.js b/module/index/js/index.ui.js index cba7d841ca..fa67ad796e 100644 --- a/module/index/js/index.ui.js +++ b/module/index/js/index.ui.js @@ -891,3 +891,4 @@ window.startCron = function(restart) turnon ? browserNotify() : ping(); if(runnable) startCron(); +if(scoreNotice) zui.Messager.show({ content: {html: scoreNotice}, placement: 'bottom-right', time: 0, icon: 'diamond', className: 'primary-pale' }); diff --git a/module/index/ui/index.html.php b/module/index/ui/index.html.php index 693ee4c820..cb31dd7e1e 100644 --- a/module/index/ui/index.html.php +++ b/module/index/ui/index.html.php @@ -27,6 +27,10 @@ jsVar('pollTime', (!empty($config->message->browser->turnon) && isset($config jsVar('turnon', empty($config->message->browser->turnon) ? 0 : 1); jsVar('runnable', $this->loadModel('cron')->runnable()); +$scoreNotice = ''; +if($config->vision != 'lite') $scoreNotice = $this->loadModel('score')->getNotice(); +jsVar('scoreNotice', $scoreNotice); + set::zui(true); set::bodyClass($this->cookie->hideMenu ? 'hide-menu' : 'show-menu'); @@ -105,8 +109,4 @@ div ), ); -$scoreNotice = ''; -if($config->vision != 'lite') $scoreNotice = $this->loadModel('score')->getNotice(); -div(setID('noticeBox'), empty($scoreNotice) ? null : html($scoreNotice)); - render('pagebase'); diff --git a/module/score/model.php b/module/score/model.php index 8a7e1e7f81..3120b4b150 100644 --- a/module/score/model.php +++ b/module/score/model.php @@ -359,14 +359,6 @@ class scoreModel extends model ->fetch('score'); if(!$score) return ''; - $notice = sprintf($this->lang->score->tips, $score, $this->app->user->score); - $fullNotice = << - -
{$notice}
- - -EOT; - return $fullNotice; + return sprintf($this->lang->score->tips, $score, $this->app->user->score); } }