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,141 @@
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
+ * Augments the Element Utility with a <code>delegate</code> method that
9
+ * facilitates easy creation of delegated event listeners. (Note: Using CSS
10
+ * selectors as the filtering criteria for delegated event listeners requires
11
+ * inclusion of the Selector Utility.)
12
+ *
13
+ * @module element-delegate
14
+ * @title Element Event Delegation Module
15
+ * @namespace YAHOO.util
16
+ * @requires element, event-delegate
17
+ */
18
+
19
+ (function () {
20
+
21
+ var Event = YAHOO.util.Event,
22
+ delegates = [],
23
+ specialTypes = {
24
+ mouseenter: true,
25
+ mouseleave: true
26
+ };
27
+
28
+ YAHOO.lang.augmentObject(YAHOO.util.Element.prototype, {
29
+
30
+ /**
31
+ * Appends a delegated event listener. Delegated event listeners
32
+ * receive two arguments by default: the DOM event and the element
33
+ * specified by the filtering function or CSS selector.
34
+ * (Note: Using the delegate method requires the element-delegate
35
+ * module. Using CSS selectors as the filtering criteria for delegated
36
+ * event listeners requires inclusion of the Selector Utility.)
37
+ * @method delegate
38
+ * @param {String} type The name of the event to listen for
39
+ * @param {Function} fn The handler to call when the event fires
40
+ * @param {Function|string} filter Function or CSS selector used to
41
+ * determine for what element(s) the event listener should be called.
42
+ * When a function is specified, the function should return an
43
+ * HTML element. Using a CSS Selector requires the inclusion of the
44
+ * CSS Selector Utility.
45
+ * @param {Any} obj A variable to pass to the handler
46
+ * @param {Object} scope The object to use for the scope of the handler
47
+ * @return {boolean} Returns true if the delegated event listener
48
+ * was added successfully
49
+ * @for Element
50
+ */
51
+ delegate: function (type, fn, filter, obj, overrideContext) {
52
+
53
+ if (YAHOO.lang.isString(filter) && !YAHOO.util.Selector) {
54
+ YAHOO.log("Using a CSS selector to define the filtering criteria for a delegated listener requires the Selector Utility.", "error", "Element");
55
+ return false;
56
+ }
57
+
58
+ if (!Event._createDelegate) {
59
+ YAHOO.log("Using delegate functionality requires the event-delegate module.", "error", "Element");
60
+ return false;
61
+ }
62
+
63
+ var sType = Event._getType(type),
64
+ el = this.get("element"),
65
+ fnDelegate,
66
+ fnMouseDelegate,
67
+
68
+ fnWrapper = function (e) {
69
+
70
+ return fnDelegate.call(el, e);
71
+
72
+ };
73
+
74
+ if (specialTypes[type]) {
75
+
76
+ if (!Event._createMouseDelegate) {
77
+ YAHOO.log("Delegating a " + type + " event requires the event-mouseleave module.", "error", "Element");
78
+ return false;
79
+ }
80
+
81
+ fnMouseDelegate = Event._createMouseDelegate(fn, obj, overrideContext);
82
+
83
+ fnDelegate = Event._createDelegate(function (event, matchedEl, container) {
84
+
85
+ return fnMouseDelegate.call(matchedEl, event, container);
86
+
87
+ }, filter, obj, overrideContext);
88
+
89
+ }
90
+ else {
91
+ fnDelegate = Event._createDelegate(fn, filter, obj, overrideContext);
92
+ }
93
+
94
+
95
+ delegates.push([el, sType, fn, fnWrapper]);
96
+
97
+ return this.on(sType, fnWrapper);
98
+
99
+ },
100
+
101
+
102
+ /**
103
+ * Remove a delegated event listener
104
+ * @method removeDelegate
105
+ * @param {String} type The name of the event to listen for
106
+ * @param {Function} fn The function call when the event fires
107
+ * @return {boolean} Returns true if the unbind was successful, false
108
+ * otherwise.
109
+ * @for Element
110
+ */
111
+ removeDelegate: function (type, fn) {
112
+
113
+ var sType = Event._getType(type),
114
+ index = Event._getCacheIndex(delegates, this.get("element"), sType, fn),
115
+ returnVal,
116
+ cacheItem;
117
+
118
+ if (index >= 0) {
119
+ cacheItem = delegates[index];
120
+ }
121
+
122
+ if (cacheItem) {
123
+
124
+ returnVal = this.removeListener(cacheItem[1], cacheItem[3]);
125
+
126
+ if (returnVal) {
127
+ delete delegates[index][2];
128
+ delete delegates[index][3];
129
+ delegates.splice(index, 1);
130
+ }
131
+
132
+ }
133
+
134
+ return returnVal;
135
+
136
+ }
137
+
138
+ });
139
+
140
+ }());
141
+ YAHOO.register("element-delegate", YAHOO.util.Element, {version: "2.8.1", build: "19"});
@@ -0,0 +1,7 @@
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 A=YAHOO.util.Event,B=[],C={mouseenter:true,mouseleave:true};YAHOO.lang.augmentObject(YAHOO.util.Element.prototype,{delegate:function(J,L,F,H,I){if(YAHOO.lang.isString(F)&&!YAHOO.util.Selector){return false;}if(!A._createDelegate){return false;}var E=A._getType(J),G=this.get("element"),M,K,D=function(N){return M.call(G,N);};if(C[J]){if(!A._createMouseDelegate){return false;}K=A._createMouseDelegate(L,H,I);M=A._createDelegate(function(P,O,N){return K.call(O,P,N);},F,H,I);}else{M=A._createDelegate(L,F,H,I);}B.push([G,E,L,D]);return this.on(E,D);},removeDelegate:function(H,G){var I=A._getType(H),E=A._getCacheIndex(B,this.get("element"),I,G),F,D;if(E>=0){D=B[E];}if(D){F=this.removeListener(D[1],D[3]);if(F){delete B[E][2];delete B[E][3];B.splice(E,1);}}return F;}});}());YAHOO.register("element-delegate",YAHOO.util.Element,{version:"2.8.1",build:"19"});
@@ -0,0 +1,138 @@
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
+ * Augments the Element Utility with a <code>delegate</code> method that
9
+ * facilitates easy creation of delegated event listeners. (Note: Using CSS
10
+ * selectors as the filtering criteria for delegated event listeners requires
11
+ * inclusion of the Selector Utility.)
12
+ *
13
+ * @module element-delegate
14
+ * @title Element Event Delegation Module
15
+ * @namespace YAHOO.util
16
+ * @requires element, event-delegate
17
+ */
18
+
19
+ (function () {
20
+
21
+ var Event = YAHOO.util.Event,
22
+ delegates = [],
23
+ specialTypes = {
24
+ mouseenter: true,
25
+ mouseleave: true
26
+ };
27
+
28
+ YAHOO.lang.augmentObject(YAHOO.util.Element.prototype, {
29
+
30
+ /**
31
+ * Appends a delegated event listener. Delegated event listeners
32
+ * receive two arguments by default: the DOM event and the element
33
+ * specified by the filtering function or CSS selector.
34
+ * (Note: Using the delegate method requires the element-delegate
35
+ * module. Using CSS selectors as the filtering criteria for delegated
36
+ * event listeners requires inclusion of the Selector Utility.)
37
+ * @method delegate
38
+ * @param {String} type The name of the event to listen for
39
+ * @param {Function} fn The handler to call when the event fires
40
+ * @param {Function|string} filter Function or CSS selector used to
41
+ * determine for what element(s) the event listener should be called.
42
+ * When a function is specified, the function should return an
43
+ * HTML element. Using a CSS Selector requires the inclusion of the
44
+ * CSS Selector Utility.
45
+ * @param {Any} obj A variable to pass to the handler
46
+ * @param {Object} scope The object to use for the scope of the handler
47
+ * @return {boolean} Returns true if the delegated event listener
48
+ * was added successfully
49
+ * @for Element
50
+ */
51
+ delegate: function (type, fn, filter, obj, overrideContext) {
52
+
53
+ if (YAHOO.lang.isString(filter) && !YAHOO.util.Selector) {
54
+ return false;
55
+ }
56
+
57
+ if (!Event._createDelegate) {
58
+ return false;
59
+ }
60
+
61
+ var sType = Event._getType(type),
62
+ el = this.get("element"),
63
+ fnDelegate,
64
+ fnMouseDelegate,
65
+
66
+ fnWrapper = function (e) {
67
+
68
+ return fnDelegate.call(el, e);
69
+
70
+ };
71
+
72
+ if (specialTypes[type]) {
73
+
74
+ if (!Event._createMouseDelegate) {
75
+ return false;
76
+ }
77
+
78
+ fnMouseDelegate = Event._createMouseDelegate(fn, obj, overrideContext);
79
+
80
+ fnDelegate = Event._createDelegate(function (event, matchedEl, container) {
81
+
82
+ return fnMouseDelegate.call(matchedEl, event, container);
83
+
84
+ }, filter, obj, overrideContext);
85
+
86
+ }
87
+ else {
88
+ fnDelegate = Event._createDelegate(fn, filter, obj, overrideContext);
89
+ }
90
+
91
+
92
+ delegates.push([el, sType, fn, fnWrapper]);
93
+
94
+ return this.on(sType, fnWrapper);
95
+
96
+ },
97
+
98
+
99
+ /**
100
+ * Remove a delegated event listener
101
+ * @method removeDelegate
102
+ * @param {String} type The name of the event to listen for
103
+ * @param {Function} fn The function call when the event fires
104
+ * @return {boolean} Returns true if the unbind was successful, false
105
+ * otherwise.
106
+ * @for Element
107
+ */
108
+ removeDelegate: function (type, fn) {
109
+
110
+ var sType = Event._getType(type),
111
+ index = Event._getCacheIndex(delegates, this.get("element"), sType, fn),
112
+ returnVal,
113
+ cacheItem;
114
+
115
+ if (index >= 0) {
116
+ cacheItem = delegates[index];
117
+ }
118
+
119
+ if (cacheItem) {
120
+
121
+ returnVal = this.removeListener(cacheItem[1], cacheItem[3]);
122
+
123
+ if (returnVal) {
124
+ delete delegates[index][2];
125
+ delete delegates[index][3];
126
+ delegates.splice(index, 1);
127
+ }
128
+
129
+ }
130
+
131
+ return returnVal;
132
+
133
+ }
134
+
135
+ });
136
+
137
+ }());
138
+ YAHOO.register("element-delegate", YAHOO.util.Element, {version: "2.8.1", build: "19"});
@@ -0,0 +1,1106 @@
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
+ * Provides Attribute configurations.
9
+ * @namespace YAHOO.util
10
+ * @class Attribute
11
+ * @constructor
12
+ * @param hash {Object} The intial Attribute.
13
+ * @param {YAHOO.util.AttributeProvider} The owner of the Attribute instance.
14
+ */
15
+
16
+ YAHOO.util.Attribute = function(hash, owner) {
17
+ if (owner) {
18
+ this.owner = owner;
19
+ this.configure(hash, true);
20
+ }
21
+ };
22
+
23
+ YAHOO.util.Attribute.prototype = {
24
+ /**
25
+ * The name of the attribute.
26
+ * @property name
27
+ * @type String
28
+ */
29
+ name: undefined,
30
+
31
+ /**
32
+ * The value of the attribute.
33
+ * @property value
34
+ * @type String
35
+ */
36
+ value: null,
37
+
38
+ /**
39
+ * The owner of the attribute.
40
+ * @property owner
41
+ * @type YAHOO.util.AttributeProvider
42
+ */
43
+ owner: null,
44
+
45
+ /**
46
+ * Whether or not the attribute is read only.
47
+ * @property readOnly
48
+ * @type Boolean
49
+ */
50
+ readOnly: false,
51
+
52
+ /**
53
+ * Whether or not the attribute can only be written once.
54
+ * @property writeOnce
55
+ * @type Boolean
56
+ */
57
+ writeOnce: false,
58
+
59
+ /**
60
+ * The attribute's initial configuration.
61
+ * @private
62
+ * @property _initialConfig
63
+ * @type Object
64
+ */
65
+ _initialConfig: null,
66
+
67
+ /**
68
+ * Whether or not the attribute's value has been set.
69
+ * @private
70
+ * @property _written
71
+ * @type Boolean
72
+ */
73
+ _written: false,
74
+
75
+ /**
76
+ * A function to call when setting the attribute's value.
77
+ * The method receives the new value as the first arg and the attribute name as the 2nd
78
+ * @property method
79
+ * @type Function
80
+ */
81
+ method: null,
82
+
83
+ /**
84
+ * The function to use when setting the attribute's value.
85
+ * The setter receives the new value as the first arg and the attribute name as the 2nd
86
+ * The return value of the setter replaces the value passed to set().
87
+ * @property setter
88
+ * @type Function
89
+ */
90
+ setter: null,
91
+
92
+ /**
93
+ * The function to use when getting the attribute's value.
94
+ * The getter receives the new value as the first arg and the attribute name as the 2nd
95
+ * The return value of the getter will be used as the return from get().
96
+ * @property getter
97
+ * @type Function
98
+ */
99
+ getter: null,
100
+
101
+ /**
102
+ * The validator to use when setting the attribute's value.
103
+ * @property validator
104
+ * @type Function
105
+ * @return Boolean
106
+ */
107
+ validator: null,
108
+
109
+ /**
110
+ * Retrieves the current value of the attribute.
111
+ * @method getValue
112
+ * @return {any} The current value of the attribute.
113
+ */
114
+ getValue: function() {
115
+ var val = this.value;
116
+
117
+ if (this.getter) {
118
+ val = this.getter.call(this.owner, this.name, val);
119
+ }
120
+
121
+ return val;
122
+ },
123
+
124
+ /**
125
+ * Sets the value of the attribute and fires beforeChange and change events.
126
+ * @method setValue
127
+ * @param {Any} value The value to apply to the attribute.
128
+ * @param {Boolean} silent If true the change events will not be fired.
129
+ * @return {Boolean} Whether or not the value was set.
130
+ */
131
+ setValue: function(value, silent) {
132
+ var beforeRetVal,
133
+ owner = this.owner,
134
+ name = this.name;
135
+
136
+ var event = {
137
+ type: name,
138
+ prevValue: this.getValue(),
139
+ newValue: value
140
+ };
141
+
142
+ if (this.readOnly || ( this.writeOnce && this._written) ) {
143
+ YAHOO.log( 'setValue ' + name + ', ' + value +
144
+ ' failed: read only', 'error', 'Attribute');
145
+ return false; // write not allowed
146
+ }
147
+
148
+ if (this.validator && !this.validator.call(owner, value) ) {
149
+ YAHOO.log( 'setValue ' + name + ', ' + value +
150
+ ' validation failed', 'error', 'Attribute');
151
+ return false; // invalid value
152
+ }
153
+
154
+ if (!silent) {
155
+ beforeRetVal = owner.fireBeforeChangeEvent(event);
156
+ if (beforeRetVal === false) {
157
+ YAHOO.log('setValue ' + name +
158
+ ' cancelled by beforeChange event', 'info', 'Attribute');
159
+ return false;
160
+ }
161
+ }
162
+
163
+ if (this.setter) {
164
+ value = this.setter.call(owner, value, this.name);
165
+ if (value === undefined) {
166
+ YAHOO.log('setter for ' + this.name + ' returned undefined', 'warn', 'Attribute');
167
+ }
168
+ }
169
+
170
+ if (this.method) {
171
+ this.method.call(owner, value, this.name);
172
+ }
173
+
174
+ this.value = value; // TODO: set before calling setter/method?
175
+ this._written = true;
176
+
177
+ event.type = name;
178
+
179
+ if (!silent) {
180
+ this.owner.fireChangeEvent(event);
181
+ }
182
+
183
+ return true;
184
+ },
185
+
186
+ /**
187
+ * Allows for configuring the Attribute's properties.
188
+ * @method configure
189
+ * @param {Object} map A key-value map of Attribute properties.
190
+ * @param {Boolean} init Whether or not this should become the initial config.
191
+ */
192
+ configure: function(map, init) {
193
+ map = map || {};
194
+
195
+ if (init) {
196
+ this._written = false; // reset writeOnce
197
+ }
198
+
199
+ this._initialConfig = this._initialConfig || {};
200
+
201
+ for (var key in map) {
202
+ if ( map.hasOwnProperty(key) ) {
203
+ this[key] = map[key];
204
+ if (init) {
205
+ this._initialConfig[key] = map[key];
206
+ }
207
+ }
208
+ }
209
+ },
210
+
211
+ /**
212
+ * Resets the value to the initial config value.
213
+ * @method resetValue
214
+ * @return {Boolean} Whether or not the value was set.
215
+ */
216
+ resetValue: function() {
217
+ return this.setValue(this._initialConfig.value);
218
+ },
219
+
220
+ /**
221
+ * Resets the attribute config to the initial config state.
222
+ * @method resetConfig
223
+ */
224
+ resetConfig: function() {
225
+ this.configure(this._initialConfig, true);
226
+ },
227
+
228
+ /**
229
+ * Resets the value to the current value.
230
+ * Useful when values may have gotten out of sync with actual properties.
231
+ * @method refresh
232
+ * @return {Boolean} Whether or not the value was set.
233
+ */
234
+ refresh: function(silent) {
235
+ this.setValue(this.value, silent);
236
+ }
237
+ };
238
+
239
+ (function() {
240
+ var Lang = YAHOO.util.Lang;
241
+
242
+ /*
243
+ Copyright (c) 2006, Yahoo! Inc. All rights reserved.
244
+ Code licensed under the BSD License:
245
+ http://developer.yahoo.net/yui/license.txt
246
+ */
247
+
248
+ /**
249
+ * Provides and manages YAHOO.util.Attribute instances
250
+ * @namespace YAHOO.util
251
+ * @class AttributeProvider
252
+ * @uses YAHOO.util.EventProvider
253
+ */
254
+ YAHOO.util.AttributeProvider = function() {};
255
+
256
+ YAHOO.util.AttributeProvider.prototype = {
257
+
258
+ /**
259
+ * A key-value map of Attribute configurations
260
+ * @property _configs
261
+ * @protected (may be used by subclasses and augmentors)
262
+ * @private
263
+ * @type {Object}
264
+ */
265
+ _configs: null,
266
+ /**
267
+ * Returns the current value of the attribute.
268
+ * @method get
269
+ * @param {String} key The attribute whose value will be returned.
270
+ * @return {Any} The current value of the attribute.
271
+ */
272
+ get: function(key){
273
+ this._configs = this._configs || {};
274
+ var config = this._configs[key];
275
+
276
+ if (!config || !this._configs.hasOwnProperty(key)) {
277
+ YAHOO.log(key + ' not found', 'error', 'AttributeProvider');
278
+ return null;
279
+ }
280
+
281
+ return config.getValue();
282
+ },
283
+
284
+ /**
285
+ * Sets the value of a config.
286
+ * @method set
287
+ * @param {String} key The name of the attribute
288
+ * @param {Any} value The value to apply to the attribute
289
+ * @param {Boolean} silent Whether or not to suppress change events
290
+ * @return {Boolean} Whether or not the value was set.
291
+ */
292
+ set: function(key, value, silent){
293
+ this._configs = this._configs || {};
294
+ var config = this._configs[key];
295
+
296
+ if (!config) {
297
+ YAHOO.log('set failed: ' + key + ' not found',
298
+ 'error', 'AttributeProvider');
299
+ return false;
300
+ }
301
+
302
+ return config.setValue(value, silent);
303
+ },
304
+
305
+ /**
306
+ * Returns an array of attribute names.
307
+ * @method getAttributeKeys
308
+ * @return {Array} An array of attribute names.
309
+ */
310
+ getAttributeKeys: function(){
311
+ this._configs = this._configs;
312
+ var keys = [], key;
313
+
314
+ for (key in this._configs) {
315
+ if ( Lang.hasOwnProperty(this._configs, key) &&
316
+ !Lang.isUndefined(this._configs[key]) ) {
317
+ keys[keys.length] = key;
318
+ }
319
+ }
320
+
321
+ return keys;
322
+ },
323
+
324
+ /**
325
+ * Sets multiple attribute values.
326
+ * @method setAttributes
327
+ * @param {Object} map A key-value map of attributes
328
+ * @param {Boolean} silent Whether or not to suppress change events
329
+ */
330
+ setAttributes: function(map, silent){
331
+ for (var key in map) {
332
+ if ( Lang.hasOwnProperty(map, key) ) {
333
+ this.set(key, map[key], silent);
334
+ }
335
+ }
336
+ },
337
+
338
+ /**
339
+ * Resets the specified attribute's value to its initial value.
340
+ * @method resetValue
341
+ * @param {String} key The name of the attribute
342
+ * @param {Boolean} silent Whether or not to suppress change events
343
+ * @return {Boolean} Whether or not the value was set
344
+ */
345
+ resetValue: function(key, silent){
346
+ this._configs = this._configs || {};
347
+ if (this._configs[key]) {
348
+ this.set(key, this._configs[key]._initialConfig.value, silent);
349
+ return true;
350
+ }
351
+ return false;
352
+ },
353
+
354
+ /**
355
+ * Sets the attribute's value to its current value.
356
+ * @method refresh
357
+ * @param {String | Array} key The attribute(s) to refresh
358
+ * @param {Boolean} silent Whether or not to suppress change events
359
+ */
360
+ refresh: function(key, silent) {
361
+ this._configs = this._configs || {};
362
+ var configs = this._configs;
363
+
364
+ key = ( ( Lang.isString(key) ) ? [key] : key ) ||
365
+ this.getAttributeKeys();
366
+
367
+ for (var i = 0, len = key.length; i < len; ++i) {
368
+ if (configs.hasOwnProperty(key[i])) {
369
+ this._configs[key[i]].refresh(silent);
370
+ }
371
+ }
372
+ },
373
+
374
+ /**
375
+ * Adds an Attribute to the AttributeProvider instance.
376
+ * @method register
377
+ * @param {String} key The attribute's name
378
+ * @param {Object} map A key-value map containing the
379
+ * attribute's properties.
380
+ * @deprecated Use setAttributeConfig
381
+ */
382
+ register: function(key, map) {
383
+ this.setAttributeConfig(key, map);
384
+ },
385
+
386
+
387
+ /**
388
+ * Returns the attribute's properties.
389
+ * @method getAttributeConfig
390
+ * @param {String} key The attribute's name
391
+ * @private
392
+ * @return {object} A key-value map containing all of the
393
+ * attribute's properties.
394
+ */
395
+ getAttributeConfig: function(key) {
396
+ this._configs = this._configs || {};
397
+ var config = this._configs[key] || {};
398
+ var map = {}; // returning a copy to prevent overrides
399
+
400
+ for (key in config) {
401
+ if ( Lang.hasOwnProperty(config, key) ) {
402
+ map[key] = config[key];
403
+ }
404
+ }
405
+
406
+ return map;
407
+ },
408
+
409
+ /**
410
+ * Sets or updates an Attribute instance's properties.
411
+ * @method setAttributeConfig
412
+ * @param {String} key The attribute's name.
413
+ * @param {Object} map A key-value map of attribute properties
414
+ * @param {Boolean} init Whether or not this should become the intial config.
415
+ */
416
+ setAttributeConfig: function(key, map, init) {
417
+ this._configs = this._configs || {};
418
+ map = map || {};
419
+ if (!this._configs[key]) {
420
+ map.name = key;
421
+ this._configs[key] = this.createAttribute(map);
422
+ } else {
423
+ this._configs[key].configure(map, init);
424
+ }
425
+ },
426
+
427
+ /**
428
+ * Sets or updates an Attribute instance's properties.
429
+ * @method configureAttribute
430
+ * @param {String} key The attribute's name.
431
+ * @param {Object} map A key-value map of attribute properties
432
+ * @param {Boolean} init Whether or not this should become the intial config.
433
+ * @deprecated Use setAttributeConfig
434
+ */
435
+ configureAttribute: function(key, map, init) {
436
+ this.setAttributeConfig(key, map, init);
437
+ },
438
+
439
+ /**
440
+ * Resets an attribute to its intial configuration.
441
+ * @method resetAttributeConfig
442
+ * @param {String} key The attribute's name.
443
+ * @private
444
+ */
445
+ resetAttributeConfig: function(key){
446
+ this._configs = this._configs || {};
447
+ this._configs[key].resetConfig();
448
+ },
449
+
450
+ // wrapper for EventProvider.subscribe
451
+ // to create events on the fly
452
+ subscribe: function(type, callback) {
453
+ this._events = this._events || {};
454
+
455
+ if ( !(type in this._events) ) {
456
+ this._events[type] = this.createEvent(type);
457
+ }
458
+
459
+ YAHOO.util.EventProvider.prototype.subscribe.apply(this, arguments);
460
+ },
461
+
462
+ on: function() {
463
+ this.subscribe.apply(this, arguments);
464
+ },
465
+
466
+ addListener: function() {
467
+ this.subscribe.apply(this, arguments);
468
+ },
469
+
470
+ /**
471
+ * Fires the attribute's beforeChange event.
472
+ * @method fireBeforeChangeEvent
473
+ * @param {String} key The attribute's name.
474
+ * @param {Obj} e The event object to pass to handlers.
475
+ */
476
+ fireBeforeChangeEvent: function(e) {
477
+ var type = 'before';
478
+ type += e.type.charAt(0).toUpperCase() + e.type.substr(1) + 'Change';
479
+ e.type = type;
480
+ return this.fireEvent(e.type, e);
481
+ },
482
+
483
+ /**
484
+ * Fires the attribute's change event.
485
+ * @method fireChangeEvent
486
+ * @param {String} key The attribute's name.
487
+ * @param {Obj} e The event object to pass to the handlers.
488
+ */
489
+ fireChangeEvent: function(e) {
490
+ e.type += 'Change';
491
+ return this.fireEvent(e.type, e);
492
+ },
493
+
494
+ createAttribute: function(map) {
495
+ return new YAHOO.util.Attribute(map, this);
496
+ }
497
+ };
498
+
499
+ YAHOO.augment(YAHOO.util.AttributeProvider, YAHOO.util.EventProvider);
500
+ })();
501
+
502
+ (function() {
503
+ // internal shorthand
504
+ var Dom = YAHOO.util.Dom,
505
+ AttributeProvider = YAHOO.util.AttributeProvider,
506
+ specialTypes = {
507
+ mouseenter: true,
508
+ mouseleave: true
509
+ };
510
+
511
+ /**
512
+ * Element provides an wrapper object to simplify adding
513
+ * event listeners, using dom methods, and managing attributes.
514
+ * @module element
515
+ * @namespace YAHOO.util
516
+ * @requires yahoo, dom, event
517
+ */
518
+
519
+ /**
520
+ * Element provides an wrapper object to simplify adding
521
+ * event listeners, using dom methods, and managing attributes.
522
+ * @class Element
523
+ * @uses YAHOO.util.AttributeProvider
524
+ * @constructor
525
+ * @param el {HTMLElement | String} The html element that
526
+ * represents the Element.
527
+ * @param {Object} map A key-value map of initial config names and values
528
+ */
529
+ var Element = function(el, map) {
530
+ this.init.apply(this, arguments);
531
+ };
532
+
533
+ Element.DOM_EVENTS = {
534
+ 'click': true,
535
+ 'dblclick': true,
536
+ 'keydown': true,
537
+ 'keypress': true,
538
+ 'keyup': true,
539
+ 'mousedown': true,
540
+ 'mousemove': true,
541
+ 'mouseout': true,
542
+ 'mouseover': true,
543
+ 'mouseup': true,
544
+ 'mouseenter': true,
545
+ 'mouseleave': true,
546
+ 'focus': true,
547
+ 'blur': true,
548
+ 'submit': true,
549
+ 'change': true
550
+ };
551
+
552
+ Element.prototype = {
553
+ /**
554
+ * Dom events supported by the Element instance.
555
+ * @property DOM_EVENTS
556
+ * @type Object
557
+ */
558
+ DOM_EVENTS: null,
559
+
560
+ DEFAULT_HTML_SETTER: function(value, key) {
561
+ var el = this.get('element');
562
+
563
+ if (el) {
564
+ el[key] = value;
565
+ }
566
+
567
+ return value;
568
+
569
+ },
570
+
571
+ DEFAULT_HTML_GETTER: function(key) {
572
+ var el = this.get('element'),
573
+ val;
574
+
575
+ if (el) {
576
+ val = el[key];
577
+ }
578
+
579
+ return val;
580
+ },
581
+
582
+ /**
583
+ * Wrapper for HTMLElement method.
584
+ * @method appendChild
585
+ * @param {YAHOO.util.Element || HTMLElement} child The element to append.
586
+ * @return {HTMLElement} The appended DOM element.
587
+ */
588
+ appendChild: function(child) {
589
+ child = child.get ? child.get('element') : child;
590
+ return this.get('element').appendChild(child);
591
+ },
592
+
593
+ /**
594
+ * Wrapper for HTMLElement method.
595
+ * @method getElementsByTagName
596
+ * @param {String} tag The tagName to collect
597
+ * @return {HTMLCollection} A collection of DOM elements.
598
+ */
599
+ getElementsByTagName: function(tag) {
600
+ return this.get('element').getElementsByTagName(tag);
601
+ },
602
+
603
+ /**
604
+ * Wrapper for HTMLElement method.
605
+ * @method hasChildNodes
606
+ * @return {Boolean} Whether or not the element has childNodes
607
+ */
608
+ hasChildNodes: function() {
609
+ return this.get('element').hasChildNodes();
610
+ },
611
+
612
+ /**
613
+ * Wrapper for HTMLElement method.
614
+ * @method insertBefore
615
+ * @param {HTMLElement} element The HTMLElement to insert
616
+ * @param {HTMLElement} before The HTMLElement to insert
617
+ * the element before.
618
+ * @return {HTMLElement} The inserted DOM element.
619
+ */
620
+ insertBefore: function(element, before) {
621
+ element = element.get ? element.get('element') : element;
622
+ before = (before && before.get) ? before.get('element') : before;
623
+
624
+ return this.get('element').insertBefore(element, before);
625
+ },
626
+
627
+ /**
628
+ * Wrapper for HTMLElement method.
629
+ * @method removeChild
630
+ * @param {HTMLElement} child The HTMLElement to remove
631
+ * @return {HTMLElement} The removed DOM element.
632
+ */
633
+ removeChild: function(child) {
634
+ child = child.get ? child.get('element') : child;
635
+ return this.get('element').removeChild(child);
636
+ },
637
+
638
+ /**
639
+ * Wrapper for HTMLElement method.
640
+ * @method replaceChild
641
+ * @param {HTMLElement} newNode The HTMLElement to insert
642
+ * @param {HTMLElement} oldNode The HTMLElement to replace
643
+ * @return {HTMLElement} The replaced DOM element.
644
+ */
645
+ replaceChild: function(newNode, oldNode) {
646
+ newNode = newNode.get ? newNode.get('element') : newNode;
647
+ oldNode = oldNode.get ? oldNode.get('element') : oldNode;
648
+ return this.get('element').replaceChild(newNode, oldNode);
649
+ },
650
+
651
+
652
+ /**
653
+ * Registers Element specific attributes.
654
+ * @method initAttributes
655
+ * @param {Object} map A key-value map of initial attribute configs
656
+ */
657
+ initAttributes: function(map) {
658
+ },
659
+
660
+ /**
661
+ * Adds a listener for the given event. These may be DOM or
662
+ * customEvent listeners. Any event that is fired via fireEvent
663
+ * can be listened for. All handlers receive an event object.
664
+ * @method addListener
665
+ * @param {String} type The name of the event to listen for
666
+ * @param {Function} fn The handler to call when the event fires
667
+ * @param {Any} obj A variable to pass to the handler
668
+ * @param {Object} scope The object to use for the scope of the handler
669
+ */
670
+ addListener: function(type, fn, obj, scope) {
671
+
672
+ scope = scope || this;
673
+
674
+ var Event = YAHOO.util.Event,
675
+ el = this.get('element') || this.get('id'),
676
+ self = this;
677
+
678
+
679
+ if (specialTypes[type] && !Event._createMouseDelegate) {
680
+ YAHOO.log("Using a " + type + " event requires the event-mouseenter module", "error", "Event");
681
+ return false;
682
+ }
683
+
684
+
685
+ if (!this._events[type]) { // create on the fly
686
+
687
+ if (el && this.DOM_EVENTS[type]) {
688
+ Event.on(el, type, function(e, matchedEl) {
689
+
690
+ // Supplement IE with target, currentTarget relatedTarget
691
+
692
+ if (e.srcElement && !e.target) {
693
+ e.target = e.srcElement;
694
+ }
695
+
696
+ if ((e.toElement && !e.relatedTarget) || (e.fromElement && !e.relatedTarget)) {
697
+ e.relatedTarget = Event.getRelatedTarget(e);
698
+ }
699
+
700
+ if (!e.currentTarget) {
701
+ e.currentTarget = el;
702
+ }
703
+
704
+ // Note: matchedEl el is passed back for delegated listeners
705
+ self.fireEvent(type, e, matchedEl);
706
+
707
+ }, obj, scope);
708
+ }
709
+ this.createEvent(type, {scope: this});
710
+ }
711
+
712
+ return YAHOO.util.EventProvider.prototype.subscribe.apply(this, arguments); // notify via customEvent
713
+ },
714
+
715
+
716
+ /**
717
+ * Alias for addListener
718
+ * @method on
719
+ * @param {String} type The name of the event to listen for
720
+ * @param {Function} fn The function call when the event fires
721
+ * @param {Any} obj A variable to pass to the handler
722
+ * @param {Object} scope The object to use for the scope of the handler
723
+ */
724
+ on: function() {
725
+ return this.addListener.apply(this, arguments);
726
+ },
727
+
728
+ /**
729
+ * Alias for addListener
730
+ * @method subscribe
731
+ * @param {String} type The name of the event to listen for
732
+ * @param {Function} fn The function call when the event fires
733
+ * @param {Any} obj A variable to pass to the handler
734
+ * @param {Object} scope The object to use for the scope of the handler
735
+ */
736
+ subscribe: function() {
737
+ return this.addListener.apply(this, arguments);
738
+ },
739
+
740
+ /**
741
+ * Remove an event listener
742
+ * @method removeListener
743
+ * @param {String} type The name of the event to listen for
744
+ * @param {Function} fn The function call when the event fires
745
+ */
746
+ removeListener: function(type, fn) {
747
+ return this.unsubscribe.apply(this, arguments);
748
+ },
749
+
750
+ /**
751
+ * Wrapper for Dom method.
752
+ * @method addClass
753
+ * @param {String} className The className to add
754
+ */
755
+ addClass: function(className) {
756
+ Dom.addClass(this.get('element'), className);
757
+ },
758
+
759
+ /**
760
+ * Wrapper for Dom method.
761
+ * @method getElementsByClassName
762
+ * @param {String} className The className to collect
763
+ * @param {String} tag (optional) The tag to use in
764
+ * conjunction with class name
765
+ * @return {Array} Array of HTMLElements
766
+ */
767
+ getElementsByClassName: function(className, tag) {
768
+ return Dom.getElementsByClassName(className, tag,
769
+ this.get('element') );
770
+ },
771
+
772
+ /**
773
+ * Wrapper for Dom method.
774
+ * @method hasClass
775
+ * @param {String} className The className to add
776
+ * @return {Boolean} Whether or not the element has the class name
777
+ */
778
+ hasClass: function(className) {
779
+ return Dom.hasClass(this.get('element'), className);
780
+ },
781
+
782
+ /**
783
+ * Wrapper for Dom method.
784
+ * @method removeClass
785
+ * @param {String} className The className to remove
786
+ */
787
+ removeClass: function(className) {
788
+ return Dom.removeClass(this.get('element'), className);
789
+ },
790
+
791
+ /**
792
+ * Wrapper for Dom method.
793
+ * @method replaceClass
794
+ * @param {String} oldClassName The className to replace
795
+ * @param {String} newClassName The className to add
796
+ */
797
+ replaceClass: function(oldClassName, newClassName) {
798
+ return Dom.replaceClass(this.get('element'),
799
+ oldClassName, newClassName);
800
+ },
801
+
802
+ /**
803
+ * Wrapper for Dom method.
804
+ * @method setStyle
805
+ * @param {String} property The style property to set
806
+ * @param {String} value The value to apply to the style property
807
+ */
808
+ setStyle: function(property, value) {
809
+ return Dom.setStyle(this.get('element'), property, value); // TODO: always queuing?
810
+ },
811
+
812
+ /**
813
+ * Wrapper for Dom method.
814
+ * @method getStyle
815
+ * @param {String} property The style property to retrieve
816
+ * @return {String} The current value of the property
817
+ */
818
+ getStyle: function(property) {
819
+ return Dom.getStyle(this.get('element'), property);
820
+ },
821
+
822
+ /**
823
+ * Apply any queued set calls.
824
+ * @method fireQueue
825
+ */
826
+ fireQueue: function() {
827
+ var queue = this._queue;
828
+ for (var i = 0, len = queue.length; i < len; ++i) {
829
+ this[queue[i][0]].apply(this, queue[i][1]);
830
+ }
831
+ },
832
+
833
+ /**
834
+ * Appends the HTMLElement into either the supplied parentNode.
835
+ * @method appendTo
836
+ * @param {HTMLElement | Element} parentNode The node to append to
837
+ * @param {HTMLElement | Element} before An optional node to insert before
838
+ * @return {HTMLElement} The appended DOM element.
839
+ */
840
+ appendTo: function(parent, before) {
841
+ parent = (parent.get) ? parent.get('element') : Dom.get(parent);
842
+
843
+ this.fireEvent('beforeAppendTo', {
844
+ type: 'beforeAppendTo',
845
+ target: parent
846
+ });
847
+
848
+
849
+ before = (before && before.get) ?
850
+ before.get('element') : Dom.get(before);
851
+ var element = this.get('element');
852
+
853
+ if (!element) {
854
+ YAHOO.log('appendTo failed: element not available',
855
+ 'error', 'Element');
856
+ return false;
857
+ }
858
+
859
+ if (!parent) {
860
+ YAHOO.log('appendTo failed: parent not available',
861
+ 'error', 'Element');
862
+ return false;
863
+ }
864
+
865
+ if (element.parent != parent) {
866
+ if (before) {
867
+ parent.insertBefore(element, before);
868
+ } else {
869
+ parent.appendChild(element);
870
+ }
871
+ }
872
+
873
+ YAHOO.log(element + 'appended to ' + parent);
874
+
875
+ this.fireEvent('appendTo', {
876
+ type: 'appendTo',
877
+ target: parent
878
+ });
879
+
880
+ return element;
881
+ },
882
+
883
+ get: function(key) {
884
+ var configs = this._configs || {},
885
+ el = configs.element; // avoid loop due to 'element'
886
+
887
+ if (el && !configs[key] && !YAHOO.lang.isUndefined(el.value[key]) ) {
888
+ this._setHTMLAttrConfig(key);
889
+ }
890
+
891
+ return AttributeProvider.prototype.get.call(this, key);
892
+ },
893
+
894
+ setAttributes: function(map, silent) {
895
+ // set based on configOrder
896
+ var done = {},
897
+ configOrder = this._configOrder;
898
+
899
+ // set based on configOrder
900
+ for (var i = 0, len = configOrder.length; i < len; ++i) {
901
+ if (map[configOrder[i]] !== undefined) {
902
+ done[configOrder[i]] = true;
903
+ this.set(configOrder[i], map[configOrder[i]], silent);
904
+ }
905
+ }
906
+
907
+ // unconfigured (e.g. Dom attributes)
908
+ for (var att in map) {
909
+ if (map.hasOwnProperty(att) && !done[att]) {
910
+ this.set(att, map[att], silent);
911
+ }
912
+ }
913
+ },
914
+
915
+ set: function(key, value, silent) {
916
+ var el = this.get('element');
917
+ if (!el) {
918
+ this._queue[this._queue.length] = ['set', arguments];
919
+ if (this._configs[key]) {
920
+ this._configs[key].value = value; // so "get" works while queueing
921
+
922
+ }
923
+ return;
924
+ }
925
+
926
+ // set it on the element if not configured and is an HTML attribute
927
+ if ( !this._configs[key] && !YAHOO.lang.isUndefined(el[key]) ) {
928
+ this._setHTMLAttrConfig(key);
929
+ }
930
+
931
+ return AttributeProvider.prototype.set.apply(this, arguments);
932
+ },
933
+
934
+ setAttributeConfig: function(key, map, init) {
935
+ this._configOrder.push(key);
936
+ AttributeProvider.prototype.setAttributeConfig.apply(this, arguments);
937
+ },
938
+
939
+ createEvent: function(type, config) {
940
+ this._events[type] = true;
941
+ return AttributeProvider.prototype.createEvent.apply(this, arguments);
942
+ },
943
+
944
+ init: function(el, attr) {
945
+ this._initElement(el, attr);
946
+ },
947
+
948
+ destroy: function() {
949
+ var el = this.get('element');
950
+ YAHOO.util.Event.purgeElement(el, true); // purge DOM listeners recursively
951
+ this.unsubscribeAll(); // unsubscribe all custom events
952
+
953
+ if (el && el.parentNode) {
954
+ el.parentNode.removeChild(el); // pull from the DOM
955
+ }
956
+
957
+ // revert initial configs
958
+ this._queue = [];
959
+ this._events = {};
960
+ this._configs = {};
961
+ this._configOrder = [];
962
+ },
963
+
964
+ _initElement: function(el, attr) {
965
+ this._queue = this._queue || [];
966
+ this._events = this._events || {};
967
+ this._configs = this._configs || {};
968
+ this._configOrder = [];
969
+ attr = attr || {};
970
+ attr.element = attr.element || el || null;
971
+
972
+ var isReady = false; // to determine when to init HTMLElement and content
973
+
974
+ var DOM_EVENTS = Element.DOM_EVENTS;
975
+ this.DOM_EVENTS = this.DOM_EVENTS || {};
976
+
977
+ for (var event in DOM_EVENTS) {
978
+ if (DOM_EVENTS.hasOwnProperty(event)) {
979
+ this.DOM_EVENTS[event] = DOM_EVENTS[event];
980
+ }
981
+ }
982
+
983
+ if (typeof attr.element === 'string') { // register ID for get() access
984
+ this._setHTMLAttrConfig('id', { value: attr.element });
985
+ }
986
+
987
+ if (Dom.get(attr.element)) {
988
+ isReady = true;
989
+ this._initHTMLElement(attr);
990
+ this._initContent(attr);
991
+ }
992
+
993
+ YAHOO.util.Event.onAvailable(attr.element, function() {
994
+ if (!isReady) { // otherwise already done
995
+ this._initHTMLElement(attr);
996
+ }
997
+
998
+ this.fireEvent('available', { type: 'available', target: Dom.get(attr.element) });
999
+ }, this, true);
1000
+
1001
+ YAHOO.util.Event.onContentReady(attr.element, function() {
1002
+ if (!isReady) { // otherwise already done
1003
+ this._initContent(attr);
1004
+ }
1005
+ this.fireEvent('contentReady', { type: 'contentReady', target: Dom.get(attr.element) });
1006
+ }, this, true);
1007
+ },
1008
+
1009
+ _initHTMLElement: function(attr) {
1010
+ /**
1011
+ * The HTMLElement the Element instance refers to.
1012
+ * @attribute element
1013
+ * @type HTMLElement
1014
+ */
1015
+ this.setAttributeConfig('element', {
1016
+ value: Dom.get(attr.element),
1017
+ readOnly: true
1018
+ });
1019
+ },
1020
+
1021
+ _initContent: function(attr) {
1022
+ this.initAttributes(attr);
1023
+ this.setAttributes(attr, true);
1024
+ this.fireQueue();
1025
+
1026
+ },
1027
+
1028
+ /**
1029
+ * Sets the value of the property and fires beforeChange and change events.
1030
+ * @private
1031
+ * @method _setHTMLAttrConfig
1032
+ * @param {YAHOO.util.Element} element The Element instance to
1033
+ * register the config to.
1034
+ * @param {String} key The name of the config to register
1035
+ * @param {Object} map A key-value map of the config's params
1036
+ */
1037
+ _setHTMLAttrConfig: function(key, map) {
1038
+ var el = this.get('element');
1039
+ map = map || {};
1040
+ map.name = key;
1041
+
1042
+ map.setter = map.setter || this.DEFAULT_HTML_SETTER;
1043
+ map.getter = map.getter || this.DEFAULT_HTML_GETTER;
1044
+
1045
+ map.value = map.value || el[key];
1046
+ this._configs[key] = new YAHOO.util.Attribute(map, this);
1047
+ }
1048
+ };
1049
+
1050
+ /**
1051
+ * Fires when the Element's HTMLElement can be retrieved by Id.
1052
+ * <p>See: <a href="#addListener">Element.addListener</a></p>
1053
+ * <p><strong>Event fields:</strong><br>
1054
+ * <code>&lt;String&gt; type</code> available<br>
1055
+ * <code>&lt;HTMLElement&gt;
1056
+ * target</code> the HTMLElement bound to this Element instance<br>
1057
+ * <p><strong>Usage:</strong><br>
1058
+ * <code>var handler = function(e) {var target = e.target};<br>
1059
+ * myTabs.addListener('available', handler);</code></p>
1060
+ * @event available
1061
+ */
1062
+
1063
+ /**
1064
+ * Fires when the Element's HTMLElement subtree is rendered.
1065
+ * <p>See: <a href="#addListener">Element.addListener</a></p>
1066
+ * <p><strong>Event fields:</strong><br>
1067
+ * <code>&lt;String&gt; type</code> contentReady<br>
1068
+ * <code>&lt;HTMLElement&gt;
1069
+ * target</code> the HTMLElement bound to this Element instance<br>
1070
+ * <p><strong>Usage:</strong><br>
1071
+ * <code>var handler = function(e) {var target = e.target};<br>
1072
+ * myTabs.addListener('contentReady', handler);</code></p>
1073
+ * @event contentReady
1074
+ */
1075
+
1076
+ /**
1077
+ * Fires before the Element is appended to another Element.
1078
+ * <p>See: <a href="#addListener">Element.addListener</a></p>
1079
+ * <p><strong>Event fields:</strong><br>
1080
+ * <code>&lt;String&gt; type</code> beforeAppendTo<br>
1081
+ * <code>&lt;HTMLElement/Element&gt;
1082
+ * target</code> the HTMLElement/Element being appended to
1083
+ * <p><strong>Usage:</strong><br>
1084
+ * <code>var handler = function(e) {var target = e.target};<br>
1085
+ * myTabs.addListener('beforeAppendTo', handler);</code></p>
1086
+ * @event beforeAppendTo
1087
+ */
1088
+
1089
+ /**
1090
+ * Fires after the Element is appended to another Element.
1091
+ * <p>See: <a href="#addListener">Element.addListener</a></p>
1092
+ * <p><strong>Event fields:</strong><br>
1093
+ * <code>&lt;String&gt; type</code> appendTo<br>
1094
+ * <code>&lt;HTMLElement/Element&gt;
1095
+ * target</code> the HTMLElement/Element being appended to
1096
+ * <p><strong>Usage:</strong><br>
1097
+ * <code>var handler = function(e) {var target = e.target};<br>
1098
+ * myTabs.addListener('appendTo', handler);</code></p>
1099
+ * @event appendTo
1100
+ */
1101
+
1102
+ YAHOO.augment(Element, AttributeProvider);
1103
+ YAHOO.util.Element = Element;
1104
+ })();
1105
+
1106
+ YAHOO.register("element", YAHOO.util.Element, {version: "2.8.1", build: "19"});