yui-rails-asset 2.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (398) hide show
  1. data/LICENSE +21 -0
  2. data/README +17 -0
  3. data/lib/yui/rails.rb +29 -0
  4. data/lib/yui/rails/engine.rb +10 -0
  5. data/lib/yui/rails/version.rb +6 -0
  6. data/vendor/assets/javascripts/yui-2.8.1/build/animation/animation-debug.js +1396 -0
  7. data/vendor/assets/javascripts/yui-2.8.1/build/animation/animation-min.js +23 -0
  8. data/vendor/assets/javascripts/yui-2.8.1/build/animation/animation.js +1392 -0
  9. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/ajax-loader.gif +0 -0
  10. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/asc.gif +0 -0
  11. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/autocomplete.css +7 -0
  12. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/back-h.png +0 -0
  13. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/back-v.png +0 -0
  14. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/bar-h.png +0 -0
  15. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/bar-v.png +0 -0
  16. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/bg-h.gif +0 -0
  17. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/bg-v.gif +0 -0
  18. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/blankimage.png +0 -0
  19. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/button.css +7 -0
  20. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/calendar.css +8 -0
  21. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/carousel.css +7 -0
  22. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/check0.gif +0 -0
  23. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/check1.gif +0 -0
  24. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/check2.gif +0 -0
  25. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/colorpicker.css +7 -0
  26. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/container.css +7 -0
  27. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/datatable.css +8 -0
  28. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/desc.gif +0 -0
  29. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/dt-arrow-dn.png +0 -0
  30. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/dt-arrow-up.png +0 -0
  31. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/editor-knob.gif +0 -0
  32. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/editor-sprite-active.gif +0 -0
  33. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/editor-sprite.gif +0 -0
  34. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/editor.css +10 -0
  35. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/header_background.png +0 -0
  36. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/hue_bg.png +0 -0
  37. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/imagecropper.css +7 -0
  38. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/layout.css +7 -0
  39. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/layout_sprite.png +0 -0
  40. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/loading.gif +0 -0
  41. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/logger.css +7 -0
  42. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menu-button-arrow-disabled.png +0 -0
  43. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menu-button-arrow.png +0 -0
  44. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menu.css +7 -0
  45. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menubaritem_submenuindicator.png +0 -0
  46. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menubaritem_submenuindicator_disabled.png +0 -0
  47. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menuitem_checkbox.png +0 -0
  48. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menuitem_checkbox_disabled.png +0 -0
  49. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menuitem_submenuindicator.png +0 -0
  50. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/menuitem_submenuindicator_disabled.png +0 -0
  51. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/paginator.css +7 -0
  52. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/picker_mask.png +0 -0
  53. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/profilerviewer.css +7 -0
  54. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/progressbar.css +7 -0
  55. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/resize.css +7 -0
  56. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/simpleeditor.css +10 -0
  57. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/skin.css +36 -0
  58. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/slider.css +7 -0
  59. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/split-button-arrow-active.png +0 -0
  60. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/split-button-arrow-disabled.png +0 -0
  61. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/split-button-arrow-focus.png +0 -0
  62. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/split-button-arrow-hover.png +0 -0
  63. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/split-button-arrow.png +0 -0
  64. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/sprite.png +0 -0
  65. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/sprite.psd +0 -0
  66. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/tabview.css +8 -0
  67. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/treeview-loading.gif +0 -0
  68. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/treeview-sprite.gif +0 -0
  69. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/treeview.css +7 -0
  70. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/wait.gif +0 -0
  71. data/vendor/assets/javascripts/yui-2.8.1/build/assets/skins/sam/yuitest.css +7 -0
  72. data/vendor/assets/javascripts/yui-2.8.1/build/autocomplete/assets/autocomplete-core.css +7 -0
  73. data/vendor/assets/javascripts/yui-2.8.1/build/autocomplete/assets/skins/sam/autocomplete-skin.css +57 -0
  74. data/vendor/assets/javascripts/yui-2.8.1/build/autocomplete/assets/skins/sam/autocomplete.css +7 -0
  75. data/vendor/assets/javascripts/yui-2.8.1/build/autocomplete/autocomplete-debug.js +3009 -0
  76. data/vendor/assets/javascripts/yui-2.8.1/build/autocomplete/autocomplete-min.js +12 -0
  77. data/vendor/assets/javascripts/yui-2.8.1/build/autocomplete/autocomplete.js +2966 -0
  78. data/vendor/assets/javascripts/yui-2.8.1/build/base/base-min.css +7 -0
  79. data/vendor/assets/javascripts/yui-2.8.1/build/base/base.css +131 -0
  80. data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/button-core.css +44 -0
  81. data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/button-skin.css +219 -0
  82. data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/button.css +7 -0
  83. data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/menu-button-arrow-disabled.png +0 -0
  84. data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/menu-button-arrow.png +0 -0
  85. data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/split-button-arrow-active.png +0 -0
  86. data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/split-button-arrow-disabled.png +0 -0
  87. data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/split-button-arrow-focus.png +0 -0
  88. data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/split-button-arrow-hover.png +0 -0
  89. data/vendor/assets/javascripts/yui-2.8.1/build/button/assets/skins/sam/split-button-arrow.png +0 -0
  90. data/vendor/assets/javascripts/yui-2.8.1/build/button/button-debug.js +4694 -0
  91. data/vendor/assets/javascripts/yui-2.8.1/build/button/button-min.js +11 -0
  92. data/vendor/assets/javascripts/yui-2.8.1/build/button/button.js +4633 -0
  93. data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/calendar-core.css +132 -0
  94. data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/calendar.css +320 -0
  95. data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/calgrad.png +0 -0
  96. data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/callt.gif +0 -0
  97. data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/calrt.gif +0 -0
  98. data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/calx.gif +0 -0
  99. data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/skins/sam/calendar-skin.css +361 -0
  100. data/vendor/assets/javascripts/yui-2.8.1/build/calendar/assets/skins/sam/calendar.css +8 -0
  101. data/vendor/assets/javascripts/yui-2.8.1/build/calendar/calendar-debug.js +7324 -0
  102. data/vendor/assets/javascripts/yui-2.8.1/build/calendar/calendar-min.js +18 -0
  103. data/vendor/assets/javascripts/yui-2.8.1/build/calendar/calendar.js +7294 -0
  104. data/vendor/assets/javascripts/yui-2.8.1/build/carousel/assets/ajax-loader.gif +0 -0
  105. data/vendor/assets/javascripts/yui-2.8.1/build/carousel/assets/carousel-core.css +88 -0
  106. data/vendor/assets/javascripts/yui-2.8.1/build/carousel/assets/skins/sam/ajax-loader.gif +0 -0
  107. data/vendor/assets/javascripts/yui-2.8.1/build/carousel/assets/skins/sam/carousel-skin.css +142 -0
  108. data/vendor/assets/javascripts/yui-2.8.1/build/carousel/assets/skins/sam/carousel.css +7 -0
  109. data/vendor/assets/javascripts/yui-2.8.1/build/carousel/carousel-debug.js +4390 -0
  110. data/vendor/assets/javascripts/yui-2.8.1/build/carousel/carousel-min.js +12 -0
  111. data/vendor/assets/javascripts/yui-2.8.1/build/carousel/carousel.js +4349 -0
  112. data/vendor/assets/javascripts/yui-2.8.1/build/charts/assets/charts.swf +0 -0
  113. data/vendor/assets/javascripts/yui-2.8.1/build/charts/charts-debug.js +2061 -0
  114. data/vendor/assets/javascripts/yui-2.8.1/build/charts/charts-min.js +9 -0
  115. data/vendor/assets/javascripts/yui-2.8.1/build/charts/charts.js +2060 -0
  116. data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/colorpicker-core.css +6 -0
  117. data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/hue_thumb.png +0 -0
  118. data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/picker_mask.png +0 -0
  119. data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/picker_thumb.png +0 -0
  120. data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/skins/sam/colorpicker-skin.css +105 -0
  121. data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/skins/sam/colorpicker.css +7 -0
  122. data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/skins/sam/hue_bg.png +0 -0
  123. data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/assets/skins/sam/picker_mask.png +0 -0
  124. data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/colorpicker-debug.js +1783 -0
  125. data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/colorpicker-min.js +9 -0
  126. data/vendor/assets/javascripts/yui-2.8.1/build/colorpicker/colorpicker.js +1763 -0
  127. data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection-debug.js +1576 -0
  128. data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection-min.js +9 -0
  129. data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection.js +1546 -0
  130. data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection.swf +0 -0
  131. data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection_core-debug.js +980 -0
  132. data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection_core-min.js +8 -0
  133. data/vendor/assets/javascripts/yui-2.8.1/build/connection/connection_core.js +957 -0
  134. data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/alrt16_1.gif +0 -0
  135. data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/blck16_1.gif +0 -0
  136. data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/close12_1.gif +0 -0
  137. data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/container-core.css +176 -0
  138. data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/container.css +324 -0
  139. data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/hlp16_1.gif +0 -0
  140. data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/info16_1.gif +0 -0
  141. data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/skins/sam/container-skin.css +242 -0
  142. data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/skins/sam/container.css +7 -0
  143. data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/tip16_1.gif +0 -0
  144. data/vendor/assets/javascripts/yui-2.8.1/build/container/assets/warn16_1.gif +0 -0
  145. data/vendor/assets/javascripts/yui-2.8.1/build/container/container-debug.js +9076 -0
  146. data/vendor/assets/javascripts/yui-2.8.1/build/container/container-min.js +19 -0
  147. data/vendor/assets/javascripts/yui-2.8.1/build/container/container.js +9052 -0
  148. data/vendor/assets/javascripts/yui-2.8.1/build/container/container_core-debug.js +5136 -0
  149. data/vendor/assets/javascripts/yui-2.8.1/build/container/container_core-min.js +14 -0
  150. data/vendor/assets/javascripts/yui-2.8.1/build/container/container_core.js +5126 -0
  151. data/vendor/assets/javascripts/yui-2.8.1/build/cookie/cookie-debug.js +482 -0
  152. data/vendor/assets/javascripts/yui-2.8.1/build/cookie/cookie-min.js +7 -0
  153. data/vendor/assets/javascripts/yui-2.8.1/build/cookie/cookie.js +482 -0
  154. data/vendor/assets/javascripts/yui-2.8.1/build/datasource/datasource-debug.js +3067 -0
  155. data/vendor/assets/javascripts/yui-2.8.1/build/datasource/datasource-min.js +12 -0
  156. data/vendor/assets/javascripts/yui-2.8.1/build/datasource/datasource.js +2996 -0
  157. data/vendor/assets/javascripts/yui-2.8.1/build/datatable/assets/datatable-core.css +93 -0
  158. data/vendor/assets/javascripts/yui-2.8.1/build/datatable/assets/datatable.css +49 -0
  159. data/vendor/assets/javascripts/yui-2.8.1/build/datatable/assets/skins/sam/datatable-skin.css +240 -0
  160. data/vendor/assets/javascripts/yui-2.8.1/build/datatable/assets/skins/sam/datatable.css +8 -0
  161. data/vendor/assets/javascripts/yui-2.8.1/build/datatable/assets/skins/sam/dt-arrow-dn.png +0 -0
  162. data/vendor/assets/javascripts/yui-2.8.1/build/datatable/assets/skins/sam/dt-arrow-up.png +0 -0
  163. data/vendor/assets/javascripts/yui-2.8.1/build/datatable/datatable-debug.js +17360 -0
  164. data/vendor/assets/javascripts/yui-2.8.1/build/datatable/datatable-min.js +29 -0
  165. data/vendor/assets/javascripts/yui-2.8.1/build/datatable/datatable.js +17122 -0
  166. data/vendor/assets/javascripts/yui-2.8.1/build/datemath/datemath-debug.js +408 -0
  167. data/vendor/assets/javascripts/yui-2.8.1/build/datemath/datemath-min.js +7 -0
  168. data/vendor/assets/javascripts/yui-2.8.1/build/datemath/datemath.js +408 -0
  169. data/vendor/assets/javascripts/yui-2.8.1/build/dom/dom-debug.js +1872 -0
  170. data/vendor/assets/javascripts/yui-2.8.1/build/dom/dom-min.js +9 -0
  171. data/vendor/assets/javascripts/yui-2.8.1/build/dom/dom.js +1832 -0
  172. data/vendor/assets/javascripts/yui-2.8.1/build/dragdrop/dragdrop-debug.js +3710 -0
  173. data/vendor/assets/javascripts/yui-2.8.1/build/dragdrop/dragdrop-min.js +10 -0
  174. data/vendor/assets/javascripts/yui-2.8.1/build/dragdrop/dragdrop.js +3601 -0
  175. data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/editor-core.css +602 -0
  176. data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/simpleeditor-core.css +602 -0
  177. data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/blankimage.png +0 -0
  178. data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/editor-knob.gif +0 -0
  179. data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/editor-skin.css +711 -0
  180. data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/editor-sprite-active.gif +0 -0
  181. data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/editor-sprite.gif +0 -0
  182. data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/editor.css +10 -0
  183. data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/simpleeditor-skin.css +711 -0
  184. data/vendor/assets/javascripts/yui-2.8.1/build/editor/assets/skins/sam/simpleeditor.css +10 -0
  185. data/vendor/assets/javascripts/yui-2.8.1/build/editor/editor-debug.js +9557 -0
  186. data/vendor/assets/javascripts/yui-2.8.1/build/editor/editor-min.js +30 -0
  187. data/vendor/assets/javascripts/yui-2.8.1/build/editor/editor.js +9447 -0
  188. data/vendor/assets/javascripts/yui-2.8.1/build/editor/simpleeditor-debug.js +7493 -0
  189. data/vendor/assets/javascripts/yui-2.8.1/build/editor/simpleeditor-min.js +24 -0
  190. data/vendor/assets/javascripts/yui-2.8.1/build/editor/simpleeditor.js +7406 -0
  191. data/vendor/assets/javascripts/yui-2.8.1/build/element-delegate/element-delegate-debug.js +141 -0
  192. data/vendor/assets/javascripts/yui-2.8.1/build/element-delegate/element-delegate-min.js +7 -0
  193. data/vendor/assets/javascripts/yui-2.8.1/build/element-delegate/element-delegate.js +138 -0
  194. data/vendor/assets/javascripts/yui-2.8.1/build/element/element-debug.js +1106 -0
  195. data/vendor/assets/javascripts/yui-2.8.1/build/element/element-min.js +8 -0
  196. data/vendor/assets/javascripts/yui-2.8.1/build/element/element.js +1090 -0
  197. data/vendor/assets/javascripts/yui-2.8.1/build/event-delegate/event-delegate-debug.js +283 -0
  198. data/vendor/assets/javascripts/yui-2.8.1/build/event-delegate/event-delegate-min.js +7 -0
  199. data/vendor/assets/javascripts/yui-2.8.1/build/event-delegate/event-delegate.js +281 -0
  200. data/vendor/assets/javascripts/yui-2.8.1/build/event-mouseenter/event-mouseenter-debug.js +219 -0
  201. data/vendor/assets/javascripts/yui-2.8.1/build/event-mouseenter/event-mouseenter-min.js +7 -0
  202. data/vendor/assets/javascripts/yui-2.8.1/build/event-mouseenter/event-mouseenter.js +219 -0
  203. data/vendor/assets/javascripts/yui-2.8.1/build/event-simulate/event-simulate-debug.js +622 -0
  204. data/vendor/assets/javascripts/yui-2.8.1/build/event-simulate/event-simulate-min.js +7 -0
  205. data/vendor/assets/javascripts/yui-2.8.1/build/event-simulate/event-simulate.js +622 -0
  206. data/vendor/assets/javascripts/yui-2.8.1/build/event/event-debug.js +2524 -0
  207. data/vendor/assets/javascripts/yui-2.8.1/build/event/event-min.js +11 -0
  208. data/vendor/assets/javascripts/yui-2.8.1/build/event/event.js +2500 -0
  209. data/vendor/assets/javascripts/yui-2.8.1/build/fonts/fonts-min.css +7 -0
  210. data/vendor/assets/javascripts/yui-2.8.1/build/fonts/fonts.css +56 -0
  211. data/vendor/assets/javascripts/yui-2.8.1/build/get/get-debug.js +773 -0
  212. data/vendor/assets/javascripts/yui-2.8.1/build/get/get-min.js +7 -0
  213. data/vendor/assets/javascripts/yui-2.8.1/build/get/get.js +755 -0
  214. data/vendor/assets/javascripts/yui-2.8.1/build/grids/grids-min.css +7 -0
  215. data/vendor/assets/javascripts/yui-2.8.1/build/grids/grids.css +467 -0
  216. data/vendor/assets/javascripts/yui-2.8.1/build/history/assets/blank.html +1 -0
  217. data/vendor/assets/javascripts/yui-2.8.1/build/history/history-debug.js +808 -0
  218. data/vendor/assets/javascripts/yui-2.8.1/build/history/history-min.js +7 -0
  219. data/vendor/assets/javascripts/yui-2.8.1/build/history/history.js +808 -0
  220. data/vendor/assets/javascripts/yui-2.8.1/build/imagecropper/assets/imagecropper-core.css +33 -0
  221. data/vendor/assets/javascripts/yui-2.8.1/build/imagecropper/assets/skins/sam/imagecropper-skin.css +16 -0
  222. data/vendor/assets/javascripts/yui-2.8.1/build/imagecropper/assets/skins/sam/imagecropper.css +7 -0
  223. data/vendor/assets/javascripts/yui-2.8.1/build/imagecropper/imagecropper-debug.js +907 -0
  224. data/vendor/assets/javascripts/yui-2.8.1/build/imagecropper/imagecropper-min.js +8 -0
  225. data/vendor/assets/javascripts/yui-2.8.1/build/imagecropper/imagecropper.js +889 -0
  226. data/vendor/assets/javascripts/yui-2.8.1/build/imageloader/imageloader-debug.js +487 -0
  227. data/vendor/assets/javascripts/yui-2.8.1/build/imageloader/imageloader-min.js +7 -0
  228. data/vendor/assets/javascripts/yui-2.8.1/build/imageloader/imageloader.js +481 -0
  229. data/vendor/assets/javascripts/yui-2.8.1/build/json/json-debug.js +538 -0
  230. data/vendor/assets/javascripts/yui-2.8.1/build/json/json-min.js +7 -0
  231. data/vendor/assets/javascripts/yui-2.8.1/build/json/json.js +538 -0
  232. data/vendor/assets/javascripts/yui-2.8.1/build/layout/assets/layout-core.css +158 -0
  233. data/vendor/assets/javascripts/yui-2.8.1/build/layout/assets/skins/sam/layout-skin.css +207 -0
  234. data/vendor/assets/javascripts/yui-2.8.1/build/layout/assets/skins/sam/layout.css +7 -0
  235. data/vendor/assets/javascripts/yui-2.8.1/build/layout/assets/skins/sam/layout_sprite.png +0 -0
  236. data/vendor/assets/javascripts/yui-2.8.1/build/layout/layout-debug.js +2305 -0
  237. data/vendor/assets/javascripts/yui-2.8.1/build/layout/layout-min.js +11 -0
  238. data/vendor/assets/javascripts/yui-2.8.1/build/layout/layout.js +2290 -0
  239. data/vendor/assets/javascripts/yui-2.8.1/build/logger/assets/logger-core.css +7 -0
  240. data/vendor/assets/javascripts/yui-2.8.1/build/logger/assets/logger.css +57 -0
  241. data/vendor/assets/javascripts/yui-2.8.1/build/logger/assets/skins/sam/logger-skin.css +55 -0
  242. data/vendor/assets/javascripts/yui-2.8.1/build/logger/assets/skins/sam/logger.css +7 -0
  243. data/vendor/assets/javascripts/yui-2.8.1/build/logger/logger-debug.js +2104 -0
  244. data/vendor/assets/javascripts/yui-2.8.1/build/logger/logger-min.js +9 -0
  245. data/vendor/assets/javascripts/yui-2.8.1/build/logger/logger.js +2104 -0
  246. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menu-core.css +242 -0
  247. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menu.css +503 -0
  248. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menu_down_arrow.png +0 -0
  249. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menu_down_arrow_disabled.png +0 -0
  250. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menu_up_arrow.png +0 -0
  251. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menu_up_arrow_disabled.png +0 -0
  252. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menubaritem_submenuindicator.png +0 -0
  253. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menubaritem_submenuindicator_disabled.png +0 -0
  254. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menubaritem_submenuindicator_selected.png +0 -0
  255. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menuitem_checkbox.png +0 -0
  256. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menuitem_checkbox_disabled.png +0 -0
  257. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menuitem_checkbox_selected.png +0 -0
  258. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menuitem_submenuindicator.png +0 -0
  259. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menuitem_submenuindicator_disabled.png +0 -0
  260. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/menuitem_submenuindicator_selected.png +0 -0
  261. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menu-skin.css +339 -0
  262. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menu.css +7 -0
  263. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menubaritem_submenuindicator.png +0 -0
  264. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menubaritem_submenuindicator_disabled.png +0 -0
  265. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menuitem_checkbox.png +0 -0
  266. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menuitem_checkbox_disabled.png +0 -0
  267. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menuitem_submenuindicator.png +0 -0
  268. data/vendor/assets/javascripts/yui-2.8.1/build/menu/assets/skins/sam/menuitem_submenuindicator_disabled.png +0 -0
  269. data/vendor/assets/javascripts/yui-2.8.1/build/menu/menu-debug.js +9870 -0
  270. data/vendor/assets/javascripts/yui-2.8.1/build/menu/menu-min.js +16 -0
  271. data/vendor/assets/javascripts/yui-2.8.1/build/menu/menu.js +9823 -0
  272. data/vendor/assets/javascripts/yui-2.8.1/build/paginator/assets/paginator-core.css +6 -0
  273. data/vendor/assets/javascripts/yui-2.8.1/build/paginator/assets/skins/sam/paginator-skin.css +78 -0
  274. data/vendor/assets/javascripts/yui-2.8.1/build/paginator/assets/skins/sam/paginator.css +7 -0
  275. data/vendor/assets/javascripts/yui-2.8.1/build/paginator/paginator-debug.js +2393 -0
  276. data/vendor/assets/javascripts/yui-2.8.1/build/paginator/paginator-min.js +10 -0
  277. data/vendor/assets/javascripts/yui-2.8.1/build/paginator/paginator.js +2393 -0
  278. data/vendor/assets/javascripts/yui-2.8.1/build/profiler/profiler-debug.js +557 -0
  279. data/vendor/assets/javascripts/yui-2.8.1/build/profiler/profiler-min.js +7 -0
  280. data/vendor/assets/javascripts/yui-2.8.1/build/profiler/profiler.js +557 -0
  281. data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/profilerviewer-core.css +6 -0
  282. data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/skins/sam/asc.gif +0 -0
  283. data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/skins/sam/desc.gif +0 -0
  284. data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/skins/sam/header_background.png +0 -0
  285. data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/skins/sam/profilerviewer-skin.css +167 -0
  286. data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/skins/sam/profilerviewer.css +7 -0
  287. data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/assets/skins/sam/wait.gif +0 -0
  288. data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/profilerviewer-debug.js +1229 -0
  289. data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/profilerviewer-min.js +9 -0
  290. data/vendor/assets/javascripts/yui-2.8.1/build/profilerviewer/profilerviewer.js +1192 -0
  291. data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/progressbar-core.css +85 -0
  292. data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/skins/sam/back-h.png +0 -0
  293. data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/skins/sam/back-v.png +0 -0
  294. data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/skins/sam/bar-h.png +0 -0
  295. data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/skins/sam/bar-v.png +0 -0
  296. data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/skins/sam/progressbar-skin.css +56 -0
  297. data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/assets/skins/sam/progressbar.css +7 -0
  298. data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/progressbar-debug.js +691 -0
  299. data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/progressbar-min.js +8 -0
  300. data/vendor/assets/javascripts/yui-2.8.1/build/progressbar/progressbar.js +677 -0
  301. data/vendor/assets/javascripts/yui-2.8.1/build/reset-fonts-grids/reset-fonts-grids.css +7 -0
  302. data/vendor/assets/javascripts/yui-2.8.1/build/reset-fonts/reset-fonts.css +7 -0
  303. data/vendor/assets/javascripts/yui-2.8.1/build/reset/reset-min.css +7 -0
  304. data/vendor/assets/javascripts/yui-2.8.1/build/reset/reset.css +142 -0
  305. data/vendor/assets/javascripts/yui-2.8.1/build/resize/assets/resize-core.css +173 -0
  306. data/vendor/assets/javascripts/yui-2.8.1/build/resize/assets/skins/sam/layout_sprite.png +0 -0
  307. data/vendor/assets/javascripts/yui-2.8.1/build/resize/assets/skins/sam/resize-skin.css +142 -0
  308. data/vendor/assets/javascripts/yui-2.8.1/build/resize/assets/skins/sam/resize.css +7 -0
  309. data/vendor/assets/javascripts/yui-2.8.1/build/resize/resize-debug.js +1749 -0
  310. data/vendor/assets/javascripts/yui-2.8.1/build/resize/resize-min.js +10 -0
  311. data/vendor/assets/javascripts/yui-2.8.1/build/resize/resize.js +1689 -0
  312. data/vendor/assets/javascripts/yui-2.8.1/build/selector/selector-debug.js +651 -0
  313. data/vendor/assets/javascripts/yui-2.8.1/build/selector/selector-min.js +8 -0
  314. data/vendor/assets/javascripts/yui-2.8.1/build/selector/selector.js +644 -0
  315. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/bg-fader.gif +0 -0
  316. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/bg-h.gif +0 -0
  317. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/bg-v-e.gif +0 -0
  318. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/bg-v.gif +0 -0
  319. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/left-thumb.png +0 -0
  320. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/right-thumb.png +0 -0
  321. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/skins/sam/bg-h.gif +0 -0
  322. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/skins/sam/bg-v.gif +0 -0
  323. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/skins/sam/slider-skin.css +24 -0
  324. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/skins/sam/slider.css +7 -0
  325. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/slider-core.css +17 -0
  326. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/slider-skin.css +20 -0
  327. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/thumb-bar.gif +0 -0
  328. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/thumb-e.gif +0 -0
  329. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/thumb-fader.gif +0 -0
  330. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/thumb-n.gif +0 -0
  331. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/thumb-s.gif +0 -0
  332. data/vendor/assets/javascripts/yui-2.8.1/build/slider/assets/thumb-w.gif +0 -0
  333. data/vendor/assets/javascripts/yui-2.8.1/build/slider/slider-debug.js +2114 -0
  334. data/vendor/assets/javascripts/yui-2.8.1/build/slider/slider-min.js +9 -0
  335. data/vendor/assets/javascripts/yui-2.8.1/build/slider/slider.js +2068 -0
  336. data/vendor/assets/javascripts/yui-2.8.1/build/storage/storage-debug.js +1185 -0
  337. data/vendor/assets/javascripts/yui-2.8.1/build/storage/storage-min.js +8 -0
  338. data/vendor/assets/javascripts/yui-2.8.1/build/storage/storage.js +1183 -0
  339. data/vendor/assets/javascripts/yui-2.8.1/build/stylesheet/stylesheet-debug.js +648 -0
  340. data/vendor/assets/javascripts/yui-2.8.1/build/stylesheet/stylesheet-min.js +7 -0
  341. data/vendor/assets/javascripts/yui-2.8.1/build/stylesheet/stylesheet.js +645 -0
  342. data/vendor/assets/javascripts/yui-2.8.1/build/swf/swf-debug.js +269 -0
  343. data/vendor/assets/javascripts/yui-2.8.1/build/swf/swf-min.js +7 -0
  344. data/vendor/assets/javascripts/yui-2.8.1/build/swf/swf.js +268 -0
  345. data/vendor/assets/javascripts/yui-2.8.1/build/swfdetect/swfdetect-debug.js +93 -0
  346. data/vendor/assets/javascripts/yui-2.8.1/build/swfdetect/swfdetect-min.js +7 -0
  347. data/vendor/assets/javascripts/yui-2.8.1/build/swfdetect/swfdetect.js +93 -0
  348. data/vendor/assets/javascripts/yui-2.8.1/build/swfstore/swf.js +238 -0
  349. data/vendor/assets/javascripts/yui-2.8.1/build/swfstore/swfstore-debug.js +470 -0
  350. data/vendor/assets/javascripts/yui-2.8.1/build/swfstore/swfstore-min.js +7 -0
  351. data/vendor/assets/javascripts/yui-2.8.1/build/swfstore/swfstore.js +453 -0
  352. data/vendor/assets/javascripts/yui-2.8.1/build/swfstore/swfstore.swf +0 -0
  353. data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/border_tabs.css +54 -0
  354. data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/loading.gif +0 -0
  355. data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/skin-sam.css +77 -0
  356. data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/skins/sam/tabview-skin.css +186 -0
  357. data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/skins/sam/tabview.css +8 -0
  358. data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/tabview-core.css +133 -0
  359. data/vendor/assets/javascripts/yui-2.8.1/build/tabview/assets/tabview.css +77 -0
  360. data/vendor/assets/javascripts/yui-2.8.1/build/tabview/tabview-debug.js +995 -0
  361. data/vendor/assets/javascripts/yui-2.8.1/build/tabview/tabview-min.js +8 -0
  362. data/vendor/assets/javascripts/yui-2.8.1/build/tabview/tabview.js +987 -0
  363. data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/check0.gif +0 -0
  364. data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/check1.gif +0 -0
  365. data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/check2.gif +0 -0
  366. data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/loading.gif +0 -0
  367. data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/treeview-loading.gif +0 -0
  368. data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/treeview-skin.css +249 -0
  369. data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/treeview-sprite.gif +0 -0
  370. data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/skins/sam/treeview.css +7 -0
  371. data/vendor/assets/javascripts/yui-2.8.1/build/treeview/assets/treeview-core.css +6 -0
  372. data/vendor/assets/javascripts/yui-2.8.1/build/treeview/treeview-debug.js +4058 -0
  373. data/vendor/assets/javascripts/yui-2.8.1/build/treeview/treeview-min.js +12 -0
  374. data/vendor/assets/javascripts/yui-2.8.1/build/treeview/treeview.js +3989 -0
  375. data/vendor/assets/javascripts/yui-2.8.1/build/uploader/assets/uploader.swf +0 -0
  376. data/vendor/assets/javascripts/yui-2.8.1/build/uploader/uploader-debug.js +1072 -0
  377. data/vendor/assets/javascripts/yui-2.8.1/build/uploader/uploader-min.js +15 -0
  378. data/vendor/assets/javascripts/yui-2.8.1/build/uploader/uploader.js +1069 -0
  379. data/vendor/assets/javascripts/yui-2.8.1/build/utilities/utilities.js +39 -0
  380. data/vendor/assets/javascripts/yui-2.8.1/build/yahoo-dom-event/yahoo-dom-event.js +14 -0
  381. data/vendor/assets/javascripts/yui-2.8.1/build/yahoo/yahoo-debug.js +1075 -0
  382. data/vendor/assets/javascripts/yui-2.8.1/build/yahoo/yahoo-min.js +7 -0
  383. data/vendor/assets/javascripts/yui-2.8.1/build/yahoo/yahoo.js +1075 -0
  384. data/vendor/assets/javascripts/yui-2.8.1/build/yuiloader-dom-event/yuiloader-dom-event.js +17 -0
  385. data/vendor/assets/javascripts/yui-2.8.1/build/yuiloader/yuiloader-debug.js +3879 -0
  386. data/vendor/assets/javascripts/yui-2.8.1/build/yuiloader/yuiloader-min.js +10 -0
  387. data/vendor/assets/javascripts/yui-2.8.1/build/yuiloader/yuiloader.js +3879 -0
  388. data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/assets/skins/sam/yuitest-skin.css +7 -0
  389. data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/assets/skins/sam/yuitest.css +7 -0
  390. data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/assets/testlogger.css +7 -0
  391. data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/assets/yuitest-core.css +7 -0
  392. data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/yuitest-debug.js +2741 -0
  393. data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/yuitest-min.js +10 -0
  394. data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/yuitest.js +2741 -0
  395. data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/yuitest_core-debug.js +1976 -0
  396. data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/yuitest_core-min.js +9 -0
  397. data/vendor/assets/javascripts/yui-2.8.1/build/yuitest/yuitest_core.js +1976 -0
  398. metadata +470 -0
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3
+ Code licensed under the BSD License:
4
+ http://developer.yahoo.com/yui/license.html
5
+ version: 2.8.1
6
+ */
7
+ (function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang;var B=function(F,E){if(D.isObject(F)&&!F.tagName){E=F;F=null;}if(D.isString(F)){if(C.get(F)){F=C.get(F);}}if(!F){F=document.body;}var G={element:F,attributes:E||{}};B.superclass.constructor.call(this,G.element,G.attributes);};B._instances={};B.getLayoutById=function(E){if(B._instances[E]){return B._instances[E];}return false;};YAHOO.extend(B,YAHOO.util.Element,{browser:function(){var E=YAHOO.env.ua;E.standardsMode=false;E.secure=false;return E;}(),_units:null,_rendered:null,_zIndex:null,_sizes:null,_setBodySize:function(G){var F=0,E=0;G=((G===false)?false:true);if(this._isBody){F=C.getClientHeight();E=C.getClientWidth();}else{F=parseInt(this.getStyle("height"),10);E=parseInt(this.getStyle("width"),10);if(isNaN(E)){E=this.get("element").clientWidth;}if(isNaN(F)){F=this.get("element").clientHeight;}}if(this.get("minWidth")){if(E<this.get("minWidth")){E=this.get("minWidth");}}if(this.get("minHeight")){if(F<this.get("minHeight")){F=this.get("minHeight");}}if(G){if(F<0){F=0;}if(E<0){E=0;}C.setStyle(this._doc,"height",F+"px");C.setStyle(this._doc,"width",E+"px");}this._sizes.doc={h:F,w:E};this._setSides(G);},_setSides:function(J){var H=((this._units.top)?this._units.top.get("height"):0),G=((this._units.bottom)?this._units.bottom.get("height"):0),I=this._sizes.doc.h,E=this._sizes.doc.w;J=((J===false)?false:true);this._sizes.top={h:H,w:((this._units.top)?E:0),t:0};this._sizes.bottom={h:G,w:((this._units.bottom)?E:0)};var F=(I-(H+G));this._sizes.left={h:F,w:((this._units.left)?this._units.left.get("width"):0)};this._sizes.right={h:F,w:((this._units.right)?this._units.right.get("width"):0),l:((this._units.right)?(E-this._units.right.get("width")):0),t:((this._units.top)?this._sizes.top.h:0)};if(this._units.right&&J){this._units.right.set("top",this._sizes.right.t);if(!this._units.right._collapsing){this._units.right.set("left",this._sizes.right.l);}this._units.right.set("height",this._sizes.right.h,true);}if(this._units.left){this._sizes.left.l=0;if(this._units.top){this._sizes.left.t=this._sizes.top.h;}else{this._sizes.left.t=0;}if(J){this._units.left.set("top",this._sizes.left.t);this._units.left.set("height",this._sizes.left.h,true);this._units.left.set("left",0);}}if(this._units.bottom){this._sizes.bottom.t=this._sizes.top.h+this._sizes.left.h;if(J){this._units.bottom.set("top",this._sizes.bottom.t);this._units.bottom.set("width",this._sizes.bottom.w,true);}}if(this._units.top){if(J){this._units.top.set("width",this._sizes.top.w,true);}}this._setCenter(J);},_setCenter:function(G){G=((G===false)?false:true);var F=this._sizes.left.h;var E=(this._sizes.doc.w-(this._sizes.left.w+this._sizes.right.w));if(G){this._units.center.set("height",F,true);this._units.center.set("width",E,true);this._units.center.set("top",this._sizes.top.h);this._units.center.set("left",this._sizes.left.w);}this._sizes.center={h:F,w:E,t:this._sizes.top.h,l:this._sizes.left.w};},getSizes:function(){return this._sizes;},getUnitById:function(E){return YAHOO.widget.LayoutUnit.getLayoutUnitById(E);},getUnitByPosition:function(E){if(E){E=E.toLowerCase();if(this._units[E]){return this._units[E];}return false;}return false;},removeUnit:function(E){delete this._units[E.get("position")];this.resize();},addUnit:function(G){if(!G.position){return false;}if(this._units[G.position]){return false;}var H=null,J=null;if(G.id){if(C.get(G.id)){H=C.get(G.id);delete G.id;}}if(G.element){H=G.element;}if(!J){J=document.createElement("div");var L=C.generateId();J.id=L;}if(!H){H=document.createElement("div");}C.addClass(H,"yui-layout-wrap");if(this.browser.ie&&!this.browser.standardsMode){J.style.zoom=1;H.style.zoom=1;}if(J.firstChild){J.insertBefore(H,J.firstChild);}else{J.appendChild(H);}this._doc.appendChild(J);var I=false,F=false;if(G.height){I=parseInt(G.height,10);}if(G.width){F=parseInt(G.width,10);}var E={};YAHOO.lang.augmentObject(E,G);E.parent=this;E.wrap=H;E.height=I;E.width=F;var K=new YAHOO.widget.LayoutUnit(J,E);K.on("heightChange",this.resize,{unit:K},this);K.on("widthChange",this.resize,{unit:K},this);K.on("gutterChange",this.resize,{unit:K},this);this._units[G.position]=K;if(this._rendered){this.resize();}return K;},_createUnits:function(){var E=this.get("units");for(var F in E){if(D.hasOwnProperty(E,F)){this.addUnit(E[F]);}}},resize:function(H,G){var E=H;if(E&&E.prevValue&&E.newValue){if(E.prevValue==E.newValue){if(G){if(G.unit){if(!G.unit.get("animate")){H=false;}}}}}H=((H===false)?false:true);if(H){var F=this.fireEvent("beforeResize");if(F===false){H=false;}if(this.browser.ie){if(this._isBody){C.removeClass(document.documentElement,"yui-layout");C.addClass(document.documentElement,"yui-layout");}else{this.removeClass("yui-layout");this.addClass("yui-layout");}}}this._setBodySize(H);if(H){this.fireEvent("resize",{target:this,sizes:this._sizes,event:E});}return this;},_setupBodyElements:function(){this._doc=C.get("layout-doc");if(!this._doc){this._doc=document.createElement("div");this._doc.id="layout-doc";if(document.body.firstChild){document.body.insertBefore(this._doc,document.body.firstChild);}else{document.body.appendChild(this._doc);}}this._createUnits();this._setBodySize();A.on(window,"resize",this.resize,this,true);C.addClass(this._doc,"yui-layout-doc");},_setupElements:function(){this._doc=this.getElementsByClassName("yui-layout-doc")[0];if(!this._doc){this._doc=document.createElement("div");this.get("element").appendChild(this._doc);}this._createUnits();this._setBodySize();C.addClass(this._doc,"yui-layout-doc");},_isBody:null,_doc:null,init:function(F,E){this._zIndex=0;B.superclass.init.call(this,F,E);if(this.get("parent")){this._zIndex=this.get("parent")._zIndex+10;}this._sizes={};this._units={};var G=F;if(!D.isString(G)){G=C.generateId(G);}B._instances[G]=this;},render:function(){this._stamp();var E=this.get("element");if(E&&E.tagName&&(E.tagName.toLowerCase()=="body")){this._isBody=true;C.addClass(document.body,"yui-layout");if(C.hasClass(document.body,"yui-skin-sam")){C.addClass(document.documentElement,"yui-skin-sam");
8
+ C.removeClass(document.body,"yui-skin-sam");}this._setupBodyElements();}else{this._isBody=false;this.addClass("yui-layout");this._setupElements();}this.resize();this._rendered=true;this.fireEvent("render");return this;},_stamp:function(){if(document.compatMode=="CSS1Compat"){this.browser.standardsMode=true;}if(window.location.href.toLowerCase().indexOf("https")===0){C.addClass(document.documentElement,"secure");this.browser.secure=true;}},initAttributes:function(E){B.superclass.initAttributes.call(this,E);this.setAttributeConfig("units",{writeOnce:true,validator:YAHOO.lang.isArray,value:E.units||[]});this.setAttributeConfig("minHeight",{value:E.minHeight||false,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minWidth",{value:E.minWidth||false,validator:YAHOO.lang.isNumber});this.setAttributeConfig("height",{value:E.height||false,validator:YAHOO.lang.isNumber,method:function(F){if(F<0){F=0;}this.setStyle("height",F+"px");}});this.setAttributeConfig("width",{value:E.width||false,validator:YAHOO.lang.isNumber,method:function(F){if(F<0){F=0;}this.setStyle("width",F+"px");}});this.setAttributeConfig("parent",{writeOnce:true,value:E.parent||false,method:function(F){if(F){F.on("resize",this.resize,this,true);}}});},destroy:function(){var G=this.get("parent");if(G){G.removeListener("resize",this.resize,this,true);}A.removeListener(window,"resize",this.resize,this,true);this.unsubscribeAll();for(var E in this._units){if(D.hasOwnProperty(this._units,E)){if(this._units[E]){this._units[E].destroy(true);}}}A.purgeElement(this.get("element"));this.get("parentNode").removeChild(this.get("element"));delete YAHOO.widget.Layout._instances[this.get("id")];for(var F in this){if(D.hasOwnProperty(this,F)){this[F]=null;delete this[F];}}if(G){G.resize();}},toString:function(){if(this.get){return"Layout #"+this.get("id");}return"Layout";}});YAHOO.widget.Layout=B;})();(function(){var D=YAHOO.util.Dom,C=YAHOO.util.Selector,A=YAHOO.util.Event,E=YAHOO.lang;var B=function(G,F){var H={element:G,attributes:F||{}};B.superclass.constructor.call(this,H.element,H.attributes);};B._instances={};B.getLayoutUnitById=function(F){if(B._instances[F]){return B._instances[F];}return false;};YAHOO.extend(B,YAHOO.util.Element,{STR_CLOSE:"Click to close this pane.",STR_COLLAPSE:"Click to collapse this pane.",STR_EXPAND:"Click to expand this pane.",LOADING_CLASSNAME:"loading",browser:null,_sizes:null,_anim:null,_resize:null,_clip:null,_gutter:null,header:null,body:null,footer:null,_collapsed:null,_collapsing:null,_lastWidth:null,_lastHeight:null,_lastTop:null,_lastLeft:null,_lastScroll:null,_lastCenterScroll:null,_lastScrollTop:null,resize:function(F){var G=this.fireEvent("beforeResize");if(G===false){return this;}if(!this._collapsing||(F===true)){var N=this.get("scroll");this.set("scroll",false);var K=this._getBoxSize(this.header),J=this._getBoxSize(this.footer),L=[this.get("height"),this.get("width")];var H=(L[0]-K[0]-J[0])-(this._gutter.top+this._gutter.bottom),M=L[1]-(this._gutter.left+this._gutter.right);var O=(H+(K[0]+J[0])),I=M;if(this._collapsed&&!this._collapsing){this._setHeight(this._clip,O);this._setWidth(this._clip,I);D.setStyle(this._clip,"top",this.get("top")+this._gutter.top+"px");D.setStyle(this._clip,"left",this.get("left")+this._gutter.left+"px");}else{if(!this._collapsed||(this._collapsed&&this._collapsing)){O=this._setHeight(this.get("wrap"),O);I=this._setWidth(this.get("wrap"),I);this._sizes.wrap.h=O;this._sizes.wrap.w=I;D.setStyle(this.get("wrap"),"top",this._gutter.top+"px");D.setStyle(this.get("wrap"),"left",this._gutter.left+"px");this._sizes.header.w=this._setWidth(this.header,I);this._sizes.header.h=K[0];this._sizes.footer.w=this._setWidth(this.footer,I);this._sizes.footer.h=J[0];D.setStyle(this.footer,"bottom","0px");this._sizes.body.h=this._setHeight(this.body,(O-(K[0]+J[0])));this._sizes.body.w=this._setWidth(this.body,I);D.setStyle(this.body,"top",K[0]+"px");this.set("scroll",N);this.fireEvent("resize");}}}return this;},_setWidth:function(H,G){if(H){var F=this._getBorderSizes(H);G=(G-(F[1]+F[3]));G=this._fixQuirks(H,G,"w");if(G<0){G=0;}D.setStyle(H,"width",G+"px");}return G;},_setHeight:function(H,G){if(H){var F=this._getBorderSizes(H);G=(G-(F[0]+F[2]));G=this._fixQuirks(H,G,"h");if(G<0){G=0;}D.setStyle(H,"height",G+"px");}return G;},_fixQuirks:function(I,L,G){var K=0,H=2;if(G=="w"){K=1;H=3;}if((this.browser.ie<8)&&!this.browser.standardsMode){var F=this._getBorderSizes(I),J=this._getBorderSizes(I.parentNode);if((F[K]===0)&&(F[H]===0)){if((J[K]!==0)&&(J[H]!==0)){L=(L-(J[K]+J[H]));}}else{if((J[K]===0)&&(J[H]===0)){L=(L+(F[K]+F[H]));}}}return L;},_getBoxSize:function(H){var G=[0,0];if(H){if(this.browser.ie&&!this.browser.standardsMode){H.style.zoom=1;}var F=this._getBorderSizes(H);G[0]=H.clientHeight+(F[0]+F[2]);G[1]=H.clientWidth+(F[1]+F[3]);}return G;},_getBorderSizes:function(H){var G=[];H=H||this.get("element");if(this.browser.ie&&!this.browser.standardsMode){H.style.zoom=1;}G[0]=parseInt(D.getStyle(H,"borderTopWidth"),10);G[1]=parseInt(D.getStyle(H,"borderRightWidth"),10);G[2]=parseInt(D.getStyle(H,"borderBottomWidth"),10);G[3]=parseInt(D.getStyle(H,"borderLeftWidth"),10);for(var F=0;F<G.length;F++){if(isNaN(G[F])){G[F]=0;}}return G;},_createClip:function(){if(!this._clip){this._clip=document.createElement("div");this._clip.className="yui-layout-clip yui-layout-clip-"+this.get("position");this._clip.innerHTML='<div class="collapse"></div>';var F=this._clip.firstChild;F.title=this.STR_EXPAND;A.on(F,"click",this.expand,this,true);this.get("element").parentNode.appendChild(this._clip);}},_toggleClip:function(){if(!this._collapsed){var J=this._getBoxSize(this.header),K=this._getBoxSize(this.footer),I=[this.get("height"),this.get("width")];var H=(I[0]-J[0]-K[0])-(this._gutter.top+this._gutter.bottom),F=I[1]-(this._gutter.left+this._gutter.right),G=(H+(J[0]+K[0]));switch(this.get("position")){case"top":case"bottom":this._setWidth(this._clip,F);this._setHeight(this._clip,this.get("collapseSize"));D.setStyle(this._clip,"left",(this._lastLeft+this._gutter.left)+"px");
9
+ if(this.get("position")=="bottom"){D.setStyle(this._clip,"top",((this._lastTop+this._lastHeight)-(this.get("collapseSize")-this._gutter.top))+"px");}else{D.setStyle(this._clip,"top",this.get("top")+this._gutter.top+"px");}break;case"left":case"right":this._setWidth(this._clip,this.get("collapseSize"));this._setHeight(this._clip,G);D.setStyle(this._clip,"top",(this.get("top")+this._gutter.top)+"px");if(this.get("position")=="right"){D.setStyle(this._clip,"left",(((this._lastLeft+this._lastWidth)-this.get("collapseSize"))-this._gutter.left)+"px");}else{D.setStyle(this._clip,"left",(this.get("left")+this._gutter.left)+"px");}break;}D.setStyle(this._clip,"display","block");this.setStyle("display","none");}else{D.setStyle(this._clip,"display","none");}},getSizes:function(){return this._sizes;},toggle:function(){if(this._collapsed){this.expand();}else{this.collapse();}return this;},expand:function(){if(!this._collapsed){return this;}var L=this.fireEvent("beforeExpand");if(L===false){return this;}this._collapsing=true;this.setStyle("zIndex",this.get("parent")._zIndex+1);if(this._anim){this.setStyle("display","none");var F={},H;switch(this.get("position")){case"left":case"right":this.set("width",this._lastWidth,true);this.setStyle("width",this._lastWidth+"px");this.get("parent").resize(false);H=this.get("parent").getSizes()[this.get("position")];this.set("height",H.h,true);var K=H.l;F={left:{to:K}};if(this.get("position")=="left"){F.left.from=(K-H.w);this.setStyle("left",(K-H.w)+"px");}break;case"top":case"bottom":this.set("height",this._lastHeight,true);this.setStyle("height",this._lastHeight+"px");this.get("parent").resize(false);H=this.get("parent").getSizes()[this.get("position")];this.set("width",H.w,true);var J=H.t;F={top:{to:J}};if(this.get("position")=="top"){this.setStyle("top",(J-H.h)+"px");F.top.from=(J-H.h);}break;}this._anim.attributes=F;var I=function(){this.setStyle("display","block");this.resize(true);this._anim.onStart.unsubscribe(I,this,true);};var G=function(){this._collapsing=false;this.setStyle("zIndex",this.get("parent")._zIndex);this.set("width",this._lastWidth);this.set("height",this._lastHeight);this._collapsed=false;this.resize();this.set("scroll",this._lastScroll);if(this._lastScrollTop>0){this.body.scrollTop=this._lastScrollTop;}this._anim.onComplete.unsubscribe(G,this,true);this.fireEvent("expand");};this._anim.onStart.subscribe(I,this,true);this._anim.onComplete.subscribe(G,this,true);this._anim.animate();this._toggleClip();}else{this._collapsing=false;this._toggleClip();this._collapsed=false;this.setStyle("zIndex",this.get("parent")._zIndex);this.setStyle("display","block");this.set("width",this._lastWidth);this.set("height",this._lastHeight);this.resize();this.set("scroll",this._lastScroll);if(this._lastScrollTop>0){this.body.scrollTop=this._lastScrollTop;}this.fireEvent("expand");}return this;},collapse:function(){if(this._collapsed){return this;}var J=this.fireEvent("beforeCollapse");if(J===false){return this;}if(!this._clip){this._createClip();}this._collapsing=true;var G=this.get("width"),H=this.get("height"),F={};this._lastWidth=G;this._lastHeight=H;this._lastScroll=this.get("scroll");this._lastScrollTop=this.body.scrollTop;this.set("scroll",false,true);this._lastLeft=parseInt(this.get("element").style.left,10);this._lastTop=parseInt(this.get("element").style.top,10);if(isNaN(this._lastTop)){this._lastTop=0;this.set("top",0);}if(isNaN(this._lastLeft)){this._lastLeft=0;this.set("left",0);}this.setStyle("zIndex",this.get("parent")._zIndex+1);var K=this.get("position");switch(K){case"top":case"bottom":this.set("height",(this.get("collapseSize")+(this._gutter.top+this._gutter.bottom)));F={top:{to:(this.get("top")-H)}};if(K=="bottom"){F.top.to=(this.get("top")+H);}break;case"left":case"right":this.set("width",(this.get("collapseSize")+(this._gutter.left+this._gutter.right)));F={left:{to:-(this._lastWidth)}};if(K=="right"){F.left={to:(this.get("left")+G)};}break;}if(this._anim){this._anim.attributes=F;var I=function(){this._collapsing=false;this._toggleClip();this.setStyle("zIndex",this.get("parent")._zIndex);this._collapsed=true;this.get("parent").resize();this._anim.onComplete.unsubscribe(I,this,true);this.fireEvent("collapse");};this._anim.onComplete.subscribe(I,this,true);this._anim.animate();}else{this._collapsing=false;this.setStyle("display","none");this._toggleClip();this.setStyle("zIndex",this.get("parent")._zIndex);this.get("parent").resize();this._collapsed=true;this.fireEvent("collapse");}return this;},close:function(){this.setStyle("display","none");this.get("parent").removeUnit(this);this.fireEvent("close");if(this._clip){this._clip.parentNode.removeChild(this._clip);this._clip=null;}return this.get("parent");},loadHandler:{success:function(F){this.body.innerHTML=F.responseText;this.resize(true);},failure:function(F){}},dataConnection:null,_loading:false,loadContent:function(){if(YAHOO.util.Connect&&this.get("dataSrc")&&!this._loading&&!this.get("dataLoaded")){this._loading=true;D.addClass(this.body,this.LOADING_CLASSNAME);this.dataConnection=YAHOO.util.Connect.asyncRequest(this.get("loadMethod"),this.get("dataSrc"),{success:function(F){this.loadHandler.success.call(this,F);this.set("dataLoaded",true);this.dataConnection=null;D.removeClass(this.body,this.LOADING_CLASSNAME);this._loading=false;this.fireEvent("load");},failure:function(F){this.loadHandler.failure.call(this,F);this.dataConnection=null;D.removeClass(this.body,this.LOADING_CLASSNAME);this._loading=false;this.fireEvent("loadError",{error:F});},scope:this,timeout:this.get("dataTimeout")});return this.dataConnection;}return false;},init:function(H,G){this._gutter={left:0,right:0,top:0,bottom:0};this._sizes={wrap:{h:0,w:0},header:{h:0,w:0},body:{h:0,w:0},footer:{h:0,w:0}};B.superclass.init.call(this,H,G);this.browser=this.get("parent").browser;var K=H;if(!E.isString(K)){K=D.generateId(K);}B._instances[K]=this;this.setStyle("position","absolute");this.addClass("yui-layout-unit");this.addClass("yui-layout-unit-"+this.get("position"));
10
+ var J=this.getElementsByClassName("yui-layout-hd","div")[0];if(J){this.header=J;}var F=this.getElementsByClassName("yui-layout-bd","div")[0];if(F){this.body=F;}var I=this.getElementsByClassName("yui-layout-ft","div")[0];if(I){this.footer=I;}this.on("contentChange",this.resize,this,true);this._lastScrollTop=0;this.set("animate",this.get("animate"));},initAttributes:function(F){B.superclass.initAttributes.call(this,F);this.setAttributeConfig("wrap",{value:F.wrap||null,method:function(G){if(G){var H=D.generateId(G);B._instances[H]=this;}}});this.setAttributeConfig("grids",{value:F.grids||false});this.setAttributeConfig("top",{value:F.top||0,validator:E.isNumber,method:function(G){if(!this._collapsing){this.setStyle("top",G+"px");}}});this.setAttributeConfig("left",{value:F.left||0,validator:E.isNumber,method:function(G){if(!this._collapsing){this.setStyle("left",G+"px");}}});this.setAttributeConfig("minWidth",{value:F.minWidth||false,method:function(G){if(this._resize){this._resize.set("minWidth",G);}},validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxWidth",{value:F.maxWidth||false,method:function(G){if(this._resize){this._resize.set("maxWidth",G);}},validator:YAHOO.lang.isNumber});this.setAttributeConfig("minHeight",{value:F.minHeight||false,method:function(G){if(this._resize){this._resize.set("minHeight",G);}},validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxHeight",{value:F.maxHeight||false,method:function(G){if(this._resize){this._resize.set("maxHeight",G);}},validator:YAHOO.lang.isNumber});this.setAttributeConfig("height",{value:F.height,validator:E.isNumber,method:function(G){if(!this._collapsing){if(G<0){G=0;}this.setStyle("height",G+"px");}}});this.setAttributeConfig("width",{value:F.width,validator:E.isNumber,method:function(G){if(!this._collapsing){if(G<0){G=0;}this.setStyle("width",G+"px");}}});this.setAttributeConfig("zIndex",{value:F.zIndex||false,method:function(G){this.setStyle("zIndex",G);}});this.setAttributeConfig("position",{value:F.position});this.setAttributeConfig("gutter",{value:F.gutter||0,validator:YAHOO.lang.isString,method:function(H){var G=H.split(" ");if(G.length){this._gutter.top=parseInt(G[0],10);if(G[1]){this._gutter.right=parseInt(G[1],10);}else{this._gutter.right=this._gutter.top;}if(G[2]){this._gutter.bottom=parseInt(G[2],10);}else{this._gutter.bottom=this._gutter.top;}if(G[3]){this._gutter.left=parseInt(G[3],10);}else{if(G[1]){this._gutter.left=this._gutter.right;}else{this._gutter.left=this._gutter.top;}}}}});this.setAttributeConfig("parent",{writeOnce:true,value:F.parent||false,method:function(G){if(G){G.on("resize",this.resize,this,true);}}});this.setAttributeConfig("collapseSize",{value:F.collapseSize||25,validator:YAHOO.lang.isNumber});this.setAttributeConfig("duration",{value:F.duration||0.5});this.setAttributeConfig("easing",{value:F.easing||((YAHOO.util&&YAHOO.util.Easing)?YAHOO.util.Easing.BounceIn:"false")});this.setAttributeConfig("animate",{value:((F.animate===false)?false:true),validator:function(){var G=false;if(YAHOO.util.Anim){G=true;}return G;},method:function(G){if(G){this._anim=new YAHOO.util.Anim(this.get("element"),{},this.get("duration"),this.get("easing"));}else{this._anim=false;}}});this.setAttributeConfig("header",{value:F.header||false,method:function(G){if(G===false){if(this.header){D.addClass(this.body,"yui-layout-bd-nohd");this.header.parentNode.removeChild(this.header);this.header=null;}}else{if(!this.header){var I=this.getElementsByClassName("yui-layout-hd","div")[0];if(!I){I=this._createHeader();}this.header=I;}var H=this.header.getElementsByTagName("h2")[0];if(!H){H=document.createElement("h2");this.header.appendChild(H);}H.innerHTML=G;if(this.body){D.removeClass(this.body,"yui-layout-bd-nohd");}}this.fireEvent("contentChange",{target:"header"});}});this.setAttributeConfig("proxy",{writeOnce:true,value:((F.proxy===false)?false:true)});this.setAttributeConfig("body",{value:F.body||false,method:function(I){if(!this.body){var G=this.getElementsByClassName("yui-layout-bd","div")[0];if(G){this.body=G;}else{G=document.createElement("div");G.className="yui-layout-bd";this.body=G;this.get("wrap").appendChild(G);}}if(!this.header){D.addClass(this.body,"yui-layout-bd-nohd");}D.addClass(this.body,"yui-layout-bd-noft");var H=null;if(E.isString(I)){H=D.get(I);}else{if(I&&I.tagName){H=I;}}if(H){var J=D.generateId(H);B._instances[J]=this;this.body.appendChild(H);}else{this.body.innerHTML=I;}this._cleanGrids();this.fireEvent("contentChange",{target:"body"});}});this.setAttributeConfig("footer",{value:F.footer||false,method:function(H){if(H===false){if(this.footer){D.addClass(this.body,"yui-layout-bd-noft");this.footer.parentNode.removeChild(this.footer);this.footer=null;}}else{if(!this.footer){var I=this.getElementsByClassName("yui-layout-ft","div")[0];if(!I){I=document.createElement("div");I.className="yui-layout-ft";this.footer=I;this.get("wrap").appendChild(I);}else{this.footer=I;}}var G=null;if(E.isString(H)){G=D.get(H);}else{if(H&&H.tagName){G=H;}}if(G){this.footer.appendChild(G);}else{this.footer.innerHTML=H;}D.removeClass(this.body,"yui-layout-bd-noft");}this.fireEvent("contentChange",{target:"footer"});}});this.setAttributeConfig("close",{value:F.close||false,method:function(G){if(this.get("position")=="center"){return false;}if(!this.header&&G){this._createHeader();}var H=D.getElementsByClassName("close","div",this.header)[0];if(G){if(!this.get("header")){this.set("header","&nbsp;");}if(!H){H=document.createElement("div");H.className="close";this.header.appendChild(H);A.on(H,"click",this.close,this,true);}H.title=this.STR_CLOSE;}else{if(H&&H.parentNode){A.purgeElement(H);H.parentNode.removeChild(H);}}this._configs.close.value=G;this.set("collapse",this.get("collapse"));}});this.setAttributeConfig("collapse",{value:F.collapse||false,method:function(G){if(this.get("position")=="center"){return false;}if(!this.header&&G){this._createHeader();}var H=D.getElementsByClassName("collapse","div",this.header)[0];if(G){if(!this.get("header")){this.set("header","&nbsp;");
11
+ }if(!H){H=document.createElement("div");this.header.appendChild(H);A.on(H,"click",this.collapse,this,true);}H.title=this.STR_COLLAPSE;H.className="collapse"+((this.get("close"))?" collapse-close":"");}else{if(H&&H.parentNode){A.purgeElement(H);H.parentNode.removeChild(H);}}}});this.setAttributeConfig("scroll",{value:(((F.scroll===true)||(F.scroll===false)||(F.scroll===null))?F.scroll:false),method:function(G){if((G===false)&&!this._collapsed){if(this.body){if(this.body.scrollTop>0){this._lastScrollTop=this.body.scrollTop;}}}if(G===true){this.addClass("yui-layout-scroll");this.removeClass("yui-layout-noscroll");if(this._lastScrollTop>0){if(this.body){this.body.scrollTop=this._lastScrollTop;}}}else{if(G===false){this.removeClass("yui-layout-scroll");this.addClass("yui-layout-noscroll");}else{if(G===null){this.removeClass("yui-layout-scroll");this.removeClass("yui-layout-noscroll");}}}}});this.setAttributeConfig("hover",{writeOnce:true,value:F.hover||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("useShim",{value:F.useShim||false,validator:YAHOO.lang.isBoolean,method:function(G){if(this._resize){this._resize.set("useShim",G);}}});this.setAttributeConfig("resize",{value:F.resize||false,validator:function(G){if(YAHOO.util&&YAHOO.util.Resize){return true;}return false;},method:function(G){if(G&&!this._resize){if(this.get("position")=="center"){return false;}var I=false;switch(this.get("position")){case"top":I="b";break;case"bottom":I="t";break;case"right":I="l";break;case"left":I="r";break;}this.setStyle("position","absolute");if(I){this._resize=new YAHOO.util.Resize(this.get("element"),{proxy:this.get("proxy"),hover:this.get("hover"),status:false,autoRatio:false,handles:[I],minWidth:this.get("minWidth"),maxWidth:this.get("maxWidth"),minHeight:this.get("minHeight"),maxHeight:this.get("maxHeight"),height:this.get("height"),width:this.get("width"),setSize:false,useShim:this.get("useShim"),wrap:false});this._resize._handles[I].innerHTML='<div class="yui-layout-resize-knob"></div>';if(this.get("proxy")){var H=this._resize.getProxyEl();H.innerHTML='<div class="yui-layout-handle-'+I+'"></div>';}this._resize.on("startResize",function(J){this._lastScroll=this.get("scroll");this.set("scroll",false);if(this.get("parent")){this.get("parent").fireEvent("startResize");var K=this.get("parent").getUnitByPosition("center");this._lastCenterScroll=K.get("scroll");K.addClass(this._resize.CSS_RESIZING);K.set("scroll",false);}this.fireEvent("startResize");},this,true);this._resize.on("resize",function(J){this.set("height",J.height);this.set("width",J.width);},this,true);this._resize.on("endResize",function(J){this.set("scroll",this._lastScroll);if(this.get("parent")){var K=this.get("parent").getUnitByPosition("center");K.set("scroll",this._lastCenterScroll);K.removeClass(this._resize.CSS_RESIZING);}this.resize();this.fireEvent("endResize");},this,true);}}else{if(this._resize){this._resize.destroy();}}}});this.setAttributeConfig("dataSrc",{value:F.dataSrc});this.setAttributeConfig("loadMethod",{value:F.loadMethod||"GET",validator:YAHOO.lang.isString});this.setAttributeConfig("dataLoaded",{value:false,validator:YAHOO.lang.isBoolean,writeOnce:true});this.setAttributeConfig("dataTimeout",{value:F.dataTimeout||null,validator:YAHOO.lang.isNumber});},_cleanGrids:function(){if(this.get("grids")){var F=C.query("div.yui-b",this.body,true);if(F){D.removeClass(F,"yui-b");}A.onAvailable("yui-main",function(){D.setStyle(C.query("#yui-main"),"margin-left","0");D.setStyle(C.query("#yui-main"),"margin-right","0");});}},_createHeader:function(){var F=document.createElement("div");F.className="yui-layout-hd";if(this.get("firstChild")){this.get("wrap").insertBefore(F,this.get("wrap").firstChild);}else{this.get("wrap").appendChild(F);}this.header=F;return F;},destroy:function(H){if(this._resize){this._resize.destroy();}var G=this.get("parent");this.setStyle("display","none");if(this._clip){this._clip.parentNode.removeChild(this._clip);this._clip=null;}if(!H){G.removeUnit(this);}if(G){G.removeListener("resize",this.resize,this,true);}this.unsubscribeAll();A.purgeElement(this.get("element"));this.get("parentNode").removeChild(this.get("element"));delete YAHOO.widget.LayoutUnit._instances[this.get("id")];for(var F in this){if(E.hasOwnProperty(this,F)){this[F]=null;delete this[F];}}return G;},toString:function(){if(this.get){return"LayoutUnit #"+this.get("id")+" ("+this.get("position")+")";}return"LayoutUnit";}});YAHOO.widget.LayoutUnit=B;})();YAHOO.register("layout",YAHOO.widget.Layout,{version:"2.8.1",build:"19"});
@@ -0,0 +1,2290 @@
1
+ /*
2
+ Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3
+ Code licensed under the BSD License:
4
+ http://developer.yahoo.com/yui/license.html
5
+ version: 2.8.1
6
+ */
7
+ /**
8
+ * @description <p>Provides a fixed layout containing, top, bottom, left, right and center layout units. It can be applied to either the body or an element.</p>
9
+ * @namespace YAHOO.widget
10
+ * @requires yahoo, dom, element, event
11
+ * @module layout
12
+ */
13
+ (function() {
14
+ var Dom = YAHOO.util.Dom,
15
+ Event = YAHOO.util.Event,
16
+ Lang = YAHOO.lang;
17
+
18
+ /**
19
+ * @constructor
20
+ * @class Layout
21
+ * @extends YAHOO.util.Element
22
+ * @description <p>Provides a fixed layout containing, top, bottom, left, right and center layout units. It can be applied to either the body or an element.</p>
23
+ * @param {String/HTMLElement} el The element to make contain a layout.
24
+ * @param {Object} attrs Object liternal containing configuration parameters.
25
+ */
26
+
27
+ var Layout = function(el, config) {
28
+ if (Lang.isObject(el) && !el.tagName) {
29
+ config = el;
30
+ el = null;
31
+ }
32
+ if (Lang.isString(el)) {
33
+ if (Dom.get(el)) {
34
+ el = Dom.get(el);
35
+ }
36
+ }
37
+ if (!el) {
38
+ el = document.body;
39
+ }
40
+
41
+ var oConfig = {
42
+ element: el,
43
+ attributes: config || {}
44
+ };
45
+
46
+ Layout.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
47
+ };
48
+
49
+ /**
50
+ * @private
51
+ * @static
52
+ * @property _instances
53
+ * @description Internal hash table for all layout instances
54
+ * @type Object
55
+ */
56
+ Layout._instances = {};
57
+ /**
58
+ * @static
59
+ * @method getLayoutById
60
+ * @description Get's a layout object by the HTML id of the element associated with the Layout object.
61
+ * @return {Object} The Layout Object
62
+ */
63
+ Layout.getLayoutById = function(id) {
64
+ if (Layout._instances[id]) {
65
+ return Layout._instances[id];
66
+ }
67
+ return false;
68
+ };
69
+
70
+ YAHOO.extend(Layout, YAHOO.util.Element, {
71
+ /**
72
+ * @property browser
73
+ * @description A modified version of the YAHOO.env.ua object
74
+ * @type Object
75
+ */
76
+ browser: function() {
77
+ var b = YAHOO.env.ua;
78
+ b.standardsMode = false;
79
+ b.secure = false;
80
+ return b;
81
+ }(),
82
+ /**
83
+ * @private
84
+ * @property _units
85
+ * @description An object literal that contains a list of units in the layout
86
+ * @type Object
87
+ */
88
+ _units: null,
89
+ /**
90
+ * @private
91
+ * @property _rendered
92
+ * @description Set to true when the layout is rendered
93
+ * @type Boolean
94
+ */
95
+ _rendered: null,
96
+ /**
97
+ * @private
98
+ * @property _zIndex
99
+ * @description The zIndex to set all LayoutUnits to
100
+ * @type Number
101
+ */
102
+ _zIndex: null,
103
+ /**
104
+ * @private
105
+ * @property _sizes
106
+ * @description A collection of the current sizes of all usable LayoutUnits to be used for calculations
107
+ * @type Object
108
+ */
109
+ _sizes: null,
110
+ /**
111
+ * @private
112
+ * @method _setBodySize
113
+ * @param {Boolean} set If set to false, it will NOT set the size, just perform the calculations (used for collapsing units)
114
+ * @description Used to set the body size of the layout, sets the height and width of the parent container
115
+ */
116
+ _setBodySize: function(set) {
117
+ var h = 0, w = 0;
118
+ set = ((set === false) ? false : true);
119
+
120
+ if (this._isBody) {
121
+ h = Dom.getClientHeight();
122
+ w = Dom.getClientWidth();
123
+ } else {
124
+ h = parseInt(this.getStyle('height'), 10);
125
+ w = parseInt(this.getStyle('width'), 10);
126
+ if (isNaN(w)) {
127
+ w = this.get('element').clientWidth;
128
+ }
129
+ if (isNaN(h)) {
130
+ h = this.get('element').clientHeight;
131
+ }
132
+ }
133
+ if (this.get('minWidth')) {
134
+ if (w < this.get('minWidth')) {
135
+ w = this.get('minWidth');
136
+ }
137
+ }
138
+ if (this.get('minHeight')) {
139
+ if (h < this.get('minHeight')) {
140
+ h = this.get('minHeight');
141
+ }
142
+ }
143
+ if (set) {
144
+ if (h < 0) {
145
+ h = 0;
146
+ }
147
+ if (w < 0) {
148
+ w = 0;
149
+ }
150
+ Dom.setStyle(this._doc, 'height', h + 'px');
151
+ Dom.setStyle(this._doc, 'width', w + 'px');
152
+ }
153
+ this._sizes.doc = { h: h, w: w };
154
+ this._setSides(set);
155
+ },
156
+ /**
157
+ * @private
158
+ * @method _setSides
159
+ * @param {Boolean} set If set to false, it will NOT set the size, just perform the calculations (used for collapsing units)
160
+ * @description Used to set the size and position of the left, right, top and bottom units
161
+ */
162
+ _setSides: function(set) {
163
+ var h1 = ((this._units.top) ? this._units.top.get('height') : 0),
164
+ h2 = ((this._units.bottom) ? this._units.bottom.get('height') : 0),
165
+ h = this._sizes.doc.h,
166
+ w = this._sizes.doc.w;
167
+ set = ((set === false) ? false : true);
168
+
169
+ this._sizes.top = {
170
+ h: h1, w: ((this._units.top) ? w : 0),
171
+ t: 0
172
+ };
173
+ this._sizes.bottom = {
174
+ h: h2, w: ((this._units.bottom) ? w : 0)
175
+ };
176
+
177
+ var newH = (h - (h1 + h2));
178
+
179
+ this._sizes.left = {
180
+ h: newH, w: ((this._units.left) ? this._units.left.get('width') : 0)
181
+ };
182
+ this._sizes.right = {
183
+ h: newH, w: ((this._units.right) ? this._units.right.get('width') : 0),
184
+ l: ((this._units.right) ? (w - this._units.right.get('width')) : 0),
185
+ t: ((this._units.top) ? this._sizes.top.h : 0)
186
+ };
187
+
188
+ if (this._units.right && set) {
189
+ this._units.right.set('top', this._sizes.right.t);
190
+ if (!this._units.right._collapsing) {
191
+ this._units.right.set('left', this._sizes.right.l);
192
+ }
193
+ this._units.right.set('height', this._sizes.right.h, true);
194
+ }
195
+ if (this._units.left) {
196
+ this._sizes.left.l = 0;
197
+ if (this._units.top) {
198
+ this._sizes.left.t = this._sizes.top.h;
199
+ } else {
200
+ this._sizes.left.t = 0;
201
+ }
202
+ if (set) {
203
+ this._units.left.set('top', this._sizes.left.t);
204
+ this._units.left.set('height', this._sizes.left.h, true);
205
+ this._units.left.set('left', 0);
206
+ }
207
+ }
208
+ if (this._units.bottom) {
209
+ this._sizes.bottom.t = this._sizes.top.h + this._sizes.left.h;
210
+ if (set) {
211
+ this._units.bottom.set('top', this._sizes.bottom.t);
212
+ this._units.bottom.set('width', this._sizes.bottom.w, true);
213
+ }
214
+ }
215
+ if (this._units.top) {
216
+ if (set) {
217
+ this._units.top.set('width', this._sizes.top.w, true);
218
+ }
219
+ }
220
+ this._setCenter(set);
221
+ },
222
+ /**
223
+ * @private
224
+ * @method _setCenter
225
+ * @param {Boolean} set If set to false, it will NOT set the size, just perform the calculations (used for collapsing units)
226
+ * @description Used to set the size and position of the center unit
227
+ */
228
+ _setCenter: function(set) {
229
+ set = ((set === false) ? false : true);
230
+ var h = this._sizes.left.h;
231
+ var w = (this._sizes.doc.w - (this._sizes.left.w + this._sizes.right.w));
232
+ if (set) {
233
+ this._units.center.set('height', h, true);
234
+ this._units.center.set('width', w, true);
235
+ this._units.center.set('top', this._sizes.top.h);
236
+ this._units.center.set('left', this._sizes.left.w);
237
+ }
238
+ this._sizes.center = { h: h, w: w, t: this._sizes.top.h, l: this._sizes.left.w };
239
+ },
240
+ /**
241
+ * @method getSizes
242
+ * @description Get a reference to the internal Layout Unit sizes object used to build the layout wireframe
243
+ * @return {Object} An object of the layout unit sizes
244
+ */
245
+ getSizes: function() {
246
+ return this._sizes;
247
+ },
248
+ /**
249
+ * @method getUnitById
250
+ * @param {String} id The HTML element id of the unit
251
+ * @description Get the LayoutUnit by it's HTML id
252
+ * @return {<a href="YAHOO.widget.LayoutUnit.html">YAHOO.widget.LayoutUnit</a>} The LayoutUnit instance
253
+ */
254
+ getUnitById: function(id) {
255
+ return YAHOO.widget.LayoutUnit.getLayoutUnitById(id);
256
+ },
257
+ /**
258
+ * @method getUnitByPosition
259
+ * @param {String} pos The position of the unit in this layout
260
+ * @description Get the LayoutUnit by it's position in this layout
261
+ * @return {<a href="YAHOO.widget.LayoutUnit.html">YAHOO.widget.LayoutUnit</a>} The LayoutUnit instance
262
+ */
263
+ getUnitByPosition: function(pos) {
264
+ if (pos) {
265
+ pos = pos.toLowerCase();
266
+ if (this._units[pos]) {
267
+ return this._units[pos];
268
+ }
269
+ return false;
270
+ }
271
+ return false;
272
+ },
273
+ /**
274
+ * @method removeUnit
275
+ * @param {Object} unit The LayoutUnit that you want to remove
276
+ * @description Remove the unit from this layout and resize the layout.
277
+ */
278
+ removeUnit: function(unit) {
279
+ delete this._units[unit.get('position')];
280
+ this.resize();
281
+ },
282
+ /**
283
+ * @method addUnit
284
+ * @param {Object} cfg The config for the LayoutUnit that you want to add
285
+ * @description Add a unit to this layout and if the layout is rendered, resize the layout.
286
+ * @return {<a href="YAHOO.widget.LayoutUnit.html">YAHOO.widget.LayoutUnit</a>} The LayoutUnit instance
287
+ */
288
+ addUnit: function(cfg) {
289
+ if (!cfg.position) {
290
+ return false;
291
+ }
292
+ if (this._units[cfg.position]) {
293
+ return false;
294
+ }
295
+ var element = null,
296
+ el = null;
297
+
298
+ if (cfg.id) {
299
+ if (Dom.get(cfg.id)) {
300
+ element = Dom.get(cfg.id);
301
+ delete cfg.id;
302
+
303
+ }
304
+ }
305
+ if (cfg.element) {
306
+ element = cfg.element;
307
+ }
308
+
309
+ if (!el) {
310
+ el = document.createElement('div');
311
+ var id = Dom.generateId();
312
+ el.id = id;
313
+ }
314
+
315
+ if (!element) {
316
+ element = document.createElement('div');
317
+ }
318
+ Dom.addClass(element, 'yui-layout-wrap');
319
+ if (this.browser.ie && !this.browser.standardsMode) {
320
+ el.style.zoom = 1;
321
+ element.style.zoom = 1;
322
+ }
323
+
324
+ if (el.firstChild) {
325
+ el.insertBefore(element, el.firstChild);
326
+ } else {
327
+ el.appendChild(element);
328
+ }
329
+ this._doc.appendChild(el);
330
+
331
+ var h = false, w = false;
332
+
333
+ if (cfg.height) {
334
+ h = parseInt(cfg.height, 10);
335
+ }
336
+ if (cfg.width) {
337
+ w = parseInt(cfg.width, 10);
338
+ }
339
+ var unitConfig = {};
340
+ YAHOO.lang.augmentObject(unitConfig, cfg); // break obj ref
341
+
342
+ unitConfig.parent = this;
343
+ unitConfig.wrap = element;
344
+ unitConfig.height = h;
345
+ unitConfig.width = w;
346
+
347
+ var unit = new YAHOO.widget.LayoutUnit(el, unitConfig);
348
+
349
+ unit.on('heightChange', this.resize, { unit: unit }, this);
350
+ unit.on('widthChange', this.resize, { unit: unit }, this);
351
+ unit.on('gutterChange', this.resize, { unit: unit }, this);
352
+ this._units[cfg.position] = unit;
353
+
354
+ if (this._rendered) {
355
+ this.resize();
356
+ }
357
+
358
+ return unit;
359
+ },
360
+ /**
361
+ * @private
362
+ * @method _createUnits
363
+ * @description Private method to create units from the config that was passed in.
364
+ */
365
+ _createUnits: function() {
366
+ var units = this.get('units');
367
+ for (var i in units) {
368
+ if (Lang.hasOwnProperty(units, i)) {
369
+ this.addUnit(units[i]);
370
+ }
371
+ }
372
+ },
373
+ /**
374
+ * @method resize
375
+ * @param Boolean/Event set If set to false, it will NOT set the size, just perform the calculations (used for collapsing units). This can also have an attribute event passed to it.
376
+ * @description Starts the chain of resize routines that will resize all the units.
377
+ * @return {<a href="YAHOO.widget.Layout.html">YAHOO.widget.Layout</a>} The Layout instance
378
+ */
379
+ resize: function(set, info) {
380
+ /*
381
+ * Fixes bug #2528175
382
+ * If the event comes from an attribute and the value hasn't changed, don't process it.
383
+ */
384
+ var ev = set;
385
+ if (ev && ev.prevValue && ev.newValue) {
386
+ if (ev.prevValue == ev.newValue) {
387
+ if (info) {
388
+ if (info.unit) {
389
+ if (!info.unit.get('animate')) {
390
+ set = false;
391
+ }
392
+ }
393
+ }
394
+ }
395
+ }
396
+ set = ((set === false) ? false : true);
397
+ if (set) {
398
+ var retVal = this.fireEvent('beforeResize');
399
+ if (retVal === false) {
400
+ set = false;
401
+ }
402
+ if (this.browser.ie) {
403
+ if (this._isBody) {
404
+ Dom.removeClass(document.documentElement, 'yui-layout');
405
+ Dom.addClass(document.documentElement, 'yui-layout');
406
+ } else {
407
+ this.removeClass('yui-layout');
408
+ this.addClass('yui-layout');
409
+ }
410
+ }
411
+ }
412
+ this._setBodySize(set);
413
+ if (set) {
414
+ this.fireEvent('resize', { target: this, sizes: this._sizes, event: ev });
415
+ }
416
+ return this;
417
+ },
418
+ /**
419
+ * @private
420
+ * @method _setupBodyElements
421
+ * @description Sets up the main doc element when using the body as the main element.
422
+ */
423
+ _setupBodyElements: function() {
424
+ this._doc = Dom.get('layout-doc');
425
+ if (!this._doc) {
426
+ this._doc = document.createElement('div');
427
+ this._doc.id = 'layout-doc';
428
+ if (document.body.firstChild) {
429
+ document.body.insertBefore(this._doc, document.body.firstChild);
430
+ } else {
431
+ document.body.appendChild(this._doc);
432
+ }
433
+ }
434
+ this._createUnits();
435
+ this._setBodySize();
436
+ Event.on(window, 'resize', this.resize, this, true);
437
+ Dom.addClass(this._doc, 'yui-layout-doc');
438
+ },
439
+ /**
440
+ * @private
441
+ * @method _setupElements
442
+ * @description Sets up the main doc element when not using the body as the main element.
443
+ */
444
+ _setupElements: function() {
445
+ this._doc = this.getElementsByClassName('yui-layout-doc')[0];
446
+ if (!this._doc) {
447
+ this._doc = document.createElement('div');
448
+ this.get('element').appendChild(this._doc);
449
+ }
450
+ this._createUnits();
451
+ this._setBodySize();
452
+ Dom.addClass(this._doc, 'yui-layout-doc');
453
+ },
454
+ /**
455
+ * @private
456
+ * @property _isBody
457
+ * @description Flag to determine if we are using the body as the root element.
458
+ * @type Boolean
459
+ */
460
+ _isBody: null,
461
+ /**
462
+ * @private
463
+ * @property _doc
464
+ * @description Reference to the root element
465
+ * @type HTMLElement
466
+ */
467
+ _doc: null,
468
+ /**
469
+ * @private
470
+ * @method init
471
+ * @description The Layout class' initialization method
472
+ */
473
+ init: function(p_oElement, p_oAttributes) {
474
+
475
+ this._zIndex = 0;
476
+
477
+ Layout.superclass.init.call(this, p_oElement, p_oAttributes);
478
+
479
+ if (this.get('parent')) {
480
+ this._zIndex = this.get('parent')._zIndex + 10;
481
+ }
482
+
483
+ this._sizes = {};
484
+ this._units = {};
485
+
486
+ var id = p_oElement;
487
+ if (!Lang.isString(id)) {
488
+ id = Dom.generateId(id);
489
+ }
490
+ Layout._instances[id] = this;
491
+ },
492
+ /**
493
+ * @method render
494
+ * @description This method starts the render process, applying classnames and creating elements
495
+ * @return {<a href="YAHOO.widget.Layout.html">YAHOO.widget.Layout</a>} The Layout instance
496
+ */
497
+ render: function() {
498
+ this._stamp();
499
+ var el = this.get('element');
500
+ if (el && el.tagName && (el.tagName.toLowerCase() == 'body')) {
501
+ this._isBody = true;
502
+ Dom.addClass(document.body, 'yui-layout');
503
+ if (Dom.hasClass(document.body, 'yui-skin-sam')) {
504
+ //Move the class up so we can have a css chain
505
+ Dom.addClass(document.documentElement, 'yui-skin-sam');
506
+ Dom.removeClass(document.body, 'yui-skin-sam');
507
+ }
508
+ this._setupBodyElements();
509
+ } else {
510
+ this._isBody = false;
511
+ this.addClass('yui-layout');
512
+ this._setupElements();
513
+ }
514
+ this.resize();
515
+ this._rendered = true;
516
+ this.fireEvent('render');
517
+
518
+ return this;
519
+ },
520
+ /**
521
+ * @private
522
+ * @method _stamp
523
+ * @description Stamps the root node with a secure classname for ease of use. Also sets the this.browser.standardsMode variable.
524
+ */
525
+ _stamp: function() {
526
+ if (document.compatMode == 'CSS1Compat') {
527
+ this.browser.standardsMode = true;
528
+ }
529
+ if (window.location.href.toLowerCase().indexOf("https") === 0) {
530
+ Dom.addClass(document.documentElement, 'secure');
531
+ this.browser.secure = true;
532
+ }
533
+ },
534
+ /**
535
+ * @private
536
+ * @method initAttributes
537
+ * @description Processes the config
538
+ */
539
+ initAttributes: function(attr) {
540
+ Layout.superclass.initAttributes.call(this, attr);
541
+ /**
542
+ * @attribute units
543
+ * @description An array of config definitions for the LayoutUnits to add to this layout
544
+ * @type Array
545
+ */
546
+ this.setAttributeConfig('units', {
547
+ writeOnce: true,
548
+ validator: YAHOO.lang.isArray,
549
+ value: attr.units || []
550
+ });
551
+
552
+ /**
553
+ * @attribute minHeight
554
+ * @description The minimum height in pixels
555
+ * @type Number
556
+ */
557
+ this.setAttributeConfig('minHeight', {
558
+ value: attr.minHeight || false,
559
+ validator: YAHOO.lang.isNumber
560
+ });
561
+
562
+ /**
563
+ * @attribute minWidth
564
+ * @description The minimum width in pixels
565
+ * @type Number
566
+ */
567
+ this.setAttributeConfig('minWidth', {
568
+ value: attr.minWidth || false,
569
+ validator: YAHOO.lang.isNumber
570
+ });
571
+
572
+ /**
573
+ * @attribute height
574
+ * @description The height in pixels
575
+ * @type Number
576
+ */
577
+ this.setAttributeConfig('height', {
578
+ value: attr.height || false,
579
+ validator: YAHOO.lang.isNumber,
580
+ method: function(h) {
581
+ if (h < 0) {
582
+ h = 0;
583
+ }
584
+ this.setStyle('height', h + 'px');
585
+ }
586
+ });
587
+
588
+ /**
589
+ * @attribute width
590
+ * @description The width in pixels
591
+ * @type Number
592
+ */
593
+ this.setAttributeConfig('width', {
594
+ value: attr.width || false,
595
+ validator: YAHOO.lang.isNumber,
596
+ method: function(w) {
597
+ if (w < 0) {
598
+ w = 0;
599
+ }
600
+ this.setStyle('width', w + 'px');
601
+ }
602
+ });
603
+
604
+ /**
605
+ * @attribute parent
606
+ * @description If this layout is to be used as a child of another Layout instance, this config will bind the resize events together.
607
+ * @type Object YAHOO.widget.Layout
608
+ */
609
+ this.setAttributeConfig('parent', {
610
+ writeOnce: true,
611
+ value: attr.parent || false,
612
+ method: function(p) {
613
+ if (p) {
614
+ p.on('resize', this.resize, this, true);
615
+ }
616
+ }
617
+ });
618
+ },
619
+ /**
620
+ * @method destroy
621
+ * @description Removes this layout from the page and destroys all units that it contains. This will destroy all data inside the layout and it's children.
622
+ */
623
+ destroy: function() {
624
+ var par = this.get('parent');
625
+ if (par) {
626
+ par.removeListener('resize', this.resize, this, true);
627
+ }
628
+ Event.removeListener(window, 'resize', this.resize, this, true);
629
+
630
+ this.unsubscribeAll();
631
+ for (var u in this._units) {
632
+ if (Lang.hasOwnProperty(this._units, u)) {
633
+ if (this._units[u]) {
634
+ this._units[u].destroy(true);
635
+ }
636
+ }
637
+ }
638
+
639
+ Event.purgeElement(this.get('element'));
640
+ this.get('parentNode').removeChild(this.get('element'));
641
+
642
+ delete YAHOO.widget.Layout._instances[this.get('id')];
643
+ //Brutal Object Destroy
644
+ for (var i in this) {
645
+ if (Lang.hasOwnProperty(this, i)) {
646
+ this[i] = null;
647
+ delete this[i];
648
+ }
649
+ }
650
+
651
+ if (par) {
652
+ par.resize();
653
+ }
654
+ },
655
+ /**
656
+ * @method toString
657
+ * @description Returns a string representing the Layout.
658
+ * @return {String}
659
+ */
660
+ toString: function() {
661
+ if (this.get) {
662
+ return 'Layout #' + this.get('id');
663
+ }
664
+ return 'Layout';
665
+ }
666
+ });
667
+ /**
668
+ * @event resize
669
+ * @description Fired when this.resize is called
670
+ * @type YAHOO.util.CustomEvent
671
+ */
672
+ /**
673
+ * @event startResize
674
+ * @description Fired when the Resize Utility for a Unit fires it's startResize Event.
675
+ * @type YAHOO.util.CustomEvent
676
+ */
677
+ /**
678
+ * @event beforeResize
679
+ * @description Fires at the beginning of the resize method. If you return false, the resize is cancelled.
680
+ * @type YAHOO.util.CustomEvent
681
+ */
682
+ /**
683
+ * @event render
684
+ * @description Fired after the render method completes.
685
+ * @type YAHOO.util.CustomEvent
686
+ */
687
+
688
+ YAHOO.widget.Layout = Layout;
689
+ })();
690
+ /**
691
+ * @description <p>Provides a fixed position unit containing a header, body and footer for use with a YAHOO.widget.Layout instance.</p>
692
+ * @namespace YAHOO.widget
693
+ * @requires yahoo, dom, element, event, layout
694
+ * @optional animation, dragdrop, selector
695
+ */
696
+ (function() {
697
+ var Dom = YAHOO.util.Dom,
698
+ Sel = YAHOO.util.Selector,
699
+ Event = YAHOO.util.Event,
700
+ Lang = YAHOO.lang;
701
+
702
+ /**
703
+ * @constructor
704
+ * @class LayoutUnit
705
+ * @extends YAHOO.util.Element
706
+ * @description <p>Provides a fixed position unit containing a header, body and footer for use with a YAHOO.widget.Layout instance.</p>
707
+ * @param {String/HTMLElement} el The element to make a unit.
708
+ * @param {Object} attrs Object liternal containing configuration parameters.
709
+ */
710
+
711
+ var LayoutUnit = function(el, config) {
712
+
713
+ var oConfig = {
714
+ element: el,
715
+ attributes: config || {}
716
+ };
717
+
718
+ LayoutUnit.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
719
+ };
720
+
721
+ /**
722
+ * @private
723
+ * @static
724
+ * @property _instances
725
+ * @description Internal hash table for all layout unit instances
726
+ * @type Object
727
+ */
728
+ LayoutUnit._instances = {};
729
+ /**
730
+ * @static
731
+ * @method getLayoutUnitById
732
+ * @description Get's a layout unit object by the HTML id of the element associated with the Layout Unit object.
733
+ * @return {Object} The Layout Object
734
+ */
735
+ LayoutUnit.getLayoutUnitById = function(id) {
736
+ if (LayoutUnit._instances[id]) {
737
+ return LayoutUnit._instances[id];
738
+ }
739
+ return false;
740
+ };
741
+
742
+ YAHOO.extend(LayoutUnit, YAHOO.util.Element, {
743
+ /**
744
+ * @property STR_CLOSE
745
+ * @description String used for close button title
746
+ * @type {String}
747
+ */
748
+ STR_CLOSE: 'Click to close this pane.',
749
+ /**
750
+ * @property STR_COLLAPSE
751
+ * @description String used for collapse button title
752
+ * @type {String}
753
+ */
754
+ STR_COLLAPSE: 'Click to collapse this pane.',
755
+ /**
756
+ * @property STR_EXPAND
757
+ * @description String used for expand button title
758
+ * @type {String}
759
+ */
760
+ STR_EXPAND: 'Click to expand this pane.',
761
+ /**
762
+ * The class name applied to dynamic tabs while loading.
763
+ * @property LOADING_CLASSNAME
764
+ * @type String
765
+ * @default "disabled"
766
+ */
767
+ LOADING_CLASSNAME: 'loading',
768
+ /**
769
+ * @property browser
770
+ * @description A modified version of the YAHOO.env.ua object
771
+ * @type Object
772
+ */
773
+ browser: null,
774
+ /**
775
+ * @private
776
+ * @property _sizes
777
+ * @description A collection of the current sizes of the contents of this Layout Unit
778
+ * @type Object
779
+ */
780
+ _sizes: null,
781
+ /**
782
+ * @private
783
+ * @property _anim
784
+ * @description A reference to the Animation instance used by this LayouUnit
785
+ * @type YAHOO.util.Anim
786
+ */
787
+ _anim: null,
788
+ /**
789
+ * @private
790
+ * @property _resize
791
+ * @description A reference to the Resize instance used by this LayoutUnit
792
+ * @type YAHOO.util.Resize
793
+ */
794
+ _resize: null,
795
+ /**
796
+ * @private
797
+ * @property _clip
798
+ * @description A reference to the clip element used when collapsing the unit
799
+ * @type HTMLElement
800
+ */
801
+ _clip: null,
802
+ /**
803
+ * @private
804
+ * @property _gutter
805
+ * @description A simple hash table used to store the gutter to apply to the Unit
806
+ * @type Object
807
+ */
808
+ _gutter: null,
809
+ /**
810
+ * @property header
811
+ * @description A reference to the HTML element used for the Header
812
+ * @type HTMLELement
813
+ */
814
+ header: null,
815
+ /**
816
+ * @property body
817
+ * @description A reference to the HTML element used for the body
818
+ * @type HTMLElement
819
+ */
820
+ body: null,
821
+ /**
822
+ * @property footer
823
+ * @description A reference to the HTML element used for the footer
824
+ * @type HTMLElement
825
+ */
826
+ footer: null,
827
+ /**
828
+ * @private
829
+ * @property _collapsed
830
+ * @description Flag to determine if the unit is collapsed or not.
831
+ * @type Boolean
832
+ */
833
+ _collapsed: null,
834
+ /**
835
+ * @private
836
+ * @property _collapsing
837
+ * @description A flag set while the unit is being collapsed, used so we don't fire events while animating the size
838
+ * @type Boolean
839
+ */
840
+ _collapsing: null,
841
+ /**
842
+ * @private
843
+ * @property _lastWidth
844
+ * @description A holder for the last known width of the unit
845
+ * @type Number
846
+ */
847
+ _lastWidth: null,
848
+ /**
849
+ * @private
850
+ * @property _lastHeight
851
+ * @description A holder for the last known height of the unit
852
+ * @type Number
853
+ */
854
+ _lastHeight: null,
855
+ /**
856
+ * @private
857
+ * @property _lastTop
858
+ * @description A holder for the last known top of the unit
859
+ * @type Number
860
+ */
861
+ _lastTop: null,
862
+ /**
863
+ * @private
864
+ * @property _lastLeft
865
+ * @description A holder for the last known left of the unit
866
+ * @type Number
867
+ */
868
+ _lastLeft: null,
869
+ /**
870
+ * @private
871
+ * @property _lastScroll
872
+ * @description A holder for the last known scroll state of the unit
873
+ * @type Boolean
874
+ */
875
+ _lastScroll: null,
876
+ /**
877
+ * @private
878
+ * @property _lastCenetrScroll
879
+ * @description A holder for the last known scroll state of the center unit
880
+ * @type Boolean
881
+ */
882
+ _lastCenterScroll: null,
883
+ /**
884
+ * @private
885
+ * @property _lastScrollTop
886
+ * @description A holder for the last known scrollTop state of the unit
887
+ * @type Number
888
+ */
889
+ _lastScrollTop: null,
890
+ /**
891
+ * @method resize
892
+ * @description Resize either the unit or it's clipped state, also updating the box inside
893
+ * @param {Boolean} force This will force full calculations even when the unit is collapsed
894
+ * @return {<a href="YAHOO.widget.LayoutUnit.html">YAHOO.widget.LayoutUnit</a>} The LayoutUnit instance
895
+ */
896
+ resize: function(force) {
897
+ var retVal = this.fireEvent('beforeResize');
898
+ if (retVal === false) {
899
+ return this;
900
+ }
901
+ if (!this._collapsing || (force === true)) {
902
+ var scroll = this.get('scroll');
903
+ this.set('scroll', false);
904
+
905
+
906
+ var hd = this._getBoxSize(this.header),
907
+ ft = this._getBoxSize(this.footer),
908
+ box = [this.get('height'), this.get('width')];
909
+
910
+ var nh = (box[0] - hd[0] - ft[0]) - (this._gutter.top + this._gutter.bottom),
911
+ nw = box[1] - (this._gutter.left + this._gutter.right);
912
+
913
+ var wrapH = (nh + (hd[0] + ft[0])),
914
+ wrapW = nw;
915
+
916
+ if (this._collapsed && !this._collapsing) {
917
+ this._setHeight(this._clip, wrapH);
918
+ this._setWidth(this._clip, wrapW);
919
+ Dom.setStyle(this._clip, 'top', this.get('top') + this._gutter.top + 'px');
920
+ Dom.setStyle(this._clip, 'left', this.get('left') + this._gutter.left + 'px');
921
+ } else if (!this._collapsed || (this._collapsed && this._collapsing)) {
922
+ wrapH = this._setHeight(this.get('wrap'), wrapH);
923
+ wrapW = this._setWidth(this.get('wrap'), wrapW);
924
+ this._sizes.wrap.h = wrapH;
925
+ this._sizes.wrap.w = wrapW;
926
+
927
+ Dom.setStyle(this.get('wrap'), 'top', this._gutter.top + 'px');
928
+ Dom.setStyle(this.get('wrap'), 'left', this._gutter.left + 'px');
929
+
930
+ this._sizes.header.w = this._setWidth(this.header, wrapW);
931
+ this._sizes.header.h = hd[0];
932
+
933
+ this._sizes.footer.w = this._setWidth(this.footer, wrapW);
934
+ this._sizes.footer.h = ft[0];
935
+
936
+ Dom.setStyle(this.footer, 'bottom', '0px');
937
+
938
+ this._sizes.body.h = this._setHeight(this.body, (wrapH - (hd[0] + ft[0])));
939
+ this._sizes.body.w =this._setWidth(this.body, wrapW);
940
+ Dom.setStyle(this.body, 'top', hd[0] + 'px');
941
+
942
+ this.set('scroll', scroll);
943
+ this.fireEvent('resize');
944
+ }
945
+ }
946
+ return this;
947
+ },
948
+ /**
949
+ * @private
950
+ * @method _setWidth
951
+ * @description Sets the width of the element based on the border size of the element.
952
+ * @param {HTMLElement} el The HTMLElement to have it's width set
953
+ * @param {Number} w The width that you want it the element set to
954
+ * @return {Number} The new width, fixed for borders and IE QuirksMode
955
+ */
956
+ _setWidth: function(el, w) {
957
+ if (el) {
958
+ var b = this._getBorderSizes(el);
959
+ w = (w - (b[1] + b[3]));
960
+ w = this._fixQuirks(el, w, 'w');
961
+ if (w < 0) {
962
+ w = 0;
963
+ }
964
+ Dom.setStyle(el, 'width', w + 'px');
965
+ }
966
+ return w;
967
+ },
968
+ /**
969
+ * @private
970
+ * @method _setHeight
971
+ * @description Sets the height of the element based on the border size of the element.
972
+ * @param {HTMLElement} el The HTMLElement to have it's height set
973
+ * @param {Number} h The height that you want it the element set to
974
+ * @return {Number} The new height, fixed for borders and IE QuirksMode
975
+ */
976
+ _setHeight: function(el, h) {
977
+ if (el) {
978
+ var b = this._getBorderSizes(el);
979
+ h = (h - (b[0] + b[2]));
980
+ h = this._fixQuirks(el, h, 'h');
981
+ if (h < 0) {
982
+ h = 0;
983
+ }
984
+ Dom.setStyle(el, 'height', h + 'px');
985
+ }
986
+ return h;
987
+ },
988
+ /**
989
+ * @private
990
+ * @method _fixQuirks
991
+ * @description Fixes the box calculations for IE in QuirksMode
992
+ * @param {HTMLElement} el The HTMLElement to set the dimension on
993
+ * @param {Number} dim The number of the dimension to fix
994
+ * @param {String} side The dimension (h or w) to fix. Defaults to h
995
+ * @return {Number} The fixed dimension
996
+ */
997
+ _fixQuirks: function(el, dim, side) {
998
+ var i1 = 0, i2 = 2;
999
+ if (side == 'w') {
1000
+ i1 = 1;
1001
+ i2 = 3;
1002
+ }
1003
+ if ((this.browser.ie < 8) && !this.browser.standardsMode) {
1004
+ //Internet Explorer - Quirks Mode
1005
+ var b = this._getBorderSizes(el),
1006
+ bp = this._getBorderSizes(el.parentNode);
1007
+ if ((b[i1] === 0) && (b[i2] === 0)) { //No Borders, check parent
1008
+ if ((bp[i1] !== 0) && (bp[i2] !== 0)) { //Parent has Borders
1009
+ dim = (dim - (bp[i1] + bp[i2]));
1010
+ }
1011
+ } else {
1012
+ if ((bp[i1] === 0) && (bp[i2] === 0)) {
1013
+ dim = (dim + (b[i1] + b[i2]));
1014
+ }
1015
+ }
1016
+ }
1017
+ return dim;
1018
+ },
1019
+ /**
1020
+ * @private
1021
+ * @method _getBoxSize
1022
+ * @description Get's the elements clientHeight and clientWidth plus the size of the borders
1023
+ * @param {HTMLElement} el The HTMLElement to get the size of
1024
+ * @return {Array} An array of height and width
1025
+ */
1026
+ _getBoxSize: function(el) {
1027
+ var size = [0, 0];
1028
+ if (el) {
1029
+ if (this.browser.ie && !this.browser.standardsMode) {
1030
+ el.style.zoom = 1;
1031
+ }
1032
+ var b = this._getBorderSizes(el);
1033
+ size[0] = el.clientHeight + (b[0] + b[2]);
1034
+ size[1] = el.clientWidth + (b[1] + b[3]);
1035
+ }
1036
+ return size;
1037
+ },
1038
+ /**
1039
+ * @private
1040
+ * @method _getBorderSizes
1041
+ * @description Get the CSS border size of the element passed.
1042
+ * @param {HTMLElement} el The element to get the border size of
1043
+ * @return {Array} An array of the top, right, bottom, left borders.
1044
+ */
1045
+ _getBorderSizes: function(el) {
1046
+ var s = [];
1047
+ el = el || this.get('element');
1048
+ if (this.browser.ie && !this.browser.standardsMode) {
1049
+ el.style.zoom = 1;
1050
+ }
1051
+ s[0] = parseInt(Dom.getStyle(el, 'borderTopWidth'), 10);
1052
+ s[1] = parseInt(Dom.getStyle(el, 'borderRightWidth'), 10);
1053
+ s[2] = parseInt(Dom.getStyle(el, 'borderBottomWidth'), 10);
1054
+ s[3] = parseInt(Dom.getStyle(el, 'borderLeftWidth'), 10);
1055
+
1056
+ //IE will return NaN on these if they are set to auto, we'll set them to 0
1057
+ for (var i = 0; i < s.length; i++) {
1058
+ if (isNaN(s[i])) {
1059
+ s[i] = 0;
1060
+ }
1061
+ }
1062
+ return s;
1063
+ },
1064
+ /**
1065
+ * @private
1066
+ * @method _createClip
1067
+ * @description Create the clip element used when the Unit is collapsed
1068
+ */
1069
+ _createClip: function() {
1070
+ if (!this._clip) {
1071
+ this._clip = document.createElement('div');
1072
+ this._clip.className = 'yui-layout-clip yui-layout-clip-' + this.get('position');
1073
+ this._clip.innerHTML = '<div class="collapse"></div>';
1074
+ var c = this._clip.firstChild;
1075
+ c.title = this.STR_EXPAND;
1076
+ Event.on(c, 'click', this.expand, this, true);
1077
+ this.get('element').parentNode.appendChild(this._clip);
1078
+ }
1079
+ },
1080
+ /**
1081
+ * @private
1082
+ * @method _toggleClip
1083
+ * @description Toggle th current state of the Clip element and set it's height, width and position
1084
+ */
1085
+ _toggleClip: function() {
1086
+ if (!this._collapsed) {
1087
+ //show
1088
+ var hd = this._getBoxSize(this.header),
1089
+ ft = this._getBoxSize(this.footer),
1090
+ box = [this.get('height'), this.get('width')];
1091
+
1092
+
1093
+ var nh = (box[0] - hd[0] - ft[0]) - (this._gutter.top + this._gutter.bottom),
1094
+ nw = box[1] - (this._gutter.left + this._gutter.right),
1095
+ wrapH = (nh + (hd[0] + ft[0]));
1096
+
1097
+ switch (this.get('position')) {
1098
+ case 'top':
1099
+ case 'bottom':
1100
+ this._setWidth(this._clip, nw);
1101
+ this._setHeight(this._clip, this.get('collapseSize'));
1102
+ Dom.setStyle(this._clip, 'left', (this._lastLeft + this._gutter.left) + 'px');
1103
+ if (this.get('position') == 'bottom') {
1104
+ Dom.setStyle(this._clip, 'top', ((this._lastTop + this._lastHeight) - (this.get('collapseSize') - this._gutter.top)) + 'px');
1105
+ } else {
1106
+ Dom.setStyle(this._clip, 'top', this.get('top') + this._gutter.top + 'px');
1107
+ }
1108
+ break;
1109
+ case 'left':
1110
+ case 'right':
1111
+ this._setWidth(this._clip, this.get('collapseSize'));
1112
+ this._setHeight(this._clip, wrapH);
1113
+ Dom.setStyle(this._clip, 'top', (this.get('top') + this._gutter.top) + 'px');
1114
+ if (this.get('position') == 'right') {
1115
+ Dom.setStyle(this._clip, 'left', (((this._lastLeft + this._lastWidth) - this.get('collapseSize')) - this._gutter.left) + 'px');
1116
+ } else {
1117
+ Dom.setStyle(this._clip, 'left', (this.get('left') + this._gutter.left) + 'px');
1118
+ }
1119
+ break;
1120
+ }
1121
+
1122
+ Dom.setStyle(this._clip, 'display', 'block');
1123
+ this.setStyle('display', 'none');
1124
+ } else {
1125
+ //Hide
1126
+ Dom.setStyle(this._clip, 'display', 'none');
1127
+ }
1128
+ },
1129
+ /**
1130
+ * @method getSizes
1131
+ * @description Get a reference to the internal sizes object for this unit
1132
+ * @return {Object} An object of the sizes used for calculations
1133
+ */
1134
+ getSizes: function() {
1135
+ return this._sizes;
1136
+ },
1137
+ /**
1138
+ * @method toggle
1139
+ * @description Toggles the Unit, replacing it with a clipped version.
1140
+ * @return {<a href="YAHOO.widget.LayoutUnit.html">YAHOO.widget.LayoutUnit</a>} The LayoutUnit instance
1141
+ */
1142
+ toggle: function() {
1143
+ if (this._collapsed) {
1144
+ this.expand();
1145
+ } else {
1146
+ this.collapse();
1147
+ }
1148
+ return this;
1149
+ },
1150
+ /**
1151
+ * @method expand
1152
+ * @description Expand the Unit if it is collapsed.
1153
+ * @return {<a href="YAHOO.widget.LayoutUnit.html">YAHOO.widget.LayoutUnit</a>} The LayoutUnit instance
1154
+ */
1155
+ expand: function() {
1156
+ if (!this._collapsed) {
1157
+ return this;
1158
+ }
1159
+ var retVal = this.fireEvent('beforeExpand');
1160
+ if (retVal === false) {
1161
+ return this;
1162
+ }
1163
+
1164
+ this._collapsing = true;
1165
+ this.setStyle('zIndex', this.get('parent')._zIndex + 1);
1166
+
1167
+ if (this._anim) {
1168
+ this.setStyle('display', 'none');
1169
+ var attr = {}, s;
1170
+
1171
+ switch (this.get('position')) {
1172
+ case 'left':
1173
+ case 'right':
1174
+ this.set('width', this._lastWidth, true);
1175
+ this.setStyle('width', this._lastWidth + 'px');
1176
+ this.get('parent').resize(false);
1177
+ s = this.get('parent').getSizes()[this.get('position')];
1178
+ this.set('height', s.h, true);
1179
+ var left = s.l;
1180
+ attr = {
1181
+ left: {
1182
+ to: left
1183
+ }
1184
+ };
1185
+ if (this.get('position') == 'left') {
1186
+ attr.left.from = (left - s.w);
1187
+ this.setStyle('left', (left - s.w) + 'px');
1188
+ }
1189
+ break;
1190
+ case 'top':
1191
+ case 'bottom':
1192
+ this.set('height', this._lastHeight, true);
1193
+ this.setStyle('height', this._lastHeight + 'px');
1194
+ this.get('parent').resize(false);
1195
+ s = this.get('parent').getSizes()[this.get('position')];
1196
+ this.set('width', s.w, true);
1197
+ var top = s.t;
1198
+ attr = {
1199
+ top: {
1200
+ to: top
1201
+ }
1202
+ };
1203
+ if (this.get('position') == 'top') {
1204
+ this.setStyle('top', (top - s.h) + 'px');
1205
+ attr.top.from = (top - s.h);
1206
+ }
1207
+ break;
1208
+ }
1209
+
1210
+ this._anim.attributes = attr;
1211
+ var exStart = function() {
1212
+ this.setStyle('display', 'block');
1213
+ this.resize(true);
1214
+ this._anim.onStart.unsubscribe(exStart, this, true);
1215
+ };
1216
+ var expand = function() {
1217
+ this._collapsing = false;
1218
+ this.setStyle('zIndex', this.get('parent')._zIndex);
1219
+ this.set('width', this._lastWidth);
1220
+ this.set('height', this._lastHeight);
1221
+ this._collapsed = false;
1222
+ this.resize();
1223
+ this.set('scroll', this._lastScroll);
1224
+ if (this._lastScrollTop > 0) {
1225
+ this.body.scrollTop = this._lastScrollTop;
1226
+ }
1227
+ this._anim.onComplete.unsubscribe(expand, this, true);
1228
+ this.fireEvent('expand');
1229
+ };
1230
+ this._anim.onStart.subscribe(exStart, this, true);
1231
+ this._anim.onComplete.subscribe(expand, this, true);
1232
+ this._anim.animate();
1233
+ this._toggleClip();
1234
+ } else {
1235
+ this._collapsing = false;
1236
+ this._toggleClip();
1237
+ this._collapsed = false;
1238
+ this.setStyle('zIndex', this.get('parent')._zIndex);
1239
+ this.setStyle('display', 'block');
1240
+ this.set('width', this._lastWidth);
1241
+ this.set('height', this._lastHeight);
1242
+ this.resize();
1243
+ this.set('scroll', this._lastScroll);
1244
+ if (this._lastScrollTop > 0) {
1245
+ this.body.scrollTop = this._lastScrollTop;
1246
+ }
1247
+ this.fireEvent('expand');
1248
+ }
1249
+ return this;
1250
+ },
1251
+ /**
1252
+ * @method collapse
1253
+ * @description Collapse the Unit if it is not collapsed.
1254
+ * @return {<a href="YAHOO.widget.LayoutUnit.html">YAHOO.widget.LayoutUnit</a>} The LayoutUnit instance
1255
+ */
1256
+ collapse: function() {
1257
+ if (this._collapsed) {
1258
+ return this;
1259
+ }
1260
+ var retValue = this.fireEvent('beforeCollapse');
1261
+ if (retValue === false) {
1262
+ return this;
1263
+ }
1264
+ if (!this._clip) {
1265
+ this._createClip();
1266
+ }
1267
+ this._collapsing = true;
1268
+ var w = this.get('width'),
1269
+ h = this.get('height'),
1270
+ attr = {};
1271
+ this._lastWidth = w;
1272
+ this._lastHeight = h;
1273
+ this._lastScroll = this.get('scroll');
1274
+ this._lastScrollTop = this.body.scrollTop;
1275
+ this.set('scroll', false, true);
1276
+ this._lastLeft = parseInt(this.get('element').style.left, 10);
1277
+ this._lastTop = parseInt(this.get('element').style.top, 10);
1278
+ if (isNaN(this._lastTop)) {
1279
+ this._lastTop = 0;
1280
+ this.set('top', 0);
1281
+ }
1282
+ if (isNaN(this._lastLeft)) {
1283
+ this._lastLeft = 0;
1284
+ this.set('left', 0);
1285
+ }
1286
+ this.setStyle('zIndex', this.get('parent')._zIndex + 1);
1287
+ var pos = this.get('position');
1288
+
1289
+ switch (pos) {
1290
+ case 'top':
1291
+ case 'bottom':
1292
+ this.set('height', (this.get('collapseSize') + (this._gutter.top + this._gutter.bottom)));
1293
+ attr = {
1294
+ top: {
1295
+ to: (this.get('top') - h)
1296
+ }
1297
+ };
1298
+ if (pos == 'bottom') {
1299
+ attr.top.to = (this.get('top') + h);
1300
+ }
1301
+ break;
1302
+ case 'left':
1303
+ case 'right':
1304
+ this.set('width', (this.get('collapseSize') + (this._gutter.left + this._gutter.right)));
1305
+ attr = {
1306
+ left: {
1307
+ to: -(this._lastWidth)
1308
+ }
1309
+ };
1310
+ if (pos == 'right') {
1311
+ attr.left = {
1312
+ to: (this.get('left') + w)
1313
+ };
1314
+ }
1315
+ break;
1316
+ }
1317
+ if (this._anim) {
1318
+ this._anim.attributes = attr;
1319
+ var collapse = function() {
1320
+ this._collapsing = false;
1321
+ this._toggleClip();
1322
+ this.setStyle('zIndex', this.get('parent')._zIndex);
1323
+ this._collapsed = true;
1324
+ this.get('parent').resize();
1325
+ this._anim.onComplete.unsubscribe(collapse, this, true);
1326
+ this.fireEvent('collapse');
1327
+ };
1328
+ this._anim.onComplete.subscribe(collapse, this, true);
1329
+ this._anim.animate();
1330
+ } else {
1331
+ this._collapsing = false;
1332
+ this.setStyle('display', 'none');
1333
+ this._toggleClip();
1334
+ this.setStyle('zIndex', this.get('parent')._zIndex);
1335
+ this.get('parent').resize();
1336
+ this._collapsed = true;
1337
+ this.fireEvent('collapse');
1338
+ }
1339
+ return this;
1340
+ },
1341
+ /**
1342
+ * @method close
1343
+ * @description Close the unit, removing it from the parent Layout.
1344
+ * @return {<a href="YAHOO.widget.Layout.html">YAHOO.widget.Layout</a>} The parent Layout instance
1345
+ */
1346
+ close: function() {
1347
+ this.setStyle('display', 'none');
1348
+ this.get('parent').removeUnit(this);
1349
+ this.fireEvent('close');
1350
+ if (this._clip) {
1351
+ this._clip.parentNode.removeChild(this._clip);
1352
+ this._clip = null;
1353
+ }
1354
+ return this.get('parent');
1355
+ },
1356
+ /**
1357
+ * @property loadHandler
1358
+ * @description Callback method for the YUI Connection Manager used for load the body using AJAX
1359
+ * @type Object
1360
+ */
1361
+ loadHandler: {
1362
+ success: function(o) {
1363
+ this.body.innerHTML = o.responseText;
1364
+ this.resize (true);
1365
+ },
1366
+ failure: function(o) {
1367
+ }
1368
+ },
1369
+ /**
1370
+ * @property dataConnection
1371
+ * @description YUI Connection Manager handler
1372
+ * @type Object
1373
+ */
1374
+ dataConnection: null,
1375
+ /**
1376
+ * @private
1377
+ * @property _loading
1378
+ * @description During the loading process this variable will be true
1379
+ * @type Number
1380
+ */
1381
+ _loading: false,
1382
+ /**
1383
+ * @method loadContent
1384
+ * @description Loading the content of the unit using the connection manager
1385
+ * @return {object} YUI Connection Manager handler
1386
+ */
1387
+ loadContent: function() {
1388
+ // load dynamic content unless already loading or loaded and caching
1389
+ if (YAHOO.util.Connect && this.get('dataSrc') && !this._loading && !this.get('dataLoaded')) {
1390
+ this._loading = true;
1391
+ Dom.addClass(this.body, this.LOADING_CLASSNAME);
1392
+ this.dataConnection = YAHOO.util.Connect.asyncRequest(
1393
+ this.get('loadMethod'),
1394
+ this.get('dataSrc'),
1395
+ {
1396
+ success: function(o) {
1397
+ this.loadHandler.success.call(this, o);
1398
+ this.set('dataLoaded', true);
1399
+ this.dataConnection = null;
1400
+ Dom.removeClass(this.body, this.LOADING_CLASSNAME);
1401
+ this._loading = false;
1402
+ this.fireEvent('load');
1403
+ },
1404
+ failure: function(o) {
1405
+ this.loadHandler.failure.call(this, o);
1406
+ this.dataConnection = null;
1407
+ Dom.removeClass(this.body, this.LOADING_CLASSNAME);
1408
+ this._loading = false;
1409
+ this.fireEvent('loadError', { error: o });
1410
+ },
1411
+ scope: this,
1412
+ timeout: this.get('dataTimeout')
1413
+ }
1414
+ );
1415
+ return this.dataConnection;
1416
+ }
1417
+ return false;
1418
+ },
1419
+ /**
1420
+ * @private
1421
+ * @method init
1422
+ * @description The initalization method inherited from Element.
1423
+ */
1424
+ init: function(p_oElement, p_oAttributes) {
1425
+ this._gutter = {
1426
+ left: 0,
1427
+ right: 0,
1428
+ top: 0,
1429
+ bottom: 0
1430
+ };
1431
+ this._sizes = {
1432
+ wrap: {
1433
+ h: 0,
1434
+ w: 0
1435
+ },
1436
+ header: {
1437
+ h: 0,
1438
+ w: 0
1439
+ },
1440
+ body: {
1441
+ h: 0,
1442
+ w: 0
1443
+ },
1444
+ footer: {
1445
+ h: 0,
1446
+ w: 0
1447
+ }
1448
+ };
1449
+
1450
+ LayoutUnit.superclass.init.call(this, p_oElement, p_oAttributes);
1451
+
1452
+ this.browser = this.get('parent').browser;
1453
+
1454
+ var id = p_oElement;
1455
+ if (!Lang.isString(id)) {
1456
+ id = Dom.generateId(id);
1457
+ }
1458
+ LayoutUnit._instances[id] = this;
1459
+
1460
+ this.setStyle('position', 'absolute');
1461
+
1462
+ this.addClass('yui-layout-unit');
1463
+ this.addClass('yui-layout-unit-' + this.get('position'));
1464
+
1465
+
1466
+ var header = this.getElementsByClassName('yui-layout-hd', 'div')[0];
1467
+ if (header) {
1468
+ this.header = header;
1469
+ }
1470
+ var body = this.getElementsByClassName('yui-layout-bd', 'div')[0];
1471
+ if (body) {
1472
+ this.body = body;
1473
+ }
1474
+ var footer = this.getElementsByClassName('yui-layout-ft', 'div')[0];
1475
+ if (footer) {
1476
+ this.footer = footer;
1477
+ }
1478
+
1479
+ this.on('contentChange', this.resize, this, true);
1480
+ this._lastScrollTop = 0;
1481
+
1482
+ this.set('animate', this.get('animate'));
1483
+ },
1484
+ /**
1485
+ * @private
1486
+ * @method initAttributes
1487
+ * @description Processes the config
1488
+ */
1489
+ initAttributes: function(attr) {
1490
+ LayoutUnit.superclass.initAttributes.call(this, attr);
1491
+
1492
+ /**
1493
+ * @private
1494
+ * @attribute wrap
1495
+ * @description A reference to the wrap element
1496
+ * @type HTMLElement
1497
+ */
1498
+ this.setAttributeConfig('wrap', {
1499
+ value: attr.wrap || null,
1500
+ method: function(w) {
1501
+ if (w) {
1502
+ var id = Dom.generateId(w);
1503
+ LayoutUnit._instances[id] = this;
1504
+ }
1505
+ }
1506
+ });
1507
+ /**
1508
+ * @attribute grids
1509
+ * @description Set this option to true if you want the LayoutUnit to fix the first layer of YUI CSS Grids (margins)
1510
+ * @type Boolean
1511
+ */
1512
+ this.setAttributeConfig('grids', {
1513
+ value: attr.grids || false
1514
+ });
1515
+ /**
1516
+ * @private
1517
+ * @attribute top
1518
+ * @description The current top positioning of the Unit
1519
+ * @type Number
1520
+ */
1521
+ this.setAttributeConfig('top', {
1522
+ value: attr.top || 0,
1523
+ validator: Lang.isNumber,
1524
+ method: function(t) {
1525
+ if (!this._collapsing) {
1526
+ this.setStyle('top', t + 'px');
1527
+ }
1528
+ }
1529
+ });
1530
+ /**
1531
+ * @private
1532
+ * @attribute left
1533
+ * @description The current left position of the Unit
1534
+ * @type Number
1535
+ */
1536
+ this.setAttributeConfig('left', {
1537
+ value: attr.left || 0,
1538
+ validator: Lang.isNumber,
1539
+ method: function(l) {
1540
+ if (!this._collapsing) {
1541
+ this.setStyle('left', l + 'px');
1542
+ }
1543
+ }
1544
+ });
1545
+
1546
+ /**
1547
+ * @attribute minWidth
1548
+ * @description The minWidth parameter passed to the Resize Utility
1549
+ * @type Number
1550
+ */
1551
+ this.setAttributeConfig('minWidth', {
1552
+ value: attr.minWidth || false,
1553
+ method: function(v) {
1554
+ if (this._resize) {
1555
+ this._resize.set('minWidth', v);
1556
+ }
1557
+ },
1558
+ validator: YAHOO.lang.isNumber
1559
+ });
1560
+
1561
+ /**
1562
+ * @attribute maxWidth
1563
+ * @description The maxWidth parameter passed to the Resize Utility
1564
+ * @type Number
1565
+ */
1566
+ this.setAttributeConfig('maxWidth', {
1567
+ value: attr.maxWidth || false,
1568
+ method: function(v) {
1569
+ if (this._resize) {
1570
+ this._resize.set('maxWidth', v);
1571
+ }
1572
+ },
1573
+ validator: YAHOO.lang.isNumber
1574
+ });
1575
+
1576
+ /**
1577
+ * @attribute minHeight
1578
+ * @description The minHeight parameter passed to the Resize Utility
1579
+ * @type Number
1580
+ */
1581
+ this.setAttributeConfig('minHeight', {
1582
+ value: attr.minHeight || false,
1583
+ method: function(v) {
1584
+ if (this._resize) {
1585
+ this._resize.set('minHeight', v);
1586
+ }
1587
+ },
1588
+ validator: YAHOO.lang.isNumber
1589
+ });
1590
+
1591
+ /**
1592
+ * @attribute maxHeight
1593
+ * @description The maxHeight parameter passed to the Resize Utility
1594
+ * @type Number
1595
+ */
1596
+ this.setAttributeConfig('maxHeight', {
1597
+ value: attr.maxHeight || false,
1598
+ method: function(v) {
1599
+ if (this._resize) {
1600
+ this._resize.set('maxHeight', v);
1601
+ }
1602
+ },
1603
+ validator: YAHOO.lang.isNumber
1604
+ });
1605
+
1606
+ /**
1607
+ * @attribute height
1608
+ * @description The height of the Unit
1609
+ * @type Number
1610
+ */
1611
+ this.setAttributeConfig('height', {
1612
+ value: attr.height,
1613
+ validator: Lang.isNumber,
1614
+ method: function(h) {
1615
+ if (!this._collapsing) {
1616
+ if (h < 0) {
1617
+ h = 0;
1618
+ }
1619
+ this.setStyle('height', h + 'px');
1620
+ }
1621
+ }
1622
+ });
1623
+
1624
+ /**
1625
+ * @attribute width
1626
+ * @description The width of the Unit
1627
+ * @type Number
1628
+ */
1629
+ this.setAttributeConfig('width', {
1630
+ value: attr.width,
1631
+ validator: Lang.isNumber,
1632
+ method: function(w) {
1633
+ if (!this._collapsing) {
1634
+ if (w < 0) {
1635
+ w = 0;
1636
+ }
1637
+ this.setStyle('width', w + 'px');
1638
+ }
1639
+ }
1640
+ });
1641
+ /**
1642
+ * @attribute zIndex
1643
+ * @description The CSS zIndex to give to the unit, so you can have overlapping elements such as menus in a unit.
1644
+ * @type {Number}
1645
+ */
1646
+ this.setAttributeConfig('zIndex', {
1647
+ value: attr.zIndex || false,
1648
+ method: function(z) {
1649
+ this.setStyle('zIndex', z);
1650
+ }
1651
+ });
1652
+ /**
1653
+ * @attribute position
1654
+ * @description The position (top, right, bottom, left or center) of the Unit in the Layout
1655
+ * @type {String}
1656
+ */
1657
+ this.setAttributeConfig('position', {
1658
+ value: attr.position
1659
+ });
1660
+ /**
1661
+ * @attribute gutter
1662
+ * @description The gutter that we should apply to the parent Layout around this Unit. Supports standard CSS markup: (2 4 0 5) or (2) or (2 5)
1663
+ * @type String
1664
+ */
1665
+ this.setAttributeConfig('gutter', {
1666
+ value: attr.gutter || 0,
1667
+ validator: YAHOO.lang.isString,
1668
+ method: function(gutter) {
1669
+ var p = gutter.split(' ');
1670
+ if (p.length) {
1671
+ this._gutter.top = parseInt(p[0], 10);
1672
+ if (p[1]) {
1673
+ this._gutter.right = parseInt(p[1], 10);
1674
+ } else {
1675
+ this._gutter.right = this._gutter.top;
1676
+ }
1677
+ if (p[2]) {
1678
+ this._gutter.bottom = parseInt(p[2], 10);
1679
+ } else {
1680
+ this._gutter.bottom = this._gutter.top;
1681
+ }
1682
+ if (p[3]) {
1683
+ this._gutter.left = parseInt(p[3], 10);
1684
+ } else if (p[1]) {
1685
+ this._gutter.left = this._gutter.right;
1686
+ } else {
1687
+ this._gutter.left = this._gutter.top;
1688
+ }
1689
+ }
1690
+ }
1691
+ });
1692
+ /**
1693
+ * @attribute parent
1694
+ * @description The parent Layout that we are assigned to
1695
+ * @type {Object} YAHOO.widget.Layout
1696
+ */
1697
+ this.setAttributeConfig('parent', {
1698
+ writeOnce: true,
1699
+ value: attr.parent || false,
1700
+ method: function(p) {
1701
+ if (p) {
1702
+ p.on('resize', this.resize, this, true);
1703
+ }
1704
+
1705
+ }
1706
+ });
1707
+ /**
1708
+ * @attribute collapseSize
1709
+ * @description The pixel size of the Clip that we will collapse to
1710
+ * @type Number
1711
+ */
1712
+ this.setAttributeConfig('collapseSize', {
1713
+ value: attr.collapseSize || 25,
1714
+ validator: YAHOO.lang.isNumber
1715
+ });
1716
+ /**
1717
+ * @attribute duration
1718
+ * @description The duration to give the Animation Utility when animating the opening and closing of Units
1719
+ */
1720
+ this.setAttributeConfig('duration', {
1721
+ value: attr.duration || 0.5
1722
+ });
1723
+ /**
1724
+ * @attribute easing
1725
+ * @description The Animation Easing to apply to the Animation instance for this unit.
1726
+ */
1727
+ this.setAttributeConfig('easing', {
1728
+ value: attr.easing || ((YAHOO.util && YAHOO.util.Easing) ? YAHOO.util.Easing.BounceIn : 'false')
1729
+ });
1730
+ /**
1731
+ * @attribute animate
1732
+ * @description Use animation to collapse/expand the unit
1733
+ * @type Boolean
1734
+ */
1735
+ this.setAttributeConfig('animate', {
1736
+ value: ((attr.animate === false) ? false : true),
1737
+ validator: function() {
1738
+ var anim = false;
1739
+ if (YAHOO.util.Anim) {
1740
+ anim = true;
1741
+ }
1742
+ return anim;
1743
+ },
1744
+ method: function(anim) {
1745
+ if (anim) {
1746
+ this._anim = new YAHOO.util.Anim(this.get('element'), {}, this.get('duration'), this.get('easing'));
1747
+ } else {
1748
+ this._anim = false;
1749
+ }
1750
+ }
1751
+ });
1752
+ /**
1753
+ * @attribute header
1754
+ * @description The text to use as the Header of the Unit
1755
+ */
1756
+ this.setAttributeConfig('header', {
1757
+ value: attr.header || false,
1758
+ method: function(txt) {
1759
+ if (txt === false) {
1760
+ //Remove the footer
1761
+ if (this.header) {
1762
+ Dom.addClass(this.body, 'yui-layout-bd-nohd');
1763
+ this.header.parentNode.removeChild(this.header);
1764
+ this.header = null;
1765
+ }
1766
+ } else {
1767
+ if (!this.header) {
1768
+ var header = this.getElementsByClassName('yui-layout-hd', 'div')[0];
1769
+ if (!header) {
1770
+ header = this._createHeader();
1771
+ }
1772
+ this.header = header;
1773
+ }
1774
+ var h = this.header.getElementsByTagName('h2')[0];
1775
+ if (!h) {
1776
+ h = document.createElement('h2');
1777
+ this.header.appendChild(h);
1778
+ }
1779
+ h.innerHTML = txt;
1780
+ if (this.body) {
1781
+ Dom.removeClass(this.body, 'yui-layout-bd-nohd');
1782
+ }
1783
+ }
1784
+ this.fireEvent('contentChange', { target: 'header' });
1785
+ }
1786
+ });
1787
+ /**
1788
+ * @attribute proxy
1789
+ * @description Use the proxy config setting for the Resize Utility
1790
+ * @type Boolean
1791
+ */
1792
+ this.setAttributeConfig('proxy', {
1793
+ writeOnce: true,
1794
+ value: ((attr.proxy === false) ? false : true)
1795
+ });
1796
+ /**
1797
+ * @attribute body
1798
+ * @description The content for the body. If we find an element in the page with an id that matches the passed option we will move that element into the body of this unit.
1799
+ */
1800
+ this.setAttributeConfig('body', {
1801
+ value: attr.body || false,
1802
+ method: function(content) {
1803
+ if (!this.body) {
1804
+ var body = this.getElementsByClassName('yui-layout-bd', 'div')[0];
1805
+ if (body) {
1806
+ this.body = body;
1807
+ } else {
1808
+ body = document.createElement('div');
1809
+ body.className = 'yui-layout-bd';
1810
+ this.body = body;
1811
+ this.get('wrap').appendChild(body);
1812
+ }
1813
+ }
1814
+ if (!this.header) {
1815
+ Dom.addClass(this.body, 'yui-layout-bd-nohd');
1816
+ }
1817
+ Dom.addClass(this.body, 'yui-layout-bd-noft');
1818
+
1819
+
1820
+ var el = null;
1821
+ if (Lang.isString(content)) {
1822
+ el = Dom.get(content);
1823
+ } else if (content && content.tagName) {
1824
+ el = content;
1825
+ }
1826
+ if (el) {
1827
+ var id = Dom.generateId(el);
1828
+ LayoutUnit._instances[id] = this;
1829
+ this.body.appendChild(el);
1830
+ } else {
1831
+ this.body.innerHTML = content;
1832
+ }
1833
+
1834
+ this._cleanGrids();
1835
+
1836
+ this.fireEvent('contentChange', { target: 'body' });
1837
+ }
1838
+ });
1839
+
1840
+ /**
1841
+ * @attribute footer
1842
+ * @description The content for the footer. If we find an element in the page with an id that matches the passed option we will move that element into the footer of this unit.
1843
+ */
1844
+ this.setAttributeConfig('footer', {
1845
+ value: attr.footer || false,
1846
+ method: function(content) {
1847
+ if (content === false) {
1848
+ //Remove the footer
1849
+ if (this.footer) {
1850
+ Dom.addClass(this.body, 'yui-layout-bd-noft');
1851
+ this.footer.parentNode.removeChild(this.footer);
1852
+ this.footer = null;
1853
+ }
1854
+ } else {
1855
+ if (!this.footer) {
1856
+ var ft = this.getElementsByClassName('yui-layout-ft', 'div')[0];
1857
+ if (!ft) {
1858
+ ft = document.createElement('div');
1859
+ ft.className = 'yui-layout-ft';
1860
+ this.footer = ft;
1861
+ this.get('wrap').appendChild(ft);
1862
+ } else {
1863
+ this.footer = ft;
1864
+ }
1865
+ }
1866
+ var el = null;
1867
+ if (Lang.isString(content)) {
1868
+ el = Dom.get(content);
1869
+ } else if (content && content.tagName) {
1870
+ el = content;
1871
+ }
1872
+ if (el) {
1873
+ this.footer.appendChild(el);
1874
+ } else {
1875
+ this.footer.innerHTML = content;
1876
+ }
1877
+ Dom.removeClass(this.body, 'yui-layout-bd-noft');
1878
+ }
1879
+ this.fireEvent('contentChange', { target: 'footer' });
1880
+ }
1881
+ });
1882
+ /**
1883
+ * @attribute close
1884
+ * @description Adds a close icon to the unit
1885
+ */
1886
+ this.setAttributeConfig('close', {
1887
+ value: attr.close || false,
1888
+ method: function(close) {
1889
+ //Position Center doesn't get this
1890
+ if (this.get('position') == 'center') {
1891
+ return false;
1892
+ }
1893
+ if (!this.header && close) {
1894
+ this._createHeader();
1895
+ }
1896
+ var c = Dom.getElementsByClassName('close', 'div', this.header)[0];
1897
+ if (close) {
1898
+ //Force some header text if there isn't any
1899
+ if (!this.get('header')) {
1900
+ this.set('header', '&nbsp;');
1901
+ }
1902
+ if (!c) {
1903
+ c = document.createElement('div');
1904
+ c.className = 'close';
1905
+ this.header.appendChild(c);
1906
+ Event.on(c, 'click', this.close, this, true);
1907
+ }
1908
+ c.title = this.STR_CLOSE;
1909
+ } else if (c && c.parentNode) {
1910
+ Event.purgeElement(c);
1911
+ c.parentNode.removeChild(c);
1912
+ }
1913
+ this._configs.close.value = close;
1914
+ this.set('collapse', this.get('collapse')); //Reset so we get the right classnames
1915
+ }
1916
+ });
1917
+
1918
+ /**
1919
+ * @attribute collapse
1920
+ * @description Adds a collapse icon to the unit
1921
+ */
1922
+ this.setAttributeConfig('collapse', {
1923
+ value: attr.collapse || false,
1924
+ method: function(collapse) {
1925
+ //Position Center doesn't get this
1926
+ if (this.get('position') == 'center') {
1927
+ return false;
1928
+ }
1929
+ if (!this.header && collapse) {
1930
+ this._createHeader();
1931
+ }
1932
+ var c = Dom.getElementsByClassName('collapse', 'div', this.header)[0];
1933
+ if (collapse) {
1934
+ //Force some header text if there isn't any
1935
+ if (!this.get('header')) {
1936
+ this.set('header', '&nbsp;');
1937
+ }
1938
+ if (!c) {
1939
+ c = document.createElement('div');
1940
+ this.header.appendChild(c);
1941
+ Event.on(c, 'click', this.collapse, this, true);
1942
+ }
1943
+ c.title = this.STR_COLLAPSE;
1944
+ c.className = 'collapse' + ((this.get('close')) ? ' collapse-close' : '');
1945
+ } else if (c && c.parentNode) {
1946
+ Event.purgeElement(c);
1947
+ c.parentNode.removeChild(c);
1948
+ }
1949
+ }
1950
+ });
1951
+ /**
1952
+ * @attribute scroll
1953
+ * @description Adds a class to the unit to allow for overflow: auto (yui-layout-scroll), default is overflow: hidden (yui-layout-noscroll). If true scroll bars will be placed on the element when the content exceeds the given area, false will put overflow hidden to hide the content. Passing null will render the content as usual overflow.
1954
+ * @type Boolean/Null
1955
+ */
1956
+
1957
+ this.setAttributeConfig('scroll', {
1958
+ value: (((attr.scroll === true) || (attr.scroll === false) || (attr.scroll === null)) ? attr.scroll : false),
1959
+ method: function(scroll) {
1960
+ if ((scroll === false) && !this._collapsed) { //Removing scroll bar
1961
+ if (this.body) {
1962
+ if (this.body.scrollTop > 0) {
1963
+ this._lastScrollTop = this.body.scrollTop;
1964
+ }
1965
+ }
1966
+ }
1967
+
1968
+ if (scroll === true) {
1969
+ this.addClass('yui-layout-scroll');
1970
+ this.removeClass('yui-layout-noscroll');
1971
+ if (this._lastScrollTop > 0) {
1972
+ if (this.body) {
1973
+ this.body.scrollTop = this._lastScrollTop;
1974
+ }
1975
+ }
1976
+ } else if (scroll === false) {
1977
+ this.removeClass('yui-layout-scroll');
1978
+ this.addClass('yui-layout-noscroll');
1979
+ } else if (scroll === null) {
1980
+ this.removeClass('yui-layout-scroll');
1981
+ this.removeClass('yui-layout-noscroll');
1982
+ }
1983
+ }
1984
+ });
1985
+ /**
1986
+ * @attribute hover
1987
+ * @description Config option to pass to the Resize Utility
1988
+ */
1989
+ this.setAttributeConfig('hover', {
1990
+ writeOnce: true,
1991
+ value: attr.hover || false,
1992
+ validator: YAHOO.lang.isBoolean
1993
+ });
1994
+ /**
1995
+ * @attribute useShim
1996
+ * @description Config option to pass to the Resize Utility
1997
+ */
1998
+ this.setAttributeConfig('useShim', {
1999
+ value: attr.useShim || false,
2000
+ validator: YAHOO.lang.isBoolean,
2001
+ method: function(u) {
2002
+ if (this._resize) {
2003
+ this._resize.set('useShim', u);
2004
+ }
2005
+ }
2006
+ });
2007
+ /**
2008
+ * @attribute resize
2009
+ * @description Should a Resize instance be added to this unit
2010
+ */
2011
+
2012
+ this.setAttributeConfig('resize', {
2013
+ value: attr.resize || false,
2014
+ validator: function(r) {
2015
+ if (YAHOO.util && YAHOO.util.Resize) {
2016
+ return true;
2017
+ }
2018
+ return false;
2019
+ },
2020
+ method: function(resize) {
2021
+ if (resize && !this._resize) {
2022
+ //Position Center doesn't get this
2023
+ if (this.get('position') == 'center') {
2024
+ return false;
2025
+ }
2026
+ var handle = false; //To catch center
2027
+ switch (this.get('position')) {
2028
+ case 'top':
2029
+ handle = 'b';
2030
+ break;
2031
+ case 'bottom':
2032
+ handle = 't';
2033
+ break;
2034
+ case 'right':
2035
+ handle = 'l';
2036
+ break;
2037
+ case 'left':
2038
+ handle = 'r';
2039
+ break;
2040
+ }
2041
+
2042
+ this.setStyle('position', 'absolute'); //Make sure Resize get's a position
2043
+
2044
+ if (handle) {
2045
+ this._resize = new YAHOO.util.Resize(this.get('element'), {
2046
+ proxy: this.get('proxy'),
2047
+ hover: this.get('hover'),
2048
+ status: false,
2049
+ autoRatio: false,
2050
+ handles: [handle],
2051
+ minWidth: this.get('minWidth'),
2052
+ maxWidth: this.get('maxWidth'),
2053
+ minHeight: this.get('minHeight'),
2054
+ maxHeight: this.get('maxHeight'),
2055
+ height: this.get('height'),
2056
+ width: this.get('width'),
2057
+ setSize: false,
2058
+ useShim: this.get('useShim'),
2059
+ wrap: false
2060
+ });
2061
+
2062
+ this._resize._handles[handle].innerHTML = '<div class="yui-layout-resize-knob"></div>';
2063
+
2064
+ if (this.get('proxy')) {
2065
+ var proxy = this._resize.getProxyEl();
2066
+ proxy.innerHTML = '<div class="yui-layout-handle-' + handle + '"></div>';
2067
+ }
2068
+ this._resize.on('startResize', function(ev) {
2069
+ this._lastScroll = this.get('scroll');
2070
+ this.set('scroll', false);
2071
+ if (this.get('parent')) {
2072
+ this.get('parent').fireEvent('startResize');
2073
+ var c = this.get('parent').getUnitByPosition('center');
2074
+ this._lastCenterScroll = c.get('scroll');
2075
+ c.addClass(this._resize.CSS_RESIZING);
2076
+ c.set('scroll', false);
2077
+ }
2078
+ this.fireEvent('startResize');
2079
+ }, this, true);
2080
+ this._resize.on('resize', function(ev) {
2081
+ this.set('height', ev.height);
2082
+ this.set('width', ev.width);
2083
+ }, this, true);
2084
+ this._resize.on('endResize', function(ev) {
2085
+ this.set('scroll', this._lastScroll);
2086
+ if (this.get('parent')) {
2087
+ var c = this.get('parent').getUnitByPosition('center');
2088
+ c.set('scroll', this._lastCenterScroll);
2089
+ c.removeClass(this._resize.CSS_RESIZING);
2090
+ }
2091
+ this.resize();
2092
+ this.fireEvent('endResize');
2093
+ }, this, true);
2094
+ }
2095
+ } else {
2096
+ if (this._resize) {
2097
+ this._resize.destroy();
2098
+ }
2099
+ }
2100
+ }
2101
+ });
2102
+ /**
2103
+ * The unit data source, used for loading content dynamically.
2104
+ * @attribute dataSrc
2105
+ * @type String
2106
+ */
2107
+ this.setAttributeConfig('dataSrc', {
2108
+ value: attr.dataSrc
2109
+ });
2110
+ /**
2111
+ * The method to use for the data request.
2112
+ * @attribute loadMethod
2113
+ * @type String
2114
+ * @default "GET"
2115
+ */
2116
+ this.setAttributeConfig('loadMethod', {
2117
+ value: attr.loadMethod || 'GET',
2118
+ validator: YAHOO.lang.isString
2119
+ });
2120
+ /**
2121
+ * Whether or not any data has been loaded from the server.
2122
+ * @attribute dataLoaded
2123
+ * @type Boolean
2124
+ */
2125
+ this.setAttributeConfig('dataLoaded', {
2126
+ value: false,
2127
+ validator: YAHOO.lang.isBoolean,
2128
+ writeOnce: true
2129
+ });
2130
+ /**
2131
+ * Number if milliseconds before aborting and calling failure handler.
2132
+ * @attribute dataTimeout
2133
+ * @type Number
2134
+ * @default null
2135
+ */
2136
+ this.setAttributeConfig('dataTimeout', {
2137
+ value: attr.dataTimeout || null,
2138
+ validator: YAHOO.lang.isNumber
2139
+ });
2140
+ },
2141
+ /**
2142
+ * @private
2143
+ * @method _cleanGrids
2144
+ * @description This method attempts to clean up the first level of the YUI CSS Grids, YAHOO.util.Selector is required for this operation.
2145
+ */
2146
+ _cleanGrids: function() {
2147
+ if (this.get('grids')) {
2148
+ var b = Sel.query('div.yui-b', this.body, true);
2149
+ if (b) {
2150
+ Dom.removeClass(b, 'yui-b');
2151
+ }
2152
+ Event.onAvailable('yui-main', function() {
2153
+ Dom.setStyle(Sel.query('#yui-main'), 'margin-left', '0');
2154
+ Dom.setStyle(Sel.query('#yui-main'), 'margin-right', '0');
2155
+ });
2156
+ }
2157
+ },
2158
+ /**
2159
+ * @private
2160
+ * @method _createHeader
2161
+ * @description Creates the HTMLElement for the header
2162
+ * @return {HTMLElement} The new HTMLElement
2163
+ */
2164
+ _createHeader: function() {
2165
+ var header = document.createElement('div');
2166
+ header.className = 'yui-layout-hd';
2167
+ if (this.get('firstChild')) {
2168
+ this.get('wrap').insertBefore(header, this.get('wrap').firstChild);
2169
+ } else {
2170
+ this.get('wrap').appendChild(header);
2171
+ }
2172
+ this.header = header;
2173
+ return header;
2174
+ },
2175
+ /**
2176
+ * @method destroy
2177
+ * @param {Boolean} force Don't report to the parent, because we are being called from the parent.
2178
+ * @description Removes this unit from the parent and cleans up after itself.
2179
+ * @return {<a href="YAHOO.widget.Layout.html">YAHOO.widget.Layout</a>} The parent Layout instance
2180
+ */
2181
+ destroy: function(force) {
2182
+ if (this._resize) {
2183
+ this._resize.destroy();
2184
+ }
2185
+ var par = this.get('parent');
2186
+
2187
+ this.setStyle('display', 'none');
2188
+ if (this._clip) {
2189
+ this._clip.parentNode.removeChild(this._clip);
2190
+ this._clip = null;
2191
+ }
2192
+
2193
+ if (!force) {
2194
+ par.removeUnit(this);
2195
+ }
2196
+
2197
+ if (par) {
2198
+ par.removeListener('resize', this.resize, this, true);
2199
+ }
2200
+ this.unsubscribeAll();
2201
+ Event.purgeElement(this.get('element'));
2202
+ this.get('parentNode').removeChild(this.get('element'));
2203
+
2204
+ delete YAHOO.widget.LayoutUnit._instances[this.get('id')];
2205
+ //Brutal Object Destroy
2206
+ for (var i in this) {
2207
+ if (Lang.hasOwnProperty(this, i)) {
2208
+ this[i] = null;
2209
+ delete this[i];
2210
+ }
2211
+ }
2212
+
2213
+ return par;
2214
+ },
2215
+ /**
2216
+ * @method toString
2217
+ * @description Returns a string representing the LayoutUnit.
2218
+ * @return {String}
2219
+ */
2220
+ toString: function() {
2221
+ if (this.get) {
2222
+ return 'LayoutUnit #' + this.get('id') + ' (' + this.get('position') + ')';
2223
+ }
2224
+ return 'LayoutUnit';
2225
+ }
2226
+ /**
2227
+ * @event resize
2228
+ * @description Fired when this.resize is called
2229
+ * @type YAHOO.util.CustomEvent
2230
+ */
2231
+ /**
2232
+ * @event startResize
2233
+ * @description Fired when the Resize Utility fires it's startResize Event.
2234
+ * @type YAHOO.util.CustomEvent
2235
+ */
2236
+ /**
2237
+ * @event endResize
2238
+ * @description Fired when the Resize Utility fires it's endResize Event.
2239
+ * @type YAHOO.util.CustomEvent
2240
+ */
2241
+ /**
2242
+ * @event beforeResize
2243
+ * @description Fired at the beginning of the resize method. If you return false, the resize is cancelled.
2244
+ * @type YAHOO.util.CustomEvent
2245
+ */
2246
+ /**
2247
+ * @event contentChange
2248
+ * @description Fired when the content in the header, body or footer is changed via the API
2249
+ * @type YAHOO.util.CustomEvent
2250
+ */
2251
+ /**
2252
+ * @event close
2253
+ * @description Fired when the unit is closed
2254
+ * @type YAHOO.util.CustomEvent
2255
+ */
2256
+ /**
2257
+ * @event beforeCollapse
2258
+ * @description Fired before the unit is collapsed. If you return false, the collapse is cancelled.
2259
+ * @type YAHOO.util.CustomEvent
2260
+ */
2261
+ /**
2262
+ * @event collapse
2263
+ * @description Fired when the unit is collapsed
2264
+ * @type YAHOO.util.CustomEvent
2265
+ */
2266
+ /**
2267
+ * @event expand
2268
+ * @description Fired when the unit is exanded
2269
+ * @type YAHOO.util.CustomEvent
2270
+ */
2271
+ /**
2272
+ * @event beforeExpand
2273
+ * @description Fired before the unit is exanded. If you return false, the collapse is cancelled.
2274
+ * @type YAHOO.util.CustomEvent
2275
+ */
2276
+ /**
2277
+ * @event load
2278
+ * @description Fired when data is loaded via the dataSrc config.
2279
+ * @type YAHOO.util.CustomEvent
2280
+ */
2281
+ /**
2282
+ * @event loadError
2283
+ * @description Fired when an error occurs loading data via the dataSrc config. Error message is passed as argument to this event.
2284
+ * @type YAHOO.util.CustomEvent
2285
+ */
2286
+ });
2287
+
2288
+ YAHOO.widget.LayoutUnit = LayoutUnit;
2289
+ })();
2290
+ YAHOO.register("layout", YAHOO.widget.Layout, {version: "2.8.1", build: "19"});