jquery-ui-rails 4.0.0 → 5.0.4

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.

Potentially problematic release.


This version of jquery-ui-rails might be problematic. Click here for more details.

Files changed (239) hide show
  1. data/.travis.yml +0 -1
  2. data/Gemfile +1 -1
  3. data/History.md +62 -0
  4. data/README.md +86 -74
  5. data/Rakefile +69 -37
  6. data/VERSIONS.md +36 -0
  7. data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  8. data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  9. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  10. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  11. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  12. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  13. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  14. data/{vendor → app}/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  15. data/{vendor → app}/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  16. data/{vendor → app}/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  17. data/{vendor → app}/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  18. data/{vendor → app}/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
  19. data/{vendor → app}/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  20. data/{vendor/assets/javascripts/jquery.ui.accordion.js → app/assets/javascripts/jquery-ui/accordion.js} +90 -74
  21. data/{vendor/assets/javascripts/jquery.ui.autocomplete.js → app/assets/javascripts/jquery-ui/autocomplete.js} +105 -91
  22. data/{vendor/assets/javascripts/jquery.ui.button.js → app/assets/javascripts/jquery-ui/button.js} +60 -68
  23. data/{vendor/assets/javascripts/jquery.ui.core.js → app/assets/javascripts/jquery-ui/core.js} +112 -132
  24. data/app/assets/javascripts/jquery-ui/datepicker-af.js +37 -0
  25. data/app/assets/javascripts/jquery-ui/datepicker-ar-DZ.js +37 -0
  26. data/app/assets/javascripts/jquery-ui/datepicker-ar.js +38 -0
  27. data/app/assets/javascripts/jquery-ui/datepicker-az.js +37 -0
  28. data/app/assets/javascripts/jquery-ui/datepicker-be.js +37 -0
  29. data/app/assets/javascripts/jquery-ui/datepicker-bg.js +38 -0
  30. data/app/assets/javascripts/jquery-ui/datepicker-bs.js +37 -0
  31. data/app/assets/javascripts/jquery-ui/datepicker-ca.js +37 -0
  32. data/app/assets/javascripts/jquery-ui/datepicker-cs.js +37 -0
  33. data/app/assets/javascripts/jquery-ui/datepicker-cy-GB.js +37 -0
  34. data/app/assets/javascripts/jquery-ui/datepicker-da.js +37 -0
  35. data/app/assets/javascripts/jquery-ui/datepicker-de.js +37 -0
  36. data/app/assets/javascripts/jquery-ui/datepicker-el.js +37 -0
  37. data/app/assets/javascripts/jquery-ui/datepicker-en-AU.js +37 -0
  38. data/app/assets/javascripts/jquery-ui/datepicker-en-GB.js +37 -0
  39. data/app/assets/javascripts/jquery-ui/datepicker-en-NZ.js +37 -0
  40. data/app/assets/javascripts/jquery-ui/datepicker-eo.js +37 -0
  41. data/app/assets/javascripts/jquery-ui/datepicker-es.js +37 -0
  42. data/app/assets/javascripts/jquery-ui/datepicker-et.js +37 -0
  43. data/app/assets/javascripts/jquery-ui/datepicker-eu.js +36 -0
  44. data/app/assets/javascripts/jquery-ui/datepicker-fa.js +73 -0
  45. data/app/assets/javascripts/jquery-ui/datepicker-fi.js +37 -0
  46. data/app/assets/javascripts/jquery-ui/datepicker-fo.js +37 -0
  47. data/app/assets/javascripts/jquery-ui/datepicker-fr-CA.js +37 -0
  48. data/app/assets/javascripts/jquery-ui/datepicker-fr-CH.js +37 -0
  49. data/app/assets/javascripts/jquery-ui/datepicker-fr.js +39 -0
  50. data/app/assets/javascripts/jquery-ui/datepicker-gl.js +37 -0
  51. data/app/assets/javascripts/jquery-ui/datepicker-he.js +37 -0
  52. data/app/assets/javascripts/jquery-ui/datepicker-hi.js +37 -0
  53. data/app/assets/javascripts/jquery-ui/datepicker-hr.js +37 -0
  54. data/app/assets/javascripts/jquery-ui/datepicker-hu.js +36 -0
  55. data/app/assets/javascripts/jquery-ui/datepicker-hy.js +37 -0
  56. data/app/assets/javascripts/jquery-ui/datepicker-id.js +37 -0
  57. data/app/assets/javascripts/jquery-ui/datepicker-is.js +37 -0
  58. data/app/assets/javascripts/jquery-ui/datepicker-it-CH.js +37 -0
  59. data/app/assets/javascripts/jquery-ui/datepicker-it.js +37 -0
  60. data/app/assets/javascripts/jquery-ui/datepicker-ja.js +37 -0
  61. data/app/assets/javascripts/jquery-ui/datepicker-ka.js +35 -0
  62. data/app/assets/javascripts/jquery-ui/datepicker-kk.js +37 -0
  63. data/app/assets/javascripts/jquery-ui/datepicker-km.js +37 -0
  64. data/app/assets/javascripts/jquery-ui/datepicker-ko.js +37 -0
  65. data/app/assets/javascripts/jquery-ui/datepicker-ky.js +38 -0
  66. data/app/assets/javascripts/jquery-ui/datepicker-lb.js +37 -0
  67. data/app/assets/javascripts/jquery-ui/datepicker-lt.js +37 -0
  68. data/app/assets/javascripts/jquery-ui/datepicker-lv.js +37 -0
  69. data/app/assets/javascripts/jquery-ui/datepicker-mk.js +37 -0
  70. data/app/assets/javascripts/jquery-ui/datepicker-ml.js +37 -0
  71. data/app/assets/javascripts/jquery-ui/datepicker-ms.js +37 -0
  72. data/app/assets/javascripts/jquery-ui/datepicker-nb.js +36 -0
  73. data/app/assets/javascripts/jquery-ui/datepicker-nl-BE.js +37 -0
  74. data/app/assets/javascripts/jquery-ui/datepicker-nl.js +37 -0
  75. data/app/assets/javascripts/jquery-ui/datepicker-nn.js +36 -0
  76. data/app/assets/javascripts/jquery-ui/datepicker-no.js +37 -0
  77. data/app/assets/javascripts/jquery-ui/datepicker-pl.js +37 -0
  78. data/app/assets/javascripts/jquery-ui/datepicker-pt-BR.js +37 -0
  79. data/app/assets/javascripts/jquery-ui/datepicker-pt.js +36 -0
  80. data/app/assets/javascripts/jquery-ui/datepicker-rm.js +35 -0
  81. data/app/assets/javascripts/jquery-ui/datepicker-ro.js +40 -0
  82. data/app/assets/javascripts/jquery-ui/datepicker-ru.js +37 -0
  83. data/app/assets/javascripts/jquery-ui/datepicker-sk.js +37 -0
  84. data/app/assets/javascripts/jquery-ui/datepicker-sl.js +38 -0
  85. data/app/assets/javascripts/jquery-ui/datepicker-sq.js +37 -0
  86. data/app/assets/javascripts/jquery-ui/datepicker-sr-SR.js +37 -0
  87. data/app/assets/javascripts/jquery-ui/datepicker-sr.js +37 -0
  88. data/app/assets/javascripts/jquery-ui/datepicker-sv.js +37 -0
  89. data/app/assets/javascripts/jquery-ui/datepicker-ta.js +37 -0
  90. data/app/assets/javascripts/jquery-ui/datepicker-th.js +37 -0
  91. data/app/assets/javascripts/jquery-ui/datepicker-tj.js +37 -0
  92. data/app/assets/javascripts/jquery-ui/datepicker-tr.js +37 -0
  93. data/app/assets/javascripts/jquery-ui/datepicker-uk.js +38 -0
  94. data/app/assets/javascripts/jquery-ui/datepicker-vi.js +37 -0
  95. data/app/assets/javascripts/jquery-ui/datepicker-zh-CN.js +37 -0
  96. data/app/assets/javascripts/jquery-ui/datepicker-zh-HK.js +37 -0
  97. data/app/assets/javascripts/jquery-ui/datepicker-zh-TW.js +37 -0
  98. data/{vendor/assets/javascripts/jquery.ui.datepicker.js → app/assets/javascripts/jquery-ui/datepicker.js} +120 -80
  99. data/{vendor/assets/javascripts/jquery.ui.dialog.js → app/assets/javascripts/jquery-ui/dialog.js} +298 -190
  100. data/app/assets/javascripts/jquery-ui/draggable.js +1132 -0
  101. data/app/assets/javascripts/jquery-ui/droppable.js +418 -0
  102. data/{vendor/assets/javascripts/jquery.ui.effect-blind.js → app/assets/javascripts/jquery-ui/effect-blind.js} +21 -13
  103. data/{vendor/assets/javascripts/jquery.ui.effect-bounce.js → app/assets/javascripts/jquery-ui/effect-bounce.js} +19 -9
  104. data/{vendor/assets/javascripts/jquery.ui.effect-clip.js → app/assets/javascripts/jquery-ui/effect-clip.js} +19 -9
  105. data/{vendor/assets/javascripts/jquery.ui.effect-drop.js → app/assets/javascripts/jquery-ui/effect-drop.js} +20 -10
  106. data/{vendor/assets/javascripts/jquery.ui.effect-explode.js → app/assets/javascripts/jquery-ui/effect-explode.js} +21 -11
  107. data/app/assets/javascripts/jquery-ui/effect-fade.js +42 -0
  108. data/{vendor/assets/javascripts/jquery.ui.effect-fold.js → app/assets/javascripts/jquery-ui/effect-fold.js} +19 -9
  109. data/{vendor/assets/javascripts/jquery.ui.effect-highlight.js → app/assets/javascripts/jquery-ui/effect-highlight.js} +19 -9
  110. data/app/assets/javascripts/jquery-ui/effect-puff.js +63 -0
  111. data/{vendor/assets/javascripts/jquery.ui.effect-pulsate.js → app/assets/javascripts/jquery-ui/effect-pulsate.js} +19 -9
  112. data/app/assets/javascripts/jquery-ui/effect-scale.js +92 -0
  113. data/{vendor/assets/javascripts/jquery.ui.effect-shake.js → app/assets/javascripts/jquery-ui/effect-shake.js} +20 -10
  114. data/{vendor/assets/javascripts/jquery.ui.effect-scale.js → app/assets/javascripts/jquery-ui/effect-size.js} +20 -105
  115. data/{vendor/assets/javascripts/jquery.ui.effect-slide.js → app/assets/javascripts/jquery-ui/effect-slide.js} +19 -9
  116. data/{vendor/assets/javascripts/jquery.ui.effect-transfer.js → app/assets/javascripts/jquery-ui/effect-transfer.js} +23 -13
  117. data/app/assets/javascripts/jquery-ui/effect.all.js +16 -0
  118. data/{vendor/assets/javascripts/jquery.ui.effect.js → app/assets/javascripts/jquery-ui/effect.js} +125 -92
  119. data/{vendor/assets/javascripts/jquery.ui.menu.js → app/assets/javascripts/jquery-ui/menu.js} +127 -102
  120. data/{vendor/assets/javascripts/jquery.ui.mouse.js → app/assets/javascripts/jquery-ui/mouse.js} +57 -27
  121. data/{vendor/assets/javascripts/jquery.ui.position.js → app/assets/javascripts/jquery-ui/position.js} +47 -27
  122. data/{vendor/assets/javascripts/jquery.ui.progressbar.js → app/assets/javascripts/jquery-ui/progressbar.js} +27 -13
  123. data/{vendor/assets/javascripts/jquery.ui.resizable.js → app/assets/javascripts/jquery-ui/resizable.js} +454 -243
  124. data/{vendor/assets/javascripts/jquery.ui.selectable.js → app/assets/javascripts/jquery-ui/selectable.js} +26 -16
  125. data/app/assets/javascripts/jquery-ui/selectmenu.js +620 -0
  126. data/{vendor/assets/javascripts/jquery.ui.slider.js → app/assets/javascripts/jquery-ui/slider.js} +159 -91
  127. data/{vendor/assets/javascripts/jquery.ui.sortable.js → app/assets/javascripts/jquery-ui/sortable.js} +168 -114
  128. data/{vendor/assets/javascripts/jquery.ui.spinner.js → app/assets/javascripts/jquery-ui/spinner.js} +54 -32
  129. data/{vendor/assets/javascripts/jquery.ui.tabs.js → app/assets/javascripts/jquery-ui/tabs.js} +108 -73
  130. data/{vendor/assets/javascripts/jquery.ui.tooltip.js → app/assets/javascripts/jquery-ui/tooltip.js} +134 -75
  131. data/{vendor/assets/javascripts/jquery.ui.widget.js → app/assets/javascripts/jquery-ui/widget.js} +81 -44
  132. data/app/assets/javascripts/jquery-ui.js +37 -0
  133. data/{vendor/assets/stylesheets/jquery.ui.accordion.css.erb → app/assets/stylesheets/jquery-ui/accordion.css} +7 -9
  134. data/app/assets/stylesheets/jquery-ui/all.css +14 -0
  135. data/app/assets/stylesheets/jquery-ui/autocomplete.css +21 -0
  136. data/app/assets/stylesheets/jquery-ui/base.css +30 -0
  137. data/{vendor/assets/stylesheets/jquery.ui.button.css.erb → app/assets/stylesheets/jquery-ui/button.css} +5 -5
  138. data/{vendor/assets/stylesheets/jquery.ui.core.css.erb → app/assets/stylesheets/jquery-ui/core.css} +8 -4
  139. data/{vendor/assets/stylesheets/jquery.ui.datepicker.css.erb → app/assets/stylesheets/jquery-ui/datepicker.css} +6 -9
  140. data/{vendor/assets/stylesheets/jquery.ui.dialog.css.erb → app/assets/stylesheets/jquery-ui/dialog.css} +10 -8
  141. data/app/assets/stylesheets/jquery-ui/draggable.css +16 -0
  142. data/app/assets/stylesheets/jquery-ui/menu.css +67 -0
  143. data/app/assets/stylesheets/jquery-ui/progressbar.css +32 -0
  144. data/{vendor/assets/stylesheets/jquery.ui.resizable.css.erb → app/assets/stylesheets/jquery-ui/resizable.css} +6 -6
  145. data/app/assets/stylesheets/jquery-ui/selectable.css +21 -0
  146. data/app/assets/stylesheets/jquery-ui/selectmenu.css +64 -0
  147. data/{vendor/assets/stylesheets/jquery.ui.slider.css.erb → app/assets/stylesheets/jquery-ui/slider.css} +8 -6
  148. data/app/assets/stylesheets/jquery-ui/sortable.css +16 -0
  149. data/{vendor/assets/stylesheets/jquery.ui.spinner.css.erb → app/assets/stylesheets/jquery-ui/spinner.css} +8 -8
  150. data/{vendor/assets/stylesheets/jquery.ui.tabs.css.erb → app/assets/stylesheets/jquery-ui/tabs.css} +11 -12
  151. data/{vendor/assets/stylesheets/jquery.ui.theme.css.erb → app/assets/stylesheets/jquery-ui/theme.css.erb} +29 -11
  152. data/{vendor/assets/stylesheets/jquery.ui.tooltip.css.erb → app/assets/stylesheets/jquery-ui/tooltip.css} +6 -4
  153. data/app/assets/stylesheets/jquery-ui.css +1 -0
  154. data/lib/jquery/ui/rails/version.rb +2 -1
  155. metadata +155 -161
  156. data/vendor/assets/javascripts/jquery.ui.all.js +0 -34
  157. data/vendor/assets/javascripts/jquery.ui.datepicker-af.js +0 -23
  158. data/vendor/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +0 -23
  159. data/vendor/assets/javascripts/jquery.ui.datepicker-ar.js +0 -23
  160. data/vendor/assets/javascripts/jquery.ui.datepicker-az.js +0 -23
  161. data/vendor/assets/javascripts/jquery.ui.datepicker-be.js +0 -23
  162. data/vendor/assets/javascripts/jquery.ui.datepicker-bg.js +0 -24
  163. data/vendor/assets/javascripts/jquery.ui.datepicker-bs.js +0 -23
  164. data/vendor/assets/javascripts/jquery.ui.datepicker-ca.js +0 -23
  165. data/vendor/assets/javascripts/jquery.ui.datepicker-cs.js +0 -23
  166. data/vendor/assets/javascripts/jquery.ui.datepicker-cy-GB.js +0 -23
  167. data/vendor/assets/javascripts/jquery.ui.datepicker-da.js +0 -23
  168. data/vendor/assets/javascripts/jquery.ui.datepicker-de.js +0 -23
  169. data/vendor/assets/javascripts/jquery.ui.datepicker-el.js +0 -23
  170. data/vendor/assets/javascripts/jquery.ui.datepicker-en-AU.js +0 -23
  171. data/vendor/assets/javascripts/jquery.ui.datepicker-en-GB.js +0 -23
  172. data/vendor/assets/javascripts/jquery.ui.datepicker-en-NZ.js +0 -23
  173. data/vendor/assets/javascripts/jquery.ui.datepicker-eo.js +0 -23
  174. data/vendor/assets/javascripts/jquery.ui.datepicker-es.js +0 -23
  175. data/vendor/assets/javascripts/jquery.ui.datepicker-et.js +0 -23
  176. data/vendor/assets/javascripts/jquery.ui.datepicker-eu.js +0 -23
  177. data/vendor/assets/javascripts/jquery.ui.datepicker-fa.js +0 -59
  178. data/vendor/assets/javascripts/jquery.ui.datepicker-fi.js +0 -23
  179. data/vendor/assets/javascripts/jquery.ui.datepicker-fo.js +0 -23
  180. data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CA.js +0 -23
  181. data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +0 -23
  182. data/vendor/assets/javascripts/jquery.ui.datepicker-fr.js +0 -25
  183. data/vendor/assets/javascripts/jquery.ui.datepicker-gl.js +0 -23
  184. data/vendor/assets/javascripts/jquery.ui.datepicker-he.js +0 -23
  185. data/vendor/assets/javascripts/jquery.ui.datepicker-hi.js +0 -23
  186. data/vendor/assets/javascripts/jquery.ui.datepicker-hr.js +0 -23
  187. data/vendor/assets/javascripts/jquery.ui.datepicker-hu.js +0 -23
  188. data/vendor/assets/javascripts/jquery.ui.datepicker-hy.js +0 -23
  189. data/vendor/assets/javascripts/jquery.ui.datepicker-id.js +0 -23
  190. data/vendor/assets/javascripts/jquery.ui.datepicker-is.js +0 -23
  191. data/vendor/assets/javascripts/jquery.ui.datepicker-it.js +0 -23
  192. data/vendor/assets/javascripts/jquery.ui.datepicker-ja.js +0 -23
  193. data/vendor/assets/javascripts/jquery.ui.datepicker-ka.js +0 -21
  194. data/vendor/assets/javascripts/jquery.ui.datepicker-kk.js +0 -23
  195. data/vendor/assets/javascripts/jquery.ui.datepicker-km.js +0 -23
  196. data/vendor/assets/javascripts/jquery.ui.datepicker-ko.js +0 -23
  197. data/vendor/assets/javascripts/jquery.ui.datepicker-ky.js +0 -24
  198. data/vendor/assets/javascripts/jquery.ui.datepicker-lb.js +0 -23
  199. data/vendor/assets/javascripts/jquery.ui.datepicker-lt.js +0 -23
  200. data/vendor/assets/javascripts/jquery.ui.datepicker-lv.js +0 -23
  201. data/vendor/assets/javascripts/jquery.ui.datepicker-mk.js +0 -23
  202. data/vendor/assets/javascripts/jquery.ui.datepicker-ml.js +0 -23
  203. data/vendor/assets/javascripts/jquery.ui.datepicker-ms.js +0 -23
  204. data/vendor/assets/javascripts/jquery.ui.datepicker-nb.js +0 -22
  205. data/vendor/assets/javascripts/jquery.ui.datepicker-nl-BE.js +0 -23
  206. data/vendor/assets/javascripts/jquery.ui.datepicker-nl.js +0 -23
  207. data/vendor/assets/javascripts/jquery.ui.datepicker-nn.js +0 -22
  208. data/vendor/assets/javascripts/jquery.ui.datepicker-no.js +0 -23
  209. data/vendor/assets/javascripts/jquery.ui.datepicker-pl.js +0 -23
  210. data/vendor/assets/javascripts/jquery.ui.datepicker-pt-BR.js +0 -23
  211. data/vendor/assets/javascripts/jquery.ui.datepicker-pt.js +0 -22
  212. data/vendor/assets/javascripts/jquery.ui.datepicker-rm.js +0 -21
  213. data/vendor/assets/javascripts/jquery.ui.datepicker-ro.js +0 -26
  214. data/vendor/assets/javascripts/jquery.ui.datepicker-ru.js +0 -23
  215. data/vendor/assets/javascripts/jquery.ui.datepicker-sk.js +0 -23
  216. data/vendor/assets/javascripts/jquery.ui.datepicker-sl.js +0 -24
  217. data/vendor/assets/javascripts/jquery.ui.datepicker-sq.js +0 -23
  218. data/vendor/assets/javascripts/jquery.ui.datepicker-sr-SR.js +0 -23
  219. data/vendor/assets/javascripts/jquery.ui.datepicker-sr.js +0 -23
  220. data/vendor/assets/javascripts/jquery.ui.datepicker-sv.js +0 -23
  221. data/vendor/assets/javascripts/jquery.ui.datepicker-ta.js +0 -23
  222. data/vendor/assets/javascripts/jquery.ui.datepicker-th.js +0 -23
  223. data/vendor/assets/javascripts/jquery.ui.datepicker-tj.js +0 -23
  224. data/vendor/assets/javascripts/jquery.ui.datepicker-tr.js +0 -23
  225. data/vendor/assets/javascripts/jquery.ui.datepicker-uk.js +0 -24
  226. data/vendor/assets/javascripts/jquery.ui.datepicker-vi.js +0 -23
  227. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-CN.js +0 -23
  228. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-HK.js +0 -23
  229. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-TW.js +0 -23
  230. data/vendor/assets/javascripts/jquery.ui.draggable.js +0 -950
  231. data/vendor/assets/javascripts/jquery.ui.droppable.js +0 -376
  232. data/vendor/assets/javascripts/jquery.ui.effect-fade.js +0 -32
  233. data/vendor/assets/javascripts/jquery.ui.effect.all.js +0 -14
  234. data/vendor/assets/stylesheets/jquery.ui.all.css.erb +0 -14
  235. data/vendor/assets/stylesheets/jquery.ui.autocomplete.css.erb +0 -21
  236. data/vendor/assets/stylesheets/jquery.ui.base.css.erb +0 -27
  237. data/vendor/assets/stylesheets/jquery.ui.menu.css.erb +0 -81
  238. data/vendor/assets/stylesheets/jquery.ui.progressbar.css.erb +0 -32
  239. data/vendor/assets/stylesheets/jquery.ui.selectable.css.erb +0 -19
