browser support
This commit is contained in:
parent
fcf8214559
commit
62ade695ee
3 changed files with 33 additions and 0 deletions
|
|
@ -22,4 +22,5 @@
|
|||
</head>
|
||||
<body>
|
||||
{{ body_html }}
|
||||
<script>wn.check_browser_support();</script>
|
||||
</body>
|
||||
|
|
|
|||
21
js/core.js
21
js/core.js
|
|
@ -30,6 +30,27 @@ if(!console) {
|
|||
}
|
||||
}
|
||||
|
||||
wn.check_browser_support = function() {
|
||||
var is_supported = function() {
|
||||
if($.browser.mozilla && flt($.browser.version)<4) return false;
|
||||
if($.browser.msie && flt($.browser.version)<9) return false;
|
||||
if($.browser.webkit && flt($.browser.version)<534) return false;
|
||||
return true;
|
||||
}
|
||||
if(!is_supported()) {
|
||||
$('body').html('<div style="width: 900px; margin: 20px auto; padding: 20px;\
|
||||
background-color: #fff; border: 2px solid #aaa; font-family: Arial">\
|
||||
<h3>Unsupported Browser</h3> \
|
||||
<p><i>ERPNext requires a modern web browser to function correctly</i></p> \
|
||||
<p>Supported browsers are: \
|
||||
<ul><li><a href="http://mozilla.com/firefox">Mozilla Firfox 4+</a>, \
|
||||
<li><a href="http://google.com/chrome">Google Chorme 14+</a>, \
|
||||
<li><a href="http://apple.com/safari">Apple Safari 5+</a>, \
|
||||
<li><a href="http://ie.microsoft.com">Microsoft Internet Explorer 9+</a>, \
|
||||
<li><a href="http://www.opera.com/">Opera</a></p></ul>');
|
||||
}
|
||||
}
|
||||
|
||||
wn.versions.check();
|
||||
|
||||
/* overload links for ajax pages */
|
||||
|
|
|
|||
11
js/core.min.js
vendored
11
js/core.min.js
vendored
|
|
@ -100,4 +100,15 @@ throw new SyntaxError('JSON.parse');};}}());
|
|||
* lib/js/core.js
|
||||
*/
|
||||
if(!console){var console={log:function(txt){errprint(txt);}}}
|
||||
wn.check_browser_support=function(){var is_supported=function(){if($.browser.mozilla&&flt($.browser.version)<4)return false;if($.browser.msie&&flt($.browser.version)<9)return false;if($.browser.webkit&&flt($.browser.version)<534)return false;return true;}
|
||||
if(!is_supported()){$('body').html('<div style="width: 900px; margin: 20px auto; padding: 20px;\
|
||||
background-color: #fff; border: 2px solid #aaa; font-family: Arial">\
|
||||
<h3>Unsupported Browser</h3> \
|
||||
<p><i>ERPNext requires a modern web browser to function correctly</i></p> \
|
||||
<p>Supported browsers are: \
|
||||
<ul><li><a href="http://mozilla.com/firefox">Mozilla Firfox 4+</a>, \
|
||||
<li><a href="http://google.com/chrome">Google Chorme 14+</a>, \
|
||||
<li><a href="http://apple.com/safari">Apple Safari 5+</a>, \
|
||||
<li><a href="http://ie.microsoft.com">Microsoft Internet Explorer 9+</a>, \
|
||||
<li><a href="http://www.opera.com/">Opera</a></p></ul>');}}
|
||||
wn.versions.check();$(document).bind('ready',function(){var base=window.location.href.split('#')[0];$.each($('a[softlink!="false"]'),function(i,v){if(v.href.substr(0,base.length)==base){var path=(v.href.substr(base.length));if(path.substr(0,1)!='#'){v.href=base+'#'+path;}}});if(!wn.settings.no_history&&window.location.hash){wn.page.set(window.location.hash.substr(1));}});
|
||||
Loading…
Add table
Reference in a new issue