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,10 @@
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 E=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.lang;var B=function(F,D){var G={element:F,attributes:D||{}};B.superclass.constructor.call(this,G.element,G.attributes);};B._instances={};B.getResizeById=function(D){if(B._instances[D]){return B._instances[D];}return false;};YAHOO.extend(B,YAHOO.util.Element,{CSS_RESIZE:"yui-resize",CSS_DRAG:"yui-draggable",CSS_HOVER:"yui-resize-hover",CSS_PROXY:"yui-resize-proxy",CSS_WRAP:"yui-resize-wrap",CSS_KNOB:"yui-resize-knob",CSS_HIDDEN:"yui-resize-hidden",CSS_HANDLE:"yui-resize-handle",CSS_STATUS:"yui-resize-status",CSS_GHOST:"yui-resize-ghost",CSS_RESIZING:"yui-resize-resizing",_resizeEvent:null,dd:null,browser:YAHOO.env.ua,_locked:null,_positioned:null,_dds:null,_wrap:null,_proxy:null,_handles:null,_currentHandle:null,_currentDD:null,_cache:null,_active:null,_createProxy:function(){if(this.get("proxy")){this._proxy=document.createElement("div");this._proxy.className=this.CSS_PROXY;this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px";this._wrap.parentNode.appendChild(this._proxy);}else{this.set("animate",false);}},_createWrap:function(){this._positioned=false;if(this.get("wrap")===false){switch(this.get("element").tagName.toLowerCase()){case"img":case"textarea":case"input":case"iframe":case"select":this.set("wrap",true);break;}}if(this.get("wrap")===true){this._wrap=document.createElement("div");this._wrap.id=this.get("element").id+"_wrap";this._wrap.className=this.CSS_WRAP;if(this.get("element").tagName.toLowerCase()=="textarea"){E.addClass(this._wrap,"yui-resize-textarea");}E.setStyle(this._wrap,"width",this.get("width")+"px");E.setStyle(this._wrap,"height",this.get("height")+"px");E.setStyle(this._wrap,"z-index",this.getStyle("z-index"));this.setStyle("z-index",0);var F=E.getStyle(this.get("element"),"position");E.setStyle(this._wrap,"position",((F=="static")?"relative":F));E.setStyle(this._wrap,"top",E.getStyle(this.get("element"),"top"));E.setStyle(this._wrap,"left",E.getStyle(this.get("element"),"left"));if(E.getStyle(this.get("element"),"position")=="absolute"){this._positioned=true;E.setStyle(this.get("element"),"position","relative");E.setStyle(this.get("element"),"top","0");E.setStyle(this.get("element"),"left","0");}var D=this.get("element").parentNode;D.replaceChild(this._wrap,this.get("element"));this._wrap.appendChild(this.get("element"));}else{this._wrap=this.get("element");if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true;}}if(this.get("draggable")){this._setupDragDrop();}if(this.get("hover")){E.addClass(this._wrap,this.CSS_HOVER);}if(this.get("knobHandles")){E.addClass(this._wrap,this.CSS_KNOB);}if(this.get("hiddenHandles")){E.addClass(this._wrap,this.CSS_HIDDEN);}E.addClass(this._wrap,this.CSS_RESIZE);},_setupDragDrop:function(){E.addClass(this._wrap,this.CSS_DRAG);this.dd=new YAHOO.util.DD(this._wrap,this.get("id")+"-resize",{dragOnly:true,useShim:this.get("useShim")});this.dd.on("dragEvent",function(){this.fireEvent("dragEvent",arguments);},this,true);},_createHandles:function(){this._handles={};this._dds={};var G=this.get("handles");for(var F=0;F<G.length;F++){this._handles[G[F]]=document.createElement("div");this._handles[G[F]].id=E.generateId(this._handles[G[F]]);this._handles[G[F]].className=this.CSS_HANDLE+" "+this.CSS_HANDLE+"-"+G[F];var D=document.createElement("div");D.className=this.CSS_HANDLE+"-inner-"+G[F];this._handles[G[F]].appendChild(D);this._wrap.appendChild(this._handles[G[F]]);A.on(this._handles[G[F]],"mouseover",this._handleMouseOver,this,true);A.on(this._handles[G[F]],"mouseout",this._handleMouseOut,this,true);this._dds[G[F]]=new YAHOO.util.DragDrop(this._handles[G[F]],this.get("id")+"-handle-"+G,{useShim:this.get("useShim")});this._dds[G[F]].setPadding(15,15,15,15);this._dds[G[F]].on("startDragEvent",this._handleStartDrag,this._dds[G[F]],this);this._dds[G[F]].on("mouseDownEvent",this._handleMouseDown,this._dds[G[F]],this);}this._status=document.createElement("span");this._status.className=this.CSS_STATUS;document.body.insertBefore(this._status,document.body.firstChild);},_ieSelectFix:function(){return false;},_ieSelectBack:null,_setAutoRatio:function(D){if(this.get("autoRatio")){if(D&&D.shiftKey){this.set("ratio",true);}else{this.set("ratio",this._configs.ratio._initialConfig.value);}}},_handleMouseDown:function(D){if(this._locked){return false;}if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true;}if(D){this._setAutoRatio(D);}if(this.browser.ie){this._ieSelectBack=document.body.onselectstart;document.body.onselectstart=this._ieSelectFix;}},_handleMouseOver:function(G){if(this._locked){return false;}E.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")){E.removeClass(this._wrap,this.CSS_HOVER);}var D=A.getTarget(G);if(!E.hasClass(D,this.CSS_HANDLE)){D=D.parentNode;}if(E.hasClass(D,this.CSS_HANDLE)&&!this._active){E.addClass(D,this.CSS_HANDLE+"-active");for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){if(this._handles[F]==D){E.addClass(D,this.CSS_HANDLE+"-"+F+"-active");break;}}}}E.addClass(this._wrap,this.CSS_RESIZE);},_handleMouseOut:function(G){E.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")&&!this._active){E.addClass(this._wrap,this.CSS_HOVER);}var D=A.getTarget(G);if(!E.hasClass(D,this.CSS_HANDLE)){D=D.parentNode;}if(E.hasClass(D,this.CSS_HANDLE)&&!this._active){E.removeClass(D,this.CSS_HANDLE+"-active");for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){if(this._handles[F]==D){E.removeClass(D,this.CSS_HANDLE+"-"+F+"-active");break;}}}}E.addClass(this._wrap,this.CSS_RESIZE);},_handleStartDrag:function(G,F){var D=F.getDragEl();if(E.hasClass(D,this.CSS_HANDLE)){if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true;}this._active=true;this._currentDD=F;if(this._proxy){this._proxy.style.visibility="visible";this._proxy.style.zIndex="1000";this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px";
8
+ }for(var H in this._handles){if(C.hasOwnProperty(this._handles,H)){if(this._handles[H]==D){this._currentHandle=H;var I="_handle_for_"+H;E.addClass(D,this.CSS_HANDLE+"-"+H+"-active");F.on("dragEvent",this[I],this,true);F.on("mouseUpEvent",this._handleMouseUp,this,true);break;}}}E.addClass(D,this.CSS_HANDLE+"-active");if(this.get("proxy")){var J=E.getXY(this.get("element"));E.setXY(this._proxy,J);if(this.get("ghost")){this.addClass(this.CSS_GHOST);}}E.addClass(this._wrap,this.CSS_RESIZING);this._setCache();this._updateStatus(this._cache.height,this._cache.width,this._cache.top,this._cache.left);this.fireEvent("startResize",{type:"startresize",target:this});}},_setCache:function(){this._cache.xy=E.getXY(this._wrap);E.setXY(this._wrap,this._cache.xy);this._cache.height=this.get("clientHeight");this._cache.width=this.get("clientWidth");this._cache.start.height=this._cache.height;this._cache.start.width=this._cache.width;this._cache.start.top=this._cache.xy[1];this._cache.start.left=this._cache.xy[0];this._cache.top=this._cache.xy[1];this._cache.left=this._cache.xy[0];this.set("height",this._cache.height,true);this.set("width",this._cache.width,true);},_handleMouseUp:function(F){this._active=false;var G="_handle_for_"+this._currentHandle;this._currentDD.unsubscribe("dragEvent",this[G],this,true);this._currentDD.unsubscribe("mouseUpEvent",this._handleMouseUp,this,true);if(this._proxy){this._proxy.style.visibility="hidden";this._proxy.style.zIndex="-1";if(this.get("setSize")){this.resize(F,this._cache.height,this._cache.width,this._cache.top,this._cache.left,true);}else{this.fireEvent("resize",{ev:"resize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left});}if(this.get("ghost")){this.removeClass(this.CSS_GHOST);}}if(this.get("hover")){E.addClass(this._wrap,this.CSS_HOVER);}if(this._status){E.setStyle(this._status,"display","none");}if(this.browser.ie){document.body.onselectstart=this._ieSelectBack;}if(this.browser.ie){E.removeClass(this._wrap,this.CSS_RESIZE);}for(var D in this._handles){if(C.hasOwnProperty(this._handles,D)){E.removeClass(this._handles[D],this.CSS_HANDLE+"-active");}}if(this.get("hover")&&!this._active){E.addClass(this._wrap,this.CSS_HOVER);}E.removeClass(this._wrap,this.CSS_RESIZING);E.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-"+this._currentHandle+"-active");E.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-active");if(this.browser.ie){E.addClass(this._wrap,this.CSS_RESIZE);}this._resizeEvent=null;this._currentHandle=null;if(!this.get("animate")){this.set("height",this._cache.height,true);this.set("width",this._cache.width,true);}this.fireEvent("endResize",{ev:"endResize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left});},_setRatio:function(K,N,Q,I){var O=K,G=N;if(this.get("ratio")){var P=this._cache.height,H=this._cache.width,F=parseInt(this.get("height"),10),L=parseInt(this.get("width"),10),M=this.get("maxHeight"),R=this.get("minHeight"),D=this.get("maxWidth"),J=this.get("minWidth");switch(this._currentHandle){case"l":K=F*(N/L);K=Math.min(Math.max(R,K),M);N=L*(K/F);Q=(this._cache.start.top-(-((F-K)/2)));I=(this._cache.start.left-(-((L-N))));break;case"r":K=F*(N/L);K=Math.min(Math.max(R,K),M);N=L*(K/F);Q=(this._cache.start.top-(-((F-K)/2)));break;case"t":N=L*(K/F);K=F*(N/L);I=(this._cache.start.left-(-((L-N)/2)));Q=(this._cache.start.top-(-((F-K))));break;case"b":N=L*(K/F);K=F*(N/L);I=(this._cache.start.left-(-((L-N)/2)));break;case"bl":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left-(-((L-N))));break;case"br":K=F*(N/L);N=L*(K/F);break;case"tl":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left-(-((L-N))));Q=(this._cache.start.top-(-((F-K))));break;case"tr":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left);Q=(this._cache.start.top-(-((F-K))));break;}O=this._checkHeight(K);G=this._checkWidth(N);if((O!=K)||(G!=N)){Q=0;I=0;if(O!=K){G=this._cache.width;}if(G!=N){O=this._cache.height;}}}return[O,G,Q,I];},_updateStatus:function(K,G,J,F){if(this._resizeEvent&&(!C.isString(this._resizeEvent))){K=((K===0)?this._cache.start.height:K);G=((G===0)?this._cache.start.width:G);var I=parseInt(this.get("height"),10),D=parseInt(this.get("width"),10);if(isNaN(I)){I=parseInt(K,10);}if(isNaN(D)){D=parseInt(G,10);}var L=(parseInt(K,10)-I);var H=(parseInt(G,10)-D);this._cache.offsetHeight=L;this._cache.offsetWidth=H;if(this.get("status")){E.setStyle(this._status,"display","inline");this._status.innerHTML="<strong>"+parseInt(K,10)+" x "+parseInt(G,10)+"</strong><em>"+((L>0)?"+":"")+L+" x "+((H>0)?"+":"")+H+"</em>";E.setXY(this._status,[A.getPageX(this._resizeEvent)+12,A.getPageY(this._resizeEvent)+12]);}}},lock:function(D){this._locked=true;if(D&&this.dd){E.removeClass(this._wrap,"yui-draggable");this.dd.lock();}return this;},unlock:function(D){this._locked=false;if(D&&this.dd){E.addClass(this._wrap,"yui-draggable");this.dd.unlock();}return this;},isLocked:function(){return this._locked;},reset:function(){this.resize(null,this._cache.start.height,this._cache.start.width,this._cache.start.top,this._cache.start.left,true);return this;},resize:function(M,J,P,Q,H,F,K){if(this._locked){return false;}this._resizeEvent=M;var G=this._wrap,I=this.get("animate"),O=true;if(this._proxy&&!F){G=this._proxy;I=false;}this._setAutoRatio(M);if(this._positioned){if(this._proxy){Q=this._cache.top-Q;H=this._cache.left-H;}}var L=this._setRatio(J,P,Q,H);J=parseInt(L[0],10);P=parseInt(L[1],10);Q=parseInt(L[2],10);H=parseInt(L[3],10);if(Q==0){Q=E.getY(G);}if(H==0){H=E.getX(G);}if(this._positioned){if(this._proxy&&F){if(!I){G.style.top=this._proxy.style.top;G.style.left=this._proxy.style.left;}else{Q=this._proxy.style.top;H=this._proxy.style.left;}}else{if(!this.get("ratio")&&!this._proxy){Q=this._cache.top+-(Q);H=this._cache.left+-(H);}if(Q){if(this.get("minY")){if(Q<this.get("minY")){Q=this.get("minY");}}if(this.get("maxY")){if(Q>this.get("maxY")){Q=this.get("maxY");}}}if(H){if(this.get("minX")){if(H<this.get("minX")){H=this.get("minX");
9
+ }}if(this.get("maxX")){if((H+P)>this.get("maxX")){H=(this.get("maxX")-P);}}}}}if(!K){var N=this.fireEvent("beforeResize",{ev:"beforeResize",target:this,height:J,width:P,top:Q,left:H});if(N===false){return false;}}this._updateStatus(J,P,Q,H);if(this._positioned){if(this._proxy&&F){}else{if(Q){E.setY(G,Q);this._cache.top=Q;}if(H){E.setX(G,H);this._cache.left=H;}}}if(J){if(!I){O=true;if(this._proxy&&F){if(!this.get("setSize")){O=false;}}if(O){G.style.height=J+"px";}if((this._proxy&&F)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.height=J+"px";}}}this._cache.height=J;}if(P){this._cache.width=P;if(!I){O=true;if(this._proxy&&F){if(!this.get("setSize")){O=false;}}if(O){G.style.width=P+"px";}if((this._proxy&&F)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.width=P+"px";}}}}if(I){if(YAHOO.util.Anim){var D=new YAHOO.util.Anim(G,{height:{to:this._cache.height},width:{to:this._cache.width}},this.get("animateDuration"),this.get("animateEasing"));if(this._positioned){if(Q){D.attributes.top={to:parseInt(Q,10)};}if(H){D.attributes.left={to:parseInt(H,10)};}}if(this._wrap!=this.get("element")){D.onTween.subscribe(function(){this.get("element").style.height=G.style.height;this.get("element").style.width=G.style.width;},this,true);}D.onComplete.subscribe(function(){this.set("height",J);this.set("width",P);this.fireEvent("resize",{ev:"resize",target:this,height:J,width:P,top:Q,left:H});},this,true);D.animate();}}else{if(this._proxy&&!F){this.fireEvent("proxyResize",{ev:"proxyresize",target:this,height:J,width:P,top:Q,left:H});}else{this.fireEvent("resize",{ev:"resize",target:this,height:J,width:P,top:Q,left:H});}}return this;},_handle_for_br:function(F){var G=this._setWidth(F.e);var D=this._setHeight(F.e);this.resize(F.e,D,G,0,0);},_handle_for_bl:function(G){var H=this._setWidth(G.e,true);var F=this._setHeight(G.e);var D=(H-this._cache.width);this.resize(G.e,F,H,0,D);},_handle_for_tl:function(G){var I=this._setWidth(G.e,true);var F=this._setHeight(G.e,true);var H=(F-this._cache.height);var D=(I-this._cache.width);this.resize(G.e,F,I,H,D);},_handle_for_tr:function(F){var H=this._setWidth(F.e);var D=this._setHeight(F.e,true);var G=(D-this._cache.height);this.resize(F.e,D,H,G,0);},_handle_for_r:function(D){this._dds.r.setYConstraint(0,0);var F=this._setWidth(D.e);this.resize(D.e,0,F,0,0);},_handle_for_l:function(F){this._dds.l.setYConstraint(0,0);var G=this._setWidth(F.e,true);var D=(G-this._cache.width);this.resize(F.e,0,G,0,D);},_handle_for_b:function(F){this._dds.b.setXConstraint(0,0);var D=this._setHeight(F.e);this.resize(F.e,D,0,0,0);},_handle_for_t:function(F){this._dds.t.setXConstraint(0,0);var D=this._setHeight(F.e,true);var G=(D-this._cache.height);this.resize(F.e,D,0,G,0);},_setWidth:function(H,J){var I=this._cache.xy[0],G=this._cache.width,D=A.getPageX(H),F=(D-I);if(J){F=(I-D)+parseInt(this.get("width"),10);}F=this._snapTick(F,this.get("xTicks"));F=this._checkWidth(F);return F;},_checkWidth:function(D){if(this.get("minWidth")){if(D<=this.get("minWidth")){D=this.get("minWidth");}}if(this.get("maxWidth")){if(D>=this.get("maxWidth")){D=this.get("maxWidth");}}return D;},_checkHeight:function(D){if(this.get("minHeight")){if(D<=this.get("minHeight")){D=this.get("minHeight");}}if(this.get("maxHeight")){if(D>=this.get("maxHeight")){D=this.get("maxHeight");}}return D;},_setHeight:function(G,I){var H=this._cache.xy[1],F=this._cache.height,J=A.getPageY(G),D=(J-H);if(I){D=(H-J)+parseInt(this.get("height"),10);}D=this._snapTick(D,this.get("yTicks"));D=this._checkHeight(D);return D;},_snapTick:function(G,F){if(!G||!F){return G;}var H=G;var D=G%F;if(D>0){if(D>(F/2)){H=G+(F-D);}else{H=G-D;}}return H;},init:function(H,F){this._locked=false;this._cache={xy:[],height:0,width:0,top:0,left:0,offsetHeight:0,offsetWidth:0,start:{height:0,width:0,top:0,left:0}};B.superclass.init.call(this,H,F);this.set("setSize",this.get("setSize"));if(F.height){this.set("height",parseInt(F.height,10));}else{var G=this.getStyle("height");if(G=="auto"){this.set("height",parseInt(this.get("element").offsetHeight,10));}}if(F.width){this.set("width",parseInt(F.width,10));}else{var D=this.getStyle("width");if(D=="auto"){this.set("width",parseInt(this.get("element").offsetWidth,10));}}var I=H;if(!C.isString(I)){I=E.generateId(I);}B._instances[I]=this;this._active=false;this._createWrap();this._createProxy();this._createHandles();},getProxyEl:function(){return this._proxy;},getWrapEl:function(){return this._wrap;},getStatusEl:function(){return this._status;},getActiveHandleEl:function(){return this._handles[this._currentHandle];},isActive:function(){return((this._active)?true:false);},initAttributes:function(D){B.superclass.initAttributes.call(this,D);this.setAttributeConfig("useShim",{value:((D.useShim===true)?true:false),validator:YAHOO.lang.isBoolean,method:function(F){for(var G in this._dds){if(C.hasOwnProperty(this._dds,G)){this._dds[G].useShim=F;}}if(this.dd){this.dd.useShim=F;}}});this.setAttributeConfig("setSize",{value:((D.setSize===false)?false:true),validator:YAHOO.lang.isBoolean});this.setAttributeConfig("wrap",{writeOnce:true,validator:YAHOO.lang.isBoolean,value:D.wrap||false});this.setAttributeConfig("handles",{writeOnce:true,value:D.handles||["r","b","br"],validator:function(F){if(C.isString(F)&&F.toLowerCase()=="all"){F=["t","b","r","l","bl","br","tl","tr"];}if(!C.isArray(F)){F=F.replace(/, /g,",");F=F.split(",");}this._configs.handles.value=F;}});this.setAttributeConfig("width",{value:D.width||parseInt(this.getStyle("width"),10),validator:YAHOO.lang.isNumber,method:function(F){F=parseInt(F,10);if(F>0){if(this.get("setSize")){this.setStyle("width",F+"px");}this._cache.width=F;this._configs.width.value=F;}}});this.setAttributeConfig("height",{value:D.height||parseInt(this.getStyle("height"),10),validator:YAHOO.lang.isNumber,method:function(F){F=parseInt(F,10);if(F>0){if(this.get("setSize")){this.setStyle("height",F+"px");}this._cache.height=F;this._configs.height.value=F;
10
+ }}});this.setAttributeConfig("minWidth",{value:D.minWidth||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minHeight",{value:D.minHeight||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxWidth",{value:D.maxWidth||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxHeight",{value:D.maxHeight||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minY",{value:D.minY||false});this.setAttributeConfig("minX",{value:D.minX||false});this.setAttributeConfig("maxY",{value:D.maxY||false});this.setAttributeConfig("maxX",{value:D.maxX||false});this.setAttributeConfig("animate",{value:D.animate||false,validator:function(G){var F=true;if(!YAHOO.util.Anim){F=false;}return F;}});this.setAttributeConfig("animateEasing",{value:D.animateEasing||function(){var F=false;if(YAHOO.util.Easing&&YAHOO.util.Easing.easeOut){F=YAHOO.util.Easing.easeOut;}return F;}()});this.setAttributeConfig("animateDuration",{value:D.animateDuration||0.5});this.setAttributeConfig("proxy",{value:D.proxy||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ratio",{value:D.ratio||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ghost",{value:D.ghost||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("draggable",{value:D.draggable||false,validator:YAHOO.lang.isBoolean,method:function(F){if(F&&this._wrap){this._setupDragDrop();}else{if(this.dd){E.removeClass(this._wrap,this.CSS_DRAG);this.dd.unreg();}}}});this.setAttributeConfig("hover",{value:D.hover||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("hiddenHandles",{value:D.hiddenHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("knobHandles",{value:D.knobHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("xTicks",{value:D.xTicks||false});this.setAttributeConfig("yTicks",{value:D.yTicks||false});this.setAttributeConfig("status",{value:D.status||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("autoRatio",{value:D.autoRatio||false,validator:YAHOO.lang.isBoolean});},destroy:function(){for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){A.purgeElement(this._handles[F]);this._handles[F].parentNode.removeChild(this._handles[F]);}}if(this._proxy){this._proxy.parentNode.removeChild(this._proxy);}if(this._status){this._status.parentNode.removeChild(this._status);}if(this.dd){this.dd.unreg();E.removeClass(this._wrap,this.CSS_DRAG);}if(this._wrap!=this.get("element")){this.setStyle("position","");this.setStyle("top","");this.setStyle("left","");this._wrap.parentNode.replaceChild(this.get("element"),this._wrap);}this.removeClass(this.CSS_RESIZE);delete YAHOO.util.Resize._instances[this.get("id")];for(var D in this){if(C.hasOwnProperty(this,D)){this[D]=null;delete this[D];}}},toString:function(){if(this.get){return"Resize (#"+this.get("id")+")";}return"Resize Utility";}});YAHOO.util.Resize=B;})();YAHOO.register("resize",YAHOO.util.Resize,{version:"2.8.1",build:"19"});
@@ -0,0 +1,1689 @@
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>Makes an element resizable</p>
9
+ * @namespace YAHOO.util
10
+ * @requires yahoo, dom, dragdrop, element, event
11
+ * @optional animation
12
+ * @module resize
13
+ */
14
+ (function() {
15
+ var D = YAHOO.util.Dom,
16
+ Event = YAHOO.util.Event,
17
+ Lang = YAHOO.lang;
18
+
19
+ /**
20
+ * @constructor
21
+ * @class Resize
22
+ * @extends YAHOO.util.Element
23
+ * @description <p>Makes an element resizable</p>
24
+ * @param {String/HTMLElement} el The element to make resizable.
25
+ * @param {Object} attrs Object liternal containing configuration parameters.
26
+ */
27
+
28
+ var Resize = function(el, config) {
29
+ var oConfig = {
30
+ element: el,
31
+ attributes: config || {}
32
+ };
33
+
34
+ Resize.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
35
+ };
36
+
37
+ /**
38
+ * @private
39
+ * @static
40
+ * @property _instances
41
+ * @description Internal hash table for all resize instances
42
+ * @type Object
43
+ */
44
+ Resize._instances = {};
45
+ /**
46
+ * @static
47
+ * @method getResizeById
48
+ * @description Get's a resize object by the HTML id of the element associated with the Resize object.
49
+ * @return {Object} The Resize Object
50
+ */
51
+ Resize.getResizeById = function(id) {
52
+ if (Resize._instances[id]) {
53
+ return Resize._instances[id];
54
+ }
55
+ return false;
56
+ };
57
+
58
+ YAHOO.extend(Resize, YAHOO.util.Element, {
59
+ /**
60
+ * @private
61
+ * @property CSS_RESIZE
62
+ * @description Base CSS class name
63
+ * @type String
64
+ */
65
+ CSS_RESIZE: 'yui-resize',
66
+ /**
67
+ * @private
68
+ * @property CSS_DRAG
69
+ * @description Class name added when dragging is enabled
70
+ * @type String
71
+ */
72
+ CSS_DRAG: 'yui-draggable',
73
+ /**
74
+ * @private
75
+ * @property CSS_HOVER
76
+ * @description Class name used for hover only handles
77
+ * @type String
78
+ */
79
+ CSS_HOVER: 'yui-resize-hover',
80
+ /**
81
+ * @private
82
+ * @property CSS_PROXY
83
+ * @description Class name given to the proxy element
84
+ * @type String
85
+ */
86
+ CSS_PROXY: 'yui-resize-proxy',
87
+ /**
88
+ * @private
89
+ * @property CSS_WRAP
90
+ * @description Class name given to the wrap element
91
+ * @type String
92
+ */
93
+ CSS_WRAP: 'yui-resize-wrap',
94
+ /**
95
+ * @private
96
+ * @property CSS_KNOB
97
+ * @description Class name used to make the knob style handles
98
+ * @type String
99
+ */
100
+ CSS_KNOB: 'yui-resize-knob',
101
+ /**
102
+ * @private
103
+ * @property CSS_HIDDEN
104
+ * @description Class name given to the wrap element to make all handles hidden
105
+ * @type String
106
+ */
107
+ CSS_HIDDEN: 'yui-resize-hidden',
108
+ /**
109
+ * @private
110
+ * @property CSS_HANDLE
111
+ * @description Class name given to all handles, used as a base for single handle names as well.. Handle "t" will get this.CSS_HANDLE + '-t' as well as this.CSS_HANDLE
112
+ * @type String
113
+ */
114
+ CSS_HANDLE: 'yui-resize-handle',
115
+ /**
116
+ * @private
117
+ * @property CSS_STATUS
118
+ * @description Class name given to the status element
119
+ * @type String
120
+ */
121
+ CSS_STATUS: 'yui-resize-status',
122
+ /**
123
+ * @private
124
+ * @property CSS_GHOST
125
+ * @description Class name given to the wrap element when the ghost property is active
126
+ * @type String
127
+ */
128
+ CSS_GHOST: 'yui-resize-ghost',
129
+ /**
130
+ * @private
131
+ * @property CSS_RESIZING
132
+ * @description Class name given to the wrap element when a resize action is taking place.
133
+ * @type String
134
+ */
135
+ CSS_RESIZING: 'yui-resize-resizing',
136
+ /**
137
+ * @private
138
+ * @property _resizeEvent
139
+ * @description The mouse event used to resize with
140
+ * @type Event
141
+ */
142
+ _resizeEvent: null,
143
+ /**
144
+ * @private
145
+ * @property dd
146
+ * @description The <a href="YAHOO.util.DragDrop.html">YAHOO.util.DragDrop</a> instance used if draggable is true
147
+ * @type Object
148
+ */
149
+ dd: null,
150
+ /**
151
+ * @private
152
+ * @property browser
153
+ * @description A copy of the YAHOO.env.ua property
154
+ * @type Object
155
+ */
156
+ browser: YAHOO.env.ua,
157
+ /**
158
+ * @private
159
+ * @property _locked
160
+ * @description A flag to show if the resize is locked
161
+ * @type Boolean
162
+ */
163
+ _locked: null,
164
+ /**
165
+ * @private
166
+ * @property _positioned
167
+ * @description A flag to show if the element is absolutely positioned
168
+ * @type Boolean
169
+ */
170
+ _positioned: null,
171
+ /**
172
+ * @private
173
+ * @property _dds
174
+ * @description An Object containing references to all of the <a href="YAHOO.util.DragDrop.html">YAHOO.util.DragDrop</a> instances used for the resize handles
175
+ * @type Object
176
+ */
177
+ _dds: null,
178
+ /**
179
+ * @private
180
+ * @property _wrap
181
+ * @description The HTML reference of the element wrapper
182
+ * @type HTMLElement
183
+ */
184
+ _wrap: null,
185
+ /**
186
+ * @private
187
+ * @property _proxy
188
+ * @description The HTML reference of the element proxy
189
+ * @type HTMLElement
190
+ */
191
+ _proxy: null,
192
+ /**
193
+ * @private
194
+ * @property _handles
195
+ * @description An object containing references to all of the resize handles.
196
+ * @type Object
197
+ */
198
+ _handles: null,
199
+ /**
200
+ * @private
201
+ * @property _currentHandle
202
+ * @description The string identifier of the currently active handle. e.g. 'r', 'br', 'tl'
203
+ * @type String
204
+ */
205
+ _currentHandle: null,
206
+ /**
207
+ * @private
208
+ * @property _currentDD
209
+ * @description A link to the currently active DD object
210
+ * @type Object
211
+ */
212
+ _currentDD: null,
213
+ /**
214
+ * @private
215
+ * @property _cache
216
+ * @description An lookup table containing key information for the element being resized. e.g. height, width, x position, y position, etc..
217
+ * @type Object
218
+ */
219
+ _cache: null,
220
+ /**
221
+ * @private
222
+ * @property _active
223
+ * @description Flag to show if the resize is active. Used for events.
224
+ * @type Boolean
225
+ */
226
+ _active: null,
227
+ /**
228
+ * @private
229
+ * @method _createProxy
230
+ * @description Creates the proxy element if the proxy config is true
231
+ */
232
+ _createProxy: function() {
233
+ if (this.get('proxy')) {
234
+ this._proxy = document.createElement('div');
235
+ this._proxy.className = this.CSS_PROXY;
236
+ this._proxy.style.height = this.get('element').clientHeight + 'px';
237
+ this._proxy.style.width = this.get('element').clientWidth + 'px';
238
+ this._wrap.parentNode.appendChild(this._proxy);
239
+ } else {
240
+ this.set('animate', false);
241
+ }
242
+ },
243
+ /**
244
+ * @private
245
+ * @method _createWrap
246
+ * @description Creates the wrap element if the wrap config is true. It will auto wrap the following element types: img, textarea, input, iframe, select
247
+ */
248
+ _createWrap: function() {
249
+ this._positioned = false;
250
+ //Force wrap for elements that can't have children
251
+ if (this.get('wrap') === false) {
252
+ switch (this.get('element').tagName.toLowerCase()) {
253
+ case 'img':
254
+ case 'textarea':
255
+ case 'input':
256
+ case 'iframe':
257
+ case 'select':
258
+ this.set('wrap', true);
259
+ break;
260
+ }
261
+ }
262
+ if (this.get('wrap') === true) {
263
+ this._wrap = document.createElement('div');
264
+ this._wrap.id = this.get('element').id + '_wrap';
265
+ this._wrap.className = this.CSS_WRAP;
266
+ if (this.get('element').tagName.toLowerCase() == 'textarea') {
267
+ D.addClass(this._wrap, 'yui-resize-textarea');
268
+ }
269
+ D.setStyle(this._wrap, 'width', this.get('width') + 'px');
270
+ D.setStyle(this._wrap, 'height', this.get('height') + 'px');
271
+ D.setStyle(this._wrap, 'z-index', this.getStyle('z-index'));
272
+ this.setStyle('z-index', 0);
273
+ var pos = D.getStyle(this.get('element'), 'position');
274
+ D.setStyle(this._wrap, 'position', ((pos == 'static') ? 'relative' : pos));
275
+ D.setStyle(this._wrap, 'top', D.getStyle(this.get('element'), 'top'));
276
+ D.setStyle(this._wrap, 'left', D.getStyle(this.get('element'), 'left'));
277
+ if (D.getStyle(this.get('element'), 'position') == 'absolute') {
278
+ this._positioned = true;
279
+ D.setStyle(this.get('element'), 'position', 'relative');
280
+ D.setStyle(this.get('element'), 'top', '0');
281
+ D.setStyle(this.get('element'), 'left', '0');
282
+ }
283
+ var par = this.get('element').parentNode;
284
+ par.replaceChild(this._wrap, this.get('element'));
285
+ this._wrap.appendChild(this.get('element'));
286
+ } else {
287
+ this._wrap = this.get('element');
288
+ if (D.getStyle(this._wrap, 'position') == 'absolute') {
289
+ this._positioned = true;
290
+ }
291
+ }
292
+ if (this.get('draggable')) {
293
+ this._setupDragDrop();
294
+ }
295
+ if (this.get('hover')) {
296
+ D.addClass(this._wrap, this.CSS_HOVER);
297
+ }
298
+ if (this.get('knobHandles')) {
299
+ D.addClass(this._wrap, this.CSS_KNOB);
300
+ }
301
+ if (this.get('hiddenHandles')) {
302
+ D.addClass(this._wrap, this.CSS_HIDDEN);
303
+ }
304
+ D.addClass(this._wrap, this.CSS_RESIZE);
305
+ },
306
+ /**
307
+ * @private
308
+ * @method _setupDragDrop
309
+ * @description Setup the <a href="YAHOO.util.DragDrop.html">YAHOO.util.DragDrop</a> instance on the element
310
+ */
311
+ _setupDragDrop: function() {
312
+ D.addClass(this._wrap, this.CSS_DRAG);
313
+ this.dd = new YAHOO.util.DD(this._wrap, this.get('id') + '-resize', { dragOnly: true, useShim: this.get('useShim') });
314
+ this.dd.on('dragEvent', function() {
315
+ this.fireEvent('dragEvent', arguments);
316
+ }, this, true);
317
+ },
318
+ /**
319
+ * @private
320
+ * @method _createHandles
321
+ * @description Creates the handles as specified in the config
322
+ */
323
+ _createHandles: function() {
324
+ this._handles = {};
325
+ this._dds = {};
326
+ var h = this.get('handles');
327
+ for (var i = 0; i < h.length; i++) {
328
+ this._handles[h[i]] = document.createElement('div');
329
+ this._handles[h[i]].id = D.generateId(this._handles[h[i]]);
330
+ this._handles[h[i]].className = this.CSS_HANDLE + ' ' + this.CSS_HANDLE + '-' + h[i];
331
+ var k = document.createElement('div');
332
+ k.className = this.CSS_HANDLE + '-inner-' + h[i];
333
+ this._handles[h[i]].appendChild(k);
334
+ this._wrap.appendChild(this._handles[h[i]]);
335
+ Event.on(this._handles[h[i]], 'mouseover', this._handleMouseOver, this, true);
336
+ Event.on(this._handles[h[i]], 'mouseout', this._handleMouseOut, this, true);
337
+ this._dds[h[i]] = new YAHOO.util.DragDrop(this._handles[h[i]], this.get('id') + '-handle-' + h, { useShim: this.get('useShim') });
338
+ this._dds[h[i]].setPadding(15, 15, 15, 15);
339
+ this._dds[h[i]].on('startDragEvent', this._handleStartDrag, this._dds[h[i]], this);
340
+ this._dds[h[i]].on('mouseDownEvent', this._handleMouseDown, this._dds[h[i]], this);
341
+ }
342
+ this._status = document.createElement('span');
343
+ this._status.className = this.CSS_STATUS;
344
+ document.body.insertBefore(this._status, document.body.firstChild);
345
+ },
346
+ /**
347
+ * @private
348
+ * @method _ieSelectFix
349
+ * @description The function we use as the onselectstart handler when we start a drag in Internet Explorer
350
+ */
351
+ _ieSelectFix: function() {
352
+ return false;
353
+ },
354
+ /**
355
+ * @private
356
+ * @property _ieSelectBack
357
+ * @description We will hold a copy of the current "onselectstart" method on this property, and reset it after we are done using it.
358
+ */
359
+ _ieSelectBack: null,
360
+ /**
361
+ * @private
362
+ * @method _setAutoRatio
363
+ * @param {Event} ev A mouse event.
364
+ * @description This method checks to see if the "autoRatio" config is set. If it is, we will check to see if the "Shift Key" is pressed. If so, we will set the config ratio to true.
365
+ */
366
+ _setAutoRatio: function(ev) {
367
+ if (this.get('autoRatio')) {
368
+ if (ev && ev.shiftKey) {
369
+ //Shift Pressed
370
+ this.set('ratio', true);
371
+ } else {
372
+ this.set('ratio', this._configs.ratio._initialConfig.value);
373
+ }
374
+ }
375
+ },
376
+ /**
377
+ * @private
378
+ * @method _handleMouseDown
379
+ * @param {Event} ev A mouse event.
380
+ * @description This method preps the autoRatio on MouseDown.
381
+ */
382
+ _handleMouseDown: function(ev) {
383
+ if (this._locked) {
384
+ return false;
385
+ }
386
+ if (D.getStyle(this._wrap, 'position') == 'absolute') {
387
+ this._positioned = true;
388
+ }
389
+ if (ev) {
390
+ this._setAutoRatio(ev);
391
+ }
392
+ if (this.browser.ie) {
393
+ this._ieSelectBack = document.body.onselectstart;
394
+ document.body.onselectstart = this._ieSelectFix;
395
+ }
396
+ },
397
+ /**
398
+ * @private
399
+ * @method _handleMouseOver
400
+ * @param {Event} ev A mouse event.
401
+ * @description Adds CSS class names to the handles
402
+ */
403
+ _handleMouseOver: function(ev) {
404
+ if (this._locked) {
405
+ return false;
406
+ }
407
+ D.removeClass(this._wrap, this.CSS_RESIZE);
408
+
409
+ if (this.get('hover')) {
410
+ D.removeClass(this._wrap, this.CSS_HOVER);
411
+ }
412
+ var tar = Event.getTarget(ev);
413
+ if (!D.hasClass(tar, this.CSS_HANDLE)) {
414
+ tar = tar.parentNode;
415
+ }
416
+ if (D.hasClass(tar, this.CSS_HANDLE) && !this._active) {
417
+ D.addClass(tar, this.CSS_HANDLE + '-active');
418
+ for (var i in this._handles) {
419
+ if (Lang.hasOwnProperty(this._handles, i)) {
420
+ if (this._handles[i] == tar) {
421
+ D.addClass(tar, this.CSS_HANDLE + '-' + i + '-active');
422
+ break;
423
+ }
424
+ }
425
+ }
426
+ }
427
+
428
+ D.addClass(this._wrap, this.CSS_RESIZE);
429
+ },
430
+ /**
431
+ * @private
432
+ * @method _handleMouseOut
433
+ * @param {Event} ev A mouse event.
434
+ * @description Removes CSS class names to the handles
435
+ */
436
+ _handleMouseOut: function(ev) {
437
+ D.removeClass(this._wrap, this.CSS_RESIZE);
438
+ if (this.get('hover') && !this._active) {
439
+ D.addClass(this._wrap, this.CSS_HOVER);
440
+ }
441
+ var tar = Event.getTarget(ev);
442
+ if (!D.hasClass(tar, this.CSS_HANDLE)) {
443
+ tar = tar.parentNode;
444
+ }
445
+ if (D.hasClass(tar, this.CSS_HANDLE) && !this._active) {
446
+ D.removeClass(tar, this.CSS_HANDLE + '-active');
447
+ for (var i in this._handles) {
448
+ if (Lang.hasOwnProperty(this._handles, i)) {
449
+ if (this._handles[i] == tar) {
450
+ D.removeClass(tar, this.CSS_HANDLE + '-' + i + '-active');
451
+ break;
452
+ }
453
+ }
454
+ }
455
+ }
456
+ D.addClass(this._wrap, this.CSS_RESIZE);
457
+ },
458
+ /**
459
+ * @private
460
+ * @method _handleStartDrag
461
+ * @param {Object} args The args passed from the CustomEvent.
462
+ * @param {Object} dd The <a href="YAHOO.util.DragDrop.html">YAHOO.util.DragDrop</a> object we are working with.
463
+ * @description Resizes the proxy, sets up the <a href="YAHOO.util.DragDrop.html">YAHOO.util.DragDrop</a> handlers, updates the status div and preps the cache
464
+ */
465
+ _handleStartDrag: function(args, dd) {
466
+ var tar = dd.getDragEl();
467
+ if (D.hasClass(tar, this.CSS_HANDLE)) {
468
+ if (D.getStyle(this._wrap, 'position') == 'absolute') {
469
+ this._positioned = true;
470
+ }
471
+ this._active = true;
472
+ this._currentDD = dd;
473
+ if (this._proxy) {
474
+ this._proxy.style.visibility = 'visible';
475
+ this._proxy.style.zIndex = '1000';
476
+ this._proxy.style.height = this.get('element').clientHeight + 'px';
477
+ this._proxy.style.width = this.get('element').clientWidth + 'px';
478
+ }
479
+
480
+ for (var i in this._handles) {
481
+ if (Lang.hasOwnProperty(this._handles, i)) {
482
+ if (this._handles[i] == tar) {
483
+ this._currentHandle = i;
484
+ var handle = '_handle_for_' + i;
485
+ D.addClass(tar, this.CSS_HANDLE + '-' + i + '-active');
486
+ dd.on('dragEvent', this[handle], this, true);
487
+ dd.on('mouseUpEvent', this._handleMouseUp, this, true);
488
+ break;
489
+ }
490
+ }
491
+ }
492
+
493
+
494
+ D.addClass(tar, this.CSS_HANDLE + '-active');
495
+
496
+ if (this.get('proxy')) {
497
+ var xy = D.getXY(this.get('element'));
498
+ D.setXY(this._proxy, xy);
499
+ if (this.get('ghost')) {
500
+ this.addClass(this.CSS_GHOST);
501
+ }
502
+ }
503
+ D.addClass(this._wrap, this.CSS_RESIZING);
504
+ this._setCache();
505
+ this._updateStatus(this._cache.height, this._cache.width, this._cache.top, this._cache.left);
506
+ this.fireEvent('startResize', { type: 'startresize', target: this});
507
+ }
508
+ },
509
+ /**
510
+ * @private
511
+ * @method _setCache
512
+ * @description Sets up the this._cache hash table.
513
+ */
514
+ _setCache: function() {
515
+ this._cache.xy = D.getXY(this._wrap);
516
+ D.setXY(this._wrap, this._cache.xy);
517
+ this._cache.height = this.get('clientHeight');
518
+ this._cache.width = this.get('clientWidth');
519
+ this._cache.start.height = this._cache.height;
520
+ this._cache.start.width = this._cache.width;
521
+ this._cache.start.top = this._cache.xy[1];
522
+ this._cache.start.left = this._cache.xy[0];
523
+ this._cache.top = this._cache.xy[1];
524
+ this._cache.left = this._cache.xy[0];
525
+ this.set('height', this._cache.height, true);
526
+ this.set('width', this._cache.width, true);
527
+ },
528
+ /**
529
+ * @private
530
+ * @method _handleMouseUp
531
+ * @param {Event} ev A mouse event.
532
+ * @description Cleans up listeners, hides proxy element and removes class names.
533
+ */
534
+ _handleMouseUp: function(ev) {
535
+ this._active = false;
536
+
537
+ var handle = '_handle_for_' + this._currentHandle;
538
+ this._currentDD.unsubscribe('dragEvent', this[handle], this, true);
539
+ this._currentDD.unsubscribe('mouseUpEvent', this._handleMouseUp, this, true);
540
+
541
+ if (this._proxy) {
542
+ this._proxy.style.visibility = 'hidden';
543
+ this._proxy.style.zIndex = '-1';
544
+ if (this.get('setSize')) {
545
+ this.resize(ev, this._cache.height, this._cache.width, this._cache.top, this._cache.left, true);
546
+ } else {
547
+ this.fireEvent('resize', { ev: 'resize', target: this, height: this._cache.height, width: this._cache.width, top: this._cache.top, left: this._cache.left });
548
+ }
549
+
550
+ if (this.get('ghost')) {
551
+ this.removeClass(this.CSS_GHOST);
552
+ }
553
+ }
554
+
555
+ if (this.get('hover')) {
556
+ D.addClass(this._wrap, this.CSS_HOVER);
557
+ }
558
+ if (this._status) {
559
+ D.setStyle(this._status, 'display', 'none');
560
+ }
561
+ if (this.browser.ie) {
562
+ document.body.onselectstart = this._ieSelectBack;
563
+ }
564
+
565
+ if (this.browser.ie) {
566
+ D.removeClass(this._wrap, this.CSS_RESIZE);
567
+ }
568
+
569
+ for (var i in this._handles) {
570
+ if (Lang.hasOwnProperty(this._handles, i)) {
571
+ D.removeClass(this._handles[i], this.CSS_HANDLE + '-active');
572
+ }
573
+ }
574
+ if (this.get('hover') && !this._active) {
575
+ D.addClass(this._wrap, this.CSS_HOVER);
576
+ }
577
+ D.removeClass(this._wrap, this.CSS_RESIZING);
578
+
579
+ D.removeClass(this._handles[this._currentHandle], this.CSS_HANDLE + '-' + this._currentHandle + '-active');
580
+ D.removeClass(this._handles[this._currentHandle], this.CSS_HANDLE + '-active');
581
+
582
+ if (this.browser.ie) {
583
+ D.addClass(this._wrap, this.CSS_RESIZE);
584
+ }
585
+
586
+ this._resizeEvent = null;
587
+ this._currentHandle = null;
588
+
589
+ if (!this.get('animate')) {
590
+ this.set('height', this._cache.height, true);
591
+ this.set('width', this._cache.width, true);
592
+ }
593
+
594
+ this.fireEvent('endResize', { ev: 'endResize', target: this, height: this._cache.height, width: this._cache.width, top: this._cache.top, left: this._cache.left });
595
+ },
596
+ /**
597
+ * @private
598
+ * @method _setRatio
599
+ * @param {Number} h The height offset.
600
+ * @param {Number} w The with offset.
601
+ * @param {Number} t The top offset.
602
+ * @param {Number} l The left offset.
603
+ * @description Using the Height, Width, Top & Left, it recalcuates them based on the original element size.
604
+ * @return {Array} The new Height, Width, Top & Left settings
605
+ */
606
+ _setRatio: function(h, w, t, l) {
607
+ var oh = h, ow = w;
608
+ if (this.get('ratio')) {
609
+ var orgH = this._cache.height,
610
+ orgW = this._cache.width,
611
+ nh = parseInt(this.get('height'), 10),
612
+ nw = parseInt(this.get('width'), 10),
613
+ maxH = this.get('maxHeight'),
614
+ minH = this.get('minHeight'),
615
+ maxW = this.get('maxWidth'),
616
+ minW = this.get('minWidth');
617
+
618
+ switch (this._currentHandle) {
619
+ case 'l':
620
+ h = nh * (w / nw);
621
+ h = Math.min(Math.max(minH, h), maxH);
622
+ w = nw * (h / nh);
623
+ t = (this._cache.start.top - (-((nh - h) / 2)));
624
+ l = (this._cache.start.left - (-((nw - w))));
625
+ break;
626
+ case 'r':
627
+ h = nh * (w / nw);
628
+ h = Math.min(Math.max(minH, h), maxH);
629
+ w = nw * (h / nh);
630
+ t = (this._cache.start.top - (-((nh - h) / 2)));
631
+ break;
632
+ case 't':
633
+ w = nw * (h / nh);
634
+ h = nh * (w / nw);
635
+ l = (this._cache.start.left - (-((nw - w) / 2)));
636
+ t = (this._cache.start.top - (-((nh - h))));
637
+ break;
638
+ case 'b':
639
+ w = nw * (h / nh);
640
+ h = nh * (w / nw);
641
+ l = (this._cache.start.left - (-((nw - w) / 2)));
642
+ break;
643
+ case 'bl':
644
+ h = nh * (w / nw);
645
+ w = nw * (h / nh);
646
+ l = (this._cache.start.left - (-((nw - w))));
647
+ break;
648
+ case 'br':
649
+ h = nh * (w / nw);
650
+ w = nw * (h / nh);
651
+ break;
652
+ case 'tl':
653
+ h = nh * (w / nw);
654
+ w = nw * (h / nh);
655
+ l = (this._cache.start.left - (-((nw - w))));
656
+ t = (this._cache.start.top - (-((nh - h))));
657
+ break;
658
+ case 'tr':
659
+ h = nh * (w / nw);
660
+ w = nw * (h / nh);
661
+ l = (this._cache.start.left);
662
+ t = (this._cache.start.top - (-((nh - h))));
663
+ break;
664
+ }
665
+ oh = this._checkHeight(h);
666
+ ow = this._checkWidth(w);
667
+ if ((oh != h) || (ow != w)) {
668
+ t = 0;
669
+ l = 0;
670
+ if (oh != h) {
671
+ ow = this._cache.width;
672
+ }
673
+ if (ow != w) {
674
+ oh = this._cache.height;
675
+ }
676
+ }
677
+ }
678
+ return [oh, ow, t, l];
679
+ },
680
+ /**
681
+ * @private
682
+ * @method _updateStatus
683
+ * @param {Number} h The new height setting.
684
+ * @param {Number} w The new width setting.
685
+ * @param {Number} t The new top setting.
686
+ * @param {Number} l The new left setting.
687
+ * @description Using the Height, Width, Top & Left, it updates the status element with the elements sizes.
688
+ */
689
+ _updateStatus: function(h, w, t, l) {
690
+ if (this._resizeEvent && (!Lang.isString(this._resizeEvent))) {
691
+ h = ((h === 0) ? this._cache.start.height : h);
692
+ w = ((w === 0) ? this._cache.start.width : w);
693
+ var h1 = parseInt(this.get('height'), 10),
694
+ w1 = parseInt(this.get('width'), 10);
695
+
696
+ if (isNaN(h1)) {
697
+ h1 = parseInt(h, 10);
698
+ }
699
+ if (isNaN(w1)) {
700
+ w1 = parseInt(w, 10);
701
+ }
702
+ var diffH = (parseInt(h, 10) - h1);
703
+ var diffW = (parseInt(w, 10) - w1);
704
+ this._cache.offsetHeight = diffH;
705
+ this._cache.offsetWidth = diffW;
706
+ if (this.get('status')) {
707
+ D.setStyle(this._status, 'display', 'inline');
708
+ //This will cause IE8 to crash if the status box is hidden..
709
+ this._status.innerHTML = '<strong>' + parseInt(h, 10) + ' x ' + parseInt(w, 10) + '</strong><em>' + ((diffH > 0) ? '+' : '') + diffH + ' x ' + ((diffW > 0) ? '+' : '') + diffW + '</em>';
710
+ D.setXY(this._status, [Event.getPageX(this._resizeEvent) + 12, Event.getPageY(this._resizeEvent) + 12]);
711
+ }
712
+ }
713
+ },
714
+ /**
715
+ * @method lock
716
+ * @description Lock the resize so it can't be resized
717
+ * @param {Boolean} dd If the draggable config is set, lock it too
718
+ * @return {<a href="YAHOO.util.Resize.html">YAHOO.util.Resize</a>} The Resize instance
719
+ */
720
+ lock: function(dd) {
721
+ this._locked = true;
722
+ if (dd && this.dd) {
723
+ D.removeClass(this._wrap, 'yui-draggable');
724
+ this.dd.lock();
725
+ }
726
+ return this;
727
+ },
728
+ /**
729
+ * @method unlock
730
+ * @description Unlock the resize so it can be resized
731
+ * @param {Boolean} dd If the draggable config is set, unlock it too
732
+ * @return {<a href="YAHOO.util.Resize.html">YAHOO.util.Resize</a>} The Resize instance
733
+ */
734
+ unlock: function(dd) {
735
+ this._locked = false;
736
+ if (dd && this.dd) {
737
+ D.addClass(this._wrap, 'yui-draggable');
738
+ this.dd.unlock();
739
+ }
740
+ return this;
741
+ },
742
+ /**
743
+ * @method isLocked
744
+ * @description Check the locked status of the resize instance
745
+ * @return {Boolean}
746
+ */
747
+ isLocked: function() {
748
+ return this._locked;
749
+ },
750
+ /**
751
+ * @method reset
752
+ * @description Resets the element to is start state.
753
+ * @return {<a href="YAHOO.util.Resize.html">YAHOO.util.Resize</a>} The Resize instance
754
+ */
755
+ reset: function() {
756
+ this.resize(null, this._cache.start.height, this._cache.start.width, this._cache.start.top, this._cache.start.left, true);
757
+ return this;
758
+ },
759
+ /**
760
+ * @private
761
+ * @method resize
762
+ * @param {Event} ev The mouse event.
763
+ * @param {Number} h The new height setting.
764
+ * @param {Number} w The new width setting.
765
+ * @param {Number} t The new top setting.
766
+ * @param {Number} l The new left setting.
767
+ * @param {Boolean} force Resize the element (used for proxy resize).
768
+ * @param {Boolean} silent Don't fire the beforeResize Event.
769
+ * @description Resizes the element, wrapper or proxy based on the data from the handlers.
770
+ * @return {<a href="YAHOO.util.Resize.html">YAHOO.util.Resize</a>} The Resize instance
771
+ */
772
+ resize: function(ev, h, w, t, l, force, silent) {
773
+ if (this._locked) {
774
+ return false;
775
+ }
776
+ this._resizeEvent = ev;
777
+ var el = this._wrap, anim = this.get('animate'), set = true;
778
+ if (this._proxy && !force) {
779
+ el = this._proxy;
780
+ anim = false;
781
+ }
782
+ this._setAutoRatio(ev);
783
+ if (this._positioned) {
784
+ if (this._proxy) {
785
+ t = this._cache.top - t;
786
+ l = this._cache.left - l;
787
+ }
788
+ }
789
+
790
+
791
+ var ratio = this._setRatio(h, w, t, l);
792
+ h = parseInt(ratio[0], 10);
793
+ w = parseInt(ratio[1], 10);
794
+ t = parseInt(ratio[2], 10);
795
+ l = parseInt(ratio[3], 10);
796
+
797
+ if (t == 0) {
798
+ //No Offset, get from cache
799
+ t = D.getY(el);
800
+ }
801
+ if (l == 0) {
802
+ //No Offset, get from cache
803
+ l = D.getX(el);
804
+ }
805
+
806
+
807
+
808
+ if (this._positioned) {
809
+ if (this._proxy && force) {
810
+ if (!anim) {
811
+ el.style.top = this._proxy.style.top;
812
+ el.style.left = this._proxy.style.left;
813
+ } else {
814
+ t = this._proxy.style.top;
815
+ l = this._proxy.style.left;
816
+ }
817
+ } else {
818
+ if (!this.get('ratio') && !this._proxy) {
819
+ t = this._cache.top + -(t);
820
+ l = this._cache.left + -(l);
821
+ }
822
+ if (t) {
823
+ if (this.get('minY')) {
824
+ if (t < this.get('minY')) {
825
+ t = this.get('minY');
826
+ }
827
+ }
828
+ if (this.get('maxY')) {
829
+ if (t > this.get('maxY')) {
830
+ t = this.get('maxY');
831
+ }
832
+ }
833
+ }
834
+ if (l) {
835
+ if (this.get('minX')) {
836
+ if (l < this.get('minX')) {
837
+ l = this.get('minX');
838
+ }
839
+ }
840
+ if (this.get('maxX')) {
841
+ if ((l + w) > this.get('maxX')) {
842
+ l = (this.get('maxX') - w);
843
+ }
844
+ }
845
+ }
846
+ }
847
+ }
848
+ if (!silent) {
849
+ var beforeReturn = this.fireEvent('beforeResize', { ev: 'beforeResize', target: this, height: h, width: w, top: t, left: l });
850
+ if (beforeReturn === false) {
851
+ return false;
852
+ }
853
+ }
854
+
855
+ this._updateStatus(h, w, t, l);
856
+
857
+
858
+ if (this._positioned) {
859
+ if (this._proxy && force) {
860
+ //Do nothing
861
+ } else {
862
+ if (t) {
863
+ D.setY(el, t);
864
+ this._cache.top = t;
865
+ }
866
+ if (l) {
867
+ D.setX(el, l);
868
+ this._cache.left = l;
869
+ }
870
+ }
871
+ }
872
+ if (h) {
873
+ if (!anim) {
874
+ set = true;
875
+ if (this._proxy && force) {
876
+ if (!this.get('setSize')) {
877
+ set = false;
878
+ }
879
+ }
880
+ if (set) {
881
+ el.style.height = h + 'px';
882
+ }
883
+ if ((this._proxy && force) || !this._proxy) {
884
+ if (this._wrap != this.get('element')) {
885
+ this.get('element').style.height = h + 'px';
886
+ }
887
+ }
888
+ }
889
+ this._cache.height = h;
890
+ }
891
+ if (w) {
892
+ this._cache.width = w;
893
+ if (!anim) {
894
+ set = true;
895
+ if (this._proxy && force) {
896
+ if (!this.get('setSize')) {
897
+ set = false;
898
+ }
899
+ }
900
+ if (set) {
901
+ el.style.width = w + 'px';
902
+ }
903
+ if ((this._proxy && force) || !this._proxy) {
904
+ if (this._wrap != this.get('element')) {
905
+ this.get('element').style.width = w + 'px';
906
+ }
907
+ }
908
+ }
909
+ }
910
+ if (anim) {
911
+ if (YAHOO.util.Anim) {
912
+ var _anim = new YAHOO.util.Anim(el, {
913
+ height: {
914
+ to: this._cache.height
915
+ },
916
+ width: {
917
+ to: this._cache.width
918
+ }
919
+ }, this.get('animateDuration'), this.get('animateEasing'));
920
+ if (this._positioned) {
921
+ if (t) {
922
+ _anim.attributes.top = {
923
+ to: parseInt(t, 10)
924
+ };
925
+ }
926
+ if (l) {
927
+ _anim.attributes.left = {
928
+ to: parseInt(l, 10)
929
+ };
930
+ }
931
+ }
932
+
933
+ if (this._wrap != this.get('element')) {
934
+ _anim.onTween.subscribe(function() {
935
+ this.get('element').style.height = el.style.height;
936
+ this.get('element').style.width = el.style.width;
937
+ }, this, true);
938
+ }
939
+
940
+ _anim.onComplete.subscribe(function() {
941
+ this.set('height', h);
942
+ this.set('width', w);
943
+ this.fireEvent('resize', { ev: 'resize', target: this, height: h, width: w, top: t, left: l });
944
+ }, this, true);
945
+ _anim.animate();
946
+
947
+ }
948
+ } else {
949
+ if (this._proxy && !force) {
950
+ this.fireEvent('proxyResize', { ev: 'proxyresize', target: this, height: h, width: w, top: t, left: l });
951
+ } else {
952
+ this.fireEvent('resize', { ev: 'resize', target: this, height: h, width: w, top: t, left: l });
953
+ }
954
+ }
955
+ return this;
956
+ },
957
+ /**
958
+ * @private
959
+ * @method _handle_for_br
960
+ * @param {Object} args The arguments from the CustomEvent.
961
+ * @description Handles the sizes for the Bottom Right handle.
962
+ */
963
+ _handle_for_br: function(args) {
964
+ var newW = this._setWidth(args.e);
965
+ var newH = this._setHeight(args.e);
966
+ this.resize(args.e, newH, newW, 0, 0);
967
+ },
968
+ /**
969
+ * @private
970
+ * @method _handle_for_bl
971
+ * @param {Object} args The arguments from the CustomEvent.
972
+ * @description Handles the sizes for the Bottom Left handle.
973
+ */
974
+ _handle_for_bl: function(args) {
975
+ var newW = this._setWidth(args.e, true);
976
+ var newH = this._setHeight(args.e);
977
+ var l = (newW - this._cache.width);
978
+ this.resize(args.e, newH, newW, 0, l);
979
+ },
980
+ /**
981
+ * @private
982
+ * @method _handle_for_tl
983
+ * @param {Object} args The arguments from the CustomEvent.
984
+ * @description Handles the sizes for the Top Left handle.
985
+ */
986
+ _handle_for_tl: function(args) {
987
+ var newW = this._setWidth(args.e, true);
988
+ var newH = this._setHeight(args.e, true);
989
+ var t = (newH - this._cache.height);
990
+ var l = (newW - this._cache.width);
991
+ this.resize(args.e, newH, newW, t, l);
992
+ },
993
+ /**
994
+ * @private
995
+ * @method _handle_for_tr
996
+ * @param {Object} args The arguments from the CustomEvent.
997
+ * @description Handles the sizes for the Top Right handle.
998
+ */
999
+ _handle_for_tr: function(args) {
1000
+ var newW = this._setWidth(args.e);
1001
+ var newH = this._setHeight(args.e, true);
1002
+ var t = (newH - this._cache.height);
1003
+ this.resize(args.e, newH, newW, t, 0);
1004
+ },
1005
+ /**
1006
+ * @private
1007
+ * @method _handle_for_r
1008
+ * @param {Object} args The arguments from the CustomEvent.
1009
+ * @description Handles the sizes for the Right handle.
1010
+ */
1011
+ _handle_for_r: function(args) {
1012
+ this._dds.r.setYConstraint(0,0);
1013
+ var newW = this._setWidth(args.e);
1014
+ this.resize(args.e, 0, newW, 0, 0);
1015
+ },
1016
+ /**
1017
+ * @private
1018
+ * @method _handle_for_l
1019
+ * @param {Object} args The arguments from the CustomEvent.
1020
+ * @description Handles the sizes for the Left handle.
1021
+ */
1022
+ _handle_for_l: function(args) {
1023
+ this._dds.l.setYConstraint(0,0);
1024
+ var newW = this._setWidth(args.e, true);
1025
+ var l = (newW - this._cache.width);
1026
+ this.resize(args.e, 0, newW, 0, l);
1027
+ },
1028
+ /**
1029
+ * @private
1030
+ * @method _handle_for_b
1031
+ * @param {Object} args The arguments from the CustomEvent.
1032
+ * @description Handles the sizes for the Bottom handle.
1033
+ */
1034
+ _handle_for_b: function(args) {
1035
+ this._dds.b.setXConstraint(0,0);
1036
+ var newH = this._setHeight(args.e);
1037
+ this.resize(args.e, newH, 0, 0, 0);
1038
+ },
1039
+ /**
1040
+ * @private
1041
+ * @method _handle_for_t
1042
+ * @param {Object} args The arguments from the CustomEvent.
1043
+ * @description Handles the sizes for the Top handle.
1044
+ */
1045
+ _handle_for_t: function(args) {
1046
+ this._dds.t.setXConstraint(0,0);
1047
+ var newH = this._setHeight(args.e, true);
1048
+ var t = (newH - this._cache.height);
1049
+ this.resize(args.e, newH, 0, t, 0);
1050
+ },
1051
+ /**
1052
+ * @private
1053
+ * @method _setWidth
1054
+ * @param {Event} ev The mouse event.
1055
+ * @param {Boolean} flip Argument to determine the direction of the movement.
1056
+ * @description Calculates the width based on the mouse event.
1057
+ * @return {Number} The new value
1058
+ */
1059
+ _setWidth: function(ev, flip) {
1060
+ var xy = this._cache.xy[0],
1061
+ w = this._cache.width,
1062
+ x = Event.getPageX(ev),
1063
+ nw = (x - xy);
1064
+
1065
+ if (flip) {
1066
+ nw = (xy - x) + parseInt(this.get('width'), 10);
1067
+ }
1068
+
1069
+ nw = this._snapTick(nw, this.get('xTicks'));
1070
+ nw = this._checkWidth(nw);
1071
+ return nw;
1072
+ },
1073
+ /**
1074
+ * @private
1075
+ * @method _checkWidth
1076
+ * @param {Number} w The width to check.
1077
+ * @description Checks the value passed against the maxWidth and minWidth.
1078
+ * @return {Number} the new value
1079
+ */
1080
+ _checkWidth: function(w) {
1081
+ if (this.get('minWidth')) {
1082
+ if (w <= this.get('minWidth')) {
1083
+ w = this.get('minWidth');
1084
+ }
1085
+ }
1086
+ if (this.get('maxWidth')) {
1087
+ if (w >= this.get('maxWidth')) {
1088
+ w = this.get('maxWidth');
1089
+ }
1090
+ }
1091
+ return w;
1092
+ },
1093
+ /**
1094
+ * @private
1095
+ * @method _checkHeight
1096
+ * @param {Number} h The height to check.
1097
+ * @description Checks the value passed against the maxHeight and minHeight.
1098
+ * @return {Number} The new value
1099
+ */
1100
+ _checkHeight: function(h) {
1101
+ if (this.get('minHeight')) {
1102
+ if (h <= this.get('minHeight')) {
1103
+ h = this.get('minHeight');
1104
+ }
1105
+ }
1106
+ if (this.get('maxHeight')) {
1107
+ if (h >= this.get('maxHeight')) {
1108
+ h = this.get('maxHeight');
1109
+ }
1110
+ }
1111
+ return h;
1112
+ },
1113
+ /**
1114
+ * @private
1115
+ * @method _setHeight
1116
+ * @param {Event} ev The mouse event.
1117
+ * @param {Boolean} flip Argument to determine the direction of the movement.
1118
+ * @description Calculated the height based on the mouse event.
1119
+ * @return {Number} The new value
1120
+ */
1121
+ _setHeight: function(ev, flip) {
1122
+ var xy = this._cache.xy[1],
1123
+ h = this._cache.height,
1124
+ y = Event.getPageY(ev),
1125
+ nh = (y - xy);
1126
+
1127
+ if (flip) {
1128
+ nh = (xy - y) + parseInt(this.get('height'), 10);
1129
+ }
1130
+ nh = this._snapTick(nh, this.get('yTicks'));
1131
+ nh = this._checkHeight(nh);
1132
+
1133
+ return nh;
1134
+ },
1135
+ /**
1136
+ * @private
1137
+ * @method _snapTick
1138
+ * @param {Number} size The size to tick against.
1139
+ * @param {Number} pix The tick pixels.
1140
+ * @description Adjusts the number based on the ticks used.
1141
+ * @return {Number} the new snapped position
1142
+ */
1143
+ _snapTick: function(size, pix) {
1144
+ if (!size || !pix) {
1145
+ return size;
1146
+ }
1147
+ var _s = size;
1148
+ var _x = size % pix;
1149
+ if (_x > 0) {
1150
+ if (_x > (pix / 2)) {
1151
+ _s = size + (pix - _x);
1152
+ } else {
1153
+ _s = size - _x;
1154
+ }
1155
+ }
1156
+ return _s;
1157
+ },
1158
+ /**
1159
+ * @private
1160
+ * @method init
1161
+ * @description The Resize class's initialization method
1162
+ */
1163
+ init: function(p_oElement, p_oAttributes) {
1164
+ this._locked = false;
1165
+ this._cache = {
1166
+ xy: [],
1167
+ height: 0,
1168
+ width: 0,
1169
+ top: 0,
1170
+ left: 0,
1171
+ offsetHeight: 0,
1172
+ offsetWidth: 0,
1173
+ start: {
1174
+ height: 0,
1175
+ width: 0,
1176
+ top: 0,
1177
+ left: 0
1178
+ }
1179
+ };
1180
+
1181
+ Resize.superclass.init.call(this, p_oElement, p_oAttributes);
1182
+
1183
+ this.set('setSize', this.get('setSize'));
1184
+
1185
+ if (p_oAttributes.height) {
1186
+ this.set('height', parseInt(p_oAttributes.height, 10));
1187
+ } else {
1188
+ var h = this.getStyle('height');
1189
+ if (h == 'auto') {
1190
+ this.set('height', parseInt(this.get('element').offsetHeight, 10));
1191
+ }
1192
+ }
1193
+ if (p_oAttributes.width) {
1194
+ this.set('width', parseInt(p_oAttributes.width, 10));
1195
+ } else {
1196
+ var w = this.getStyle('width');
1197
+ if (w == 'auto') {
1198
+ this.set('width', parseInt(this.get('element').offsetWidth, 10));
1199
+ }
1200
+ }
1201
+
1202
+ var id = p_oElement;
1203
+ if (!Lang.isString(id)) {
1204
+ id = D.generateId(id);
1205
+ }
1206
+ Resize._instances[id] = this;
1207
+
1208
+ this._active = false;
1209
+
1210
+ this._createWrap();
1211
+ this._createProxy();
1212
+ this._createHandles();
1213
+
1214
+ },
1215
+ /**
1216
+ * @method getProxyEl
1217
+ * @description Get the HTML reference for the proxy, returns null if no proxy.
1218
+ * @return {HTMLElement} The proxy element
1219
+ */
1220
+ getProxyEl: function() {
1221
+ return this._proxy;
1222
+ },
1223
+ /**
1224
+ * @method getWrapEl
1225
+ * @description Get the HTML reference for the wrap element, returns the current element if not wrapped.
1226
+ * @return {HTMLElement} The wrap element
1227
+ */
1228
+ getWrapEl: function() {
1229
+ return this._wrap;
1230
+ },
1231
+ /**
1232
+ * @method getStatusEl
1233
+ * @description Get the HTML reference for the status element.
1234
+ * @return {HTMLElement} The status element
1235
+ */
1236
+ getStatusEl: function() {
1237
+ return this._status;
1238
+ },
1239
+ /**
1240
+ * @method getActiveHandleEl
1241
+ * @description Get the HTML reference for the currently active resize handle.
1242
+ * @return {HTMLElement} The handle element that is active
1243
+ */
1244
+ getActiveHandleEl: function() {
1245
+ return this._handles[this._currentHandle];
1246
+ },
1247
+ /**
1248
+ * @method isActive
1249
+ * @description Returns true or false if a resize operation is currently active on the element.
1250
+ * @return {Boolean}
1251
+ */
1252
+ isActive: function() {
1253
+ return ((this._active) ? true : false);
1254
+ },
1255
+ /**
1256
+ * @private
1257
+ * @method initAttributes
1258
+ * @description Initializes all of the configuration attributes used to create a resizable element.
1259
+ * @param {Object} attr Object literal specifying a set of
1260
+ * configuration attributes used to create the utility.
1261
+ */
1262
+ initAttributes: function(attr) {
1263
+ Resize.superclass.initAttributes.call(this, attr);
1264
+
1265
+ /**
1266
+ * @attribute useShim
1267
+ * @description This setting will be passed to the DragDrop instances on the resize handles and for the draggable property.
1268
+ * This property should be used if you want the resize handles to work over iframe and other elements.
1269
+ * @type Boolean
1270
+ */
1271
+ this.setAttributeConfig('useShim', {
1272
+ value: ((attr.useShim === true) ? true : false),
1273
+ validator: YAHOO.lang.isBoolean,
1274
+ method: function(u) {
1275
+ for (var i in this._dds) {
1276
+ if (Lang.hasOwnProperty(this._dds, i)) {
1277
+ this._dds[i].useShim = u;
1278
+ }
1279
+ }
1280
+ if (this.dd) {
1281
+ this.dd.useShim = u;
1282
+ }
1283
+ }
1284
+ });
1285
+ /**
1286
+ * @attribute setSize
1287
+ * @description Set the size of the resized element, if set to false the element will not be auto resized,
1288
+ * the resize event will contain the dimensions so the end user can resize it on their own.
1289
+ * This setting will only work with proxy set to true and animate set to false.
1290
+ * @type Boolean
1291
+ */
1292
+ this.setAttributeConfig('setSize', {
1293
+ value: ((attr.setSize === false) ? false : true),
1294
+ validator: YAHOO.lang.isBoolean
1295
+ });
1296
+
1297
+ /**
1298
+ * @attribute wrap
1299
+ * @description Should we wrap the element
1300
+ * @type Boolean
1301
+ */
1302
+ this.setAttributeConfig('wrap', {
1303
+ writeOnce: true,
1304
+ validator: YAHOO.lang.isBoolean,
1305
+ value: attr.wrap || false
1306
+ });
1307
+
1308
+ /**
1309
+ * @attribute handles
1310
+ * @description The handles to use (any combination of): 't', 'b', 'r', 'l', 'bl', 'br', 'tl', 'tr'. Defaults to: ['r', 'b', 'br'].
1311
+ * Can use a shortcut of All. Note: 8 way resizing should be done on an element that is absolutely positioned.
1312
+ * @type Array
1313
+ */
1314
+ this.setAttributeConfig('handles', {
1315
+ writeOnce: true,
1316
+ value: attr.handles || ['r', 'b', 'br'],
1317
+ validator: function(handles) {
1318
+ if (Lang.isString(handles) && handles.toLowerCase() == 'all') {
1319
+ handles = ['t', 'b', 'r', 'l', 'bl', 'br', 'tl', 'tr'];
1320
+ }
1321
+ if (!Lang.isArray(handles)) {
1322
+ handles = handles.replace(/, /g, ',');
1323
+ handles = handles.split(',');
1324
+ }
1325
+ this._configs.handles.value = handles;
1326
+ }
1327
+ });
1328
+
1329
+ /**
1330
+ * @attribute width
1331
+ * @description The width of the element
1332
+ * @type Number
1333
+ */
1334
+ this.setAttributeConfig('width', {
1335
+ value: attr.width || parseInt(this.getStyle('width'), 10),
1336
+ validator: YAHOO.lang.isNumber,
1337
+ method: function(width) {
1338
+ width = parseInt(width, 10);
1339
+ if (width > 0) {
1340
+ if (this.get('setSize')) {
1341
+ this.setStyle('width', width + 'px');
1342
+ }
1343
+ this._cache.width = width;
1344
+ this._configs.width.value = width;
1345
+ }
1346
+ }
1347
+ });
1348
+
1349
+ /**
1350
+ * @attribute height
1351
+ * @description The height of the element
1352
+ * @type Number
1353
+ */
1354
+ this.setAttributeConfig('height', {
1355
+ value: attr.height || parseInt(this.getStyle('height'), 10),
1356
+ validator: YAHOO.lang.isNumber,
1357
+ method: function(height) {
1358
+ height = parseInt(height, 10);
1359
+ if (height > 0) {
1360
+ if (this.get('setSize')) {
1361
+ this.setStyle('height', height + 'px');
1362
+ }
1363
+ this._cache.height = height;
1364
+ this._configs.height.value = height;
1365
+ }
1366
+ }
1367
+ });
1368
+
1369
+ /**
1370
+ * @attribute minWidth
1371
+ * @description The minimum width of the element
1372
+ * @type Number
1373
+ */
1374
+ this.setAttributeConfig('minWidth', {
1375
+ value: attr.minWidth || 15,
1376
+ validator: YAHOO.lang.isNumber
1377
+ });
1378
+
1379
+ /**
1380
+ * @attribute minHeight
1381
+ * @description The minimum height of the element
1382
+ * @type Number
1383
+ */
1384
+ this.setAttributeConfig('minHeight', {
1385
+ value: attr.minHeight || 15,
1386
+ validator: YAHOO.lang.isNumber
1387
+ });
1388
+
1389
+ /**
1390
+ * @attribute maxWidth
1391
+ * @description The maximum width of the element
1392
+ * @type Number
1393
+ */
1394
+ this.setAttributeConfig('maxWidth', {
1395
+ value: attr.maxWidth || 10000,
1396
+ validator: YAHOO.lang.isNumber
1397
+ });
1398
+
1399
+ /**
1400
+ * @attribute maxHeight
1401
+ * @description The maximum height of the element
1402
+ * @type Number
1403
+ */
1404
+ this.setAttributeConfig('maxHeight', {
1405
+ value: attr.maxHeight || 10000,
1406
+ validator: YAHOO.lang.isNumber
1407
+ });
1408
+
1409
+ /**
1410
+ * @attribute minY
1411
+ * @description The minimum y coord of the element
1412
+ * @type Number
1413
+ */
1414
+ this.setAttributeConfig('minY', {
1415
+ value: attr.minY || false
1416
+ });
1417
+
1418
+ /**
1419
+ * @attribute minX
1420
+ * @description The minimum x coord of the element
1421
+ * @type Number
1422
+ */
1423
+ this.setAttributeConfig('minX', {
1424
+ value: attr.minX || false
1425
+ });
1426
+ /**
1427
+ * @attribute maxY
1428
+ * @description The max y coord of the element
1429
+ * @type Number
1430
+ */
1431
+ this.setAttributeConfig('maxY', {
1432
+ value: attr.maxY || false
1433
+ });
1434
+
1435
+ /**
1436
+ * @attribute maxX
1437
+ * @description The max x coord of the element
1438
+ * @type Number
1439
+ */
1440
+ this.setAttributeConfig('maxX', {
1441
+ value: attr.maxX || false
1442
+ });
1443
+
1444
+ /**
1445
+ * @attribute animate
1446
+ * @description Should be use animation to resize the element (can only be used if we use proxy).
1447
+ * @type Boolean
1448
+ */
1449
+ this.setAttributeConfig('animate', {
1450
+ value: attr.animate || false,
1451
+ validator: function(value) {
1452
+ var ret = true;
1453
+ if (!YAHOO.util.Anim) {
1454
+ ret = false;
1455
+ }
1456
+ return ret;
1457
+ }
1458
+ });
1459
+
1460
+ /**
1461
+ * @attribute animateEasing
1462
+ * @description The Easing to apply to the animation.
1463
+ * @type Object
1464
+ */
1465
+ this.setAttributeConfig('animateEasing', {
1466
+ value: attr.animateEasing || function() {
1467
+ var easing = false;
1468
+ if (YAHOO.util.Easing && YAHOO.util.Easing.easeOut) {
1469
+ easing = YAHOO.util.Easing.easeOut;
1470
+ }
1471
+ return easing;
1472
+ }()
1473
+ });
1474
+
1475
+ /**
1476
+ * @attribute animateDuration
1477
+ * @description The Duration to apply to the animation.
1478
+ * @type Number
1479
+ */
1480
+ this.setAttributeConfig('animateDuration', {
1481
+ value: attr.animateDuration || 0.5
1482
+ });
1483
+
1484
+ /**
1485
+ * @attribute proxy
1486
+ * @description Resize a proxy element instead of the real element.
1487
+ * @type Boolean
1488
+ */
1489
+ this.setAttributeConfig('proxy', {
1490
+ value: attr.proxy || false,
1491
+ validator: YAHOO.lang.isBoolean
1492
+ });
1493
+
1494
+ /**
1495
+ * @attribute ratio
1496
+ * @description Maintain the element's ratio when resizing.
1497
+ * @type Boolean
1498
+ */
1499
+ this.setAttributeConfig('ratio', {
1500
+ value: attr.ratio || false,
1501
+ validator: YAHOO.lang.isBoolean
1502
+ });
1503
+
1504
+ /**
1505
+ * @attribute ghost
1506
+ * @description Apply an opacity filter to the element being resized (only works with proxy).
1507
+ * @type Boolean
1508
+ */
1509
+ this.setAttributeConfig('ghost', {
1510
+ value: attr.ghost || false,
1511
+ validator: YAHOO.lang.isBoolean
1512
+ });
1513
+
1514
+ /**
1515
+ * @attribute draggable
1516
+ * @description A convienence method to make the element draggable
1517
+ * @type Boolean
1518
+ */
1519
+ this.setAttributeConfig('draggable', {
1520
+ value: attr.draggable || false,
1521
+ validator: YAHOO.lang.isBoolean,
1522
+ method: function(dd) {
1523
+ if (dd && this._wrap) {
1524
+ this._setupDragDrop();
1525
+ } else {
1526
+ if (this.dd) {
1527
+ D.removeClass(this._wrap, this.CSS_DRAG);
1528
+ this.dd.unreg();
1529
+ }
1530
+ }
1531
+ }
1532
+ });
1533
+
1534
+ /**
1535
+ * @attribute hover
1536
+ * @description Only show the handles when they are being moused over.
1537
+ * @type Boolean
1538
+ */
1539
+ this.setAttributeConfig('hover', {
1540
+ value: attr.hover || false,
1541
+ validator: YAHOO.lang.isBoolean
1542
+ });
1543
+
1544
+ /**
1545
+ * @attribute hiddenHandles
1546
+ * @description Don't show the handles, just use the cursor to the user.
1547
+ * @type Boolean
1548
+ */
1549
+ this.setAttributeConfig('hiddenHandles', {
1550
+ value: attr.hiddenHandles || false,
1551
+ validator: YAHOO.lang.isBoolean
1552
+ });
1553
+
1554
+ /**
1555
+ * @attribute knobHandles
1556
+ * @description Use the smaller handles, instead if the full size handles.
1557
+ * @type Boolean
1558
+ */
1559
+ this.setAttributeConfig('knobHandles', {
1560
+ value: attr.knobHandles || false,
1561
+ validator: YAHOO.lang.isBoolean
1562
+ });
1563
+
1564
+ /**
1565
+ * @attribute xTicks
1566
+ * @description The number of x ticks to span the resize to.
1567
+ * @type Number or False
1568
+ */
1569
+ this.setAttributeConfig('xTicks', {
1570
+ value: attr.xTicks || false
1571
+ });
1572
+
1573
+ /**
1574
+ * @attribute yTicks
1575
+ * @description The number of y ticks to span the resize to.
1576
+ * @type Number or False
1577
+ */
1578
+ this.setAttributeConfig('yTicks', {
1579
+ value: attr.yTicks || false
1580
+ });
1581
+
1582
+ /**
1583
+ * @attribute status
1584
+ * @description Show the status (new size) of the resize.
1585
+ * @type Boolean
1586
+ */
1587
+ this.setAttributeConfig('status', {
1588
+ value: attr.status || false,
1589
+ validator: YAHOO.lang.isBoolean
1590
+ });
1591
+
1592
+ /**
1593
+ * @attribute autoRatio
1594
+ * @description Using the shift key during a resize will toggle the ratio config.
1595
+ * @type Boolean
1596
+ */
1597
+ this.setAttributeConfig('autoRatio', {
1598
+ value: attr.autoRatio || false,
1599
+ validator: YAHOO.lang.isBoolean
1600
+ });
1601
+
1602
+ },
1603
+ /**
1604
+ * @method destroy
1605
+ * @description Destroys the resize object and all of it's elements & listeners.
1606
+ */
1607
+ destroy: function() {
1608
+ for (var h in this._handles) {
1609
+ if (Lang.hasOwnProperty(this._handles, h)) {
1610
+ Event.purgeElement(this._handles[h]);
1611
+ this._handles[h].parentNode.removeChild(this._handles[h]);
1612
+ }
1613
+ }
1614
+ if (this._proxy) {
1615
+ this._proxy.parentNode.removeChild(this._proxy);
1616
+ }
1617
+ if (this._status) {
1618
+ this._status.parentNode.removeChild(this._status);
1619
+ }
1620
+ if (this.dd) {
1621
+ this.dd.unreg();
1622
+ D.removeClass(this._wrap, this.CSS_DRAG);
1623
+ }
1624
+ if (this._wrap != this.get('element')) {
1625
+ this.setStyle('position', '');
1626
+ this.setStyle('top', '');
1627
+ this.setStyle('left', '');
1628
+ this._wrap.parentNode.replaceChild(this.get('element'), this._wrap);
1629
+ }
1630
+ this.removeClass(this.CSS_RESIZE);
1631
+
1632
+ delete YAHOO.util.Resize._instances[this.get('id')];
1633
+ //Brutal Object Destroy
1634
+ for (var i in this) {
1635
+ if (Lang.hasOwnProperty(this, i)) {
1636
+ this[i] = null;
1637
+ delete this[i];
1638
+ }
1639
+ }
1640
+ },
1641
+ /**
1642
+ * @method toString
1643
+ * @description Returns a string representing the Resize Object.
1644
+ * @return {String}
1645
+ */
1646
+ toString: function() {
1647
+ if (this.get) {
1648
+ return 'Resize (#' + this.get('id') + ')';
1649
+ }
1650
+ return 'Resize Utility';
1651
+ }
1652
+ });
1653
+
1654
+ YAHOO.util.Resize = Resize;
1655
+
1656
+ /**
1657
+ * @event dragEvent
1658
+ * @description Fires when the <a href="YAHOO.util.DragDrop.html">YAHOO.util.DragDrop</a> dragEvent is fired for the config option draggable.
1659
+ * @type YAHOO.util.CustomEvent
1660
+ */
1661
+ /**
1662
+ * @event startResize
1663
+ * @description Fires when a resize action is started.
1664
+ * @type YAHOO.util.CustomEvent
1665
+ */
1666
+ /**
1667
+ * @event endResize
1668
+ * @description Fires when the mouseUp event from the Drag Instance fires.
1669
+ * @type YAHOO.util.CustomEvent
1670
+ */
1671
+ /**
1672
+ * @event resize
1673
+ * @description Fires on every element resize (only fires once when used with proxy config setting).
1674
+ * @type YAHOO.util.CustomEvent
1675
+ */
1676
+ /**
1677
+ * @event beforeResize
1678
+ * @description Fires before every element resize after the size calculations, returning false will stop the resize.
1679
+ * @type YAHOO.util.CustomEvent
1680
+ */
1681
+ /**
1682
+ * @event proxyResize
1683
+ * @description Fires on every proxy resize (only fires when used with proxy config setting).
1684
+ * @type YAHOO.util.CustomEvent
1685
+ */
1686
+
1687
+ })();
1688
+
1689
+ YAHOO.register("resize", YAHOO.util.Resize, {version: "2.8.1", build: "19"});