jquery-ui-rails 6.0.1 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +5 -5
  2. data/.gitmodules +1 -1
  3. data/History.md +7 -2
  4. data/README.md +12 -12
  5. data/Rakefile +8 -3
  6. data/VERSIONS.md +1 -0
  7. data/app/assets/images/jquery-ui/ui-icons_444444_256x240.png +0 -0
  8. data/app/assets/images/jquery-ui/ui-icons_555555_256x240.png +0 -0
  9. data/app/assets/images/jquery-ui/ui-icons_777620_256x240.png +0 -0
  10. data/app/assets/images/jquery-ui/ui-icons_777777_256x240.png +0 -0
  11. data/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png +0 -0
  12. data/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
  13. data/app/assets/javascripts/jquery-ui/core.js +1 -1
  14. data/app/assets/javascripts/jquery-ui/data.js +8 -4
  15. data/app/assets/javascripts/jquery-ui/disable-selection.js +6 -3
  16. data/app/assets/javascripts/jquery-ui/effect.js +55 -717
  17. data/app/assets/javascripts/jquery-ui/effects/effect-blind.js +6 -3
  18. data/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +6 -3
  19. data/app/assets/javascripts/jquery-ui/effects/effect-clip.js +6 -3
  20. data/app/assets/javascripts/jquery-ui/effects/effect-drop.js +6 -3
  21. data/app/assets/javascripts/jquery-ui/effects/effect-explode.js +8 -5
  22. data/app/assets/javascripts/jquery-ui/effects/effect-fade.js +6 -3
  23. data/app/assets/javascripts/jquery-ui/effects/effect-fold.js +6 -3
  24. data/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +6 -3
  25. data/app/assets/javascripts/jquery-ui/effects/effect-puff.js +6 -3
  26. data/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +6 -3
  27. data/app/assets/javascripts/jquery-ui/effects/effect-scale.js +6 -3
  28. data/app/assets/javascripts/jquery-ui/effects/effect-shake.js +6 -3
  29. data/app/assets/javascripts/jquery-ui/effects/effect-size.js +8 -3
  30. data/app/assets/javascripts/jquery-ui/effects/effect-slide.js +6 -3
  31. data/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +6 -3
  32. data/app/assets/javascripts/jquery-ui/focusable.js +8 -5
  33. data/app/assets/javascripts/jquery-ui/form-reset-mixin.js +7 -4
  34. data/app/assets/javascripts/jquery-ui/form.js +6 -3
  35. data/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +8 -5
  36. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +6 -3
  37. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +5 -2
  38. data/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +12 -9
  39. data/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +12 -9
  40. data/app/assets/javascripts/jquery-ui/i18n/datepicker-bg.js +12 -9
  41. data/app/assets/javascripts/jquery-ui/i18n/datepicker-bs.js +12 -9
  42. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ca.js +12 -9
  43. data/app/assets/javascripts/jquery-ui/i18n/datepicker-cs.js +10 -7
  44. data/app/assets/javascripts/jquery-ui/i18n/datepicker-cy-GB.js +8 -5
  45. data/app/assets/javascripts/jquery-ui/i18n/datepicker-da.js +13 -10
  46. data/app/assets/javascripts/jquery-ui/i18n/datepicker-de-AT.js +41 -0
  47. data/app/assets/javascripts/jquery-ui/i18n/datepicker-de.js +12 -9
  48. data/app/assets/javascripts/jquery-ui/i18n/datepicker-el.js +12 -9
  49. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-AU.js +8 -5
  50. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-GB.js +8 -5
  51. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-NZ.js +8 -5
  52. data/app/assets/javascripts/jquery-ui/i18n/datepicker-eo.js +12 -9
  53. data/app/assets/javascripts/jquery-ui/i18n/datepicker-es.js +12 -9
  54. data/app/assets/javascripts/jquery-ui/i18n/datepicker-et.js +8 -5
  55. data/app/assets/javascripts/jquery-ui/i18n/datepicker-eu.js +12 -9
  56. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fa.js +6 -3
  57. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fi.js +12 -9
  58. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fo.js +11 -8
  59. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CA.js +5 -2
  60. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CH.js +5 -2
  61. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr.js +6 -3
  62. data/app/assets/javascripts/jquery-ui/i18n/datepicker-gl.js +12 -9
  63. data/app/assets/javascripts/jquery-ui/i18n/datepicker-he.js +12 -9
  64. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hi.js +7 -4
  65. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hr.js +12 -9
  66. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hu.js +9 -6
  67. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hy.js +12 -9
  68. data/app/assets/javascripts/jquery-ui/i18n/datepicker-id.js +12 -9
  69. data/app/assets/javascripts/jquery-ui/i18n/datepicker-is.js +11 -8
  70. data/app/assets/javascripts/jquery-ui/i18n/datepicker-it-CH.js +12 -9
  71. data/app/assets/javascripts/jquery-ui/i18n/datepicker-it.js +12 -9
  72. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ja.js +12 -9
  73. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ka.js +9 -6
  74. data/app/assets/javascripts/jquery-ui/i18n/datepicker-kk.js +12 -9
  75. data/app/assets/javascripts/jquery-ui/i18n/datepicker-km.js +9 -6
  76. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ko.js +12 -9
  77. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ky.js +10 -7
  78. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lb.js +8 -5
  79. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lt.js +11 -8
  80. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lv.js +11 -8
  81. data/app/assets/javascripts/jquery-ui/i18n/datepicker-mk.js +12 -9
  82. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ml.js +8 -5
  83. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ms.js +12 -9
  84. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nb.js +9 -6
  85. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl-BE.js +5 -2
  86. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl.js +5 -2
  87. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nn.js +9 -6
  88. data/app/assets/javascripts/jquery-ui/i18n/datepicker-no.js +9 -6
  89. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pl.js +12 -9
  90. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt-BR.js +11 -8
  91. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt.js +12 -9
  92. data/app/assets/javascripts/jquery-ui/i18n/datepicker-rm.js +8 -5
  93. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ro.js +8 -5
  94. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ru.js +12 -9
  95. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sk.js +12 -9
  96. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sl.js +12 -9
  97. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sq.js +12 -9
  98. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr-SR.js +12 -9
  99. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr.js +12 -9
  100. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sv.js +12 -9
  101. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ta.js +10 -7
  102. data/app/assets/javascripts/jquery-ui/i18n/datepicker-th.js +12 -9
  103. data/app/assets/javascripts/jquery-ui/i18n/datepicker-tj.js +12 -9
  104. data/app/assets/javascripts/jquery-ui/i18n/datepicker-tr.js +12 -9
  105. data/app/assets/javascripts/jquery-ui/i18n/datepicker-uk.js +12 -9
  106. data/app/assets/javascripts/jquery-ui/i18n/datepicker-vi.js +5 -2
  107. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-CN.js +12 -9
  108. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-HK.js +12 -9
  109. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-TW.js +15 -12
  110. data/app/assets/javascripts/jquery-ui/ie.js +5 -2
  111. data/app/assets/javascripts/jquery-ui/jquery-patch.js +91 -0
  112. data/app/assets/javascripts/jquery-ui/jquery-var-for-color.js +24 -0
  113. data/app/assets/javascripts/jquery-ui/keycode.js +7 -3
  114. data/app/assets/javascripts/jquery-ui/labels.js +12 -6
  115. data/app/assets/javascripts/jquery-ui/plugin.js +5 -2
  116. data/app/assets/javascripts/jquery-ui/position.js +24 -11
  117. data/app/assets/javascripts/jquery-ui/safe-active-element.js +6 -2
  118. data/app/assets/javascripts/jquery-ui/safe-blur.js +6 -2
  119. data/app/assets/javascripts/jquery-ui/scroll-parent.js +6 -3
  120. data/app/assets/javascripts/jquery-ui/tabbable.js +7 -4
  121. data/app/assets/javascripts/jquery-ui/unique-id.js +6 -3
  122. data/app/assets/javascripts/jquery-ui/vendor/jquery-color/jquery.color.js +722 -0
  123. data/app/assets/javascripts/jquery-ui/version.js +6 -3
  124. data/app/assets/javascripts/jquery-ui/widget.js +43 -24
  125. data/app/assets/javascripts/jquery-ui/widgets/accordion.js +17 -8
  126. data/app/assets/javascripts/jquery-ui/widgets/autocomplete.js +23 -32
  127. data/app/assets/javascripts/jquery-ui/widgets/button.js +82 -19
  128. data/app/assets/javascripts/jquery-ui/widgets/checkboxradio.js +9 -11
  129. data/app/assets/javascripts/jquery-ui/widgets/controlgroup.js +10 -6
  130. data/app/assets/javascripts/jquery-ui/widgets/datepicker.js +176 -56
  131. data/app/assets/javascripts/jquery-ui/widgets/dialog.js +45 -31
  132. data/app/assets/javascripts/jquery-ui/widgets/draggable.js +22 -13
  133. data/app/assets/javascripts/jquery-ui/widgets/droppable.js +19 -13
  134. data/app/assets/javascripts/jquery-ui/widgets/menu.js +83 -43
  135. data/app/assets/javascripts/jquery-ui/widgets/mouse.js +18 -7
  136. data/app/assets/javascripts/jquery-ui/widgets/progressbar.js +9 -6
  137. data/app/assets/javascripts/jquery-ui/widgets/resizable.js +36 -18
  138. data/app/assets/javascripts/jquery-ui/widgets/selectable.js +13 -6
  139. data/app/assets/javascripts/jquery-ui/widgets/selectmenu.js +15 -10
  140. data/app/assets/javascripts/jquery-ui/widgets/slider.js +10 -7
  141. data/app/assets/javascripts/jquery-ui/widgets/sortable.js +221 -159
  142. data/app/assets/javascripts/jquery-ui/widgets/spinner.js +20 -13
  143. data/app/assets/javascripts/jquery-ui/widgets/tabs.js +13 -13
  144. data/app/assets/javascripts/jquery-ui/widgets/tooltip.js +15 -11
  145. data/app/assets/javascripts/jquery-ui.js +3 -2
  146. data/app/assets/stylesheets/jquery-ui/accordion.css +1 -1
  147. data/app/assets/stylesheets/jquery-ui/all.css +1 -1
  148. data/app/assets/stylesheets/jquery-ui/autocomplete.css +1 -1
  149. data/app/assets/stylesheets/jquery-ui/base.css +1 -1
  150. data/app/assets/stylesheets/jquery-ui/button.css +1 -1
  151. data/app/assets/stylesheets/jquery-ui/checkboxradio.css +1 -1
  152. data/app/assets/stylesheets/jquery-ui/controlgroup.css +1 -1
  153. data/app/assets/stylesheets/jquery-ui/core.css +2 -2
  154. data/app/assets/stylesheets/jquery-ui/datepicker.css +1 -1
  155. data/app/assets/stylesheets/jquery-ui/dialog.css +1 -1
  156. data/app/assets/stylesheets/jquery-ui/draggable.css +1 -1
  157. data/app/assets/stylesheets/jquery-ui/menu.css +1 -1
  158. data/app/assets/stylesheets/jquery-ui/progressbar.css +2 -2
  159. data/app/assets/stylesheets/jquery-ui/resizable.css +1 -1
  160. data/app/assets/stylesheets/jquery-ui/selectable.css +1 -1
  161. data/app/assets/stylesheets/jquery-ui/selectmenu.css +1 -1
  162. data/app/assets/stylesheets/jquery-ui/slider.css +2 -2
  163. data/app/assets/stylesheets/jquery-ui/sortable.css +1 -1
  164. data/app/assets/stylesheets/jquery-ui/spinner.css +1 -1
  165. data/app/assets/stylesheets/jquery-ui/tabs.css +1 -1
  166. data/app/assets/stylesheets/jquery-ui/theme.css.erb +9 -6
  167. data/app/assets/stylesheets/jquery-ui/tooltip.css +1 -1
  168. data/lib/jquery/ui/rails/version.rb +2 -2
  169. metadata +8 -7
  170. data/app/assets/javascripts/jquery-ui/escape-selector.js +0 -23
  171. data/app/assets/javascripts/jquery-ui/jquery-1-7.js +0 -91
