Sha256: 2a05e71bccee734bf8e7399e073dcc0c79a36d827f0246f5e55bd0cd63b065b4
Contents?: true
Size: 1.64 KB
Versions: 2
Compression:
Stored size: 1.64 KB
Contents
// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2011 Strobe Inc. and contributors. // Portions ©2008-2010 Apple Inc. All rights reserved. // License: Licensed under MIT license (see license.js) // ========================================================================== // sc_require("system/browser"); SC.setupBodyClassNames = function() { var el = document.body ; if (!el) return ; var browser, platform, shadows, borderRad, classNames, style; browser = SC.browser.current ; platform = SC.browser.windows ? 'windows' : SC.browser.mac ? 'mac' : 'other-platform' ; style = document.documentElement.style; shadows = (style.MozBoxShadow !== undefined) || (style.webkitBoxShadow !== undefined) || (style.oBoxShadow !== undefined) || (style.boxShadow !== undefined); borderRad = (style.MozBorderRadius !== undefined) || (style.webkitBorderRadius !== undefined) || (style.oBorderRadius !== undefined) || (style.borderRadius !== undefined); classNames = el.className ? el.className.split(' ') : [] ; if(shadows) classNames.push('box-shadow'); if(borderRad) classNames.push('border-rad'); classNames.push(browser) ; if (browser === 'chrome') classNames.push('safari'); classNames.push(platform) ; if (parseInt(SC.browser.msie,0)==7) classNames.push('ie7') ; if (SC.browser.mobileSafari) classNames.push('mobile-safari') ; if ('createTouch' in document) classNames.push('touch'); el.className = classNames.join(' ') ; } ;
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sproutcore-1.5.0.pre.4 | lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js |
sproutcore-1.5.0.pre.3 | lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js |