API Docs for: 3.13.0
Show:

File: widget/js/WidgetBaseIE.js

  1. /**
  2. * IE specific support for the widget-base module.
  3. *
  4. * @module widget-base-ie
  5. */
  6. var BOUNDING_BOX = "boundingBox",
  7. CONTENT_BOX = "contentBox",
  8. HEIGHT = "height",
  9. OFFSET_HEIGHT = "offsetHeight",
  10. EMPTY_STR = "",
  11. IE = Y.UA.ie,
  12. heightReallyMinHeight = IE < 7,
  13. bbTempExpanding = Y.Widget.getClassName("tmp", "forcesize"),
  14. contentExpanded = Y.Widget.getClassName("content", "expanded");
  15.  
  16. // TODO: Ideally we want to re-use the base _uiSizeCB impl
  17. Y.Widget.prototype._uiSizeCB = function(expand) {
  18.  
  19. var bb = this.get(BOUNDING_BOX),
  20. cb = this.get(CONTENT_BOX),
  21. borderBoxSupported = this._bbs;
  22.  
  23. if (borderBoxSupported === undefined) {
  24. this._bbs = borderBoxSupported = !(IE && IE < 8 && bb.get("ownerDocument").get("compatMode") != "BackCompat");
  25. }
  26.  
  27. if (borderBoxSupported) {
  28. cb.toggleClass(contentExpanded, expand);
  29. } else {
  30. if (expand) {
  31. if (heightReallyMinHeight) {
  32. bb.addClass(bbTempExpanding);
  33. }
  34.  
  35. cb.set(OFFSET_HEIGHT, bb.get(OFFSET_HEIGHT));
  36.  
  37. if (heightReallyMinHeight) {
  38. bb.removeClass(bbTempExpanding);
  39. }
  40. } else {
  41. cb.setStyle(HEIGHT, EMPTY_STR);
  42. }
  43. }
  44. };
  45.