@@ -1,10 +1,9 @@
1
1
  //= require jquery-ui/version
2
2
  //= require jquery-ui/keycode
3
3
 
4
- // jscs:disable maximumLineLength
5
- /* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
4
+ /* eslint-disable max-len, camelcase */
6
5
  /*!
7
- * jQuery UI Datepicker 1.12.1
6
+ * jQuery UI Datepicker 1.13.0
8
7
  * http://jqueryui.com
9
8
  *
10
9
  * Copyright jQuery Foundation and other contributors
@@ -22,6 +21,8 @@
22
21
  //>>css.theme: ../../themes/base/theme.css
23
22
 
24
23
  ( function( factory ) {
24
+ "use strict";
25
+
25
26
  if ( typeof define === "function" && define.amd ) {
26
27
 
27
28
  // AMD. Register as an anonymous module.
@@ -35,9 +36,10 @@
35
36
  // Browser globals
36
37
  factory( jQuery );
37
38
  }
38
- }( function( $ ) {
39
+ } )( function( $ ) {
40
+ "use strict";
39
41
 
40
- $.extend( $.ui, { datepicker: { version: "1.12.1" } } );
42
+ $.extend( $.ui, { datepicker: { version: "1.13.0" } } );
41
43
 
42
44
  var datepicker_instActive;
43
45
 
@@ -65,6 +67,7 @@ function datepicker_getZindex( elem ) {
65
67
 
66
68
  return 0;
67
69
  }
70
+
68
71
  /* Date picker manager.
69
72
  Use the singleton instance of this class, $.datepicker, to interact with the date picker.
70
73
  Settings for (groups of) date pickers are maintained in an instance object,
@@ -91,18 +94,20 @@ function Datepicker() {
91
94
  prevText: "Prev", // Display text for previous month link
92
95
  nextText: "Next", // Display text for next month link
93
96
  currentText: "Today", // Display text for current month link
94
- monthNames: [ "January","February","March","April","May","June",
95
- "July","August","September","October","November","December" ], // Names of months for drop-down and formatting
97
+ monthNames: [ "January", "February", "March", "April", "May", "June",
98
+ "July", "August", "September", "October", "November", "December" ], // Names of months for drop-down and formatting
96
99
  monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting
97
100
  dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting
98
101
  dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting
99
- dayNamesMin: [ "Su","Mo","Tu","We","Th","Fr","Sa" ], // Column headings for days starting at Sunday
102
+ dayNamesMin: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ], // Column headings for days starting at Sunday
100
103
  weekHeader: "Wk", // Column header for week of the year
101
104
  dateFormat: "mm/dd/yy", // See format options on parseDate
102
105
  firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
103
106
  isRTL: false, // True if right-to-left language, false if left-to-right
104
107
  showMonthAfterYear: false, // True if the year select precedes month, false for month then year
105
- yearSuffix: "" // Additional text to append to the year in the month headers
108
+ yearSuffix: "", // Additional text to append to the year in the month headers,
109
+ selectMonthLabel: "Select month", // Invisible label for month selector
110
+ selectYearLabel: "Select year" // Invisible label for year selector
106
111
  };
107
112
  this._defaults = { // Global defaults for all the date picker instances
108
113
  showOn: "focus", // "focus" for popup on focus,
@@ -143,6 +148,7 @@ function Datepicker() {
143
148
  onSelect: null, // Define a callback function when a date is selected
144
149
  onChangeMonthYear: null, // Define a callback function when the month or year is changed
145
150
  onClose: null, // Define a callback function when the datepicker is closed
151
+ onUpdateDatepicker: null, // Define a callback function when the datepicker is updated
146
152
  numberOfMonths: 1, // Number of months to show at a time
147
153
  showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
148
154
  stepMonths: 1, // Number of months to step back/forward
@@ -161,6 +167,7 @@ function Datepicker() {
161
167
  }
162
168
 
163
169
  $.extend( Datepicker.prototype, {
170
+
164
171
  /* Class name added to elements to indicate already configured with a date picker. */
