Sha256: 42df0528466a5e664c4c6a2abb3293450d5b7e6776a993d441c60bcc657dc591

Contents?: true

Size: 1.95 KB

Versions: 7

Compression:

Stored size: 1.95 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
//            Portions ©2008-2009 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

7 entries across 7 versions & 1 rubygems

Version Path
sproutcore-1.4.0.rc.5 lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.0.rc.4 lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.0.rc.3 lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.0.rc.2 lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.4.0.rc lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.0.1049.pre.2 lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js
sproutcore-1.0.1049.pre.1 frameworks/sproutcore/frameworks/bootstrap/system/loader.js