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,33 @@
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
+ .yui-crop {
8
+ position: relative;
9
+ }
10
+ .yui-crop .yui-crop-mask {
11
+ position: absolute;
12
+ top: 0;
13
+ left: 0;
14
+ height: 100%;
15
+ width: 100%;
16
+ }
17
+
18
+ .yui-crop .yui-resize {
19
+ position: absolute;
20
+ top: 10px;
21
+ left: 10px;
22
+ border: 0;
23
+ }
24
+
25
+ .yui-crop .yui-crop-resize-mask {
26
+ position: absolute;
27
+ top: 0;
28
+ left: 0;
29
+ height: 100%;
30
+ width: 100%;
31
+ background-position: -10px -10px;
32
+ overflow: hidden;
33
+ }
@@ -0,0 +1,16 @@
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
+ .yui-skin-sam .yui-crop .yui-crop-mask {
8
+ background-color: #000;
9
+ opacity: .5;
10
+ filter: alpha(opacity=50);
11
+ }
12
+
13
+ .yui-skin-sam .yui-crop .yui-resize {
14
+ border: 1px dashed #fff;
15
+ }
16
+
@@ -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
+ .yui-crop{position:relative;}.yui-crop .yui-crop-mask{position:absolute;top:0;left:0;height:100%;width:100%;}.yui-crop .yui-resize{position:absolute;top:10px;left:10px;border:0;}.yui-crop .yui-crop-resize-mask{position:absolute;top:0;left:0;height:100%;width:100%;background-position:-10px -10px;overflow:hidden;}.yui-skin-sam .yui-crop .yui-crop-mask{background-color:#000;opacity:.5;filter:alpha(opacity=50);}.yui-skin-sam .yui-crop .yui-resize{border:1px dashed #fff;}
@@ -0,0 +1,907 @@
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>Creates a Image Cropper control.</p>
9
+ * @namespace YAHOO.widget
10
+ * @requires yahoo, dom, dragdrop, element, event, resize
11
+ * @module imagecropper
12
+ * @beta
13
+ */
14
+ (function() {
15
+ var Dom = YAHOO.util.Dom,
16
+ Event = YAHOO.util.Event,
17
+ Lang = YAHOO.lang;
18
+
19
+ /**
20
+ * @constructor
21
+ * @class ImageCropper
22
+ * @description <p>Creates a Image Cropper control.</p>
23
+ * @extends YAHOO.util.Element
24
+ * @param {String/HTMLElement} el The image element to make croppable.
25
+ * @param {Object} attrs Object liternal containing configuration parameters.
26
+ */
27
+ var Crop = function(el, config) {
28
+ YAHOO.log('Initializing', 'log', 'ImageCropper');
29
+ var oConfig = {
30
+ element: el,
31
+ attributes: config || {}
32
+ };
33
+
34
+ Crop.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 ImageCropper instances
42
+ * @type Object
43
+ */
44
+ Crop._instances = {};
45
+ /**
46
+ * @static
47
+ * @method getCropperById
48
+ * @description Get's an ImageCropper object by the HTML id of the image associated with the ImageCropper object.
49
+ * @return {Object} The ImageCropper Object
50
+ */
51
+ Crop.getCropperById = function(id) {
52
+ if (Crop._instances[id]) {
53
+ return Crop._instances[id];
54
+ }
55
+ return false;
56
+ };
57
+
58
+ YAHOO.extend(Crop, YAHOO.util.Element, {
59
+ /**
60
+ * @private
61
+ * @property CSS_MAIN
62
+ * @description The CSS class used to wrap the element
63
+ * @type String
64
+ */
65
+ CSS_MAIN: 'yui-crop',
66
+ /**
67
+ * @private
68
+ * @property CSS_MASK
69
+ * @description The CSS class for the mask element
70
+ * @type String
71
+ */
72
+ CSS_MASK: 'yui-crop-mask',
73
+ /**
74
+ * @private
75
+ * @property CSS_RESIZE_MASK
76
+ * @description The CSS class for the mask inside the resize element
77
+ * @type String
78
+ */
79
+ CSS_RESIZE_MASK: 'yui-crop-resize-mask',
80
+
81
+ /**
82
+ * @private
83
+ * @property _image
84
+ * @description The url of the image we are cropping
85
+ * @type String
86
+ */
87
+ _image: null,
88
+ /**
89
+ * @private
90
+ * @property _active
91
+ * @description Flag to determine if the crop region is active
92
+ * @type Boolean
93
+ */
94
+ _active: null,
95
+ /**
96
+ * @private
97
+ * @property _resize
98
+ * @description A reference to the Resize Utility used in this Cropper Instance
99
+ * @type Object
100
+ */
101
+ _resize: null,
102
+ /**
103
+ * @private
104
+ * @property _resizeEl
105
+ * @description The HTML Element used to create the Resize Oject
106
+ * @type HTMLElement
107
+ */
108
+ _resizeEl: null,
109
+ /**
110
+ * @private
111
+ * @property _resizeMaskEl
112
+ * @description The HTML Element used to create the Resize mask
113
+ * @type HTMLElement
114
+ */
115
+ _resizeMaskEl: null,
116
+ /**
117
+ * @private
118
+ * @property _wrap
119
+ * @description The HTML Element created to wrap the image
120
+ * @type HTMLElement
121
+ */
122
+ _wrap: null,
123
+ /**
124
+ * @private
125
+ * @property _mask
126
+ * @description The HTML Element created to "mask" the image being cropped
127
+ * @type HTMLElement
128
+ */
129
+ _mask: null,
130
+ /**
131
+ * @private
132
+ * @method _createWrap
133
+ * @description Creates the wrapper element used to wrap the image
134
+ */
135
+ _createWrap: function() {
136
+ YAHOO.log('Creating the wrap element', 'log', 'ImageCropper');
137
+ this._wrap = document.createElement('div');
138
+ this._wrap.id = this.get('element').id + '_wrap';
139
+ this._wrap.className = this.CSS_MAIN;
140
+ var el = this.get('element');
141
+ this._wrap.style.width = el.width ? el.width + 'px' : Dom.getStyle(el, 'width');
142
+ this._wrap.style.height = el.height ? el.height + 'px' : Dom.getStyle(el, 'height');
143
+
144
+ var par = this.get('element').parentNode;
145
+ par.replaceChild(this._wrap, this.get('element'));
146
+ this._wrap.appendChild(this.get('element'));
147
+
148
+ Event.on(this._wrap, 'mouseover', this._handleMouseOver, this, true);
149
+ Event.on(this._wrap, 'mouseout', this._handleMouseOut, this, true);
150
+
151
+ Event.on(this._wrap, 'click', function(ev) { Event.stopEvent(ev); }, this, true);
152
+ },
153
+
154
+ /**
155
+ * @private
156
+ * @method _createMask
157
+ * @description Creates the mask element used to mask the image
158
+ */
159
+ _createMask: function() {
160
+ YAHOO.log('Creating the Mask', 'log', 'ImageCropper');
161
+ this._mask = document.createElement('div');
162
+ this._mask.className = this.CSS_MASK;
163
+ this._wrap.appendChild(this._mask);
164
+ },
165
+
166
+ /**
167
+ * @private
168
+ * @method _createResize
169
+ * @description Creates the resize element and the instance of the Resize Utility
170
+ */
171
+ _createResize: function() {
172
+ YAHOO.log('Creating the Resize element', 'log', 'ImageCropper');
173
+ this._resizeEl = document.createElement('div');
174
+ this._resizeEl.className = YAHOO.util.Resize.prototype.CSS_RESIZE;
175
+ this._resizeEl.style.position = 'absolute';
176
+
177
+ this._resizeEl.innerHTML = '<div class="' + this.CSS_RESIZE_MASK + '"></div>';
178
+ this._resizeMaskEl = this._resizeEl.firstChild;
179
+ this._wrap.appendChild(this._resizeEl);
180
+ this._resizeEl.style.top = this.get('initialXY')[1] + 'px';
181
+ this._resizeEl.style.left = this.get('initialXY')[0] + 'px';
182
+ this._resizeMaskEl.style.height = Math.floor(this.get('initHeight')) + 'px';
183
+ this._resizeMaskEl.style.width = Math.floor(this.get('initWidth')) + 'px';
184
+
185
+ this._resize = new YAHOO.util.Resize(this._resizeEl, {
186
+ knobHandles: true,
187
+ handles: 'all',
188
+ draggable: true,
189
+ status: this.get('status'),
190
+ minWidth: this.get('minWidth'),
191
+ minHeight: this.get('minHeight'),
192
+ ratio: this.get('ratio'),
193
+ autoRatio: this.get('autoRatio'),
194
+ height: this.get('initHeight'),
195
+ width: this.get('initWidth')
196
+ });
197
+
198
+ this._setBackgroundImage(this.get('element').getAttribute('src', 2));
199
+ this._setBackgroundPosition(-(this.get('initialXY')[0]), -(this.get('initialXY')[1]));
200
+
201
+ this._resize.on('startResize', this._handleStartResizeEvent, this, true);
202
+ this._resize.on('endResize', this._handleEndResizeEvent, this, true);
203
+ this._resize.on('dragEvent', this._handleDragEvent, this, true);
204
+ this._resize.on('beforeResize', this._handleBeforeResizeEvent, this, true);
205
+ this._resize.on('resize', this._handleResizeEvent, this, true);
206
+ this._resize.dd.on('b4StartDragEvent', this._handleB4DragEvent, this, true);
207
+ },
208
+
209
+ /**
210
+ * @private
211
+ * @method _handleMouseOver
212
+ * @description Handles the mouseover event
213
+ */
214
+ _handleMouseOver: function(ev) {
215
+ var evType = 'keydown';
216
+ if (YAHOO.env.ua.gecko || YAHOO.env.ua.opera) {
217
+ evType = 'keypress';
218
+ }
219
+ if (!this._active) {
220
+ this._active = true;
221
+ if (this.get('useKeys')) {
222
+ Event.on(document, evType, this._handleKeyPress, this, true);
223
+ }
224
+ }
225
+ },
226
+ /**
227
+ * @private
228
+ * @method _handleMouseOut
229
+ * @description Handles the mouseout event
230
+ */
231
+ _handleMouseOut: function(ev) {
232
+ var evType = 'keydown';
233
+ if (YAHOO.env.ua.gecko || YAHOO.env.ua.opera) {
234
+ evType = 'keypress';
235
+ }
236
+ this._active = false;
237
+ if (this.get('useKeys')) {
238
+ Event.removeListener(document, evType, this._handleKeyPress);
239
+ }
240
+ },
241
+
242
+ /**
243
+ * @private
244
+ * @method _moveEl
245
+ * @description Moves the resize element based on the arrow keys
246
+ */
247
+ _moveEl: function(dir, inc) {
248
+ YAHOO.log('Moving the element', 'log', 'ImageCropper');
249
+ var t = 0, l = 0,
250
+ region = this._setConstraints(),
251
+ resize = true;
252
+
253
+ switch (dir) {
254
+ case 'down':
255
+ t = -(inc);
256
+ if ((region.bottom - inc) < 0) {
257
+ resize = false;
258
+ this._resizeEl.style.top = (region.top + region.bottom) + 'px';
259
+ }
260
+ break;
261
+ case 'up':
262
+ t = (inc);
263
+ if ((region.top - inc) < 0) {
264
+ resize = false;
265
+ this._resizeEl.style.top = '0px';
266
+ }
267
+ break;
268
+ case 'right':
269
+ l = -(inc);
270
+ if ((region.right - inc) < 0) {
271
+ resize = false;
272
+ this._resizeEl.style.left = (region.left + region.right) + 'px';
273
+ }
274
+ break;
275
+ case 'left':
276
+ l = inc;
277
+ if ((region.left - inc) < 0) {
278
+ resize = false;
279
+ this._resizeEl.style.left = '0px';
280
+ }
281
+ break;
282
+ }
283
+
284
+ if (resize) {
285
+ YAHOO.log('Moving via Key Listener: ' + dir, 'log', 'ImageCropper');
286
+ this._resizeEl.style.left = (parseInt(this._resizeEl.style.left, 10) - l) + 'px';
287
+ this._resizeEl.style.top = (parseInt(this._resizeEl.style.top, 10) - t) + 'px';
288
+ this.fireEvent('moveEvent', { target: 'keypress' });
289
+ } else {
290
+ this._setConstraints();
291
+ }
292
+ this._syncBackgroundPosition();
293
+ },
294
+
295
+ /**
296
+ * @private
297
+ * @method _handleKeyPress
298
+ * @description Handles the keypress event
299
+ */
300
+ _handleKeyPress: function(ev) {
301
+ var kc = Event.getCharCode(ev),
302
+ stopEvent = false,
303
+ inc = ((ev.shiftKey) ? this.get('shiftKeyTick') : this.get('keyTick'));
304
+
305
+ switch (kc) {
306
+ case 0x25: // left
307
+ this._moveEl('left', inc);
308
+ stopEvent = true;
309
+ break;
310
+ case 0x26: // up
311
+ this._moveEl('up', inc);
312
+ stopEvent = true;
313
+ break;
314
+ case 0x27: // right
315
+ this._moveEl('right', inc);
316
+ stopEvent = true;
317
+ break;
318
+ case 0x28: // down
319
+ this._moveEl('down', inc);
320
+ stopEvent = true;
321
+ break;
322
+ default:
323
+ }
324
+ if (stopEvent) {
325
+ Event.preventDefault(ev);
326
+ }
327
+ },
328
+
329
+ /**
330
+ * @private
331
+ * @method _handleB4DragEvent
332
+ * @description Handles the DragDrop b4DragEvent event
333
+ */
334
+ _handleB4DragEvent: function() {
335
+ this._setConstraints();
336
+ },
337
+
338
+ /**
339
+ * @private
340
+ * @method _handleDragEvent
341
+ * @description Handles the DragDrop DragEvent event
342
+ */
343
+ _handleDragEvent: function() {
344
+ this._syncBackgroundPosition();
345
+ this.fireEvent('dragEvent', arguments);
346
+ this.fireEvent('moveEvent', { target: 'dragevent' });
347
+ },
348
+
349
+ /**
350
+ * @private
351
+ * @method _handleBeforeResizeEvent
352
+ * @description Handles the Resize Utilitys beforeResize event
353
+ */
354
+ _handleBeforeResizeEvent: function(args) {
355
+ var region = Dom.getRegion(this.get('element')),
356
+ c = this._resize._cache,
357
+ ch = this._resize._currentHandle, h = 0, w = 0;
358
+
359
+ if (args.top && (args.top < region.top)) {
360
+ h = (c.height + c.top) - region.top;
361
+ Dom.setY(this._resize.getWrapEl(), region.top);
362
+ this._resize.getWrapEl().style.height = h + 'px';
363
+ this._resize._cache.height = h;
364
+ this._resize._cache.top = region.top;
365
+ this._syncBackgroundPosition();
366
+ return false;
367
+ }
368
+ if (args.left && (args.left < region.left)) {
369
+ w = (c.width + c.left) - region.left;
370
+ Dom.setX(this._resize.getWrapEl(), region.left);
371
+ this._resize._cache.left = region.left;
372
+ this._resize.getWrapEl().style.width = w + 'px';
373
+ this._resize._cache.width = w;
374
+ this._syncBackgroundPosition();
375
+ return false;
376
+ }
377
+ if (ch != 'tl' && ch != 'l' && ch != 'bl') {
378
+ if (c.left && args.width && ((c.left + args.width) > region.right)) {
379
+ w = (region.right - c.left);
380
+ Dom.setX(this._resize.getWrapEl(), (region.right - w));
381
+ this._resize.getWrapEl().style.width = w + 'px';
382
+ this._resize._cache.left = (region.right - w);
383
+ this._resize._cache.width = w;
384
+ this._syncBackgroundPosition();
385
+ return false;
386
+ }
387
+ }
388
+ if (ch != 't' && ch != 'tr' && ch != 'tl') {
389
+ if (c.top && args.height && ((c.top + args.height) > region.bottom)) {
390
+ h = (region.bottom - c.top);
391
+ Dom.setY(this._resize.getWrapEl(), (region.bottom - h));
392
+ this._resize.getWrapEl().style.height = h + 'px';
393
+ this._resize._cache.height = h;
394
+ this._resize._cache.top = (region.bottom - h);
395
+ this._syncBackgroundPosition();
396
+ return false;
397
+ }
398
+ }
399
+ },
400
+ /**
401
+ * @private
402
+ * @method _handleResizeMaskEl
403
+ * @description Resizes the inner mask element
404
+ */
405
+ _handleResizeMaskEl: function() {
406
+ var a = this._resize._cache;
407
+ this._resizeMaskEl.style.height = Math.floor(a.height) + 'px';
408
+ this._resizeMaskEl.style.width = Math.floor(a.width) + 'px';
409
+ },
410
+ /**
411
+ * @private
412
+ * @method _handleResizeEvent
413
+ * @param Event ev The Resize Utilitys resize event.
414
+ * @description Handles the Resize Utilitys Resize event
415
+ */
416
+ _handleResizeEvent: function(ev) {
417
+ this._setConstraints(true);
418
+ this._syncBackgroundPosition();
419
+ this.fireEvent('resizeEvent', arguments);
420
+ this.fireEvent('moveEvent', { target: 'resizeevent' });
421
+ },
422
+
423
+ /**
424
+ * @private
425
+ * @method _syncBackgroundPosition
426
+ * @description Syncs the packground position of the resize element with the resize elements top and left style position
427
+ */
428
+ _syncBackgroundPosition: function() {
429
+ this._handleResizeMaskEl();
430
+ this._setBackgroundPosition(-(parseInt(this._resizeEl.style.left, 10)), -(parseInt(this._resizeEl.style.top, 10)));
431
+ },
432
+
433
+ /**
434
+ * @private
435
+ * @method _setBackgroundPosition
436
+ * @param Number l The left position
437
+ * @param Number t The top position
438
+ * @description Sets the background image position to the top and left position
439
+ */
440
+ _setBackgroundPosition: function(l, t) {
441
+ //YAHOO.log('Setting the image background position of the mask to: (' + l + ', ' + t + ')', 'log', 'ImageCropper');
442
+ var bl = parseInt(Dom.getStyle(this._resize.get('element'), 'borderLeftWidth'), 10);
443
+ var bt = parseInt(Dom.getStyle(this._resize.get('element'), 'borderTopWidth'), 10);
444
+ if (isNaN(bl)) {
445
+ bl = 0;
446
+ }
447
+ if (isNaN(bt)) {
448
+ bt = 0;
449
+ }
450
+ var mask = this._resize.getWrapEl().firstChild;
451
+ var pos = (l - bl) + 'px ' + (t - bt) + 'px';
452
+ this._resizeMaskEl.style.backgroundPosition = pos;
453
+ },
454
+
455
+ /**
456
+ * @private
457
+ * @method _setBackgroundImage
458
+ * @param String url The url of the image
459
+ * @description Sets the background image of the resize element
460
+ */
461
+ _setBackgroundImage: function(url) {
462
+ YAHOO.log('Setting the background image', 'log', 'ImageCropper');
463
+ var mask = this._resize.getWrapEl().firstChild;
464
+ this._image = url;
465
+ mask.style.backgroundImage = 'url(' + url + '#)';
466
+ },
467
+
468
+ /**
469
+ * @private
470
+ * @method _handleEndResizeEvent
471
+ * @description Handles the Resize Utilitys endResize event
472
+ */
473
+ _handleEndResizeEvent: function() {
474
+ this._setConstraints(true);
475
+ },
476
+ /**
477
+ * @private
478
+ * @method _handleStartResizeEvent
479
+ * @description Handles the Resize Utilitys startResize event
480
+ */
481
+ _handleStartResizeEvent: function() {
482
+ this._setConstraints(true);
483
+
484
+ var h = this._resize._cache.height,
485
+ w = this._resize._cache.width,
486
+ t = parseInt(this._resize.getWrapEl().style.top, 10),
487
+ l = parseInt(this._resize.getWrapEl().style.left, 10),
488
+ maxH = 0, maxW = 0;
489
+
490
+ switch (this._resize._currentHandle) {
491
+ case 'b':
492
+ maxH = (h + this._resize.dd.bottomConstraint);
493
+ break;
494
+ case 'l':
495
+ maxW = (w + this._resize.dd.leftConstraint);
496
+ break;
497
+ case 'r':
498
+ maxH = (h + t);
499
+ maxW = (w + this._resize.dd.rightConstraint);
500
+ break;
501
+ case 'br':
502
+ maxH = (h + this._resize.dd.bottomConstraint);
503
+ maxW = (w + this._resize.dd.rightConstraint);
504
+ break;
505
+ case 'tr':
506
+ maxH = (h + t);
507
+ maxW = (w + this._resize.dd.rightConstraint);
508
+ break;
509
+
510
+ }
511
+
512
+ if (maxH) {
513
+ YAHOO.log('Setting the maxHeight on the resize object to: ' + maxH, 'log', 'ImageCropper');
514
+ //this._resize.set('maxHeight', maxH);
515
+ }
516
+ if (maxW) {
517
+ YAHOO.log('Setting the maxWidth on the resize object to: ' + maxW, 'log', 'ImageCropper');
518
+ //this._resize.set('maxWidth', maxW);
519
+ }
520
+
521
+ this.fireEvent('startResizeEvent', arguments);
522
+ },
523
+
524
+ /**
525
+ * @private
526
+ * @method _setConstraints
527
+ * @param Boolean inside Used when called from inside a resize event, false by default (dragging)
528
+ * @description Set the DragDrop constraints to keep the element inside the crop area.
529
+ * @return {Object} Object containing Top, Right, Bottom and Left constraints
530
+ */
531
+ _setConstraints: function(inside) {
532
+ YAHOO.log('Setting Contraints', 'log', 'ImageCropper');
533
+ var resize = this._resize;
534
+ resize.dd.resetConstraints();
535
+ var height = parseInt(resize.get('height'), 10),
536
+ width = parseInt(resize.get('width'), 10);
537
+ if (inside) {
538
+ //Called from inside the resize callback
539
+ height = resize._cache.height;
540
+ width = resize._cache.width;
541
+ }
542
+
543
+ //Get the top, right, bottom and left positions
544
+ var region = Dom.getRegion(this.get('element'));
545
+ //Get the element we are working on
546
+ var el = resize.getWrapEl();
547
+
548
+ //Get the xy position of it
549
+ var xy = Dom.getXY(el);
550
+
551
+ //Set left to x minus left
552
+ var left = xy[0] - region.left;
553
+
554
+ //Set right to right minus x minus width
555
+ var right = region.right - xy[0] - width;
556
+
557
+ //Set top to y minus top
558
+ var top = xy[1] - region.top;
559
+
560
+ //Set bottom to bottom minus y minus height
561
+ var bottom = region.bottom - xy[1] - height;
562
+
563
+ if (top < 0) {
564
+ top = 0;
565
+ }
566
+
567
+ resize.dd.setXConstraint(left, right);
568
+ resize.dd.setYConstraint(top, bottom);
569
+ YAHOO.log('Constraints: ' + top + ',' + right + ',' + bottom + ',' + left, 'log', 'ImageCropper');
570
+
571
+ return {
572
+ top: top,
573
+ right: right,
574
+ bottom: bottom,
575
+ left: left
576
+ };
577
+
578
+
579
+
580
+ },
581
+ /**
582
+ * @method getCropCoords
583
+ * @description Returns the coordinates needed to crop the image
584
+ * @return {Object} The top, left, height, width and image url of the image being cropped
585
+ */
586
+ getCropCoords: function() {
587
+ var coords = {
588
+ top: parseInt(this._resize.getWrapEl().style.top, 10),
589
+ left: parseInt(this._resize.getWrapEl().style.left, 10),
590
+ height: this._resize._cache.height,
591
+ width: this._resize._cache.width,
592
+ image: this._image
593
+ };
594
+ YAHOO.log('Getting the crop coordinates: ' + Lang.dump(coords), 'log', 'ImageCropper');
595
+ return coords;
596
+ },
597
+ /**
598
+ * @method reset
599
+ * @description Resets the crop element back to it's original position
600
+ * @return {<a href="YAHOO.widget.ImageCropper.html">YAHOO.widget.ImageCropper</a>} The ImageCropper instance
601
+ */
602
+ reset: function() {
603
+ YAHOO.log('Resetting the control', 'log', 'ImageCropper');
604
+ this._resize.resize(null, this.get('initHeight'), this.get('initWidth'), 0, 0, true);
605
+ this._resizeEl.style.top = this.get('initialXY')[1] + 'px';
606
+ this._resizeEl.style.left = this.get('initialXY')[0] + 'px';
607
+ this._syncBackgroundPosition();
608
+ return this;
609
+ },
610
+
611
+ /**
612
+ * @method getEl
613
+ * @description Get the HTML reference for the image element.
614
+ * @return {HTMLElement} The image element
615
+ */
616
+ getEl: function() {
617
+ return this.get('element');
618
+ },
619
+ /**
620
+ * @method getResizeEl
621
+ * @description Get the HTML reference for the resize element.
622
+ * @return {HTMLElement} The resize element
623
+ */
624
+ getResizeEl: function() {
625
+ return this._resizeEl;
626
+ },
627
+ /**
628
+ * @method getWrapEl
629
+ * @description Get the HTML reference for the wrap element.
630
+ * @return {HTMLElement} The wrap element
631
+ */
632
+ getWrapEl: function() {
633
+ return this._wrap;
634
+ },
635
+
636
+ /**
637
+ * @method getMaskEl
638
+ * @description Get the HTML reference for the mask element.
639
+ * @return {HTMLElement} The mask element
640
+ */
641
+ getMaskEl: function() {
642
+ return this._mask;
643
+ },
644
+
645
+ /**
646
+ * @method getResizeMaskEl
647
+ * @description Get the HTML reference for the resizable object's mask element.
648
+ * @return {HTMLElement} The resize objects mask element.
649
+ */
650
+ getResizeMaskEl: function() {
651
+ return this._resizeMaskEl;
652
+ },
653
+
654
+ /**
655
+ * @method getResizeObject
656
+ * @description Get the Resize Utility object.
657
+ * @return {<a href="YAHOO.util.Resize.html">YAHOO.util.Resize</a>} The Resize instance
658
+ */
659
+ getResizeObject: function() {
660
+ return this._resize;
661
+ },
662
+
663
+ /**
664
+ * @private
665
+ * @method init
666
+ * @description The ImageCropper class's initialization method
667
+ */
668
+ init: function(p_oElement, p_oAttributes) {
669
+ YAHOO.log('init', 'info', 'ImageCropper');
670
+ Crop.superclass.init.call(this, p_oElement, p_oAttributes);
671
+
672
+ var id = p_oElement;
673
+
674
+ if (!Lang.isString(id)) {
675
+ if (id.tagName && (id.tagName.toLowerCase() == 'img')) {
676
+ id = Dom.generateId(id);
677
+ } else {
678
+ YAHOO.log('Element is not an image.', 'error', 'ImageCropper');
679
+ return false;
680
+ }
681
+ } else {
682
+ var el = Dom.get(id);
683
+ if (el.tagName && el.tagName.toLowerCase() == 'img') {
684
+ //All good
685
+ } else {
686
+ YAHOO.log('Element is not an image.', 'error', 'ImageCropper');
687
+ return false;
688
+ }
689
+ }
690
+
691
+
692
+
693
+ Crop._instances[id] = this;
694
+ this._createWrap();
695
+ this._createMask();
696
+ this._createResize();
697
+ this._setConstraints();
698
+
699
+ },
700
+ /**
701
+ * @private
702
+ * @method initAttributes
703
+ * @description Initializes all of the configuration attributes used to create a croppable element.
704
+ * @param {Object} attr Object literal specifying a set of
705
+ * configuration attributes used to create the widget.
706
+ */
707
+
708
+ initAttributes: function(attr) {
709
+ Crop.superclass.initAttributes.call(this, attr);
710
+
711
+ /**
712
+ * @attribute initialXY
713
+ * @description Array of the XY position that we need to set the crop element to when we build it. Defaults to [10, 10]
714
+ * @type Array
715
+ */
716
+ this.setAttributeConfig('initialXY', {
717
+ writeOnce: true,
718
+ validator: YAHOO.lang.isArray,
719
+ value: attr.initialXY || [10, 10]
720
+ });
721
+ /**
722
+ * @attribute keyTick
723
+ * @description The pixel tick for the arrow keys, defaults to 1
724
+ * @type Number
725
+ */
726
+ this.setAttributeConfig('keyTick', {
727
+ validator: YAHOO.lang.isNumber,
728
+ value: attr.keyTick || 1
729
+ });
730
+
731
+ /**
732
+ * @attribute shiftKeyTick
733
+ * @description The pixel tick for shift + the arrow keys, defaults to 10
734
+ * @type Number
735
+ */
736
+ this.setAttributeConfig('shiftKeyTick', {
737
+ validator: YAHOO.lang.isNumber,
738
+ value: attr.shiftKeyTick || 10
739
+ });
740
+
741
+ /**
742
+ * @attribute useKeys
743
+ * @description Should we use the Arrow keys to position the crop element, defaults to true
744
+ * @type Boolean
745
+ */
746
+ this.setAttributeConfig('useKeys', {
747
+ validator: YAHOO.lang.isBoolean,
748
+ value: ((attr.useKeys === false) ? false : true)
749
+ });
750
+
751
+ /**
752
+ * @attribute status
753
+ * @description Show the Resize Utility status, defaults to true
754
+ * @type Boolean
755
+ */
756
+ this.setAttributeConfig('status', {
757
+ validator: YAHOO.lang.isBoolean,
758
+ value: ((attr.status === false) ? false : true),
759
+ method: function(status) {
760
+ if (this._resize) {
761
+ this._resize.set('status', status);
762
+ }
763
+ }
764
+ });
765
+
766
+ /**
767
+ * @attribute minHeight
768
+ * @description MinHeight of the crop area, default 50
769
+ * @type Number
770
+ */
771
+ this.setAttributeConfig('minHeight', {
772
+ validator: YAHOO.lang.isNumber,
773
+ value: attr.minHeight || 50,
774
+ method: function(h) {
775
+ if (this._resize) {
776
+ this._resize.set('minHeight', h);
777
+ }
778
+ }
779
+ });
780
+
781
+ /**
782
+ * @attribute minWidth
783
+ * @description MinWidth of the crop area, default 50.
784
+ * @type Number
785
+ */
786
+ this.setAttributeConfig('minWidth', {
787
+ validator: YAHOO.lang.isNumber,
788
+ value: attr.minWidth || 50,
789
+ method: function(w) {
790
+ if (this._resize) {
791
+ this._resize.set('minWidth', w);
792
+ }
793
+ }
794
+ });
795
+
796
+ /**
797
+ * @attribute ratio
798
+ * @description Set the ratio config option of the Resize Utlility, default false
799
+ * @type Boolean
800
+ */
801
+ this.setAttributeConfig('ratio', {
802
+ validator: YAHOO.lang.isBoolean,
803
+ value: attr.ratio || false,
804
+ method: function(r) {
805
+ if (this._resize) {
806
+ this._resize.set('ratio', r);
807
+ }
808
+ }
809
+ });
810
+
811
+ /**
812
+ * @attribute ratio
813
+ * @description Set the autoRatio config option of the Resize Utlility, default true
814
+ * @type Boolean
815
+ */
816
+ this.setAttributeConfig('autoRatio', {
817
+ validator: YAHOO.lang.isBoolean,
818
+ value: ((attr.autoRatio === false) ? false : true),
819
+ method: function(a) {
820
+ if (this._resize) {
821
+ this._resize.set('autoRatio', a);
822
+ }
823
+ }
824
+ });
825
+
826
+ /**
827
+ * @attribute initHeight
828
+ * @description Set the initlal height of the crop area, defaults to 1/4 of the image height
829
+ * @type Number
830
+ */
831
+ this.setAttributeConfig('initHeight', {
832
+ writeOnce: true,
833
+ validator: YAHOO.lang.isNumber,
834
+ value: attr.initHeight || (this.get('element').height / 4)
835
+ });
836
+
837
+ /**
838
+ * @attribute initWidth
839
+ * @description Set the initlal width of the crop area, defaults to 1/4 of the image width
840
+ * @type Number
841
+ */
842
+ this.setAttributeConfig('initWidth', {
843
+ validator: YAHOO.lang.isNumber,
844
+ writeOnce: true,
845
+ value: attr.initWidth || (this.get('element').width / 4)
846
+ });
847
+
848
+ },
849
+ /**
850
+ * @method destroy
851
+ * @description Destroys the ImageCropper object and all of it's elements & listeners.
852
+ */
853
+ destroy: function() {
854
+ YAHOO.log('Destroying the ImageCropper', 'info', 'ImageCropper');
855
+ this._resize.destroy();
856
+ this._resizeEl.parentNode.removeChild(this._resizeEl);
857
+ this._mask.parentNode.removeChild(this._mask);
858
+ Event.purgeElement(this._wrap);
859
+ this._wrap.parentNode.replaceChild(this.get('element'), this._wrap);
860
+
861
+ //Brutal Object Destroy
862
+ for (var i in this) {
863
+ if (Lang.hasOwnProperty(this, i)) {
864
+ this[i] = null;
865
+ }
866
+ }
867
+
868
+ },
869
+ /**
870
+ * @method toString
871
+ * @description Returns a string representing the ImageCropper Object.
872
+ * @return {String}
873
+ */
874
+ toString: function() {
875
+ if (this.get) {
876
+ return 'ImageCropper (#' + this.get('id') + ')';
877
+ }
878
+ return 'Image Cropper';
879
+ }
880
+ });
881
+
882
+ YAHOO.widget.ImageCropper = Crop;
883
+
884
+ /**
885
+ * @event dragEvent
886
+ * @description Fires when the DragDrop dragEvent
887
+ * @type YAHOO.util.CustomEvent
888
+ */
889
+ /**
890
+ * @event startResizeEvent
891
+ * @description Fires when when a resize action is started.
892
+ * @type YAHOO.util.CustomEvent
893
+ */
894
+ /**
895
+ * @event resizeEvent
896
+ * @description Fires on every element resize.
897
+ * @type YAHOO.util.CustomEvent
898
+ */
899
+ /**
900
+ * @event moveEvent
901
+ * @description Fires on every element move. Inside these methods: _handleKeyPress, _handleDragEvent, _handleResizeEvent
902
+ * @type YAHOO.util.CustomEvent
903
+ */
904
+
905
+ })();
906
+
907
+ YAHOO.register("imagecropper", YAHOO.widget.ImageCropper, {version: "2.8.1", build: "19"});