diff --git a/module/user/js/login.js b/module/user/js/login.js index 6f0b180b46..0f75c98f81 100644 --- a/module/user/js/login.js +++ b/module/user/js/login.js @@ -18,5 +18,62 @@ $(document).ready(function() }); }); mBtn.attr('title', mBtn.attr('data-original-title')); - + showNotice(); }) + +/** + * Show browser notice + * + * @access public + * @return void + */ +function showNotice() +{ + var show = false; + var type = ''; + /* IE 6,7. */ + if($.browser.msie && $.browser.version <= 7) + { + show = true; + type = 'incompatible'; + } + + /* Souhu */ + if(window.clientInformation.userAgent.indexOf('MetaSr') >= 0) + { + show = true; + type = 'notice'; + } + else if(window.clientInformation.userAgent.indexOf('LBBROWSER') >= 0) + { + show = true; + type = 'notice'; + } + else if(window.clientInformation.userAgent.indexOf('QQBrowser') >= 0) + { + show = true; + type = 'notice'; + } + else if(window.clientInformation.userAgent.indexOf('TheWorld') >= 0) + { + show = true; + type = 'notice'; + } + else if(window.clientInformation.userAgent.indexOf('BIDUBrowser') >= 0) + { + show = true; + type = 'notice'; + } + else if(window.clientInformation.userAgent.indexOf('Maxthon') >= 0) + { + show = true; + type = 'notice'; + } + /* 360. */ + else if($.browser.chrome && !(window.clientInformation && window.clientInformation.mediaDevices)) + { + show = true; + type = 'notice'; + } + if(show) $('body').prepend('

' + browser[type] + '

'); +} diff --git a/module/user/lang/en.php b/module/user/lang/en.php index f830a517ae..a974237dc5 100644 --- a/module/user/lang/en.php +++ b/module/user/lang/en.php @@ -182,3 +182,5 @@ $lang->user->noticeResetFile = "
For security reason, system need to confirm
  • Keep the ok.txt content empty.
  • If the file exists already, remove and recreate it again.
  • "; +$lang->user->browser['incompatible'] = 'ZenTao is not compatible with IE7,IE6 browser, please replace other browsers!'; +$lang->user->browser['notice'] = 'Use the browser, display and function may have problems, recommend the use of Chrome browser'; diff --git a/module/user/lang/zh-cn.php b/module/user/lang/zh-cn.php index 778cc1fea0..3b4e2fd723 100644 --- a/module/user/lang/zh-cn.php +++ b/module/user/lang/zh-cn.php @@ -182,3 +182,5 @@ $lang->user->noticeResetFile = '
    为了安全起见,系统需要确认您
  • 文件内容为空。
  • 如果之前文件存在,删除之后重新创建。
  • '; +$lang->user->browser['incompatible'] = '禅道不兼容IE6、IE7浏览器,请更换其他浏览器!'; +$lang->user->browser['notice'] = '您可能使用的是杂牌浏览器,页面显示及功能可能会有问题,建议使用Chrome浏览器'; diff --git a/module/user/view/login.html.php b/module/user/view/login.html.php index ad55cabeae..8f84e6b6de 100644 --- a/module/user/view/login.html.php +++ b/module/user/view/login.html.php @@ -76,4 +76,5 @@ include '../../common/view/header.lite.html.php'; +user->browser)?>