Mercurial > moin > 1.9
changeset 4345:5c29df15cd90
some cosmetic changes to the javascript code (whitespace only)
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Sat, 27 Sep 2008 23:07:09 +0200 |
parents | 5c88b27f31e5 |
children | dfb09cf670f9 |
files | wiki/htdocs/common/js/common.js |
diffstat | 1 files changed, 27 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/wiki/htdocs/common/js/common.js Sat Sep 27 23:04:40 2008 +0200 +++ b/wiki/htdocs/common/js/common.js Sat Sep 27 23:07:09 2008 +0200 @@ -81,37 +81,37 @@ // copy from fckeditor browser check code (fckeditor.js:298, function : FCKeditor_IsCompatibleBrowser) function can_use_gui_editor() { - var sAgent = navigator.userAgent.toLowerCase() ; + var sAgent = navigator.userAgent.toLowerCase() ; - // Internet Explorer 5.5+ - if ( /*@cc_on!@*/false && sAgent.indexOf("mac") == -1 ) - { - var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ; - return ( sBrowserVersion >= 5.5 ) ; - } + // Internet Explorer 5.5+ + if ( /*@cc_on!@*/false && sAgent.indexOf("mac") == -1 ) + { + var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ; + return ( sBrowserVersion >= 5.5 ) ; + } - // Gecko (Opera 9 tries to behave like Gecko at this point). - if ( navigator.product == "Gecko" && navigator.productSub >= 20030210 && !( typeof(opera) == 'object' && opera.postError ) ) - return true ; + // Gecko (Opera 9 tries to behave like Gecko at this point). + if ( navigator.product == "Gecko" && navigator.productSub >= 20030210 && !( typeof(opera) == 'object' && opera.postError ) ) + return true ; - // Opera 9.50+ - if ( window.opera && window.opera.version && parseFloat( window.opera.version() ) >= 9.5 ) - return true ; + // Opera 9.50+ + if ( window.opera && window.opera.version && parseFloat( window.opera.version() ) >= 9.5 ) + return true ; /* // disable safari : until fck devteam fix http://dev.fckeditor.net/ticket/2333 - // Adobe AIR - // Checked before Safari because AIR have the WebKit rich text editor - // features from Safari 3.0.4, but the version reported is 420. - if ( sAgent.indexOf( ' adobeair/' ) != -1 ) - return ( sAgent.match( / adobeair\/(\d+)/ )[1] >= 1 ) ; // Build must be at least v1 + // Adobe AIR + // Checked before Safari because AIR have the WebKit rich text editor + // features from Safari 3.0.4, but the version reported is 420. + if ( sAgent.indexOf( ' adobeair/' ) != -1 ) + return ( sAgent.match( / adobeair\/(\d+)/ )[1] >= 1 ) ; // Build must be at least v1 - // Safari 3+ - if ( sAgent.indexOf( ' applewebkit/' ) != -1 ) - return ( sAgent.match( / applewebkit\/(\d+)/ )[1] >= 522 ) ; // Build must be at least 522 (v3) + // Safari 3+ + if ( sAgent.indexOf( ' applewebkit/' ) != -1 ) + return ( sAgent.match( / applewebkit\/(\d+)/ )[1] >= 522 ) ; // Build must be at least 522 (v3) */ - return false ; + return false ; } @@ -211,7 +211,7 @@ // login focus if (document.forms['loginform']) { - document.forms['loginform'].elements['name'].focus(); + document.forms['loginform'].elements['name'].focus(); } // Page view stuff @@ -300,10 +300,10 @@ for (var eidx = 0; eidx < form.elements.length; eidx++) { elem = form.elements[eidx]; name = elem.name; - if (name) { - if (name.substr(0,4) == 'dbw.' && name.substr(-7) == '.submit') - elem.style.display = 'none'; - } + if (name) { + if (name.substr(0,4) == 'dbw.' && name.substr(-7) == '.submit') + elem.style.display = 'none'; + } } } }