@@ -1,31 +1,38 @@
1
- //= require jquery.ui.core
2
- //= require jquery.ui.widget
3
- //= require jquery.ui.menu
4
- //= require jquery.ui.position
1
+ //= require jquery-ui/core
2
+ //= require jquery-ui/widget
3
+ //= require jquery-ui/menu
4
+ //= require jquery-ui/position
5
5
 
6
6
  /*!
7
- * jQuery UI Autocomplete 1.10.0
7
+ * jQuery UI Autocomplete 1.11.3
8
8
  * http://jqueryui.com
9
9
  *
10
- * Copyright 2013 jQuery Foundation and other contributors
10
+ * Copyright jQuery Foundation and other contributors
11
11
  * Released under the MIT license.
12
12
  * http://jquery.org/license
13
13
  *
14
14
  * http://api.jqueryui.com/autocomplete/
15
- *
16
- * Depends:
17
- * jquery.ui.core.js
18
- * jquery.ui.widget.js
19
- * jquery.ui.position.js
20
- * jquery.ui.menu.js
21
15
  */
22
- (function( $, undefined ) {
23
-
24
- // used to prevent race conditions with remote data sources
25
- var requestIndex = 0;
16
+ (function( factory ) {
17
+ if ( typeof define === "function" && define.amd ) {
18
+
19
+ // AMD. Register as an anonymous module.
20
+ define([
21
+ "jquery",
22
+ "./core",
23
+ "./widget",
24
+ "./position",
25
+ "./menu"
26
+ ], factory );
27
+ } else {
28
+
29
+ // Browser globals
30
+ factory( jQuery );
31
+ }
32
+ }(function( $ ) {
26
33
 
27
34
  $.widget( "ui.autocomplete", {
28
- version: "1.10.0",
35
+ version: "1.11.3",
29
36
  defaultElement: "<input>",
30
37
  options: {
31
38
  appendTo: null,
@@ -49,6 +56,7 @@ $.widget( "ui.autocomplete", {
49
56
  select: null
50
57
  },
51
58
 
59
+ requestIndex: 0,
52
60
  pending: 0,
53
61
 
54
62
  _create: function() {
@@ -59,10 +67,21 @@ $.widget( "ui.autocomplete", {
59
67
  // so we use the suppressKeyPressRepeat flag to avoid handling keypress
60
68
  // events when we know the keydown event was used to modify the
61
69
  // search term. #7799
62
- var suppressKeyPress, suppressKeyPressRepeat, suppressInput;
63
-
64
- this.isMultiLine = this._isMultiLine();
65
- this.valueMethod = this.element[ this.element.is( "input,textarea" ) ? "val" : "text" ];
70
+ var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
71
+ nodeName = this.element[ 0 ].nodeName.toLowerCase(),
72
+ isTextarea = nodeName === "textarea",
73
+ isInput = nodeName === "input";
74
+
75
+ this.isMultiLine =
76
+ // Textareas are always multi-line
77
+ isTextarea ? true :
78
+ // Inputs are always single-line, even if inside a contentEditable element
79
+ // IE also treats inputs as contentEditable
80
+ isInput ? false :
81
+ // All other element types are determined by whether or not they're contentEditable
82
+ this.element.prop( "isContentEditable" );
83
+
84
+ this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
66
85
  this.isNewMenu = true;
67
86
 
68
87
  this.element
@@ -71,7 +90,6 @@ $.widget( "ui.autocomplete", {
71
90
 
72
91
  this._on( this.element, {
73
92
  keydown: function( event ) {
74
- /*jshint maxcomplexity:15*/
75
93
  if ( this.element.prop( "readOnly" ) ) {
76
94
  suppressKeyPress = true;
77
95
  suppressInput = true;
@@ -83,7 +101,7 @@ $.widget( "ui.autocomplete", {
83
101
  suppressInput = false;
84
102
  suppressKeyPressRepeat = false;
85
103
  var keyCode = $.ui.keyCode;
86
- switch( event.keyCode ) {
104
+ switch ( event.keyCode ) {
87
105
  case keyCode.PAGE_UP:
88
106
  suppressKeyPress = true;
89
107
  this._move( "previousPage", event );
@@ -101,7 +119,6 @@ $.widget( "ui.autocomplete", {
101
119
  this._keyEvent( "next", event );
102
120
  break;
103
121
  case keyCode.ENTER:
104
- case keyCode.NUMPAD_ENTER:
105
122
  // when menu is open and has focus
106
123
  if ( this.menu.active ) {
107
124
  // #6055 - Opera still allows the keypress to occur
@@ -118,7 +135,9 @@ $.widget( "ui.autocomplete", {
118
135
  break;
119
136
  case keyCode.ESCAPE:
120
137
  if ( this.menu.element.is( ":visible" ) ) {
121
- this._value( this.term );
138
+ if ( !this.isMultiLine ) {
139
+ this._value( this.term );
140
+ }
122
141
  this.close( event );
123
142
  // Different browsers have different default behavior for escape
124
143
  // Single press can mean undo or clear
@@ -136,7 +155,9 @@ $.widget( "ui.autocomplete", {
136
155
  keypress: function( event ) {
137
156
  if ( suppressKeyPress ) {
138
157
  suppressKeyPress = false;
139
- event.preventDefault();
158
+ if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
159
+ event.preventDefault();
160
+ }
140
161
  return;
141
162
  }
142
163
  if ( suppressKeyPressRepeat ) {
@@ -145,7 +166,7 @@ $.widget( "ui.autocomplete", {
145
166
 
146
167
  // replicate some key handlers to allow them to repeat in Firefox and Opera
147
168
  var keyCode = $.ui.keyCode;
148
- switch( event.keyCode ) {
169
+ switch ( event.keyCode ) {
149
170
  case keyCode.PAGE_UP:
150
171
  this._move( "previousPage", event );
151
172
  break;
@@ -186,17 +207,14 @@ $.widget( "ui.autocomplete", {
186
207
 
187
208
  this._initSource();
188
209
  this.menu = $( "<ul>" )
189
- .addClass( "ui-autocomplete" )
210
+ .addClass( "ui-autocomplete ui-front" )
190
211
  .appendTo( this._appendTo() )
191
212
  .menu({
192
- // custom key handling for now
193
- input: $(),
194
213
  // disable ARIA support, the live region takes care of that
195
214
  role: null
196
215
  })
197
- .zIndex( this.element.zIndex() + 1 )
198
216
  .hide()
199
- .data( "ui-menu" );
217
+ .menu( "instance" );
200
218
 
201
219
  this._on( this.menu.element, {
202
220
  mousedown: function( event ) {
@@ -229,7 +247,9 @@ $.widget( "ui.autocomplete", {
229
247
  }
230
248
  },
231
249
  menufocus: function( event, ui ) {
232
- // #7024 - Prevent accidental activation of menu items in Firefox
250
+ var label, item;
251
+ // support: Firefox
252
+ // Prevent accidental activation of menu items in Firefox (#7024 #9118)
233
253
  if ( this.isNewMenu ) {
234
254
  this.isNewMenu = false;
235
255
  if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
@@ -243,19 +263,19 @@ $.widget( "ui.autocomplete", {
243
263
  }
244
264
  }
245
265
 
246
- var item = ui.item.data( "ui-autocomplete-item" );
266
+ item = ui.item.data( "ui-autocomplete-item" );
247
267
  if ( false !== this._trigger( "focus", event, { item: item } ) ) {
248
268
  // use value to match what will end up in the input, if it was a key event
249
269
  if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
250
270
  this._value( item.value );
251
271
  }
252
- } else {
253
- // Normally the input is populated with the item's value as the
254
- // menu is navigated, causing screen readers to notice a change and
255
- // announce the item. Since the focus event was canceled, this doesn't
256
- // happen, so we update the live region so that screen readers can
257
- // still notice the change and announce it.
258
- this.liveRegion.text( item.value );
272
+ }
273
+
274
+ // Announce the value in the liveRegion
275
+ label = ui.item.attr( "aria-label" ) || item.value;
276
+ if ( label && $.trim( label ).length ) {
277
+ this.liveRegion.children().hide();
278
+ $( "<div>" ).text( label ).appendTo( this.liveRegion );
259
279
  }
260
280
  },
261
281
  menuselect: function( event, ui ) {
@@ -263,7 +283,7 @@ $.widget( "ui.autocomplete", {
263
283
  previous = this.previous;
264
284
 
265
285
  // only trigger when focus was lost (click on menu)
266
- if ( this.element[0] !== this.document[0].activeElement ) {
286
+ if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) {
267
287
  this.element.focus();
268
288
  this.previous = previous;
269
289
  // #6109 - IE triggers two focus events and the second
@@ -289,10 +309,11 @@ $.widget( "ui.autocomplete", {
289
309
 
290
310
  this.liveRegion = $( "<span>", {
291
311
  role: "status",
292
- "aria-live": "polite"
312
+ "aria-live": "assertive",
313
+ "aria-relevant": "additions"
293
314
  })
294
315
  .addClass( "ui-helper-hidden-accessible" )
295
- .insertAfter( this.element );
316
+ .appendTo( this.document[ 0 ].body );
296
317
 
297
318
  // turning off autocomplete prevents the browser from remembering the
298
319
  // value when navigating through history, so we re-enable autocomplete
@@ -335,35 +356,21 @@ $.widget( "ui.autocomplete", {
335
356
  this.document.find( element ).eq( 0 );
336
357
  }
337
358
 
338
- if ( !element ) {
359
+ if ( !element || !element[ 0 ] ) {
339
360
  element = this.element.closest( ".ui-front" );
340
361
  }
341
362
 
342
363
  if ( !element.length ) {
343
- element = this.document[0].body;
364
+ element = this.document[ 0 ].body;
344
365
  }
345
366
 
346
367
  return element;
347
368
  },
348
369
 
349
- _isMultiLine: function() {
350
- // Textareas are always multi-line
351
- if ( this.element.is( "textarea" ) ) {
352
- return true;
353
- }
354
- // Inputs are always single-line, even if inside a contentEditable element
355
- // IE also treats inputs as contentEditable
356
- if ( this.element.is( "input" ) ) {
357
- return false;
358
- }
359
- // All other element types are determined by whether or not they're contentEditable
360
- return this.element.prop( "isContentEditable" );
361
- },
362
-
363
370
  _initSource: function() {
364
371
  var array, url,
365
372
  that = this;
366
- if ( $.isArray(this.options.source) ) {
373
+ if ( $.isArray( this.options.source ) ) {
367
374
  array = this.options.source;
368
375
  this.source = function( request, response ) {
369
376
  response( $.ui.autocomplete.filter( array, request.term ) );
@@ -382,7 +389,7 @@ $.widget( "ui.autocomplete", {
382
389
  response( data );
383
390
  },
384
391
  error: function() {
385
- response( [] );
392
+ response([]);
386
393
  }
387
394
  });
388
395
  };
@@ -394,8 +401,13 @@ $.widget( "ui.autocomplete", {
394
401
  _searchTimeout: function( event ) {
395
402
  clearTimeout( this.searching );
396
403
  this.searching = this._delay(function() {
397
- // only search if the value has changed
398
- if ( this.term !== this._value() ) {
404
+
405
+ // Search if the value has changed, or if the user retypes the same value (see #7434)
406
+ var equalValues = this.term === this._value(),
407
+ menuVisible = this.menu.element.is( ":visible" ),
408
+ modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
409
+
410
+ if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
399
411
  this.selectedItem = null;
400
412
  this.search( null, event );
401
413
  }
@@ -428,19 +440,18 @@ $.widget( "ui.autocomplete", {
428
440
  },
429
441
 
430
442
  _response: function() {
431
- var that = this,
432
- index = ++requestIndex;
443
+ var index = ++this.requestIndex;
433
444
 
434
- return function( content ) {
435
- if ( index === requestIndex ) {
436
- that.__response( content );
445
+ return $.proxy(function( content ) {
446
+ if ( index === this.requestIndex ) {
447
+ this.__response( content );
437
448
  }
438
449
 
439
- that.pending--;
440
- if ( !that.pending ) {
441
- that.element.removeClass( "ui-autocomplete-loading" );
450
+ this.pending--;
451
+ if ( !this.pending ) {
452
+ this.element.removeClass( "ui-autocomplete-loading" );
442
453
  }
443
- };
454
+ }, this );
444
455
  },
445
456
 
446
457
  __response: function( content ) {
@@ -479,7 +490,7 @@ $.widget( "ui.autocomplete", {
479
490
 
480
491
  _normalize: function( items ) {
481
492
  // assume all items have the right format when the first item is complete
482
- if ( items.length && items[0].label && items[0].value ) {
493
+ if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
483
494
  return items;
484
495
  }
485
496
  return $.map( items, function( item ) {
@@ -489,18 +500,17 @@ $.widget( "ui.autocomplete", {
489
500
  value: item
490
501
  };
491
502
  }
492
- return $.extend({
503
+ return $.extend( {}, item, {
493
504
  label: item.label || item.value,
494
505
  value: item.value || item.label
495
- }, item );
506
+ });
496
507
  });
497
508
  },
498
509
 
499
510
  _suggest: function( items ) {
500
- var ul = this.menu.element
501
- .empty()
502
- .zIndex( this.element.zIndex() + 1 );
511
+ var ul = this.menu.element.empty();
503
512
  this._renderMenu( ul, items );
513
+ this.isNewMenu = true;
504
514
  this.menu.refresh();
505
515
 
506
516
  // size and position menu
@@ -508,7 +518,7 @@ $.widget( "ui.autocomplete", {
508
518
  this._resizeMenu();
509
519
  ul.position( $.extend({
510
520
  of: this.element
511
- }, this.options.position ));
521
+ }, this.options.position ) );
512
522
 
513
523
  if ( this.options.autoFocus ) {
514
524
  this.menu.next();
@@ -537,9 +547,7 @@ $.widget( "ui.autocomplete", {
537
547
  },
538
548
 
539
549
  _renderItem: function( ul, item ) {
540
- return $( "<li>" )
541
- .append( $( "<a>" ).text( item.label ) )
542
- .appendTo( ul );
550
+ return $( "<li>" ).text( item.label ).appendTo( ul );
543
551
  },
544
552
 
545
553
  _move: function( direction, event ) {
@@ -549,7 +557,11 @@ $.widget( "ui.autocomplete", {
549
557
  }
550
558
  if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
551
559
  this.menu.isLastItem() && /^next/.test( direction ) ) {
552
- this._value( this.term );
560
+
561
+ if ( !this.isMultiLine ) {
562
+ this._value( this.term );
563
+ }
564
+
553
565
  this.menu.blur();
554
566
  return;
555
567
  }
@@ -576,17 +588,16 @@ $.widget( "ui.autocomplete", {
576
588
 
577
589
  $.extend( $.ui.autocomplete, {
578
590
  escapeRegex: function( value ) {
579
- return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
591
+ return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
580
592
  },
581
- filter: function(array, term) {
582
- var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
583
- return $.grep( array, function(value) {
593
+ filter: function( array, term ) {
594
+ var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
595
+ return $.grep( array, function( value ) {
584
596
  return matcher.test( value.label || value.value || value );
585
597
  });
586
598
  }
587
599
  });
588
600
 
589
-
590
601
  // live region extension, adding a `messages` option
591
602
  // NOTE: This is an experimental API. We are still investigating
592
603
  // a full solution for string manipulation and internationalization.
@@ -612,8 +623,11 @@ $.widget( "ui.autocomplete", $.ui.autocomplete, {
612
623
  } else {
613
624
  message = this.options.messages.noResults;
614
625
  }
615
- this.liveRegion.text( message );
626
+ this.liveRegion.children().hide();
627
+ $( "<div>" ).text( message ).appendTo( this.liveRegion );
616
628
  }
617
629
  });
618
630
 
619
- }( jQuery ));
631
+ return $.ui.autocomplete;
632
+
633
+ }));
@@ -1,30 +1,39 @@
1
- //= require jquery.ui.core
2
- //= require jquery.ui.widget
1
+ //= require jquery-ui/core
2
+ //= require jquery-ui/widget
3
3
 
4
4
  /*!
5
- * jQuery UI Button 1.10.0
5
+ * jQuery UI Button 1.11.3
6
6
  * http://jqueryui.com
7
7
  *
8
- * Copyright 2013 jQuery Foundation and other contributors
8
+ * Copyright jQuery Foundation and other contributors
9
9
  * Released under the MIT license.
10
10
  * http://jquery.org/license
11
11
  *
12
12
  * http://api.jqueryui.com/button/
13
- *
14
- * Depends:
15
- * jquery.ui.core.js
16
- * jquery.ui.widget.js
17
13
  */
18
- (function( $, undefined ) {
14
+ (function( factory ) {
15
+ if ( typeof define === "function" && define.amd ) {
16
+
17
+ // AMD. Register as an anonymous module.
18
+ define([
19
+ "jquery",
20
+ "./core",
21
+ "./widget"
22
+ ], factory );
23
+ } else {
24
+
25
+ // Browser globals
26
+ factory( jQuery );
27
+ }
28
+ }(function( $ ) {
19
29
 
20
- var lastActive, startXPos, startYPos, clickDragged,
30
+ var lastActive,
21
31
  baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
22
- stateClasses = "ui-state-hover ui-state-active ",
23
32
  typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
24
33
  formResetHandler = function() {
25
- var buttons = $( this ).find( ":ui-button" );
34
+ var form = $( this );
26
35
  setTimeout(function() {
27
- buttons.button( "refresh" );
36
+ form.find( ":ui-button" ).button( "refresh" );
28
37
  }, 1 );
29
38
  },
30
39
  radioGroup = function( radio ) {
@@ -34,9 +43,9 @@ var lastActive, startXPos, startYPos, clickDragged,
34
43
  if ( name ) {
35
44
  name = name.replace( /'/g, "\\'" );
36
45
  if ( form ) {
37
- radios = $( form ).find( "[name='" + name + "']" );
46
+ radios = $( form ).find( "[name='" + name + "'][type=radio]" );
38
47
  } else {
39
- radios = $( "[name='" + name + "']", radio.ownerDocument )
48
+ radios = $( "[name='" + name + "'][type=radio]", radio.ownerDocument )
40
49
  .filter(function() {
41
50
  return !this.form;
42
51
  });
@@ -46,7 +55,7 @@ var lastActive, startXPos, startYPos, clickDragged,
46
55
  };
47
56
 
48
57
  $.widget( "ui.button", {
49
- version: "1.10.0",
58
+ version: "1.11.3",
50
59
  defaultElement: "<button>",
51
60
  options: {
52
61
  disabled: null,
@@ -74,8 +83,7 @@ $.widget( "ui.button", {
74
83
  var that = this,
75
84
  options = this.options,
76
85
  toggleButton = this.type === "checkbox" || this.type === "radio",
77
- activeClass = !toggleButton ? "ui-state-active" : "",
78
- focusClass = "ui-state-focus";
86
+ activeClass = !toggleButton ? "ui-state-active" : "";
79
87
 
80
88
  if ( options.label === null ) {
81
89
  options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
@@ -107,53 +115,32 @@ $.widget( "ui.button", {
107
115
  }
108
116
  });
109
117
 
110
- this.element
111
- .bind( "focus" + this.eventNamespace, function() {
112
- // no need to check disabled, focus won't be triggered anyway
113
- that.buttonElement.addClass( focusClass );
114
- })
115
- .bind( "blur" + this.eventNamespace, function() {
116
- that.buttonElement.removeClass( focusClass );
117
- });
118
+ // Can't use _focusable() because the element that receives focus
119
+ // and the element that gets the ui-state-focus class are different
120
+ this._on({
121
+ focus: function() {
122
+ this.buttonElement.addClass( "ui-state-focus" );
123
+ },
124
+ blur: function() {
125
+ this.buttonElement.removeClass( "ui-state-focus" );
126
+ }
127
+ });
118
128
 
119
129
  if ( toggleButton ) {
120
130
  this.element.bind( "change" + this.eventNamespace, function() {
121
- if ( clickDragged ) {
122
- return;
123
- }
124
131
  that.refresh();
125
132
  });
126
- // if mouse moves between mousedown and mouseup (drag) set clickDragged flag
127
- // prevents issue where button state changes but checkbox/radio checked state
128
- // does not in Firefox (see ticket #6970)
129
- this.buttonElement
130
- .bind( "mousedown" + this.eventNamespace, function( event ) {
131
- if ( options.disabled ) {
132
- return;
133
- }
134
- clickDragged = false;
135
- startXPos = event.pageX;
136
- startYPos = event.pageY;
137
- })
138
- .bind( "mouseup" + this.eventNamespace, function( event ) {
139
- if ( options.disabled ) {
140
- return;
141
- }
142
- if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
143
- clickDragged = true;
144
- }
145
- });
146
133
  }
147
134
 
148
135
  if ( this.type === "checkbox" ) {
149
136
  this.buttonElement.bind( "click" + this.eventNamespace, function() {
150
- if ( options.disabled || clickDragged ) {
137
+ if ( options.disabled ) {
151
138
  return false;
152
139
  }
153
140
  });
154
141
  } else if ( this.type === "radio" ) {
155
142
  this.buttonElement.bind( "click" + this.eventNamespace, function() {
156
- if ( options.disabled || clickDragged ) {
143
+ if ( options.disabled ) {
157
144
  return false;
158
145
  }
159
146
  $( this ).addClass( "ui-state-active" );
@@ -210,9 +197,6 @@ $.widget( "ui.button", {
210
197
  }
211
198
  }
212
199
 
213
- // TODO: pull out $.Widget's handling for the disabled option into
214
- // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
215
- // be overridden by individual plugins
216
200
  this._setOption( "disabled", options.disabled );
217
201
  this._resetButton();
218
202
  },
@@ -263,7 +247,7 @@ $.widget( "ui.button", {
263
247
  this.element
264
248
  .removeClass( "ui-helper-hidden-accessible" );
265
249
  this.buttonElement
266
- .removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
250
+ .removeClass( baseClasses + " ui-state-active " + typeClasses )
267
251
  .removeAttr( "role" )
268
252
  .removeAttr( "aria-pressed" )
269
253
  .html( this.buttonElement.find(".ui-button-text").html() );
@@ -276,10 +260,14 @@ $.widget( "ui.button", {
276
260
  _setOption: function( key, value ) {
277
261
  this._super( key, value );
278
262
  if ( key === "disabled" ) {
263
+ this.widget().toggleClass( "ui-state-disabled", !!value );
264
+ this.element.prop( "disabled", !!value );
279
265
  if ( value ) {
280
- this.element.prop( "disabled", true );
281
- } else {
282
- this.element.prop( "disabled", false );
266
+ if ( this.type === "checkbox" || this.type === "radio" ) {
267
+ this.buttonElement.removeClass( "ui-state-focus" );
268
+ } else {
269
+ this.buttonElement.removeClass( "ui-state-focus ui-state-active" );
270
+ }
283
271
  }
284
272
  return;
285
273
  }
@@ -363,7 +351,7 @@ $.widget( "ui.button", {
363
351
  });
364
352
 
365
353
  $.widget( "ui.buttonset", {
366
- version: "1.10.0",
354
+ version: "1.11.3",
367
355
  options: {
368
356
  items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
369
357
  },
@@ -385,15 +373,17 @@ $.widget( "ui.buttonset", {
385
373
  },
386
374
 
387
375
  refresh: function() {
388
- var rtl = this.element.css( "direction" ) === "rtl";
376
+ var rtl = this.element.css( "direction" ) === "rtl",
377
+ allButtons = this.element.find( this.options.items ),
378
+ existingButtons = allButtons.filter( ":ui-button" );
389
379
 
390
- this.buttons = this.element.find( this.options.items )
391
- .filter( ":ui-button" )
392
- .button( "refresh" )
393
- .end()
394
- .not( ":ui-button" )
395
- .button()
396
- .end()
380
+ // Initialize new buttons
381
+ allButtons.not( ":ui-button" ).button();
382
+
383
+ // Refresh existing buttons
384
+ existingButtons.button( "refresh" );
385
+
386
+ this.buttons = allButtons
397
387
  .map(function() {
398
388
  return $( this ).button( "widget" )[ 0 ];
399
389
  })
@@ -419,4 +409,6 @@ $.widget( "ui.buttonset", {
419
409
  }
420
410
  });
421
411
 
422
- }( jQuery ) );
412
+ return $.ui.button;
413
+
414
+ }));