jquery-ui-rails 6.0.1 → 8.0.0

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 (170) hide show
  1. checksums.yaml +5 -5
  2. data/History.md +11 -2
  3. data/README.md +12 -12
  4. data/Rakefile +8 -3
  5. data/VERSIONS.md +2 -0
  6. data/app/assets/images/jquery-ui/ui-icons_444444_256x240.png +0 -0
  7. data/app/assets/images/jquery-ui/ui-icons_555555_256x240.png +0 -0
  8. data/app/assets/images/jquery-ui/ui-icons_777620_256x240.png +0 -0
  9. data/app/assets/images/jquery-ui/ui-icons_777777_256x240.png +0 -0
  10. data/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png +0 -0
  11. data/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
  12. data/app/assets/javascripts/jquery-ui/data.js +16 -18
  13. data/app/assets/javascripts/jquery-ui/disable-selection.js +10 -7
  14. data/app/assets/javascripts/jquery-ui/effect.js +69 -752
  15. data/app/assets/javascripts/jquery-ui/effects/effect-blind.js +11 -8
  16. data/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +11 -8
  17. data/app/assets/javascripts/jquery-ui/effects/effect-clip.js +11 -8
  18. data/app/assets/javascripts/jquery-ui/effects/effect-drop.js +11 -8
  19. data/app/assets/javascripts/jquery-ui/effects/effect-explode.js +13 -10
  20. data/app/assets/javascripts/jquery-ui/effects/effect-fade.js +11 -8
  21. data/app/assets/javascripts/jquery-ui/effects/effect-fold.js +11 -8
  22. data/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +11 -8
  23. data/app/assets/javascripts/jquery-ui/effects/effect-puff.js +11 -8
  24. data/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +11 -8
  25. data/app/assets/javascripts/jquery-ui/effects/effect-scale.js +11 -8
  26. data/app/assets/javascripts/jquery-ui/effects/effect-shake.js +11 -8
  27. data/app/assets/javascripts/jquery-ui/effects/effect-size.js +13 -8
  28. data/app/assets/javascripts/jquery-ui/effects/effect-slide.js +11 -8
  29. data/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +12 -9
  30. data/app/assets/javascripts/jquery-ui/focusable.js +13 -20
  31. data/app/assets/javascripts/jquery-ui/form-reset-mixin.js +11 -10
  32. data/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +8 -5
  33. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +8 -5
  34. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +7 -4
  35. data/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +14 -11
  36. data/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +14 -11
  37. data/app/assets/javascripts/jquery-ui/i18n/datepicker-bg.js +15 -12
  38. data/app/assets/javascripts/jquery-ui/i18n/datepicker-bs.js +14 -11
  39. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ca.js +12 -9
  40. data/app/assets/javascripts/jquery-ui/i18n/datepicker-cs.js +12 -9
  41. data/app/assets/javascripts/jquery-ui/i18n/datepicker-cy-GB.js +8 -5
  42. data/app/assets/javascripts/jquery-ui/i18n/datepicker-da.js +15 -12
  43. data/app/assets/javascripts/jquery-ui/i18n/datepicker-de-AT.js +41 -0
  44. data/app/assets/javascripts/jquery-ui/i18n/datepicker-de.js +14 -11
  45. data/app/assets/javascripts/jquery-ui/i18n/datepicker-el.js +13 -10
  46. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-AU.js +8 -5
  47. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-GB.js +8 -5
  48. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-NZ.js +8 -5
  49. data/app/assets/javascripts/jquery-ui/i18n/datepicker-eo.js +14 -11
  50. data/app/assets/javascripts/jquery-ui/i18n/datepicker-es.js +14 -11
  51. data/app/assets/javascripts/jquery-ui/i18n/datepicker-et.js +8 -5
  52. data/app/assets/javascripts/jquery-ui/i18n/datepicker-eu.js +14 -11
  53. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fa.js +8 -5
  54. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fi.js +14 -11
  55. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fo.js +13 -10
  56. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CA.js +5 -2
  57. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CH.js +7 -4
  58. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr.js +6 -3
  59. data/app/assets/javascripts/jquery-ui/i18n/datepicker-gl.js +14 -11
  60. data/app/assets/javascripts/jquery-ui/i18n/datepicker-he.js +14 -11
  61. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hi.js +7 -4
  62. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hr.js +14 -11
  63. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hu.js +9 -6
  64. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hy.js +14 -11
  65. data/app/assets/javascripts/jquery-ui/i18n/datepicker-id.js +16 -12
  66. data/app/assets/javascripts/jquery-ui/i18n/datepicker-is.js +13 -10
  67. data/app/assets/javascripts/jquery-ui/i18n/datepicker-it-CH.js +14 -11
  68. data/app/assets/javascripts/jquery-ui/i18n/datepicker-it.js +14 -11
  69. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ja.js +14 -11
  70. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ka.js +11 -8
  71. data/app/assets/javascripts/jquery-ui/i18n/datepicker-kk.js +14 -11
  72. data/app/assets/javascripts/jquery-ui/i18n/datepicker-km.js +9 -6
  73. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ko.js +12 -9
  74. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ky.js +12 -9
  75. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lb.js +8 -5
  76. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lt.js +13 -10
  77. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lv.js +11 -8
  78. data/app/assets/javascripts/jquery-ui/i18n/datepicker-mk.js +14 -11
  79. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ml.js +8 -5
  80. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ms.js +14 -11
  81. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nb.js +11 -8
  82. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl-BE.js +7 -4
  83. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl.js +8 -5
  84. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nn.js +11 -8
  85. data/app/assets/javascripts/jquery-ui/i18n/datepicker-no.js +11 -8
  86. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pl.js +14 -11
  87. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt-BR.js +13 -10
  88. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt.js +12 -9
  89. data/app/assets/javascripts/jquery-ui/i18n/datepicker-rm.js +10 -7
  90. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ro.js +10 -7
  91. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ru.js +14 -11
  92. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sk.js +14 -11
  93. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sl.js +14 -11
  94. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sq.js +14 -11
  95. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr-SR.js +14 -11
  96. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr.js +14 -11
  97. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sv.js +14 -11
  98. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ta.js +10 -7
  99. data/app/assets/javascripts/jquery-ui/i18n/datepicker-th.js +14 -11
  100. data/app/assets/javascripts/jquery-ui/i18n/datepicker-tj.js +14 -11
  101. data/app/assets/javascripts/jquery-ui/i18n/datepicker-tr.js +14 -11
  102. data/app/assets/javascripts/jquery-ui/i18n/datepicker-uk.js +14 -11
  103. data/app/assets/javascripts/jquery-ui/i18n/datepicker-vi.js +7 -4
  104. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-CN.js +14 -11
  105. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-HK.js +14 -11
  106. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-TW.js +15 -12
  107. data/app/assets/javascripts/jquery-ui/jquery-patch.js +58 -0
  108. data/app/assets/javascripts/jquery-ui/jquery-var-for-color.js +24 -0
  109. data/app/assets/javascripts/jquery-ui/keycode.js +11 -7
  110. data/app/assets/javascripts/jquery-ui/labels.js +18 -13
  111. data/app/assets/javascripts/jquery-ui/plugin.js +5 -2
  112. data/app/assets/javascripts/jquery-ui/position.js +30 -17
  113. data/app/assets/javascripts/jquery-ui/scroll-parent.js +10 -7
  114. data/app/assets/javascripts/jquery-ui/tabbable.js +11 -8
  115. data/app/assets/javascripts/jquery-ui/unique-id.js +10 -7
  116. data/app/assets/javascripts/jquery-ui/vendor/jquery-color/jquery.color.js +691 -0
  117. data/app/assets/javascripts/jquery-ui/version.js +6 -3
  118. data/app/assets/javascripts/jquery-ui/widget.js +56 -30
  119. data/app/assets/javascripts/jquery-ui/widgets/accordion.js +32 -23
  120. data/app/assets/javascripts/jquery-ui/widgets/autocomplete.js +31 -74
  121. data/app/assets/javascripts/jquery-ui/widgets/button.js +91 -28
  122. data/app/assets/javascripts/jquery-ui/widgets/checkboxradio.js +27 -24
  123. data/app/assets/javascripts/jquery-ui/widgets/controlgroup.js +15 -11
  124. data/app/assets/javascripts/jquery-ui/widgets/datepicker.js +185 -68
  125. data/app/assets/javascripts/jquery-ui/widgets/dialog.js +57 -54
  126. data/app/assets/javascripts/jquery-ui/widgets/draggable.js +30 -25
  127. data/app/assets/javascripts/jquery-ui/widgets/droppable.js +25 -19
  128. data/app/assets/javascripts/jquery-ui/widgets/menu.js +90 -52
  129. data/app/assets/javascripts/jquery-ui/widgets/mouse.js +36 -40
  130. data/app/assets/javascripts/jquery-ui/widgets/progressbar.js +14 -11
  131. data/app/assets/javascripts/jquery-ui/widgets/resizable.js +116 -42
  132. data/app/assets/javascripts/jquery-ui/widgets/selectable.js +18 -11
  133. data/app/assets/javascripts/jquery-ui/widgets/selectmenu.js +30 -52
  134. data/app/assets/javascripts/jquery-ui/widgets/slider.js +15 -12
  135. data/app/assets/javascripts/jquery-ui/widgets/sortable.js +193 -140
  136. data/app/assets/javascripts/jquery-ui/widgets/spinner.js +28 -45
  137. data/app/assets/javascripts/jquery-ui/widgets/tabs.js +32 -66
  138. data/app/assets/javascripts/jquery-ui/widgets/tooltip.js +38 -36
  139. data/app/assets/javascripts/jquery-ui.js +3 -7
  140. data/app/assets/stylesheets/jquery-ui/accordion.css +5 -5
  141. data/app/assets/stylesheets/jquery-ui/all.css +5 -5
  142. data/app/assets/stylesheets/jquery-ui/autocomplete.css +5 -5
  143. data/app/assets/stylesheets/jquery-ui/base.css +5 -5
  144. data/app/assets/stylesheets/jquery-ui/button.css +6 -11
  145. data/app/assets/stylesheets/jquery-ui/checkboxradio.css +5 -5
  146. data/app/assets/stylesheets/jquery-ui/controlgroup.css +5 -8
  147. data/app/assets/stylesheets/jquery-ui/core.css +5 -9
  148. data/app/assets/stylesheets/jquery-ui/datepicker.css +5 -5
  149. data/app/assets/stylesheets/jquery-ui/dialog.css +5 -5
  150. data/app/assets/stylesheets/jquery-ui/draggable.css +4 -5
  151. data/app/assets/stylesheets/jquery-ui/menu.css +5 -7
  152. data/app/assets/stylesheets/jquery-ui/progressbar.css +5 -6
  153. data/app/assets/stylesheets/jquery-ui/resizable.css +4 -5
  154. data/app/assets/stylesheets/jquery-ui/selectable.css +4 -5
  155. data/app/assets/stylesheets/jquery-ui/selectmenu.css +5 -5
  156. data/app/assets/stylesheets/jquery-ui/slider.css +6 -13
  157. data/app/assets/stylesheets/jquery-ui/sortable.css +4 -5
  158. data/app/assets/stylesheets/jquery-ui/spinner.css +5 -5
  159. data/app/assets/stylesheets/jquery-ui/tabs.css +5 -5
  160. data/app/assets/stylesheets/jquery-ui/theme.css.erb +10 -14
  161. data/app/assets/stylesheets/jquery-ui/tooltip.css +5 -5
  162. data/lib/jquery/ui/rails/version.rb +2 -2
  163. metadata +11 -15
  164. data/app/assets/javascripts/jquery-ui/core.js +0 -15
  165. data/app/assets/javascripts/jquery-ui/escape-selector.js +0 -23
  166. data/app/assets/javascripts/jquery-ui/form.js +0 -22
  167. data/app/assets/javascripts/jquery-ui/ie.js +0 -17
  168. data/app/assets/javascripts/jquery-ui/jquery-1-7.js +0 -91
  169. data/app/assets/javascripts/jquery-ui/safe-active-element.js +0 -42
  170. data/app/assets/javascripts/jquery-ui/safe-blur.js +0 -23
