[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/yuilib/3.17.2/widget-base-ie/ -> widget-base-ie-debug.js (source)

   1  /*
   2  YUI 3.17.2 (build 9c3c78e)
   3  Copyright 2014 Yahoo! Inc. All rights reserved.
   4  Licensed under the BSD License.
   5  http://yuilibrary.com/license/
   6  */
   7  
   8  YUI.add('widget-base-ie', function (Y, NAME) {
   9  
  10  /**
  11   * IE specific support for the widget-base module.
  12   *
  13   * @module widget-base-ie
  14   */
  15  var BOUNDING_BOX = "boundingBox",
  16      CONTENT_BOX = "contentBox",
  17      HEIGHT = "height",
  18      OFFSET_HEIGHT = "offsetHeight",
  19      EMPTY_STR = "",
  20      IE = Y.UA.ie,
  21      heightReallyMinHeight = IE < 7,
  22      bbTempExpanding = Y.Widget.getClassName("tmp", "forcesize"),
  23      contentExpanded = Y.Widget.getClassName("content", "expanded");
  24  
  25  // TODO: Ideally we want to re-use the base _uiSizeCB impl
  26  Y.Widget.prototype._uiSizeCB = function(expand) {
  27  
  28      var bb = this.get(BOUNDING_BOX),
  29          cb = this.get(CONTENT_BOX),
  30          borderBoxSupported = this._bbs;
  31  
  32      if (borderBoxSupported === undefined) {
  33          this._bbs = borderBoxSupported = !(IE && IE < 8 && bb.get("ownerDocument").get("compatMode") != "BackCompat");
  34      }
  35  
  36      if (borderBoxSupported) {
  37          cb.toggleClass(contentExpanded, expand);
  38      } else {
  39          if (expand) {
  40              if (heightReallyMinHeight) {
  41                  bb.addClass(bbTempExpanding);
  42              }
  43  
  44              cb.set(OFFSET_HEIGHT, bb.get(OFFSET_HEIGHT));
  45  
  46              if (heightReallyMinHeight) {
  47                  bb.removeClass(bbTempExpanding);
  48              }
  49          } else {
  50              cb.setStyle(HEIGHT, EMPTY_STR);
  51          }
  52      }
  53  };
  54  
  55  
  56  }, '3.17.2', {"requires": ["widget-base"]});


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1