165
172
  markerClassName: "hasDatepicker",
166
173
 
@@ -243,7 +250,9 @@ $.extend( Datepicker.prototype, {
243
250
  inst.append.remove();
244
251
  }
245
252
  if ( appendText ) {
246
- inst.append = $( "<span class='" + this._appendClass + "'>" + appendText + "</span>" );
253
+ inst.append = $( "<span>" )
254
+ .addClass( this._appendClass )
255
+ .text( appendText );
247
256
  input[ isRTL ? "before" : "after" ]( inst.append );
248
257
  }
249
258
 
@@ -260,12 +269,32 @@ $.extend( Datepicker.prototype, {
260
269
  if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked
261
270
  buttonText = this._get( inst, "buttonText" );
262
271
  buttonImage = this._get( inst, "buttonImage" );
263
- inst.trigger = $( this._get( inst, "buttonImageOnly" ) ?
264
- $( "<img/>" ).addClass( this._triggerClass ).
265
- attr( { src: buttonImage, alt: buttonText, title: buttonText } ) :
266
- $( "<button type='button'></button>" ).addClass( this._triggerClass ).
267
- html( !buttonImage ? buttonText : $( "<img/>" ).attr(
268
- { src:buttonImage, alt:buttonText, title:buttonText } ) ) );
272
+
273
+ if ( this._get( inst, "buttonImageOnly" ) ) {
274
+ inst.trigger = $( "<img>" )
275
+ .addClass( this._triggerClass )
276
+ .attr( {
277
+ src: buttonImage,
278
+ alt: buttonText,
279
+ title: buttonText
280
+ } );
281
+ } else {
282
+ inst.trigger = $( "<button type='button'>" )
283
+ .addClass( this._triggerClass );
284
+ if ( buttonImage ) {
285
+ inst.trigger.html(
286
+ $( "<img>" )
287
+ .attr( {
288
+ src: buttonImage,
289
+ alt: buttonText,
290
+ title: buttonText
291
+ } )
292
+ );
293
+ } else {
294
+ inst.trigger.text( buttonText );
295
+ }
296
+ }
297
+
269
298
  input[ isRTL ? "before" : "after" ]( inst.trigger );
270
299
  inst.trigger.on( "click", function() {
271
300
  if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) {
@@ -411,6 +440,7 @@ $.extend( Datepicker.prototype, {
411
440
 
412
441
  if ( datepicker_instActive === inst ) {
413
442
  datepicker_instActive = null;
443
+ this._curInst = null;
414
444
  }
415
445
  },
416
446
 
@@ -430,7 +460,9 @@ $.extend( Datepicker.prototype, {
430
460
  if ( nodeName === "input" ) {
431
461
  target.disabled = false;
432
462
  inst.trigger.filter( "button" ).
433
- each( function() { this.disabled = false; } ).end().
463
+ each( function() {
464
+ this.disabled = false;
465
+ } ).end().
434
466
  filter( "img" ).css( { opacity: "1.0", cursor: "" } );
435
467
  } else if ( nodeName === "div" || nodeName === "span" ) {
436
468
  inline = $target.children( "." + this._inlineClass );
@@ -439,7 +471,11 @@ $.extend( Datepicker.prototype, {
439
471
  prop( "disabled", false );
440
472
  }
441
473
  this._disabledInputs = $.map( this._disabledInputs,
442
- function( value ) { return ( value === target ? null : value ); } ); // delete entry
474
+
475
+ // Delete entry
476
+ function( value ) {
477
+ return ( value === target ? null : value );
478
+ } );
443
479
  },
444
480
 
445
481
  /* Disable the date picker to a jQuery selection.
@@ -458,7 +494,9 @@ $.extend( Datepicker.prototype, {
458
494
  if ( nodeName === "input" ) {
459
495
  target.disabled = true;
460
496
  inst.trigger.filter( "button" ).
461
- each( function() { this.disabled = true; } ).end().
497
+ each( function() {
498
+ this.disabled = true;
499
+ } ).end().
462
500
  filter( "img" ).css( { opacity: "0.5", cursor: "default" } );
463
501
  } else if ( nodeName === "div" || nodeName === "span" ) {
464
502
  inline = $target.children( "." + this._inlineClass );
@@ -467,7 +505,11 @@ $.extend( Datepicker.prototype, {
467
505
  prop( "disabled", true );
468
506
  }
469
507
  this._disabledInputs = $.map( this._disabledInputs,
470
- function( value ) { return ( value === target ? null : value ); } ); // delete entry
508
+
509
+ // Delete entry
510
+ function( value ) {
511
+ return ( value === target ? null : value );
512
+ } );
471
513
  this._disabledInputs[ this._disabledInputs.length ] = target;
472
514
  },
473
515
 
@@ -495,8 +537,7 @@ $.extend( Datepicker.prototype, {
495
537
  _getInst: function( target ) {
496
538
  try {
497
539
  return $.data( target, "datepicker" );
498
- }
499
- catch ( err ) {
540
+ } catch ( err ) {
500
541
  throw "Missing instance data for this datepicker";
501
542
  }
502
543
  },
@@ -729,8 +770,7 @@ $.extend( Datepicker.prototype, {
729
770
  $.datepicker._updateAlternate( inst );
730
771
  $.datepicker._updateDatepicker( inst );
731
772
  }
732
- }
733
- catch ( err ) {
773
+ } catch ( err ) {
734
774
  }
735
775
  }
736
776
  return true;
@@ -835,7 +875,8 @@ $.extend( Datepicker.prototype, {
835
875
  numMonths = this._getNumberOfMonths( inst ),
836
876
  cols = numMonths[ 1 ],
837
877
  width = 17,
838
- activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" );
878
+ activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ),
879
+ onUpdateDatepicker = $.datepicker._get( inst, "onUpdateDatepicker" );
839
880
 
840
881
  if ( activeCell.length > 0 ) {
841
882
  datepicker_handleMouseover.apply( activeCell.get( 0 ) );
@@ -861,11 +902,15 @@ $.extend( Datepicker.prototype, {
861
902
 
862
903
  //assure that inst.yearshtml didn't change.
863
904
  if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
864
- inst.dpDiv.find( "select.ui-datepicker-year:first" ).replaceWith( inst.yearshtml );
905
+ inst.dpDiv.find( "select.ui-datepicker-year" ).first().replaceWith( inst.yearshtml );
865
906
  }
866
907
  origyearshtml = inst.yearshtml = null;
867
908
  }, 0 );
868
909
  }
910
+
911
+ if ( onUpdateDatepicker ) {
912
+ onUpdateDatepicker.apply( ( inst.input ? inst.input[ 0 ] : null ), [ inst ] );
913
+ }
869
914
  },
870
915
 
871
916
  // #6694 - don't focus the input if it's already focused
@@ -903,7 +948,7 @@ $.extend( Datepicker.prototype, {
903
948
  inst = this._getInst( obj ),
904
949
  isRTL = this._get( inst, "isRTL" );
905
950
 
906
- while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden( obj ) ) ) {
951
+ while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.pseudos.hidden( obj ) ) ) {
907
952
  obj = obj[ isRTL ? "previousSibling" : "nextSibling" ];
908
953
  }
909
954
 
@@ -991,9 +1036,7 @@ $.extend( Datepicker.prototype, {
991
1036
  if ( this._isDisabledDatepicker( target[ 0 ] ) ) {
992
1037
  return;
993
1038
  }
994
- this._adjustInstDate( inst, offset +
995
- ( period === "M" ? this._get( inst, "showCurrentAtPos" ) : 0 ), // undo positioning
996
- period );
1039
+ this._adjustInstDate( inst, offset, period );
997
1040
  this._updateDatepicker( inst );
998
1041
  },
999
1042
 
@@ -1040,7 +1083,7 @@ $.extend( Datepicker.prototype, {
1040
1083
  }
1041
1084
 
1042
1085
  inst = this._getInst( target[ 0 ] );
1043
- inst.selectedDay = inst.currentDay = $( "a", td ).html();
1086
+ inst.selectedDay = inst.currentDay = parseInt( $( "a", td ).attr( "data-date" ) );
1044
1087
  inst.selectedMonth = inst.currentMonth = month;
1045
1088
  inst.selectedYear = inst.currentYear = year;
1046
1089
  this._selectDate( id, this._formatDate( inst,
@@ -1093,7 +1136,7 @@ $.extend( Datepicker.prototype, {
1093
1136
  altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" );
1094
1137
  date = this._getDate( inst );
1095
1138
  dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );
1096
- $( altField ).val( dateStr );
1139
+ $( document ).find( altField ).val( dateStr );
1097
1140
  }
1098
1141
  },
1099
1142
 
@@ -1532,8 +1575,7 @@ $.extend( Datepicker.prototype, {
1532
1575
  try {
1533
1576
  return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
1534
1577
  offset, $.datepicker._getFormatConfig( inst ) );
1535
- }
1536
- catch ( e ) {
1578
+ } catch ( e ) {
1537
1579
 
1538
1580
  // Ignore
1539
1581
  }
@@ -1707,32 +1749,104 @@ $.extend( Datepicker.prototype, {
1707
1749
  this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ),
1708
1750
  this._getFormatConfig( inst ) ) );
1709
1751
 
1710
- prev = ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ?
1711
- "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
1712
- " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" :
1713
- ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" ) );
1752
+ if ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ) {
1753
+ prev = $( "<a>" )
1754
+ .attr( {
1755
+ "class": "ui-datepicker-prev ui-corner-all",
1756
+ "data-handler": "prev",
1757
+ "data-event": "click",
1758
+ title: prevText
1759
+ } )
1760
+ .append(
1761
+ $( "<span>" )
1762
+ .addClass( "ui-icon ui-icon-circle-triangle-" +
1763
+ ( isRTL ? "e" : "w" ) )
1764
+ .text( prevText )
1765
+ )[ 0 ].outerHTML;
1766
+ } else if ( hideIfNoPrevNext ) {
1767
+ prev = "";
1768
+ } else {
1769
+ prev = $( "<a>" )
1770
+ .attr( {
1771
+ "class": "ui-datepicker-prev ui-corner-all ui-state-disabled",
1772
+ title: prevText
1773
+ } )
1774
+ .append(
1775
+ $( "<span>" )
1776
+ .addClass( "ui-icon ui-icon-circle-triangle-" +
1777
+ ( isRTL ? "e" : "w" ) )
1778
+ .text( prevText )
1779
+ )[ 0 ].outerHTML;
1780
+ }
1714
1781
 
1715
1782
  nextText = this._get( inst, "nextText" );
1716
1783
  nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText,
1717
1784
  this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ),
1718
1785
  this._getFormatConfig( inst ) ) );
1719
1786
 
1720
- next = ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ?
1721
- "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
1722
- " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" :
1723
- ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" ) );
1787
+ if ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ) {
1788
+ next = $( "<a>" )
1789
+ .attr( {
1790
+ "class": "ui-datepicker-next ui-corner-all",
1791
+ "data-handler": "next",
1792
+ "data-event": "click",
1793
+ title: nextText
1794
+ } )
1795
+ .append(
1796
+ $( "<span>" )
1797
+ .addClass( "ui-icon ui-icon-circle-triangle-" +
1798
+ ( isRTL ? "w" : "e" ) )
1799
+ .text( nextText )
1800
+ )[ 0 ].outerHTML;
1801
+ } else if ( hideIfNoPrevNext ) {
1802
+ next = "";
1803
+ } else {
1804
+ next = $( "<a>" )
1805
+ .attr( {
1806
+ "class": "ui-datepicker-next ui-corner-all ui-state-disabled",
1807
+ title: nextText
1808
+ } )
1809
+ .append(
1810
+ $( "<span>" )
1811
+ .attr( "class", "ui-icon ui-icon-circle-triangle-" +
1812
+ ( isRTL ? "w" : "e" ) )
1813
+ .text( nextText )
1814
+ )[ 0 ].outerHTML;
1815
+ }
1724
1816
 
1725
1817
  currentText = this._get( inst, "currentText" );
1726
1818
  gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today );
1727
1819
  currentText = ( !navigationAsDateFormat ? currentText :
1728
1820
  this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) );
1729
1821
 
1730
- controls = ( !inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
1731
- this._get( inst, "closeText" ) + "</button>" : "" );
1732
-
1733
- buttonPanel = ( showButtonPanel ) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + ( isRTL ? controls : "" ) +
1734
- ( this._isInRange( inst, gotoDate ) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" +
1735
- ">" + currentText + "</button>" : "" ) + ( isRTL ? "" : controls ) + "</div>" : "";
1822
+ controls = "";
1823
+ if ( !inst.inline ) {
1824
+ controls = $( "<button>" )
1825
+ .attr( {
1826
+ type: "button",
1827
+ "class": "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all",
1828
+ "data-handler": "hide",
1829
+ "data-event": "click"
1830
+ } )
1831
+ .text( this._get( inst, "closeText" ) )[ 0 ].outerHTML;
1832
+ }
1833
+
1834
+ buttonPanel = "";
1835
+ if ( showButtonPanel ) {
1836
+ buttonPanel = $( "<div class='ui-datepicker-buttonpane ui-widget-content'>" )
1837
+ .append( isRTL ? controls : "" )
1838
+ .append( this._isInRange( inst, gotoDate ) ?
1839
+ $( "<button>" )
1840
+ .attr( {
1841
+ type: "button",
1842
+ "class": "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
1843
+ "data-handler": "today",
1844
+ "data-event": "click"
1845
+ } )
1846
+ .text( currentText ) :
1847
+ "" )
1848
+ .append( isRTL ? "" : controls )[ 0 ].outerHTML;
1849
+ }
1736
1850
 
1737
1851
  firstDay = parseInt( this._get( inst, "firstDay" ), 10 );
1738
1852
  firstDay = ( isNaN( firstDay ) ? 0 : firstDay );
@@ -1820,7 +1934,9 @@ $.extend( Datepicker.prototype, {
1820
1934
  ( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) +
1821
1935
  ( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day
1822
1936
  ( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months
1823
- "' href='#'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
1937
+ "' href='#' aria-current='" + ( printDate.getTime() === currentDate.getTime() ? "true" : "false" ) + // mark date as selected for screen reader
1938
+ "' data-date='" + printDate.getDate() + // store date as data
1939
+ "'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
1824
1940
  printDate.setDate( printDate.getDate() + 1 );
1825
1941
  printDate = this._daylightSavingAdjust( printDate );
1826
1942
  }
@@ -1850,6 +1966,8 @@ $.extend( Datepicker.prototype, {
1850
1966
  changeMonth = this._get( inst, "changeMonth" ),
1851
1967
  changeYear = this._get( inst, "changeYear" ),
1852
1968
  showMonthAfterYear = this._get( inst, "showMonthAfterYear" ),
1969
+ selectMonthLabel = this._get( inst, "selectMonthLabel" ),
1970
+ selectYearLabel = this._get( inst, "selectYearLabel" ),
1853
1971
  html = "<div class='ui-datepicker-title'>",
1854
1972
  monthHtml = "";
1855
1973
 
@@ -1859,7 +1977,7 @@ $.extend( Datepicker.prototype, {
1859
1977
  } else {
1860
1978
  inMinYear = ( minDate && minDate.getFullYear() === drawYear );
1861
1979
  inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear );
1862
- monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
1980
+ monthHtml += "<select class='ui-datepicker-month' aria-label='" + selectMonthLabel + "' data-handler='selectMonth' data-event='change'>";
1863
1981
  for ( month = 0; month < 12; month++ ) {
1864
1982
  if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) {
1865
1983
  monthHtml += "<option value='" + month + "'" +
@@ -1894,7 +2012,7 @@ $.extend( Datepicker.prototype, {
1894
2012
  endYear = Math.max( year, determineYear( years[ 1 ] || "" ) );
1895
2013
  year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year );
1896
2014
  endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear );
1897
- inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
2015
+ inst.yearshtml += "<select class='ui-datepicker-year' aria-label='" + selectYearLabel + "' data-handler='selectYear' data-event='change'>";
1898
2016
  for ( ; year <= endYear; year++ ) {
1899
2017
  inst.yearshtml += "<option value='" + year + "'" +
1900
2018
  ( year === drawYear ? " selected='selected'" : "" ) +
@@ -2106,18 +2224,20 @@ $.fn.datepicker = function( options ) {
2106
2224
  apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
2107
2225
  }
2108
2226
  return this.each( function() {
2109
- typeof options === "string" ?
2110
- $.datepicker[ "_" + options + "Datepicker" ].
2111
- apply( $.datepicker, [ this ].concat( otherArgs ) ) :
2227
+ if ( typeof options === "string" ) {
2228
+ $.datepicker[ "_" + options + "Datepicker" ]
2229
+ .apply( $.datepicker, [ this ].concat( otherArgs ) );
2230
+ } else {
2112
2231
  $.datepicker._attachDatepicker( this, options );
2232
+ }
2113
2233
  } );
2114
2234
  };
2115
2235
 
2116
2236
  $.datepicker = new Datepicker(); // singleton instance
2117
2237
  $.datepicker.initialized = false;
2118
2238
  $.datepicker.uuid = new Date().getTime();
2119
- $.datepicker.version = "1.12.1";
2239
+ $.datepicker.version = "1.13.0";
2120
2240
 
2121
2241
  return $.datepicker;
2122
2242
 
2123
- } ) );
2243
+ } );
@@ -13,7 +13,7 @@
13
13
  //= require jquery-ui/widget
14
14
 
15
15
  /*!
16
- * jQuery UI Dialog 1.12.1
16
+ * jQuery UI Dialog 1.13.0
17
17
  * http://jqueryui.com
18
18
  *
19
19
  * Copyright jQuery Foundation and other contributors
@@ -31,6 +31,8 @@
31
31
  //>>css.theme: ../../themes/base/theme.css
32
32
 
33
33
  ( function( factory ) {
34
+ "use strict";
35
+
34
36
  if ( typeof define === "function" && define.amd ) {
35
37
 
36
38
  // AMD. Register as an anonymous module.
@@ -55,10 +57,11 @@
55
57
  // Browser globals
56
58
  factory( jQuery );
57
59
  }
58
- }( function( $ ) {
60
+ } )( function( $ ) {
61
+ "use strict";
59
62
 
60
63
  $.widget( "ui.dialog", {
61
- version: "1.12.1",
64
+ version: "1.13.0",
62
65
  options: {
63
66
  appendTo: "body",
64
67
  autoOpen: true,
@@ -303,7 +306,7 @@ $.widget( "ui.dialog", {
303
306
  that._trigger( "focus" );
304
307
  } );
305
308
 
306
- // Track the dialog immediately upon openening in case a focus event
309
+ // Track the dialog immediately upon opening in case a focus event
307
310
  // somehow occurs outside of the dialog before an element inside the
308
311
  // dialog is focused (#10152)
309
312
  this._makeFocusTarget();
@@ -339,22 +342,23 @@ $.widget( "ui.dialog", {
339
342
  hasFocus.eq( 0 ).trigger( "focus" );
340
343
  },
341
344
 
342
- _keepFocus: function( event ) {
343
- function checkFocus() {
344
- var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
345
- isActive = this.uiDialog[ 0 ] === activeElement ||
346
- $.contains( this.uiDialog[ 0 ], activeElement );
347
- if ( !isActive ) {
348
- this._focusTabbable();
349
- }
345
+ _restoreTabbableFocus: function() {
346
+ var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
347
+ isActive = this.uiDialog[ 0 ] === activeElement ||
348
+ $.contains( this.uiDialog[ 0 ], activeElement );
349
+ if ( !isActive ) {
350
+ this._focusTabbable();
350
351
  }
352
+ },
353
+
354
+ _keepFocus: function( event ) {
351
355
  event.preventDefault();
352
- checkFocus.call( this );
356
+ this._restoreTabbableFocus();
353
357
 
354
358
  // support: IE
355
359
  // IE <= 8 doesn't prevent moving focus even with event.preventDefault()
356
360
  // so we check again later
357
- this._delay( checkFocus );
361
+ this._delay( this._restoreTabbableFocus );
358
362
  },
359
363
 
360
364
  _createWrapper: function() {
@@ -383,8 +387,8 @@ $.widget( "ui.dialog", {
383
387
  return;
384
388
  }
385
389
  var tabbables = this.uiDialog.find( ":tabbable" ),
386
- first = tabbables.filter( ":first" ),
387
- last = tabbables.filter( ":last" );
390
+ first = tabbables.first(),
391
+ last = tabbables.last();
388
392
 
389
393
  if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&
390
394
  !event.shiftKey ) {
@@ -495,14 +499,14 @@ $.widget( "ui.dialog", {
495
499
  this.uiDialogButtonPane.remove();
496
500
  this.uiButtonSet.empty();
497
501
 
498
- if ( $.isEmptyObject( buttons ) || ( $.isArray( buttons ) && !buttons.length ) ) {
502
+ if ( $.isEmptyObject( buttons ) || ( Array.isArray( buttons ) && !buttons.length ) ) {
499
503
  this._removeClass( this.uiDialog, "ui-dialog-buttons" );
500
504
  return;
501
505
  }
502
506
 
503
507
  $.each( buttons, function( name, props ) {
504
508
  var click, buttonOptions;
505
- props = $.isFunction( props ) ?
509
+ props = typeof props === "function" ?
506
510
  { click: props, text: name } :
507
511
  props;
508
512
 
@@ -867,6 +871,8 @@ $.widget( "ui.dialog", {
867
871
  return;
868
872
  }
869
873
 
874
+ var jqMinor = $.fn.jquery.substring( 0, 4 );
875
+
870
876
  // We use a delay in case the overlay is created from an
871
877
  // event that we're going to be cancelling (#2804)
872
878
  var isOpening = true;
@@ -877,20 +883,28 @@ $.widget( "ui.dialog", {
877
883
  if ( !this.document.data( "ui-dialog-overlays" ) ) {
878
884
 
879
885
  // Prevent use of anchors and inputs
880
- // Using _on() for an event handler shared across many instances is
881
- // safe because the dialogs stack and must be closed in reverse order
882
- this._on( this.document, {
883
- focusin: function( event ) {
884
- if ( isOpening ) {
885
- return;
886
- }
886
+ // This doesn't use `_on()` because it is a shared event handler
887
+ // across all open modal dialogs.
888
+ this.document.on( "focusin.ui-dialog", function( event ) {
889
+ if ( isOpening ) {
890
+ return;
891
+ }
887
892
 
888
- if ( !this._allowInteraction( event ) ) {
889
- event.preventDefault();
890
- this._trackingInstances()[ 0 ]._focusTabbable();
893
+ var instance = this._trackingInstances()[ 0 ];
894
+ if ( !instance._allowInteraction( event ) ) {
895
+ event.preventDefault();
896
+ instance._focusTabbable();
897
+
898
+ // Support: jQuery >=3.4 <3.6 only
899
+ // Focus re-triggering in jQuery 3.4/3.5 makes the original element
900
+ // have its focus event propagated last, breaking the re-targeting.
901
+ // Trigger focus in a delay in addition if needed to avoid the issue
902
+ // See https://github.com/jquery/jquery/issues/4382
903
+ if ( jqMinor === "3.4." || jqMinor === "3.5." ) {
904
+ instance._delay( instance._restoreTabbableFocus );
891
905
  }
892
906
  }
893
- } );
907
+ }.bind( this ) );
894
908
  }
895
909
 
896
910
  this.overlay = $( "<div>" )
@@ -913,7 +927,7 @@ $.widget( "ui.dialog", {
913
927
  var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
914
928
 
915
929
  if ( !overlays ) {
916
- this._off( this.document, "focusin" );
930
+ this.document.off( "focusin.ui-dialog" );
917
931
  this.document.removeData( "ui-dialog-overlays" );
918
932
  } else {
919
933
  this.document.data( "ui-dialog-overlays", overlays );
@@ -951,4 +965,4 @@ if ( $.uiBackCompat !== false ) {
951
965
 
952
966
  return $.ui.dialog;
953
967
 
954
- } ) );
968
+ } );