src/cm/media/js/lib/yui/yui_3.10.3/build/widget-base-ie/widget-base-ie-debug.js
changeset 525 89ef5ed3c48b
equal deleted inserted replaced
524:322d0feea350 525:89ef5ed3c48b
       
     1 /*
       
     2 YUI 3.10.3 (build 2fb5187)
       
     3 Copyright 2013 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.10.3', {"requires": ["widget-base"]});