yui-rails-asset 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,8 @@
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 D=YAHOO,B=D.util,A=D.lang,C;if(!B.Storage){C=function(E){D.log("Exception in YAHOO.util.Storage.?? - must be extended by a storage engine".replace("??",E).replace("??",this.getName?this.getName():"Unknown"),"error");};B.Storage=function(E,G,F){var H=this;D.env._id_counter+=1;H._cfg=A.isObject(F)?F:{};H._location=E;H._name=G;H.isReady=false;H.createEvent(H.CE_READY,{scope:H});H.createEvent(H.CE_CHANGE,{scope:H});H.subscribe(H.CE_READY,function(){H.isReady=true;});};B.Storage.prototype={CE_READY:"YUIStorageReady",CE_CHANGE:"YUIStorageChange",DELIMITER:"__",_cfg:"",_name:"",_location:"",length:0,isReady:false,clear:function(){this._clear();this.length=0;},getItem:function(E){D.log("Fetching item at "+E);var F=this._getItem(E);return A.isValue(F)?this._getValue(F):null;},getName:function(){return this._name;},hasKey:function(E){return A.isString(E)&&this._hasKey(E);},key:function(E){D.log("Fetching key at "+E);if(A.isNumber(E)&&-1<E&&this.length>E){var F=this._key(E);if(F){return F;}}throw ("INDEX_SIZE_ERR - Storage.setItem - The provided index ("+E+") is not available");},removeItem:function(F){D.log("removing "+F);if(this.hasKey(F)){var E=this._getItem(F);if(!E){E=null;}this._removeItem(F);this.fireEvent(this.CE_CHANGE,new B.StorageEvent(this,F,E,null,B.StorageEvent.TYPE_REMOVE_ITEM));}else{}},setItem:function(G,H){D.log("SETTING "+H+" to "+G);if(A.isString(G)){var F=this.hasKey(G)?B.StorageEvent.TYPE_UPDATE_ITEM:B.StorageEvent.TYPE_ADD_ITEM,E=this._getItem(G);if(!E){E=null;}if(this._setItem(G,this._createValue(H))){this.fireEvent(this.CE_CHANGE,new B.StorageEvent(this,G,E,H,F));}else{throw ("QUOTA_EXCEEDED_ERROR - Storage.setItem - The choosen storage method ("+this.getName()+") has exceeded capacity");}}else{}},_clear:function(){C("_clear");return"";},_createValue:function(F){var E=(A.isNull(F)||A.isUndefined(F))?(""+F):typeof F;return"string"===E?F:E+this.DELIMITER+F;},_getItem:function(E){C("_getItem");return"";},_getValue:function(F){var E=F?F.split(this.DELIMITER):[];if(1==E.length){return F;}switch(E[0]){case"boolean":return"true"===E[1];case"number":return parseFloat(E[1]);case"null":return null;default:return E[1];}},_key:function(E){C("_key");return"";},_hasKey:function(E){return null!==this._getItem(E);},_removeItem:function(E){C("_removeItem");return"";},_setItem:function(E,F){C("_setItem");return"";}};A.augmentProto(B.Storage,B.EventProvider);}}());(function(){var H=YAHOO.util,B=YAHOO.lang,E={},G=[],F={},C=function(I){return(I&&I.isAvailable())?I:null;},A=function(J,I,K){var L=E[J+I.ENGINE_NAME];if(!L){L=new I(J,K);E[J+I.ENGINE_NAME]=L;}return L;},D=function(I){switch(I){case H.StorageManager.LOCATION_LOCAL:case H.StorageManager.LOCATION_SESSION:return I;default:return H.StorageManager.LOCATION_SESSION;}};H.StorageManager={LOCATION_SESSION:"sessionStorage",LOCATION_LOCAL:"localStorage",get:function(O,J,M){var K=B.isObject(M)?M:{},I=C(F[O]);if(!I&&!K.force){var N,L;if(K.order){L=K.order.length;for(N=0;N<L&&!I;N+=1){I=C(K.order[N]);}}if(!I){L=G.length;for(N=0;N<L&&!I;N+=1){I=C(G[N]);}}}if(I){return A(D(J),I,K.engine);}throw ("YAHOO.util.StorageManager.get - No engine available, please include an engine before calling this function.");},getByteSize:function(I){return encodeURIComponent(""+I).length;},register:function(I){if(B.isFunction(I)&&B.isFunction(I.isAvailable)&&B.isString(I.ENGINE_NAME)){F[I.ENGINE_NAME]=I;G.push(I);return true;}return false;}};YAHOO.register("StorageManager",H.SWFStore,{version:"2.8.1",build:"19"});}());(function(){YAHOO.util.StorageEvent=function(D,B,A,E,C){this.key=B;this.oldValue=A;this.newValue=E;this.url=window.location.href;this.window=window;this.storageArea=D;this.type=C;};YAHOO.lang.augmentObject(YAHOO.util.StorageEvent,{TYPE_ADD_ITEM:"addItem",TYPE_REMOVE_ITEM:"removeItem",TYPE_UPDATE_ITEM:"updateItem"});YAHOO.util.StorageEvent.prototype={key:null,newValue:null,oldValue:null,source:null,storageArea:null,type:null,url:null};}());(function(){var B=YAHOO.util,A=YAHOO.lang;B.StorageEngineKeyed=function(){B.StorageEngineKeyed.superclass.constructor.apply(this,arguments);this._keys=[];this._keyMap={};};A.extend(B.StorageEngineKeyed,B.Storage,{_keys:null,_keyMap:null,_addKey:function(C){this._keyMap[C]=this.length;this._keys.push(C);this.length=this._keys.length;},_indexOfKey:function(D){var C=this._keyMap[D];return undefined===C?-1:C;},_removeKey:function(E){var D=this._indexOfKey(E),F=this._keys.slice(D+1);delete this._keyMap[E];for(var C in this._keyMap){if(D<this._keyMap[C]){this._keyMap[C]-=1;}}this._keys.length=D;this._keys=this._keys.concat(F);this.length=this._keys.length;}});}());(function(){var D=YAHOO.util,B=YAHOO.lang,A=function(E){if(E.begin){E.begin();}},C=function(E){if(E.commit){E.commit();}};D.StorageEngineHTML5=function(E,F){var G=this;D.StorageEngineHTML5.superclass.constructor.call(G,E,D.StorageEngineHTML5.ENGINE_NAME,F);G._engine=window[E];G.length=G._engine.length;B.later(250,G,function(){G.fireEvent(G.CE_READY);});};YAHOO.lang.extend(D.StorageEngineHTML5,D.Storage,{_engine:null,_clear:function(){var G=this;if(G._engine.clear){G._engine.clear();}else{for(var F=G.length,E;0<=F;F-=1){E=G._key(F);G._removeItem(E);}}},_getItem:function(E){var F=this._engine.getItem(E);return B.isObject(F)?F.value:F;},_key:function(E){return this._engine.key(E);},_removeItem:function(E){var F=this;A(F._engine);F._engine.removeItem(E);C(F._engine);F.length=F._engine.length;},_setItem:function(E,F){var H=this;try{A(H._engine);H._engine.setItem(E,F);C(H._engine);H.length=H._engine.length;return true;}catch(G){return false;}}},true);D.StorageEngineHTML5.ENGINE_NAME="html5";D.StorageEngineHTML5.isAvailable=function(){return window.localStorage;};D.StorageManager.register(D.StorageEngineHTML5);}());(function(){var G=YAHOO.util,B=YAHOO.lang,D=9948,C="YUIStorageEngine",F=null,E=encodeURIComponent,A=decodeURIComponent;G.StorageEngineGears=function(I,L){var O=this;G.StorageEngineGears.superclass.constructor.call(O,I,G.StorageEngineGears.ENGINE_NAME,L);
8
+ if(!F){F=google.gears.factory.create(G.StorageEngineGears.GEARS);F.open(window.location.host+"-"+G.StorageEngineGears.DATABASE);F.execute("CREATE TABLE IF NOT EXISTS "+C+" (key TEXT, location TEXT, value TEXT)");}var K=G.StorageManager.LOCATION_SESSION===O._location,H=G.Cookie.get("sessionKey"+G.StorageEngineGears.ENGINE_NAME);if(!H){F.execute("BEGIN");F.execute("DELETE FROM "+C+' WHERE location="'+E(G.StorageManager.LOCATION_SESSION)+'"');F.execute("COMMIT");}var J=F.execute("SELECT key FROM "+C+' WHERE location="'+E(O._location)+'"'),N={};try{while(J.isValidRow()){var M=A(J.field(0));if(!N[M]){N[M]=true;O._addKey(M);}J.next();}}finally{J.close();}if(K){G.Cookie.set("sessionKey"+G.StorageEngineGears.ENGINE_NAME,true);}O.length=O._keys.length;B.later(250,O,function(){O.fireEvent(O.CE_READY);});};B.extend(G.StorageEngineGears,G.StorageEngineKeyed,{_clear:function(){F.execute("BEGIN");F.execute("DELETE FROM "+C+' WHERE location="'+E(this._location)+'"');F.execute("COMMIT");this._keys=[];this.length=0;},_getItem:function(J){var I=F.execute("SELECT value FROM "+C+' WHERE key="'+E(J)+'" AND location="'+E(this._location)+'"'),K="";try{while(I.isValidRow()){var H=I.field(0);K+=I.field(0);I.next();}}finally{I.close();}return K?A(K):null;},_key:function(H){return this._keys[H];},_removeItem:function(H){F.execute("BEGIN");F.execute("DELETE FROM "+C+' WHERE key="'+E(H)+'" AND location="'+E(this._location)+'"');F.execute("COMMIT");this._removeKey(H);},_setItem:function(P,M){if(!this.hasKey(P)){this._addKey(P);}var H=E(P),Q=E(this._location),R=E(M),K=[],O=D-(H+Q).length;if(O<R.length){for(var N=0,L=R.length;N<L;N+=O){K.push(R.substr(N,O));}}else{K.push(R);}F.execute("BEGIN");F.execute("DELETE FROM "+C+' WHERE key="'+E(P)+'" AND location="'+E(this._location)+'"');for(var J=0,I=K.length;J<I;J+=1){F.execute("INSERT INTO "+C+' VALUES ("'+H+'", "'+Q+'", "'+K[J]+'")');}F.execute("COMMIT");return true;}});G.Event.on("unload",function(){if(F){F.close();}});G.StorageEngineGears.ENGINE_NAME="gears";G.StorageEngineGears.GEARS="beta.database";G.StorageEngineGears.DATABASE="yui.database";G.StorageEngineGears.isAvailable=function(){if(window.google&&window.google.gears){try{google.gears.factory.create(G.StorageEngineGears.GEARS);return true;}catch(H){}}return false;};G.StorageManager.register(G.StorageEngineGears);}());(function(){var G=YAHOO.util,B=YAHOO.lang,H=G.Dom,C=215,E=138,F=null,D=function(J,I){return J._location+J.DELIMITER+I;},A=function(J){if(!F){if(!B.isString(J.swfURL)){J.swfURL=G.StorageEngineSWF.SWFURL;}if(!J.containerID){var K=document.getElementsByTagName("body")[0],I=K.appendChild(document.createElement("div"));J.containerID=H.generateId(I);}if(!J.attributes){J.attributes={};}if(!J.attributes.flashVars){J.attributes.flashVars={};}J.attributes.flashVars.useCompression="true";J.attributes.version=9.115;F=new YAHOO.widget.SWF(J.containerID,J.swfURL,J.attributes);}};G.StorageEngineSWF=function(I,J){var K=this;G.StorageEngineSWF.superclass.constructor.call(K,I,G.StorageEngineSWF.ENGINE_NAME,J);A(K._cfg);F.unsubscribe("contentReady");F.addListener("contentReady",function(){K._swf=F._swf;F.initialized=true;var N=G.StorageManager.LOCATION_SESSION===K._location,M=G.Cookie.get("sessionKey"+G.StorageEngineSWF.ENGINE_NAME);for(var P=F.callSWF("getLength",[])-1;0<=P;P-=1){var O=F.callSWF("getNameAt",[P]),L=-1<O.indexOf(G.StorageManager.LOCATION_SESSION+K.DELIMITER);if(N&&!M){F.callSWF("removeItem",[O]);}else{if(N===L){K._addKey(O);}}}if(N){G.Cookie.set("sessionKey"+G.StorageEngineSWF.ENGINE_NAME,true);}K.length=K._keys.length;K.fireEvent(K.CE_READY);});if(F.initialized){F.fireEvent("contentReady");}};B.extend(G.StorageEngineSWF,G.StorageEngineKeyed,{_swf:null,_clear:function(){for(var J=this._keys.length-1;0<=J;J-=1){var I=this._keys[J];F.callSWF("removeItem",[I]);}this._keys=[];this.length=0;},_getItem:function(I){var J=D(this,I);return F.callSWF("getValueOf",[J]);},_key:function(I){return(this._keys[I]||"").replace(/^.*?__/,"");},_removeItem:function(I){var J=D(this,I);F.callSWF("removeItem",[J]);this._removeKey(J);},_setItem:function(I,K){var J=D(this,I),L;if(F.callSWF("getValueOf",[J])){this._removeItem(I);}this._addKey(J);if(F.callSWF("setItem",[J,K])){return true;}else{L=H.get(F._id);if(C>H.getStyle(L,"width").replace(/\D+/g,"")){H.setStyle(L,"width",C+"px");}if(E>H.getStyle(L,"height").replace(/\D+/g,"")){H.setStyle(L,"height",E+"px");}return F.callSWF("displaySettings",[]);}}});G.StorageEngineSWF.SWFURL="swfstore.swf";G.StorageEngineSWF.ENGINE_NAME="swf";G.StorageEngineSWF.isAvailable=function(){return(6<=YAHOO.env.ua.flash&&YAHOO.widget.SWF);};G.StorageManager.register(G.StorageEngineSWF);}());YAHOO.register("storage",YAHOO.util.Storage,{version:"2.8.1",build:"19"});
@@ -0,0 +1,1183 @@
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
+ * The Storage module manages client-side data storage.
9
+ * @module Storage
10
+ */
11
+
12
+ (function() {
13
+
14
+ // internal shorthand
15
+ var Y = YAHOO,
16
+ YU = Y.util,
17
+ YL = Y.lang,
18
+ _logOverwriteError;
19
+
20
+ if (! YU.Storage) {
21
+ _logOverwriteError = function(fxName) {
22
+ Y.log('Exception in YAHOO.util.Storage.?? - must be extended by a storage engine'.replace('??', fxName).replace('??', this.getName ? this.getName() : 'Unknown'), 'error');
23
+ };
24
+
25
+ /**
26
+ * The Storage class is an HTML 5 storage API clone, used to wrap individual storage implementations with a common API.
27
+ * @class Storage
28
+ * @namespace YAHOO.util
29
+ * @constructor
30
+ * @param location {String} Required. The storage location.
31
+ * @parm name {String} Required. The engine name.
32
+ * @param conf {Object} Required. A configuration object.
33
+ */
34
+ YU.Storage = function(location, name, conf) {
35
+ var that = this;
36
+ Y.env._id_counter += 1;
37
+
38
+ // protected variables
39
+ that._cfg = YL.isObject(conf) ? conf : {};
40
+ that._location = location;
41
+ that._name = name;
42
+ that.isReady = false;
43
+
44
+ // public variables
45
+ that.createEvent(that.CE_READY, {scope: that});
46
+ that.createEvent(that.CE_CHANGE, {scope: that});
47
+
48
+ that.subscribe(that.CE_READY, function() {
49
+ that.isReady = true;
50
+ });
51
+ };
52
+
53
+ YU.Storage.prototype = {
54
+
55
+ /**
56
+ * The event name for when the storage item is ready.
57
+ * @property CE_READY
58
+ * @type {String}
59
+ * @public
60
+ */
61
+ CE_READY: 'YUIStorageReady',
62
+
63
+ /**
64
+ * The event name for when the storage item has changed.
65
+ * @property CE_CHANGE
66
+ * @type {String}
67
+ * @public
68
+ */
69
+ CE_CHANGE: 'YUIStorageChange',
70
+
71
+ /**
72
+ * The delimiter uesed between the data type and the data.
73
+ * @property DELIMITER
74
+ * @type {String}
75
+ * @public
76
+ */
77
+ DELIMITER: '__',
78
+
79
+ /**
80
+ * The configuration of the engine.
81
+ * @property _cfg
82
+ * @type {Object}
83
+ * @protected
84
+ */
85
+ _cfg: '',
86
+
87
+ /**
88
+ * The name of this engine.
89
+ * @property _name
90
+ * @type {String}
91
+ * @protected
92
+ */
93
+ _name: '',
94
+
95
+ /**
96
+ * The location for this instance.
97
+ * @property _location
98
+ * @type {String}
99
+ * @protected
100
+ */
101
+ _location: '',
102
+
103
+ /**
104
+ * The current length of the keys.
105
+ * @property length
106
+ * @type {Number}
107
+ * @public
108
+ */
109
+ length: 0,
110
+
111
+ /**
112
+ * This engine singleton has been initialized already.
113
+ * @property isReady
114
+ * @type {String}
115
+ * @protected
116
+ */
117
+ isReady: false,
118
+
119
+ /**
120
+ * Clears any existing key/value pairs.
121
+ * @method clear
122
+ * @public
123
+ */
124
+ clear: function() {
125
+ this._clear();
126
+ this.length = 0;
127
+ },
128
+
129
+ /**
130
+ * Fetches the data stored and the provided key.
131
+ * @method getItem
132
+ * @param key {String} Required. The key used to reference this value (DOMString in HTML 5 spec).
133
+ * @return {String|NULL} The value stored at the provided key (DOMString in HTML 5 spec).
134
+ * @public
135
+ */
136
+ getItem: function(key) {
137
+ Y.log("Fetching item at " + key);
138
+ var item = this._getItem(key);
139
+ return YL.isValue(item) ? this._getValue(item) : null; // required by HTML 5 spec
140
+ },
141
+
142
+ /**
143
+ * Fetches the storage object's name; should be overwritten by storage engine.
144
+ * @method getName
145
+ * @return {String} The name of the data storage object.
146
+ * @public
147
+ */
148
+ getName: function() {return this._name;},
149
+
150
+ /**
151
+ * Tests if the key has been set (not in HTML 5 spec); should be overwritten by storage engine.
152
+ * @method hasKey
153
+ * @param key {String} Required. The key to search for.
154
+ * @return {Boolean} True when key has been set.
155
+ * @public
156
+ */
157
+ hasKey: function(key) {
158
+ return YL.isString(key) && this._hasKey(key);
159
+ },
160
+
161
+ /**
162
+ * Retrieve the key stored at the provided index; should be overwritten by storage engine.
163
+ * @method key
164
+ * @param index {Number} Required. The index to retrieve (unsigned long in HTML 5 spec).
165
+ * @return {String} Required. The key at the provided index (DOMString in HTML 5 spec).
166
+ * @public
167
+ */
168
+ key: function(index) {
169
+ Y.log("Fetching key at " + index);
170
+
171
+ if (YL.isNumber(index) && -1 < index && this.length > index) {
172
+ var value = this._key(index);
173
+ if (value) {return value;}
174
+ }
175
+
176
+ // this is thrown according to the HTML5 spec
177
+ throw('INDEX_SIZE_ERR - Storage.setItem - The provided index (' + index + ') is not available');
178
+ },
179
+
180
+ /**
181
+ * Remove an item from the data storage.
182
+ * @method setItem
183
+ * @param key {String} Required. The key to remove (DOMString in HTML 5 spec).
184
+ * @public
185
+ */
186
+ removeItem: function(key) {
187
+ Y.log("removing " + key);
188
+
189
+ if (this.hasKey(key)) {
190
+ var oldValue = this._getItem(key);
191
+ if (! oldValue) {oldValue = null;}
192
+ this._removeItem(key);
193
+ this.fireEvent(this.CE_CHANGE, new YU.StorageEvent(this, key, oldValue, null, YU.StorageEvent.TYPE_REMOVE_ITEM));
194
+ }
195
+ else {
196
+ // HTML 5 spec says to do nothing
197
+ }
198
+ },
199
+
200
+ /**
201
+ * Adds an item to the data storage.
202
+ * @method setItem
203
+ * @param key {String} Required. The key used to reference this value (DOMString in HTML 5 spec).
204
+ * @param data {Object} Required. The data to store at key (DOMString in HTML 5 spec).
205
+ * @public
206
+ * @throws QUOTA_EXCEEDED_ERROR
207
+ */
208
+ setItem: function(key, data) {
209
+ Y.log("SETTING " + data + " to " + key);
210
+
211
+ if (YL.isString(key)) {
212
+ var eventType = this.hasKey(key) ? YU.StorageEvent.TYPE_UPDATE_ITEM : YU.StorageEvent.TYPE_ADD_ITEM,
213
+ oldValue = this._getItem(key);
214
+ if (! oldValue) {oldValue = null;}
215
+
216
+ if (this._setItem(key, this._createValue(data))) {
217
+ this.fireEvent(this.CE_CHANGE, new YU.StorageEvent(this, key, oldValue, data, eventType));
218
+ }
219
+ else {
220
+ // this is thrown according to the HTML5 spec
221
+ throw('QUOTA_EXCEEDED_ERROR - Storage.setItem - The choosen storage method (' +
222
+ this.getName() + ') has exceeded capacity');
223
+ }
224
+ }
225
+ else {
226
+ // HTML 5 spec says to do nothing
227
+ }
228
+ },
229
+
230
+ /**
231
+ * Implementation of the clear login; should be overwritten by storage engine.
232
+ * @method _clear
233
+ * @protected
234
+ */
235
+ _clear: function() {
236
+ _logOverwriteError('_clear');
237
+ return '';
238
+ },
239
+
240
+ /**
241
+ * Converts the object into a string, with meta data (type), so it can be restored later.
242
+ * @method _createValue
243
+ * @param s {Object} Required. An object to store.
244
+ * @protected
245
+ */
246
+ _createValue: function(s) {
247
+ var type = (YL.isNull(s) || YL.isUndefined(s)) ? ('' + s) : typeof s;
248
+ return 'string' === type ? s : type + this.DELIMITER + s;
249
+ },
250
+
251
+ /**
252
+ * Implementation of the getItem login; should be overwritten by storage engine.
253
+ * @method _getItem
254
+ * @param key {String} Required. The key used to reference this value.
255
+ * @return {String|NULL} The value stored at the provided key.
256
+ * @protected
257
+ */
258
+ _getItem: function(key) {
259
+ _logOverwriteError('_getItem');
260
+ return '';
261
+ },
262
+
263
+ /**
264
+ * Converts the stored value into its appropriate type.
265
+ * @method _getValue
266
+ * @param s {String} Required. The stored value.
267
+ * @protected
268
+ */
269
+ _getValue: function(s) {
270
+ var a = s ? s.split(this.DELIMITER) : [];
271
+ if (1 == a.length) {return s;}
272
+
273
+ switch (a[0]) {
274
+ case 'boolean': return 'true' === a[1];
275
+ case 'number': return parseFloat(a[1]);
276
+ case 'null': return null;
277
+ default: return a[1];
278
+ }
279
+ },
280
+
281
+ /**
282
+ * Implementation of the key logic; should be overwritten by storage engine.
283
+ * @method _key
284
+ * @param index {Number} Required. The index to retrieve (unsigned long in HTML 5 spec).
285
+ * @return {String|NULL} Required. The key at the provided index (DOMString in HTML 5 spec).
286
+ * @protected
287
+ */
288
+ _key: function(index) {
289
+ _logOverwriteError('_key');
290
+ return '';
291
+ },
292
+
293
+ /*
294
+ * Implementation to fetch evaluate the existence of a key.
295
+ * @see YAHOO.util.Storage._hasKey
296
+ */
297
+ _hasKey: function(key) {
298
+ return null !== this._getItem(key);
299
+ },
300
+
301
+ /**
302
+ * Implementation of the removeItem login; should be overwritten by storage engine.
303
+ * @method _removeItem
304
+ * @param key {String} Required. The key to remove.
305
+ * @protected
306
+ */
307
+ _removeItem: function(key) {
308
+ _logOverwriteError('_removeItem');
309
+ return '';
310
+ },
311
+
312
+ /**
313
+ * Implementation of the setItem login; should be overwritten by storage engine.
314
+ * @method _setItem
315
+ * @param key {String} Required. The key used to reference this value.
316
+ * @param data {Object} Required. The data to storage at key.
317
+ * @return {Boolean} True when successful, false when size QUOTA exceeded.
318
+ * @protected
319
+ */
320
+ _setItem: function(key, data) {
321
+ _logOverwriteError('_setItem');
322
+ return '';
323
+ }
324
+ };
325
+
326
+ YL.augmentProto(YU.Storage, YU.EventProvider);
327
+ }
328
+
329
+ }());
330
+ /**
331
+ * The StorageManager class is a singleton that registers DataStorage objects and returns instances of those objects.
332
+ * @class StorageManager
333
+ * @namespace YAHOO.util
334
+ * @static
335
+ */
336
+ (function() {
337
+ // internal shorthand
338
+ var Y = YAHOO.util,
339
+ YL = YAHOO.lang,
340
+
341
+ // private variables
342
+ _locationEngineMap = {}, // cached engines
343
+ _registeredEngineSet = [], // set of available engines
344
+ _registeredEngineMap = {}, // map of available engines
345
+
346
+ /**
347
+ * Fetches a storage constructor if it is available, otherwise returns NULL.
348
+ * @method _getClass
349
+ * @param klass {Function} Required. The storage constructor to test.
350
+ * @return {Function} An available storage constructor or NULL.
351
+ * @private
352
+ */
353
+ _getClass = function(klass) {
354
+ return (klass && klass.isAvailable()) ? klass : null;
355
+ },
356
+
357
+ /**
358
+ * Fetches the storage engine from the cache, or creates and caches it.
359
+ * @method _getStorageEngine
360
+ * @param location {String} Required. The location to store.
361
+ * @param klass {Function} Required. A pointer to the engineType Class.
362
+ * @param conf {Object} Optional. Additional configuration for the data source engine.
363
+ * @private
364
+ */
365
+ _getStorageEngine = function(location, klass, conf) {
366
+ var engine = _locationEngineMap[location + klass.ENGINE_NAME];
367
+
368
+ if (! engine) {
369
+ engine = new klass(location, conf);
370
+ _locationEngineMap[location + klass.ENGINE_NAME] = engine;
371
+ }
372
+
373
+ return engine;
374
+ },
375
+
376
+ /**
377
+ * Ensures that the location is valid before returning it or a default value.
378
+ * @method _getValidLocation
379
+ * @param location {String} Required. The location to evaluate.
380
+ * @private
381
+ */
382
+ _getValidLocation = function(location) {
383
+ switch (location) {
384
+ case Y.StorageManager.LOCATION_LOCAL:
385
+ case Y.StorageManager.LOCATION_SESSION:
386
+ return location;
387
+
388
+ default: return Y.StorageManager.LOCATION_SESSION;
389
+ }
390
+ };
391
+
392
+ // public namespace
393
+ Y.StorageManager = {
394
+
395
+ /**
396
+ * The storage location - session; data cleared at the end of a user's session.
397
+ * @property LOCATION_SESSION
398
+ * @type {String}
399
+ * @static
400
+ */
401
+ LOCATION_SESSION: 'sessionStorage',
402
+
403
+ /**
404
+ * The storage location - local; data cleared on demand.
405
+ * @property LOCATION_LOCAL
406
+ * @type {String}
407
+ * @static
408
+ */
409
+ LOCATION_LOCAL: 'localStorage',
410
+
411
+ /**
412
+ * Fetches the desired engine type or first available engine type.
413
+ * @method get
414
+ * @param engineType {String} Optional. The engine type, see engines.
415
+ * @param location {String} Optional. The storage location - LOCATION_SESSION & LOCATION_LOCAL; default is LOCAL.
416
+ * @param conf {Object} Optional. Additional configuration for the getting the storage engine.
417
+ * {
418
+ * engine: {Object} configuration parameters for the desired engine
419
+ * order: {Array} an array of storage engine names; the desired order to try engines}
420
+ * }
421
+ * @static
422
+ */
423
+ get: function(engineType, location, conf) {
424
+ var _cfg = YL.isObject(conf) ? conf : {},
425
+ klass = _getClass(_registeredEngineMap[engineType]);
426
+
427
+ if (! klass && ! _cfg.force) {
428
+ var i, j;
429
+
430
+ if (_cfg.order) {
431
+ j = _cfg.order.length;
432
+
433
+ for (i = 0; i < j && ! klass; i += 1) {
434
+ klass = _getClass(_cfg.order[i]);
435
+ }
436
+ }
437
+
438
+ if (! klass) {
439
+ j = _registeredEngineSet.length;
440
+
441
+ for (i = 0; i < j && ! klass; i += 1) {
442
+ klass = _getClass(_registeredEngineSet[i]);
443
+ }
444
+ }
445
+ }
446
+
447
+ if (klass) {
448
+ return _getStorageEngine(_getValidLocation(location), klass, _cfg.engine);
449
+ }
450
+
451
+ throw('YAHOO.util.StorageManager.get - No engine available, please include an engine before calling this function.');
452
+ },
453
+
454
+ /*
455
+ * Estimates the size of the string using 1 byte for each alpha-numeric character and 3 for each non-alpha-numeric character.
456
+ * @method getByteSize
457
+ * @param s {String} Required. The string to evaulate.
458
+ * @return {Number} The estimated string size.
459
+ * @private
460
+ */
461
+ getByteSize: function(s) {
462
+ return encodeURIComponent('' + s).length;
463
+ },
464
+
465
+ /**
466
+ * Registers a engineType Class with the StorageManager singleton; first in is the first out.
467
+ * @method register
468
+ * @param engineConstructor {Function} Required. The engine constructor function, see engines.
469
+ * @return {Boolean} When successfully registered.
470
+ * @static
471
+ */
472
+ register: function(engineConstructor) {
473
+ if (YL.isFunction(engineConstructor) && YL.isFunction(engineConstructor.isAvailable) && YL.isString(engineConstructor.ENGINE_NAME)) {
474
+ _registeredEngineMap[engineConstructor.ENGINE_NAME] = engineConstructor;
475
+ _registeredEngineSet.push(engineConstructor);
476
+ return true;
477
+ }
478
+
479
+ return false;
480
+ }
481
+ };
482
+
483
+ YAHOO.register("StorageManager", Y.SWFStore, {version: "2.8.1", build: "19"});
484
+ }());
485
+ (function() {
486
+
487
+ /**
488
+ * The StorageEvent class manages the storage events by emulating the HTML 5 implementation.
489
+ * @namespace YAHOO.util
490
+ * @class StorageEvent
491
+ * @constructor
492
+ * @param storageArea {Object} Required. The Storage object that was affected.
493
+ * @param key {String} Required. The key being changed; DOMString in HTML 5 spec.
494
+ * @param oldValue {String} Required. The old value of the key being changed; DOMString in HTML 5 spec.
495
+ * @param newValue {String} Required. The new value of the key being changed; DOMString in HTML 5 spec.
496
+ * @param type {String} Required. The storage event type.
497
+ */
498
+ YAHOO.util.StorageEvent = function(storageArea, key, oldValue, newValue, type) {
499
+ this.key = key;
500
+ this.oldValue = oldValue;
501
+ this.newValue = newValue;
502
+ this.url = window.location.href;
503
+ this.window = window; // todo: think about the CAJA and innocent code
504
+ this.storageArea = storageArea;
505
+ this.type = type;
506
+ };
507
+
508
+ YAHOO.lang.augmentObject(YAHOO.util.StorageEvent, {
509
+ TYPE_ADD_ITEM: 'addItem',
510
+ TYPE_REMOVE_ITEM: 'removeItem',
511
+ TYPE_UPDATE_ITEM: 'updateItem'
512
+ });
513
+
514
+ YAHOO.util.StorageEvent.prototype = {
515
+
516
+ /**
517
+ * The 'key' attribute represents the key being changed.
518
+ * @property key
519
+ * @type {String}
520
+ * @static
521
+ * @readonly
522
+ */
523
+ key: null,
524
+
525
+ /**
526
+ * The 'newValue' attribute represents the new value of the key being changed.
527
+ * @property newValue
528
+ * @type {String}
529
+ * @static
530
+ * @readonly
531
+ */
532
+ newValue: null,
533
+
534
+ /**
535
+ * The 'oldValue' attribute represents the old value of the key being changed.
536
+ * @property oldValue
537
+ * @type {String}
538
+ * @static
539
+ * @readonly
540
+ */
541
+ oldValue: null,
542
+
543
+ /**
544
+ * The 'source' attribute represents the WindowProxy object of the browsing context of the document whose key changed.
545
+ * @property source
546
+ * @type {Object}
547
+ * @static
548
+ * @readonly
549
+ */
550
+ source: null,
551
+
552
+ /**
553
+ * The 'storageArea' attribute represents the Storage object that was affected.
554
+ * @property storageArea
555
+ * @type {Object}
556
+ * @static
557
+ * @readonly
558
+ */
559
+ storageArea: null,
560
+
561
+ /**
562
+ * The 'type' attribute represents the Storage event type.
563
+ * @property type
564
+ * @type {Object}
565
+ * @static
566
+ * @readonly
567
+ */
568
+ type: null,
569
+
570
+ /**
571
+ * The 'url' attribute represents the address of the document whose key changed.
572
+ * @property url
573
+ * @type {String}
574
+ * @static
575
+ * @readonly
576
+ */
577
+ url: null
578
+ };
579
+
580
+ }());
581
+ (function() {
582
+ var Y = YAHOO.util,
583
+ YL = YAHOO.lang;
584
+
585
+ /**
586
+ * The StorageEngineKeyed class implements the interface necessary for managing keys.
587
+ * @namespace YAHOO.util
588
+ * @class StorageEngineKeyed
589
+ * @constructor
590
+ * @extend YAHOO.util.Storage
591
+ */
592
+ Y.StorageEngineKeyed = function() {
593
+ Y.StorageEngineKeyed.superclass.constructor.apply(this, arguments);
594
+ this._keys = [];
595
+ this._keyMap = {};
596
+ };
597
+
598
+ YL.extend(Y.StorageEngineKeyed, Y.Storage, {
599
+
600
+ /**
601
+ * A collection of keys applicable to the current location. This should never be edited by the developer.
602
+ * @property _keys
603
+ * @type {Array}
604
+ * @protected
605
+ */
606
+ _keys: null,
607
+
608
+ /**
609
+ * A map of keys to their applicable position in keys array. This should never be edited by the developer.
610
+ * @property _keyMap
611
+ * @type {Object}
612
+ * @protected
613
+ */
614
+ _keyMap: null,
615
+
616
+ /**
617
+ * Adds the key to the set.
618
+ * @method _addKey
619
+ * @param key {String} Required. The key to evaluate.
620
+ * @protected
621
+ */
622
+ _addKey: function(key) {
623
+ this._keyMap[key] = this.length;
624
+ this._keys.push(key);
625
+ this.length = this._keys.length;
626
+ },
627
+
628
+ /**
629
+ * Evaluates if a key exists in the keys array; indexOf does not work in all flavors of IE.
630
+ * @method _indexOfKey
631
+ * @param key {String} Required. The key to evaluate.
632
+ * @protected
633
+ */
634
+ _indexOfKey: function(key) {
635
+ var i = this._keyMap[key];
636
+ return undefined === i ? -1 : i;
637
+ },
638
+
639
+ /**
640
+ * Removes a key from the keys array.
641
+ * @method _removeKey
642
+ * @param key {String} Required. The key to remove.
643
+ * @protected
644
+ */
645
+ _removeKey: function(key) {
646
+ var j = this._indexOfKey(key),
647
+ rest = this._keys.slice(j + 1);
648
+
649
+ delete this._keyMap[key];
650
+
651
+ for (var k in this._keyMap) {
652
+ if (j < this._keyMap[k]) {
653
+ this._keyMap[k] -= 1;
654
+ }
655
+ }
656
+
657
+ this._keys.length = j;
658
+ this._keys = this._keys.concat(rest);
659
+ this.length = this._keys.length;
660
+ }
661
+ });
662
+ }());
663
+ /*
664
+ * HTML limitations:
665
+ * - 5MB in FF and Safari, 10MB in IE 8
666
+ * - only FF 3.5 recovers session storage after a browser crash
667
+ *
668
+ * Thoughts:
669
+ * - how can we not use cookies to handle session
670
+ */
671
+ (function() {
672
+ // internal shorthand
673
+ var Y = YAHOO.util,
674
+ YL = YAHOO.lang,
675
+
676
+ /*
677
+ * Required for IE 8 to make synchronous.
678
+ */
679
+ _beginTransaction = function(engine) {
680
+ if (engine.begin) {engine.begin();}
681
+ },
682
+
683
+ /*
684
+ * Required for IE 8 to make synchronous.
685
+ */
686
+ _commitTransaction = function(engine) {
687
+ if (engine.commit) {engine.commit();}
688
+ };
689
+
690
+ /**
691
+ * The StorageEngineHTML5 class implements the HTML5 storage engine.
692
+ * @namespace YAHOO.util
693
+ * @class StorageEngineHTML5
694
+ * @constructor
695
+ * @extend YAHOO.util.Storage
696
+ * @param location {String} Required. The storage location.
697
+ * @param conf {Object} Required. A configuration object.
698
+ */
699
+ Y.StorageEngineHTML5 = function(location, conf) {
700
+ var _this = this;
701
+ Y.StorageEngineHTML5.superclass.constructor.call(_this, location, Y.StorageEngineHTML5.ENGINE_NAME, conf);// not set, are cookies available
702
+ _this._engine = window[location];
703
+ _this.length = _this._engine.length;
704
+ YL.later(250, _this, function() { // temporary solution so that CE_READY can be subscribed to after this object is created
705
+ _this.fireEvent(_this.CE_READY);
706
+ });
707
+ };
708
+
709
+ YAHOO.lang.extend(Y.StorageEngineHTML5, Y.Storage, {
710
+
711
+ _engine: null,
712
+
713
+ /*
714
+ * Implementation to clear the values from the storage engine.
715
+ * @see YAHOO.util.Storage._clear
716
+ */
717
+ _clear: function() {
718
+ var _this = this;
719
+ if (_this._engine.clear) {
720
+ _this._engine.clear();
721
+ }
722
+ // for FF 3, fixed in FF 3.5
723
+ else {
724
+ for (var i = _this.length, key; 0 <= i; i -= 1) {
725
+ key = _this._key(i);
726
+ _this._removeItem(key);
727
+ }
728
+ }
729
+ },
730
+
731
+ /*
732
+ * Implementation to fetch an item from the storage engine.
733
+ * @see YAHOO.util.Storage._getItem
734
+ */
735
+ _getItem: function(key) {
736
+ var o = this._engine.getItem(key);
737
+ return YL.isObject(o) ? o.value : o; // for FF 3, fixed in FF 3.5
738
+ },
739
+
740
+ /*
741
+ * Implementation to fetch a key from the storage engine.
742
+ * @see YAHOO.util.Storage._key
743
+ */
744
+ _key: function(index) {return this._engine.key(index);},
745
+
746
+ /*
747
+ * Implementation to remove an item from the storage engine.
748
+ * @see YAHOO.util.Storage._removeItem
749
+ */
750
+ _removeItem: function(key) {
751
+ var _this = this;
752
+ _beginTransaction(_this._engine);
753
+ _this._engine.removeItem(key);
754
+ _commitTransaction(_this._engine);
755
+ _this.length = _this._engine.length;
756
+ },
757
+
758
+ /*
759
+ * Implementation to remove an item from the storage engine.
760
+ * @see YAHOO.util.Storage._setItem
761
+ */
762
+ _setItem: function(key, value) {
763
+ var _this = this;
764
+
765
+ try {
766
+ _beginTransaction(_this._engine);
767
+ _this._engine.setItem(key, value);
768
+ _commitTransaction(_this._engine);
769
+ _this.length = _this._engine.length;
770
+ return true;
771
+ }
772
+ catch (e) {
773
+ return false;
774
+ }
775
+ }
776
+ }, true);
777
+
778
+ Y.StorageEngineHTML5.ENGINE_NAME = 'html5';
779
+ Y.StorageEngineHTML5.isAvailable = function() {
780
+ return window.localStorage;
781
+ };
782
+ Y.StorageManager.register(Y.StorageEngineHTML5);
783
+ }());
784
+ /*
785
+ * Gears limitation:
786
+ * - SQLite limitations - http://www.sqlite.org/limits.html
787
+ * - DB Best Practices - http://code.google.com/apis/gears/gears_faq.html#bestPracticeDB
788
+ * - the user must approve before gears can be used
789
+ * - each SQL query has a limited number of characters (9948 bytes), data will need to be spread across rows
790
+ * - no query should insert or update more than 9948 bytes of data in a single statement or GEARs will throw:
791
+ * [Exception... "'Error: SQL statement is too long.' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]
792
+ *
793
+ * Thoughts:
794
+ * - we may want to implement additional functions for the gears only implementation
795
+ * - how can we not use cookies to handle session location
796
+ */
797
+ (function() {
798
+ // internal shorthand
799
+ var Y = YAHOO.util,
800
+ YL = YAHOO.lang,
801
+ _SQL_STMT_LIMIT = 9948,
802
+ _TABLE_NAME = 'YUIStorageEngine',
803
+
804
+ // local variables
805
+ _engine = null,
806
+
807
+ eURI = encodeURIComponent,
808
+ dURI = decodeURIComponent;
809
+
810
+ /**
811
+ * The StorageEngineGears class implements the Google Gears storage engine.
812
+ * @namespace YAHOO.util
813
+ * @class StorageEngineGears
814
+ * @constructor
815
+ * @extend YAHOO.util.Storage
816
+ * @param location {String} Required. The storage location.
817
+ * @param conf {Object} Required. A configuration object.
818
+ */
819
+ Y.StorageEngineGears = function(location, conf) {
820
+ var _this = this;
821
+ Y.StorageEngineGears.superclass.constructor.call(_this, location, Y.StorageEngineGears.ENGINE_NAME, conf);
822
+
823
+ if (! _engine) {
824
+ // create the database
825
+ _engine = google.gears.factory.create(Y.StorageEngineGears.GEARS);
826
+ _engine.open(window.location.host + '-' + Y.StorageEngineGears.DATABASE);
827
+ _engine.execute('CREATE TABLE IF NOT EXISTS ' + _TABLE_NAME + ' (key TEXT, location TEXT, value TEXT)');
828
+ }
829
+
830
+ var isSessionStorage = Y.StorageManager.LOCATION_SESSION === _this._location,
831
+ sessionKey = Y.Cookie.get('sessionKey' + Y.StorageEngineGears.ENGINE_NAME);
832
+
833
+ if (! sessionKey) {
834
+ _engine.execute('BEGIN');
835
+ _engine.execute('DELETE FROM ' + _TABLE_NAME + ' WHERE location="' + eURI(Y.StorageManager.LOCATION_SESSION) + '"');
836
+ _engine.execute('COMMIT');
837
+ }
838
+
839
+ var rs = _engine.execute('SELECT key FROM ' + _TABLE_NAME + ' WHERE location="' + eURI(_this._location) + '"'),
840
+ keyMap = {};
841
+
842
+ try {
843
+ // iterate on the rows and map the keys
844
+ while (rs.isValidRow()) {
845
+ var fld = dURI(rs.field(0));
846
+
847
+ if (! keyMap[fld]) {
848
+ keyMap[fld] = true;
849
+ _this._addKey(fld);
850
+ }
851
+
852
+ rs.next();
853
+ }
854
+ }
855
+ finally {
856
+ rs.close();
857
+ }
858
+
859
+ // this is session storage, ensure that the session key is set
860
+ if (isSessionStorage) {
861
+ Y.Cookie.set('sessionKey' + Y.StorageEngineGears.ENGINE_NAME, true);
862
+ }
863
+
864
+ _this.length = _this._keys.length;
865
+ YL.later(250, _this, function() { // temporary solution so that CE_READY can be subscribed to after this object is created
866
+ _this.fireEvent(_this.CE_READY);
867
+ });
868
+ };
869
+
870
+ YL.extend(Y.StorageEngineGears, Y.StorageEngineKeyed, {
871
+
872
+ /*
873
+ * Implementation to clear the values from the storage engine.
874
+ * @see YAHOO.util.Storage._clear
875
+ */
876
+ _clear: function() {
877
+ _engine.execute('BEGIN');
878
+ _engine.execute('DELETE FROM ' + _TABLE_NAME + ' WHERE location="' + eURI(this._location) + '"');
879
+ _engine.execute('COMMIT');
880
+ this._keys = [];
881
+ this.length = 0;
882
+ },
883
+
884
+ /*
885
+ * Implementation to fetch an item from the storage engine.
886
+ * @see YAHOO.util.Storage._getItem
887
+ */
888
+ _getItem: function(key) {
889
+ var rs = _engine.execute('SELECT value FROM ' + _TABLE_NAME + ' WHERE key="' + eURI(key) + '" AND location="' + eURI(this._location) + '"'),
890
+ value = '';
891
+
892
+ try {
893
+ while (rs.isValidRow()) {
894
+ var temp = rs.field(0);
895
+ value += rs.field(0);
896
+ rs.next();
897
+ }
898
+ }
899
+ finally {
900
+ rs.close();
901
+ }
902
+
903
+ return value ? dURI(value) : null;
904
+ },
905
+
906
+ /*
907
+ * Implementation to fetch a key from the storage engine.
908
+ * @see YAHOO.util.Storage.key
909
+ */
910
+ _key: function(index) {return this._keys[index];},
911
+
912
+ /*
913
+ * Implementation to remove an item from the storage engine.
914
+ * @see YAHOO.util.Storage._removeItem
915
+ */
916
+ _removeItem: function(key) {
917
+ _engine.execute('BEGIN');
918
+ _engine.execute('DELETE FROM ' + _TABLE_NAME + ' WHERE key="' + eURI(key) + '" AND location="' + eURI(this._location) + '"');
919
+ _engine.execute('COMMIT');
920
+ this._removeKey(key);
921
+ },
922
+
923
+ /*
924
+ * Implementation to remove an item from the storage engine.
925
+ * @see YAHOO.util.Storage._setItem
926
+ */
927
+ _setItem: function(key, data) {
928
+
929
+ if (! this.hasKey(key)) {
930
+ this._addKey(key);
931
+ }
932
+
933
+ var _key = eURI(key),
934
+ _location = eURI(this._location),
935
+ _value = eURI(data),
936
+ _values = [],
937
+ _len = _SQL_STMT_LIMIT - (_key + _location).length;
938
+
939
+ // the length of the value exceeds the available space
940
+ if (_len < _value.length) {
941
+ for (var i = 0, j = _value.length; i < j; i += _len) {
942
+ _values.push(_value.substr(i, _len));
943
+ }
944
+ }
945
+ else {
946
+ _values.push(_value);
947
+ }
948
+
949
+ // Google recommends using INSERT instead of update, because it is faster
950
+ _engine.execute('BEGIN');
951
+ _engine.execute('DELETE FROM ' + _TABLE_NAME + ' WHERE key="' + eURI(key) + '" AND location="' + eURI(this._location) + '"');
952
+ for (var m = 0, n = _values.length; m < n; m += 1) {
953
+ _engine.execute('INSERT INTO ' + _TABLE_NAME + ' VALUES ("' + _key + '", "' + _location + '", "' + _values[m] + '")');
954
+ }
955
+ _engine.execute('COMMIT');
956
+
957
+ return true;
958
+ }
959
+ });
960
+
961
+ // releases the engine when the page unloads
962
+ Y.Event.on('unload', function() {
963
+ if (_engine) {_engine.close();}
964
+ });
965
+ Y.StorageEngineGears.ENGINE_NAME = 'gears';
966
+ Y.StorageEngineGears.GEARS = 'beta.database';
967
+ Y.StorageEngineGears.DATABASE = 'yui.database';
968
+ Y.StorageEngineGears.isAvailable = function() {
969
+ if (window.google && window.google.gears) {
970
+ try {
971
+ // this will throw an exception if the user denies gears
972
+ google.gears.factory.create(Y.StorageEngineGears.GEARS);
973
+ return true;
974
+ }
975
+ catch (e) {
976
+ // no need to do anything
977
+ }
978
+ }
979
+
980
+ return false;
981
+ };
982
+ Y.StorageManager.register(Y.StorageEngineGears);
983
+ }());
984
+ /*
985
+ * SWF limitation:
986
+ * - only 100,000 bytes of data may be stored this way
987
+ * - data is publicly available on user machine
988
+ *
989
+ * Thoughts:
990
+ * - data can be shared across browsers
991
+ * - how can we not use cookies to handle session location
992
+ */
993
+ (function() {
994
+ // internal shorthand
995
+ var Y = YAHOO.util,
996
+ YL = YAHOO.lang,
997
+ YD = Y.Dom,
998
+
999
+ /*
1000
+ * The minimum width required to be able to display the settings panel within the SWF.
1001
+ */
1002
+ MINIMUM_WIDTH = 215,
1003
+
1004
+ /*
1005
+ * The minimum height required to be able to display the settings panel within the SWF.
1006
+ */
1007
+ MINIMUM_HEIGHT = 138,
1008
+
1009
+ // local variables
1010
+ _engine = null,
1011
+
1012
+ /*
1013
+ * Creates a location bound key.
1014
+ */
1015
+ _getKey = function(that, key) {
1016
+ return that._location + that.DELIMITER + key;
1017
+ },
1018
+
1019
+ /*
1020
+ * Initializes the engine, if it isn't already initialized.
1021
+ */
1022
+ _initEngine = function(cfg) {
1023
+ if (! _engine) {
1024
+ if (! YL.isString(cfg.swfURL)) {cfg.swfURL = Y.StorageEngineSWF.SWFURL;}
1025
+ if (! cfg.containerID) {
1026
+ var bd = document.getElementsByTagName('body')[0],
1027
+ container = bd.appendChild(document.createElement('div'));
1028
+ cfg.containerID = YD.generateId(container);
1029
+ }
1030
+
1031
+ if (! cfg.attributes) {cfg.attributes = {};}
1032
+ if (! cfg.attributes.flashVars) {cfg.attributes.flashVars = {};}
1033
+ cfg.attributes.flashVars.useCompression = 'true';
1034
+ cfg.attributes.version = 9.115;
1035
+ _engine = new YAHOO.widget.SWF(cfg.containerID, cfg.swfURL, cfg.attributes);
1036
+ }
1037
+ };
1038
+
1039
+ /**
1040
+ * The StorageEngineSWF class implements the SWF storage engine.
1041
+ * @namespace YAHOO.util
1042
+ * @class StorageEngineSWF
1043
+ * @uses YAHOO.widget.SWF
1044
+ * @constructor
1045
+ * @extend YAHOO.util.Storage
1046
+ * @param location {String} Required. The storage location.
1047
+ * @param conf {Object} Required. A configuration object.
1048
+ */
1049
+ Y.StorageEngineSWF = function(location, conf) {
1050
+ var _this = this;
1051
+ Y.StorageEngineSWF.superclass.constructor.call(_this, location, Y.StorageEngineSWF.ENGINE_NAME, conf);
1052
+
1053
+ _initEngine(_this._cfg);
1054
+
1055
+ // evaluates when the SWF is loaded
1056
+ _engine.unsubscribe('contentReady'); // prevents local and session content ready callbacks from firing, when switching between context
1057
+ _engine.addListener("contentReady", function() {
1058
+ _this._swf = _engine._swf;
1059
+ _engine.initialized = true;
1060
+
1061
+ var isSessionStorage = Y.StorageManager.LOCATION_SESSION === _this._location,
1062
+ sessionKey = Y.Cookie.get('sessionKey' + Y.StorageEngineSWF.ENGINE_NAME);
1063
+
1064
+ for (var i = _engine.callSWF("getLength", []) - 1; 0 <= i; i -= 1) {
1065
+ var key = _engine.callSWF("getNameAt", [i]),
1066
+ isKeySessionStorage = -1 < key.indexOf(Y.StorageManager.LOCATION_SESSION + _this.DELIMITER);
1067
+
1068
+ // this is session storage, but the session key is not set, so remove item
1069
+ if (isSessionStorage && ! sessionKey) {
1070
+ _engine.callSWF("removeItem", [key]);
1071
+ }
1072
+ // the key matches the storage type, add to key collection
1073
+ else if (isSessionStorage === isKeySessionStorage) {
1074
+ _this._addKey(key);
1075
+ }
1076
+ }
1077
+
1078
+ // this is session storage, ensure that the session key is set
1079
+ if (isSessionStorage) {
1080
+ Y.Cookie.set('sessionKey' + Y.StorageEngineSWF.ENGINE_NAME, true);
1081
+ }
1082
+
1083
+ _this.length = _this._keys.length;
1084
+ _this.fireEvent(_this.CE_READY);
1085
+ });
1086
+
1087
+ // required for pages with both a session and local storage
1088
+ if (_engine.initialized) {_engine.fireEvent('contentReady');}
1089
+ };
1090
+
1091
+ YL.extend(Y.StorageEngineSWF, Y.StorageEngineKeyed, {
1092
+ /**
1093
+ * The underlying SWF of the engine, exposed so developers can modify the adapter behavior.
1094
+ * @property _swf
1095
+ * @type {Object}
1096
+ * @protected
1097
+ */
1098
+ _swf: null,
1099
+
1100
+ /*
1101
+ * Implementation to clear the values from the storage engine.
1102
+ * @see YAHOO.util.Storage._clear
1103
+ */
1104
+ _clear: function() {
1105
+ for (var i = this._keys.length - 1; 0 <= i; i -= 1) {
1106
+ var key = this._keys[i];
1107
+ _engine.callSWF("removeItem", [key]);
1108
+ }
1109
+
1110
+ this._keys = [];
1111
+ this.length = 0;
1112
+ },
1113
+
1114
+ /*
1115
+ * Implementation to fetch an item from the storage engine.
1116
+ * @see YAHOO.util.Storage._getItem
1117
+ */
1118
+ _getItem: function(key) {
1119
+ var _key = _getKey(this, key);
1120
+ return _engine.callSWF("getValueOf", [_key]);
1121
+ },
1122
+
1123
+ /*
1124
+ * Implementation to fetch a key from the storage engine.
1125
+ * @see YAHOO.util.Storage.key
1126
+ */
1127
+ _key: function(index) {
1128
+ return (this._keys[index] || '').replace(/^.*?__/, '');
1129
+ },
1130
+
1131
+ /*
1132
+ * Implementation to remove an item from the storage engine.
1133
+ * @see YAHOO.util.Storage._removeItem
1134
+ */
1135
+ _removeItem: function(key) {
1136
+ var _key = _getKey(this, key);
1137
+ _engine.callSWF("removeItem", [_key]);
1138
+ this._removeKey(_key);
1139
+ },
1140
+
1141
+ /*
1142
+ * Implementation to remove an item from the storage engine.
1143
+ * @see YAHOO.util.Storage._setItem
1144
+ */
1145
+ _setItem: function(key, data) {
1146
+ var _key = _getKey(this, key), swfNode;
1147
+
1148
+ // setting the value returns false if the value didn't change,
1149
+ // so I changed this to clear the key if it exists so that the
1150
+ // fork below works.
1151
+ if (_engine.callSWF("getValueOf", [_key])) {
1152
+ this._removeItem(key);
1153
+ }
1154
+
1155
+ this._addKey(_key);
1156
+
1157
+ if (_engine.callSWF("setItem", [_key, data])) {
1158
+ return true;
1159
+ } else {
1160
+
1161
+ // @TODO we should not assume that a false return means that
1162
+ // the quota has been exceeded. this dialog should only be
1163
+ // displayed if the quotaExceededError event fired.
1164
+ swfNode = YD.get(_engine._id);
1165
+ if (MINIMUM_WIDTH > YD.getStyle(swfNode, 'width').replace(/\D+/g, '')) {
1166
+ YD.setStyle(swfNode, 'width', MINIMUM_WIDTH + 'px');
1167
+ }
1168
+ if (MINIMUM_HEIGHT > YD.getStyle(swfNode, 'height').replace(/\D+/g, '')) {
1169
+ YD.setStyle(swfNode, 'height', MINIMUM_HEIGHT + 'px');
1170
+ }
1171
+ return _engine.callSWF("displaySettings", []);
1172
+ }
1173
+ }
1174
+ });
1175
+
1176
+ Y.StorageEngineSWF.SWFURL = "swfstore.swf";
1177
+ Y.StorageEngineSWF.ENGINE_NAME = 'swf';
1178
+ Y.StorageEngineSWF.isAvailable = function() {
1179
+ return (6 <= YAHOO.env.ua.flash && YAHOO.widget.SWF);
1180
+ };
1181
+ Y.StorageManager.register(Y.StorageEngineSWF);
1182
+ }());
1183
+ YAHOO.register("storage", YAHOO.util.Storage, {version: "2.8.1", build: "19"});