2022-11-02 23:21:46 +08:00
|
|
|
|
<nav class="navbar navbar-inverse resNav bs-top-container" >
|
|
|
|
|
|
<div class="resNav-item resNav-left">
|
|
|
|
|
|
<!--{template header_left}-->
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="resNav-item resNav-center">
|
|
|
|
|
|
<!--{template header_search}-->
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="resNav-item resNav-right">
|
|
|
|
|
|
<!--{template header_right}-->
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
<script type="text/javascript">
|
2023-01-14 21:17:15 +08:00
|
|
|
|
jQuery(document).ready(function(e) {
|
|
|
|
|
|
_header.init('{FORMHASH}');//初始化头部效果
|
|
|
|
|
|
jQuery(".resNav .js-popbox").each(function(){
|
|
|
|
|
|
jQuery(this).popbox();
|
|
|
|
|
|
});
|
|
|
|
|
|
_notice.getNotificationCount();
|
|
|
|
|
|
});
|
|
|
|
|
|
_notice={};
|
|
|
|
|
|
_notice.flashStep=1;
|
|
|
|
|
|
_notice.checkurl='index.php?mod=system&op=notification&filter=checknew';
|
|
|
|
|
|
_notice.normalTitle= document.title;
|
|
|
|
|
|
_notice.getNotificationCount=function(){
|
|
|
|
|
|
jQuery.getJSON(_notice.checkurl,function(json){
|
|
|
|
|
|
var sum=parseInt(json.sum);
|
|
|
|
|
|
_notice.showTips(sum);
|
|
|
|
|
|
if(json.timeout>0) window.setTimeout(_notice.getNotificationCount,json.timeout);
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
_notice.showTips=function(sum){
|
|
|
|
|
|
if(sum>0){
|
|
|
|
|
|
jQuery('#dzz_notification>span.badge').html(sum).removeClass('hide');
|
|
|
|
|
|
jQuery('#dzz_notification>span.dzz').hide();
|
|
|
|
|
|
//_notice.flashTitle();
|
|
|
|
|
|
}else{
|
|
|
|
|
|
jQuery('#dzz_notification>span.badge').addClass('hide');
|
|
|
|
|
|
jQuery('#dzz_notification>span.dzz').show();
|
|
|
|
|
|
//_notice.flashTitle(1);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
_notice.flashTitle=function(flag){
|
|
|
|
|
|
//仅窗口不在焦点时闪烁title,回到焦点时停止闪烁并将title恢复正常
|
|
|
|
|
|
if(flag || CurrentActive){//当前处于焦点
|
|
|
|
|
|
document.title=_notice.normalTitle;
|
|
|
|
|
|
_notice.flashTitleRun = false;
|
|
|
|
|
|
return;//退出循环
|
|
|
|
|
|
}
|
|
|
|
|
|
_notice.flashTitleRun = true;
|
|
|
|
|
|
_notice.flashStep++;
|
|
|
|
|
|
if (_notice.flashStep==3) {_notice.flashStep=1;}
|
|
|
|
|
|
if (_notice.flashStep==1) {document.title="【您有新的通知】";}
|
|
|
|
|
|
if (_notice.flashStep==2) {document.title="【$_G[setting][sitename]】";}
|
|
|
|
|
|
setTimeout(function(){_notice.flashTitle();},500); //循环
|
|
|
|
|
|
}
|
2022-11-02 23:21:46 +08:00
|
|
|
|
</script>
|