@@ -4,24 +4,26 @@
4
4
  //= require jquery-ui/widget
5
5
 
6
6
  /*!
7
- * jQuery UI Button 1.12.1
8
- * http://jqueryui.com
7
+ * jQuery UI Button 1.14.1
8
+ * https://jqueryui.com
9
9
  *
10
- * Copyright jQuery Foundation and other contributors
10
+ * Copyright OpenJS Foundation and other contributors
11
11
  * Released under the MIT license.
12
- * http://jquery.org/license
12
+ * https://jquery.org/license
13
13
  */
14
14
 
15
15
  //>>label: Button
16
16
  //>>group: Widgets
17
17
  //>>description: Enhances a form with themeable buttons.
18
- //>>docs: http://api.jqueryui.com/button/
19
- //>>demos: http://jqueryui.com/button/
18
+ //>>docs: https://api.jqueryui.com/button/
19
+ //>>demos: https://jqueryui.com/button/
20
20
  //>>css.structure: ../../themes/base/core.css
21
21
  //>>css.structure: ../../themes/base/button.css
22
22
  //>>css.theme: ../../themes/base/theme.css
23
23
 
24
24
  ( function( factory ) {
25
+ "use strict";
26
+
25
27
  if ( typeof define === "function" && define.amd ) {
26
28
 
27
29
  // AMD. Register as an anonymous module.
@@ -41,10 +43,11 @@
41
43
  // Browser globals
42
44
  factory( jQuery );
43
45
  }
44
- }( function( $ ) {
46
+ } )( function( $ ) {
47
+ "use strict";
45
48
 
46
49
  $.widget( "ui.button", {
47
- version: "1.12.1",
50
+ version: "1.14.1",
48
51
  defaultElement: "<button>",
49
52
  options: {
50
53
  classes: {
@@ -111,9 +114,9 @@ $.widget( "ui.button", {
111
114
  if ( event.keyCode === $.ui.keyCode.SPACE ) {
112
115
  event.preventDefault();
113
116
 
114
- // Support: PhantomJS <= 1.9, IE 8 Only
115
- // If a native click is available use it so we actually cause navigation
116
- // otherwise just trigger a click event
117
+ // If a native click is available use it, so we
118
+ // actually cause navigation. Otherwise, just trigger
119
+ // a click event.
117
120
  if ( this.element[ 0 ].click ) {
118
121
  this.element[ 0 ].click();
119
122
  } else {
@@ -268,7 +271,7 @@ $.widget( "ui.button", {
268
271
  this._toggleClass( null, "ui-state-disabled", value );
269
272
  this.element[ 0 ].disabled = value;
270
273
  if ( value ) {
271
- this.element.blur();
274
+ this.element.trigger( "blur" );
272
275
  }
273
276
  }
274
277
  },
@@ -289,7 +292,7 @@ $.widget( "ui.button", {
289
292
  } );
290
293
 
291
294
  // DEPRECATED
292
- if ( $.uiBackCompat !== false ) {
295
+ if ( $.uiBackCompat === true ) {
293
296
 
294
297
  // Text and Icons options
295
298
  $.widget( "ui.button", $.ui.button, {
@@ -347,22 +350,82 @@ if ( $.uiBackCompat !== false ) {
347
350
  } );
348
351
 
349
352
  $.fn.button = ( function( orig ) {
350
- return function() {
351
- if ( !this.length || ( this.length && this[ 0 ].tagName !== "INPUT" ) ||
352
- ( this.length && this[ 0 ].tagName === "INPUT" && (
353
- this.attr( "type" ) !== "checkbox" && this.attr( "type" ) !== "radio"
354
- ) ) ) {
355
- return orig.apply( this, arguments );
356
- }
357
- if ( !$.ui.checkboxradio ) {
358
- $.error( "Checkboxradio widget missing" );
359
- }
360
- if ( arguments.length === 0 ) {
361
- return this.checkboxradio( {
362
- "icon": false
353
+ return function( options ) {
354
+ var isMethodCall = typeof options === "string";
355
+ var args = Array.prototype.slice.call( arguments, 1 );
356
+ var returnValue = this;
357
+
358
+ if ( isMethodCall ) {
359
+
360
+ // If this is an empty collection, we need to have the instance method
361
+ // return undefined instead of the jQuery instance
362
+ if ( !this.length && options === "instance" ) {
363
+ returnValue = undefined;
364
+ } else {
365
+ this.each( function() {
366
+ var methodValue;
367
+ var type = $( this ).attr( "type" );
368
+ var name = type !== "checkbox" && type !== "radio" ?
369
+ "button" :
370
+ "checkboxradio";
371
+ var instance = $.data( this, "ui-" + name );
372
+
373
+ if ( options === "instance" ) {
374
+ returnValue = instance;
375
+ return false;
376
+ }
377
+
378
+ if ( !instance ) {
379
+ return $.error( "cannot call methods on button" +
380
+ " prior to initialization; " +
381
+ "attempted to call method '" + options + "'" );
382
+ }
383
+
384
+ if ( typeof instance[ options ] !== "function" ||
385
+ options.charAt( 0 ) === "_" ) {
386
+ return $.error( "no such method '" + options + "' for button" +
387
+ " widget instance" );
388
+ }
389
+
390
+ methodValue = instance[ options ].apply( instance, args );
391
+
392
+ if ( methodValue !== instance && methodValue !== undefined ) {
393
+ returnValue = methodValue && methodValue.jquery ?
394
+ returnValue.pushStack( methodValue.get() ) :
395
+ methodValue;
396
+ return false;
397
+ }
398
+ } );
399
+ }
400
+ } else {
401
+
402
+ // Allow multiple hashes to be passed on init
403
+ if ( args.length ) {
404
+ options = $.widget.extend.apply( null, [ options ].concat( args ) );
405
+ }
406
+
407
+ this.each( function() {
408
+ var type = $( this ).attr( "type" );
409
+ var name = type !== "checkbox" && type !== "radio" ? "button" : "checkboxradio";
410
+ var instance = $.data( this, "ui-" + name );
411
+
412
+ if ( instance ) {
413
+ instance.option( options || {} );
414
+ if ( instance._init ) {
415
+ instance._init();
416
+ }
417
+ } else {
418
+ if ( name === "button" ) {
419
+ orig.call( $( this ), options );
420
+ return;
421
+ }
422
+
423
+ $( this ).checkboxradio( $.extend( { icon: false }, options ) );
424
+ }
363
425
  } );
364
426
  }
365
- return this.checkboxradio.apply( this, arguments );
427
+
428
+ return returnValue;
366
429
  };
367
430
  } )( $.fn.button );
368
431
 
@@ -388,4 +451,4 @@ if ( $.uiBackCompat !== false ) {
388
451
 
389
452
  return $.ui.button;
390
453
 
391
- } ) );
454
+ } );
@@ -1,34 +1,34 @@
1
- //= require jquery-ui/escape-selector
2
1
  //= require jquery-ui/form-reset-mixin
3
2
  //= require jquery-ui/labels
4
3
  //= require jquery-ui/widget
5
4
 
6
5
  /*!
7
- * jQuery UI Checkboxradio 1.12.1
8
- * http://jqueryui.com
6
+ * jQuery UI Checkboxradio 1.14.1
7
+ * https://jqueryui.com
9
8
  *
10
- * Copyright jQuery Foundation and other contributors
9
+ * Copyright OpenJS Foundation and other contributors
11
10
  * Released under the MIT license.
12
- * http://jquery.org/license
11
+ * https://jquery.org/license
13
12
  */
14
13
 
15
14
  //>>label: Checkboxradio
16
15
  //>>group: Widgets
17
16
  //>>description: Enhances a form with multiple themeable checkboxes or radio buttons.
18
- //>>docs: http://api.jqueryui.com/checkboxradio/
19
- //>>demos: http://jqueryui.com/checkboxradio/
17
+ //>>docs: https://api.jqueryui.com/checkboxradio/
18
+ //>>demos: https://jqueryui.com/checkboxradio/
20
19
  //>>css.structure: ../../themes/base/core.css
21
20
  //>>css.structure: ../../themes/base/button.css
22
21
  //>>css.structure: ../../themes/base/checkboxradio.css
23
22
  //>>css.theme: ../../themes/base/theme.css
24
23
 
25
24
  ( function( factory ) {
25
+ "use strict";
26
+
26
27
  if ( typeof define === "function" && define.amd ) {
27
28
 
28
29
  // AMD. Register as an anonymous module.
29
30
  define( [
30
31
  "jquery",
31
- "../escape-selector",
32
32
  "../form-reset-mixin",
33
33
  "../labels",
34
34
  "../widget"
@@ -38,10 +38,11 @@
38
38
  // Browser globals
39
39
  factory( jQuery );
40
40
  }
41
- }( function( $ ) {
41
+ } )( function( $ ) {
42
+ "use strict";
42
43
 
43
44
  $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
44
- version: "1.12.1",
45
+ version: "1.14.1",
45
46
  options: {
46
47
  disabled: null,
47
48
  label: null,
@@ -53,8 +54,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
53
54
  },
54
55
 
55
56
  _getCreateOptions: function() {
56
- var disabled, labels;
57
- var that = this;
57
+ var disabled, labels, labelContents;
58
58
  var options = this._super() || {};
59
59
 
60
60
  // We read the type here, because it makes more sense to throw a element type error first,
@@ -74,12 +74,18 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
74
74
 
75
75
  // We need to get the label text but this may also need to make sure it does not contain the
76
76
  // input itself.
77
- this.label.contents().not( this.element[ 0 ] ).each( function() {
78
-
79
- // The label contents could be text, html, or a mix. We concat each element to get a
80
- // string representation of the label, without the input as part of it.
81
- that.originalLabel += this.nodeType === 3 ? $( this ).text() : this.outerHTML;
82
- } );
77
+ // The label contents could be text, html, or a mix. We wrap all elements
78
+ // and read the wrapper's `innerHTML` to get a string representation of
79
+ // the label, without the input as part of it.
80
+ labelContents = this.label.contents().not( this.element[ 0 ] );
81
+
82
+ if ( labelContents.length ) {
83
+ this.originalLabel += labelContents
84
+ .clone()
85
+ .wrapAll( "<div></div>" )
86
+ .parent()
87
+ .html();
88
+ }
83
89
 
84
90
  // Set the label option if we found label text
85
91
  if ( this.originalLabel ) {
@@ -120,9 +126,6 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
120
126
 
121
127
  if ( checked ) {
122
128
  this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
123
- if ( this.icon ) {
124
- this._addClass( this.icon, null, "ui-state-hover" );
125
- }
126
129
  }
127
130
 
128
131
  this._on( {
@@ -157,7 +160,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
157
160
  _getRadioGroup: function() {
158
161
  var group;
159
162
  var name = this.element[ 0 ].name;
160
- var nameSelector = "input[name='" + $.ui.escapeSelector( name ) + "']";
163
+ var nameSelector = "input[name='" + CSS.escape( name ) + "']";
161
164
 
162
165
  if ( !name ) {
163
166
  return $( [] );
@@ -169,7 +172,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
169
172
 
170
173
  // Not inside a form, check all inputs that also are not inside a form
171
174
  group = $( nameSelector ).filter( function() {
172
- return $( this ).form().length === 0;
175
+ return $( $( this ).prop( "form" ) ).length === 0;
173
176
  } );
174
177
  }
175
178
 
@@ -288,4 +291,4 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
288
291
 
289
292
  return $.ui.checkboxradio;
290
293
 
291
- } ) );
294
+ } );
@@ -1,24 +1,26 @@
1
1
  //= require jquery-ui/widget
2
2
 
3
3
  /*!
4
- * jQuery UI Controlgroup 1.12.1
5
- * http://jqueryui.com
4
+ * jQuery UI Controlgroup 1.14.1
5
+ * https://jqueryui.com
6
6
  *
7
- * Copyright jQuery Foundation and other contributors
7
+ * Copyright OpenJS Foundation and other contributors
8
8
  * Released under the MIT license.
9
- * http://jquery.org/license
9
+ * https://jquery.org/license
10
10
  */
11
11
 
12
12
  //>>label: Controlgroup
13
13
  //>>group: Widgets
14
14
  //>>description: Visually groups form control widgets
15
- //>>docs: http://api.jqueryui.com/controlgroup/
16
- //>>demos: http://jqueryui.com/controlgroup/
15
+ //>>docs: https://api.jqueryui.com/controlgroup/
16
+ //>>demos: https://jqueryui.com/controlgroup/
17
17
  //>>css.structure: ../../themes/base/core.css
18
18
  //>>css.structure: ../../themes/base/controlgroup.css
19
19
  //>>css.theme: ../../themes/base/theme.css
20
20
 
21
21
  ( function( factory ) {
22
+ "use strict";
23
+
22
24
  if ( typeof define === "function" && define.amd ) {
23
25
 
24
26
  // AMD. Register as an anonymous module.
@@ -31,11 +33,13 @@
31
33
  // Browser globals
32
34
  factory( jQuery );
33
35
  }
34
- }( function( $ ) {
36
+ } )( function( $ ) {
37
+ "use strict";
38
+
35
39
  var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;
36
40
 
37
41
  return $.widget( "ui.controlgroup", {
38
- version: "1.12.1",
42
+ version: "1.14.1",
39
43
  defaultElement: "<div>",
40
44
  options: {
41
45
  direction: "horizontal",
@@ -152,7 +156,7 @@ return $.widget( "ui.controlgroup", {
152
156
  } );
153
157
  } );
154
158
 
155
- this.childWidgets = $( $.unique( childWidgets ) );
159
+ this.childWidgets = $( $.uniqueSort( childWidgets ) );
156
160
  this._addClass( this.childWidgets, "ui-controlgroup-item" );
157
161
  },
158
162
 
@@ -236,7 +240,7 @@ return $.widget( "ui.controlgroup", {
236
240
  var result = {};
237
241
  $.each( classes, function( key ) {
238
242
  var current = instance.options.classes[ key ] || "";
239
- current = $.trim( current.replace( controlgroupCornerRegex, "" ) );
243
+ current = String.prototype.trim.call( current.replace( controlgroupCornerRegex, "" ) );
240
244
  result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " );
241
245
  } );
242
246
  return result;
@@ -297,4 +301,4 @@ return $.widget( "ui.controlgroup", {
297
301
  }
298
302
  }
299
303
  } );
300
- } ) );
304
+ } );