Sha256: 2fa05412f62b2792046a7846c6f2d5f29c98638a09d86a8eb1f08768bc59adb0

Contents?: true

Size: 1.95 KB

Versions: 11

Compression:

Stored size: 1.95 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2010 Sprout Systems, Inc. and contributors.
//            Portions ©2008-2010 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

// sc_require("system/browser");

SC.bundleDidLoad = function(bundle) {
  var info = this.BUNDLE_INFO[bundle] ;
  if (!info) info = this.BUNDLE_INFO[bundle] = {} ;
  info.loaded = true ;
};

SC.bundleIsLoaded = function(bundle) {
  var info = this.BUNDLE_INFO[bundle] ;
  return info ? !!info.loaded : false ;
};

SC.loadBundle = function() { throw "SC.loadBundle(): SproutCore is not loaded."; };

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) ;
  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

11 entries across 11 versions & 1 rubygems

Version Path
sproutcore-1.4.4-java lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.4 lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.3.1 lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.3-java lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.3 lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.2-java lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.2 lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.1-java lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.1 lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.0-java lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.0 lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js