jquery-ui-rails 4.0.0 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (149) hide show
  1. data/.travis.yml +0 -1
  2. data/Gemfile +1 -1
  3. data/History.md +44 -0
  4. data/README.md +16 -4
  5. data/Rakefile +39 -11
  6. data/VERSIONS.md +31 -0
  7. data/app/assets/images/jquery-ui/animated-overlay.gif +0 -0
  8. data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  9. data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  10. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  11. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  12. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  13. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  14. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  15. data/{vendor → app}/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  16. data/{vendor → app}/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  17. data/{vendor → app}/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  18. data/{vendor → app}/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  19. data/{vendor → app}/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
  20. data/{vendor → app}/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  21. data/{vendor → app}/assets/javascripts/jquery.ui.accordion.js +17 -18
  22. data/{vendor → app}/assets/javascripts/jquery.ui.all.js +0 -0
  23. data/{vendor → app}/assets/javascripts/jquery.ui.autocomplete.js +36 -44
  24. data/{vendor → app}/assets/javascripts/jquery.ui.button.js +23 -47
  25. data/{vendor → app}/assets/javascripts/jquery.ui.core.js +20 -24
  26. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-af.js +0 -0
  27. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +0 -0
  28. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ar.js +0 -0
  29. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-az.js +0 -0
  30. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-be.js +0 -0
  31. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-bg.js +0 -0
  32. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-bs.js +0 -0
  33. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ca.js +0 -0
  34. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-cs.js +0 -0
  35. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-cy-GB.js +0 -0
  36. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-da.js +0 -0
  37. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-de.js +3 -3
  38. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-el.js +0 -0
  39. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-en-AU.js +0 -0
  40. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-en-GB.js +0 -0
  41. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-en-NZ.js +0 -0
  42. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-eo.js +0 -0
  43. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-es.js +7 -7
  44. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-et.js +0 -0
  45. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-eu.js +0 -0
  46. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fa.js +0 -0
  47. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fi.js +1 -1
  48. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fo.js +0 -0
  49. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fr-CA.js +0 -0
  50. data/app/assets/javascripts/jquery.ui.datepicker-fr-CH.js +23 -0
  51. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fr.js +6 -6
  52. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-gl.js +0 -0
  53. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-he.js +0 -0
  54. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-hi.js +0 -0
  55. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-hr.js +0 -0
  56. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-hu.js +0 -0
  57. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-hy.js +0 -0
  58. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-id.js +0 -0
  59. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-is.js +1 -1
  60. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-it.js +0 -0
  61. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ja.js +0 -0
  62. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ka.js +0 -0
  63. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-kk.js +0 -0
  64. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-km.js +0 -0
  65. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ko.js +0 -0
  66. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ky.js +0 -0
  67. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-lb.js +0 -0
  68. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-lt.js +2 -2
  69. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-lv.js +4 -4
  70. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-mk.js +0 -0
  71. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ml.js +0 -0
  72. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ms.js +0 -0
  73. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-nb.js +0 -0
  74. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-nl-BE.js +0 -0
  75. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-nl.js +0 -0
  76. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-nn.js +0 -0
  77. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-no.js +0 -0
  78. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-pl.js +0 -0
  79. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-pt-BR.js +0 -0
  80. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-pt.js +1 -1
  81. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-rm.js +0 -0
  82. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ro.js +0 -0
  83. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ru.js +0 -0
  84. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sk.js +3 -3
  85. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sl.js +0 -0
  86. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sq.js +0 -0
  87. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sr-SR.js +1 -1
  88. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sr.js +1 -1
  89. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sv.js +0 -0
  90. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ta.js +0 -0
  91. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-th.js +0 -0
  92. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-tj.js +0 -0
  93. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-tr.js +0 -0
  94. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-uk.js +0 -0
  95. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-vi.js +0 -0
  96. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-zh-CN.js +0 -0
  97. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-zh-HK.js +0 -0
  98. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-zh-TW.js +0 -0
  99. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker.js +28 -34
  100. data/{vendor → app}/assets/javascripts/jquery.ui.dialog.js +84 -28
  101. data/{vendor → app}/assets/javascripts/jquery.ui.draggable.js +96 -84
  102. data/{vendor → app}/assets/javascripts/jquery.ui.droppable.js +33 -15
  103. data/{vendor → app}/assets/javascripts/jquery.ui.effect-blind.js +2 -2
  104. data/{vendor → app}/assets/javascripts/jquery.ui.effect-bounce.js +2 -2
  105. data/{vendor → app}/assets/javascripts/jquery.ui.effect-clip.js +2 -2
  106. data/{vendor → app}/assets/javascripts/jquery.ui.effect-drop.js +2 -2
  107. data/{vendor → app}/assets/javascripts/jquery.ui.effect-explode.js +2 -2
  108. data/{vendor → app}/assets/javascripts/jquery.ui.effect-fade.js +2 -2
  109. data/{vendor → app}/assets/javascripts/jquery.ui.effect-fold.js +2 -2
  110. data/{vendor → app}/assets/javascripts/jquery.ui.effect-highlight.js +2 -2
  111. data/{vendor → app}/assets/javascripts/jquery.ui.effect-pulsate.js +2 -2
  112. data/{vendor → app}/assets/javascripts/jquery.ui.effect-scale.js +2 -2
  113. data/{vendor → app}/assets/javascripts/jquery.ui.effect-shake.js +2 -2
  114. data/{vendor → app}/assets/javascripts/jquery.ui.effect-slide.js +2 -2
  115. data/{vendor → app}/assets/javascripts/jquery.ui.effect-transfer.js +2 -2
  116. data/{vendor → app}/assets/javascripts/jquery.ui.effect.all.js +0 -0
  117. data/{vendor → app}/assets/javascripts/jquery.ui.effect.js +94 -73
  118. data/{vendor → app}/assets/javascripts/jquery.ui.menu.js +15 -9
  119. data/{vendor → app}/assets/javascripts/jquery.ui.mouse.js +3 -3
  120. data/{vendor → app}/assets/javascripts/jquery.ui.position.js +16 -12
  121. data/{vendor → app}/assets/javascripts/jquery.ui.progressbar.js +3 -3
  122. data/{vendor → app}/assets/javascripts/jquery.ui.resizable.js +20 -10
  123. data/{vendor → app}/assets/javascripts/jquery.ui.selectable.js +3 -3
  124. data/{vendor → app}/assets/javascripts/jquery.ui.slider.js +97 -70
  125. data/{vendor → app}/assets/javascripts/jquery.ui.sortable.js +81 -42
  126. data/{vendor → app}/assets/javascripts/jquery.ui.spinner.js +10 -5
  127. data/{vendor → app}/assets/javascripts/jquery.ui.tabs.js +8 -5
  128. data/{vendor → app}/assets/javascripts/jquery.ui.tooltip.js +3 -3
  129. data/{vendor → app}/assets/javascripts/jquery.ui.widget.js +5 -5
  130. data/{vendor → app}/assets/stylesheets/jquery.ui.accordion.css.erb +3 -3
  131. data/{vendor → app}/assets/stylesheets/jquery.ui.all.css.erb +3 -3
  132. data/{vendor → app}/assets/stylesheets/jquery.ui.autocomplete.css.erb +3 -3
  133. data/{vendor → app}/assets/stylesheets/jquery.ui.base.css.erb +3 -3
  134. data/{vendor → app}/assets/stylesheets/jquery.ui.button.css.erb +3 -3
  135. data/{vendor → app}/assets/stylesheets/jquery.ui.core.css.erb +4 -3
  136. data/{vendor → app}/assets/stylesheets/jquery.ui.datepicker.css.erb +3 -6
  137. data/{vendor → app}/assets/stylesheets/jquery.ui.dialog.css.erb +5 -4
  138. data/{vendor → app}/assets/stylesheets/jquery.ui.menu.css.erb +5 -3
  139. data/{vendor → app}/assets/stylesheets/jquery.ui.progressbar.css.erb +9 -4
  140. data/{vendor → app}/assets/stylesheets/jquery.ui.resizable.css.erb +2 -4
  141. data/{vendor → app}/assets/stylesheets/jquery.ui.selectable.css.erb +2 -4
  142. data/{vendor → app}/assets/stylesheets/jquery.ui.slider.css.erb +3 -3
  143. data/{vendor → app}/assets/stylesheets/jquery.ui.spinner.css.erb +5 -5
  144. data/{vendor → app}/assets/stylesheets/jquery.ui.tabs.css.erb +9 -10
  145. data/{vendor → app}/assets/stylesheets/jquery.ui.theme.css.erb +26 -5
  146. data/{vendor → app}/assets/stylesheets/jquery.ui.tooltip.css.erb +4 -2
  147. data/lib/jquery/ui/rails/version.rb +2 -1
  148. metadata +148 -161
  149. data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +0 -23
@@ -3,10 +3,10 @@
3
3
  //= require jquery.ui.mouse
4
4
 
5
5
  /*!
6
- * jQuery UI Slider 1.10.0
6
+ * jQuery UI Slider 1.10.4
7
7
  * http://jqueryui.com
8
8
  *
9
- * Copyright 2013 jQuery Foundation and other contributors
9
+ * Copyright 2014 jQuery Foundation and other contributors
10
10
  * Released under the MIT license.
11
11
  * http://jquery.org/license
12
12
  *
@@ -24,7 +24,7 @@
24
24
  var numPages = 5;
25
25
 
26
26
  $.widget( "ui.slider", $.ui.mouse, {
27
- version: "1.10.0",
27
+ version: "1.10.4",
28
28
  widgetEventPrefix: "slide",
29
29
 
30
30
  options: {
@@ -46,12 +46,6 @@ $.widget( "ui.slider", $.ui.mouse, {
46
46
  },
47
47
 
48
48
  _create: function() {
49
- var i, handleCount,
50
- o = this.options,
51
- existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
52
- handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
53
- handles = [];
54
-
55
49
  this._keySliding = false;
56
50
  this._mouseSliding = false;
57
51
  this._animateOff = true;
@@ -66,29 +60,32 @@ $.widget( "ui.slider", $.ui.mouse, {
66
60
  " ui-widget-content" +
67
61
  " ui-corner-all");
68
62
 
69
- this.range = $([]);
63
+ this._refresh();
64
+ this._setOption( "disabled", this.options.disabled );
70
65
 
71
- if ( o.range ) {
72
- if ( o.range === true ) {
73
- if ( !o.values ) {
74
- o.values = [ this._valueMin(), this._valueMin() ];
75
- } else if ( o.values.length && o.values.length !== 2 ) {
76
- o.values = [ o.values[0], o.values[0] ];
77
- } else if ( $.isArray( o.values ) ) {
78
- o.values = o.values.slice(0);
79
- }
80
- }
66
+ this._animateOff = false;
67
+ },
81
68
 
82
- this.range = $( "<div></div>" )
83
- .appendTo( this.element )
84
- .addClass( "ui-slider-range" +
85
- // note: this isn't the most fittingly semantic framework class for this element,
86
- // but worked best visually with a variety of themes
87
- " ui-widget-header" +
88
- ( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) );
89
- }
69
+ _refresh: function() {
70
+ this._createRange();
71
+ this._createHandles();
72
+ this._setupEvents();
73
+ this._refreshValue();
74
+ },
90
75
 
91
- handleCount = ( o.values && o.values.length ) || 1;
76
+ _createHandles: function() {
77
+ var i, handleCount,
78
+ options = this.options,
79
+ existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
80
+ handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
81
+ handles = [];
82
+
83
+ handleCount = ( options.values && options.values.length ) || 1;
84
+
85
+ if ( existingHandles.length > handleCount ) {
86
+ existingHandles.slice( handleCount ).remove();
87
+ existingHandles = existingHandles.slice( 0, handleCount );
88
+ }
92
89
 
93
90
  for ( i = existingHandles.length; i < handleCount; i++ ) {
94
91
  handles.push( handle );
@@ -98,46 +95,66 @@ $.widget( "ui.slider", $.ui.mouse, {
98
95
 
99
96
  this.handle = this.handles.eq( 0 );
100
97
 
101
- this.handles.add( this.range ).filter( "a" )
102
- .click(function( event ) {
103
- event.preventDefault();
104
- })
105
- .mouseenter(function() {
106
- if ( !o.disabled ) {
107
- $( this ).addClass( "ui-state-hover" );
108
- }
109
- })
110
- .mouseleave(function() {
111
- $( this ).removeClass( "ui-state-hover" );
112
- })
113
- .focus(function() {
114
- if ( !o.disabled ) {
115
- $( ".ui-slider .ui-state-focus" ).removeClass( "ui-state-focus" );
116
- $( this ).addClass( "ui-state-focus" );
117
- } else {
118
- $( this ).blur();
119
- }
120
- })
121
- .blur(function() {
122
- $( this ).removeClass( "ui-state-focus" );
123
- });
124
-
125
98
  this.handles.each(function( i ) {
126
99
  $( this ).data( "ui-slider-handle-index", i );
127
100
  });
101
+ },
128
102
 
129
- this._setOption( "disabled", o.disabled );
103
+ _createRange: function() {
104
+ var options = this.options,
105
+ classes = "";
106
+
107
+ if ( options.range ) {
108
+ if ( options.range === true ) {
109
+ if ( !options.values ) {
110
+ options.values = [ this._valueMin(), this._valueMin() ];
111
+ } else if ( options.values.length && options.values.length !== 2 ) {
112
+ options.values = [ options.values[0], options.values[0] ];
113
+ } else if ( $.isArray( options.values ) ) {
114
+ options.values = options.values.slice(0);
115
+ }
116
+ }
130
117
 
131
- this._on( this.handles, this._handleEvents );
118
+ if ( !this.range || !this.range.length ) {
119
+ this.range = $( "<div></div>" )
120
+ .appendTo( this.element );
132
121
 
133
- this._refreshValue();
122
+ classes = "ui-slider-range" +
123
+ // note: this isn't the most fittingly semantic framework class for this element,
124
+ // but worked best visually with a variety of themes
125
+ " ui-widget-header ui-corner-all";
126
+ } else {
127
+ this.range.removeClass( "ui-slider-range-min ui-slider-range-max" )
128
+ // Handle range switching from true to min/max
129
+ .css({
130
+ "left": "",
131
+ "bottom": ""
132
+ });
133
+ }
134
134
 
135
- this._animateOff = false;
135
+ this.range.addClass( classes +
136
+ ( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) );
137
+ } else {
138
+ if ( this.range ) {
139
+ this.range.remove();
140
+ }
141
+ this.range = null;
142
+ }
143
+ },
144
+
145
+ _setupEvents: function() {
146
+ var elements = this.handles.add( this.range ).filter( "a" );
147
+ this._off( elements );
148
+ this._on( elements, this._handleEvents );
149
+ this._hoverable( elements );
150
+ this._focusable( elements );
136
151
  },
137
152
 
138
153
  _destroy: function() {
139
154
  this.handles.remove();
140
- this.range.remove();
155
+ if ( this.range ) {
156
+ this.range.remove();
157
+ }
141
158
 
142
159
  this.element
143
160
  .removeClass( "ui-slider" +
@@ -309,7 +326,7 @@ $.widget( "ui.slider", $.ui.mouse, {
309
326
  } );
310
327
  otherVal = this.values( index ? 0 : 1 );
311
328
  if ( allowed !== false ) {
312
- this.values( index, newVal, true );
329
+ this.values( index, newVal );
313
330
  }
314
331
  }
315
332
  } else {
@@ -405,6 +422,16 @@ $.widget( "ui.slider", $.ui.mouse, {
405
422
  var i,
406
423
  valsLength = 0;
407
424
 
425
+ if ( key === "range" && this.options.range === true ) {
426
+ if ( value === "min" ) {
427
+ this.options.value = this._values( 0 );
428
+ this.options.values = null;
429
+ } else if ( value === "max" ) {
430
+ this.options.value = this._values( this.options.values.length-1 );
431
+ this.options.values = null;
432
+ }
433
+ }
434
+
408
435
  if ( $.isArray( this.options.values ) ) {
409
436
  valsLength = this.options.values.length;
410
437
  }
@@ -412,15 +439,6 @@ $.widget( "ui.slider", $.ui.mouse, {
412
439
  $.Widget.prototype._setOption.apply( this, arguments );
413
440
 
414
441
  switch ( key ) {
415
- case "disabled":
416
- if ( value ) {
417
- this.handles.filter( ".ui-state-focus" ).blur();
418
- this.handles.removeClass( "ui-state-hover" );
419
- this.handles.prop( "disabled", true );
420
- } else {
421
- this.handles.prop( "disabled", false );
422
- }
423
- break;
424
442
  case "orientation":
425
443
  this._detectOrientation();
426
444
  this.element
@@ -448,6 +466,11 @@ $.widget( "ui.slider", $.ui.mouse, {
448
466
  this._refreshValue();
449
467
  this._animateOff = false;
450
468
  break;
469
+ case "range":
470
+ this._animateOff = true;
471
+ this._refresh();
472
+ this._animateOff = false;
473
+ break;
451
474
  }
452
475
  },
453
476
 
@@ -473,7 +496,7 @@ $.widget( "ui.slider", $.ui.mouse, {
473
496
  val = this._trimAlignValue( val );
474
497
 
475
498
  return val;
476
- } else {
499
+ } else if ( this.options.values && this.options.values.length ) {
477
500
  // .slice() creates a copy of the array
478
501
  // this copy gets trimmed by min and max and then returned
479
502
  vals = this.options.values.slice();
@@ -482,6 +505,8 @@ $.widget( "ui.slider", $.ui.mouse, {
482
505
  }
483
506
 
484
507
  return vals;
508
+ } else {
509
+ return [];
485
510
  }
486
511
  },
487
512
 
@@ -573,7 +598,6 @@ $.widget( "ui.slider", $.ui.mouse, {
573
598
 
574
599
  _handleEvents: {
575
600
  keydown: function( event ) {
576
- /*jshint maxcomplexity:25*/
577
601
  var allowed, curVal, newVal, step,
578
602
  index = $( event.target ).data( "ui-slider-handle-index" );
579
603
 
@@ -636,6 +660,9 @@ $.widget( "ui.slider", $.ui.mouse, {
636
660
 
637
661
  this._slide( event, index, newVal );
638
662
  },
663
+ click: function( event ) {
664
+ event.preventDefault();
665
+ },
639
666
  keyup: function( event ) {
640
667
  var index = $( event.target ).data( "ui-slider-handle-index" );
641
668
 
@@ -3,10 +3,10 @@
3
3
  //= require jquery.ui.mouse
4
4
 
5
5
  /*!
6
- * jQuery UI Sortable 1.10.0
6
+ * jQuery UI Sortable 1.10.4
7
7
  * http://jqueryui.com
8
8
  *
9
- * Copyright 2013 jQuery Foundation and other contributors
9
+ * Copyright 2014 jQuery Foundation and other contributors
10
10
  * Released under the MIT license.
11
11
  * http://jquery.org/license
12
12
  *
@@ -19,14 +19,16 @@
19
19
  */
20
20
  (function( $, undefined ) {
21
21
 
22
- /*jshint loopfunc: true */
23
-
24
22
  function isOverAxis( x, reference, size ) {
25
23
  return ( x > reference ) && ( x < ( reference + size ) );
26
24
  }
27
25
 
26
+ function isFloating(item) {
27
+ return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display"));
28
+ }
29
+
28
30
  $.widget("ui.sortable", $.ui.mouse, {
29
- version: "1.10.0",
31
+ version: "1.10.4",
30
32
  widgetEventPrefix: "sort",
31
33
  ready: false,
32
34
  options: {
@@ -77,7 +79,7 @@ $.widget("ui.sortable", $.ui.mouse, {
77
79
  this.refresh();
78
80
 
79
81
  //Let's determine if the items are being displayed horizontally
80
- this.floating = this.items.length ? o.axis === "x" || (/left|right/).test(this.items[0].item.css("float")) || (/inline|table-cell/).test(this.items[0].item.css("display")) : false;
82
+ this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false;
81
83
 
82
84
  //Let's determine the parent's offset
83
85
  this.offset = this.element.offset();
@@ -162,7 +164,7 @@ $.widget("ui.sortable", $.ui.mouse, {
162
164
 
163
165
  _mouseStart: function(event, overrideHandle, noActivation) {
164
166
 
165
- var i,
167
+ var i, body,
166
168
  o = this.options;
167
169
 
168
170
  this.currentContainer = this;
@@ -232,11 +234,14 @@ $.widget("ui.sortable", $.ui.mouse, {
232
234
  this._setContainment();
233
235
  }
234
236
 
235
- if(o.cursor) { // cursor option
236
- if ($("body").css("cursor")) {
237
- this._storedCursor = $("body").css("cursor");
238
- }
239
- $("body").css("cursor", o.cursor);
237
+ if( o.cursor && o.cursor !== "auto" ) { // cursor option
238
+ body = this.document.find( "body" );
239
+
240
+ // support: IE
241
+ this.storedCursor = body.css( "cursor" );
242
+ body.css( "cursor", o.cursor );
243
+
244
+ this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
240
245
  }
241
246
 
242
247
  if(o.opacity) { // opacity option
@@ -364,12 +369,12 @@ $.widget("ui.sortable", $.ui.mouse, {
364
369
  }
365
370
 
366
371
  // Only put the placeholder inside the current Container, skip all
367
- // items form other containers. This works because when moving
372
+ // items from other containers. This works because when moving
368
373
  // an item from one container to another the
369
374
  // currentContainer is switched before the placeholder is moved.
370
375
  //
371
- // Without this moving items in "sub-sortables" can cause the placeholder to jitter
372
- // beetween the outer and inner container.
376
+ // Without this, moving items in "sub-sortables" can cause
377
+ // the placeholder to jitter beetween the outer and inner container.
373
378
  if (item.instance !== this.currentContainer) {
374
379
  continue;
375
380
  }
@@ -425,14 +430,18 @@ $.widget("ui.sortable", $.ui.mouse, {
425
430
 
426
431
  if(this.options.revert) {
427
432
  var that = this,
428
- cur = this.placeholder.offset();
433
+ cur = this.placeholder.offset(),
434
+ axis = this.options.axis,
435
+ animation = {};
429
436
 
437
+ if ( !axis || axis === "x" ) {
438
+ animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);
439
+ }
440
+ if ( !axis || axis === "y" ) {
441
+ animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);
442
+ }
430
443
  this.reverting = true;
431
-
432
- $(this.helper).animate({
433
- left: cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft),
434
- top: cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop)
435
- }, parseInt(this.options.revert, 10) || 500, function() {
444
+ $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
436
445
  that._clear(event);
437
446
  });
438
447
  } else {
@@ -539,7 +548,9 @@ $.widget("ui.sortable", $.ui.mouse, {
539
548
  b = t + item.height,
540
549
  dyClick = this.offset.click.top,
541
550
  dxClick = this.offset.click.left,
542
- isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
551
+ isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),
552
+ isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),
553
+ isOverElement = isOverElementHeight && isOverElementWidth;
543
554
 
544
555
  if ( this.options.tolerance === "pointer" ||
545
556
  this.options.forcePointerForContainers ||
@@ -631,10 +642,11 @@ $.widget("ui.sortable", $.ui.mouse, {
631
642
 
632
643
  queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
633
644
 
645
+ function addItems() {
646
+ items.push( this );
647
+ }
634
648
  for (i = queries.length - 1; i >= 0; i--){
635
- queries[i][0].each(function() {
636
- items.push(this);
637
- });
649
+ queries[i][0].each( addItems );
638
650
  }
639
651
 
640
652
  return $(items);
@@ -753,15 +765,26 @@ $.widget("ui.sortable", $.ui.mouse, {
753
765
  o.placeholder = {
754
766
  element: function() {
755
767
 
756
- var el = $(document.createElement(that.currentItem[0].nodeName))
757
- .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
758
- .removeClass("ui-sortable-helper")[0];
768
+ var nodeName = that.currentItem[0].nodeName.toLowerCase(),
769
+ element = $( "<" + nodeName + ">", that.document[0] )
770
+ .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
771
+ .removeClass("ui-sortable-helper");
772
+
773
+ if ( nodeName === "tr" ) {
774
+ that.currentItem.children().each(function() {
775
+ $( "<td>&#160;</td>", that.document[0] )
776
+ .attr( "colspan", $( this ).attr( "colspan" ) || 1 )
777
+ .appendTo( element );
778
+ });
779
+ } else if ( nodeName === "img" ) {
780
+ element.attr( "src", that.currentItem.attr( "src" ) );
781
+ }
759
782
 
760
- if(!className) {
761
- el.style.visibility = "hidden";
783
+ if ( !className ) {
784
+ element.css( "visibility", "hidden" );
762
785
  }
763
786
 
764
- return el;
787
+ return element;
765
788
  },
766
789
  update: function(container, p) {
767
790
 
@@ -790,7 +813,7 @@ $.widget("ui.sortable", $.ui.mouse, {
790
813
  },
791
814
 
792
815
  _contactContainers: function(event) {
793
- var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom,
816
+ var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,
794
817
  innermostContainer = null,
795
818
  innermostIndex = null;
796
819
 
@@ -829,15 +852,18 @@ $.widget("ui.sortable", $.ui.mouse, {
829
852
 
830
853
  // move the item into the container if it's not there already
831
854
  if(this.containers.length === 1) {
832
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
833
- this.containers[innermostIndex].containerCache.over = 1;
855
+ if (!this.containers[innermostIndex].containerCache.over) {
856
+ this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
857
+ this.containers[innermostIndex].containerCache.over = 1;
858
+ }
834
859
  } else {
835
860
 
836
861
  //When entering a new container, we will find the item with the least distance and append our item near it
837
862
  dist = 10000;
838
863
  itemWithLeastDistance = null;
839
- posProperty = this.containers[innermostIndex].floating ? "left" : "top";
840
- sizeProperty = this.containers[innermostIndex].floating ? "width" : "height";
864
+ floating = innermostContainer.floating || isFloating(this.currentItem);
865
+ posProperty = floating ? "left" : "top";
866
+ sizeProperty = floating ? "width" : "height";
841
867
  base = this.positionAbs[posProperty] + this.offset.click[posProperty];
842
868
  for (j = this.items.length - 1; j >= 0; j--) {
843
869
  if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
@@ -846,6 +872,9 @@ $.widget("ui.sortable", $.ui.mouse, {
846
872
  if(this.items[j].item[0] === this.currentItem[0]) {
847
873
  continue;
848
874
  }
875
+ if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {
876
+ continue;
877
+ }
849
878
  cur = this.items[j].item.offset()[posProperty];
850
879
  nearBottom = false;
851
880
  if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
@@ -864,10 +893,14 @@ $.widget("ui.sortable", $.ui.mouse, {
864
893
  return;
865
894
  }
866
895
 
867
- this.currentContainer = this.containers[innermostIndex];
896
+ if(this.currentContainer === this.containers[innermostIndex]) {
897
+ return;
898
+ }
899
+
868
900
  itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
869
901
  this._trigger("change", event, this._uiHash());
870
902
  this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
903
+ this.currentContainer = this.containers[innermostIndex];
871
904
 
872
905
  //Update the placeholder
873
906
  this.options.placeholder.update(this.currentContainer, this.placeholder);
@@ -1171,19 +1204,25 @@ $.widget("ui.sortable", $.ui.mouse, {
1171
1204
 
1172
1205
 
1173
1206
  //Post events to containers
1207
+ function delayEvent( type, instance, container ) {
1208
+ return function( event ) {
1209
+ container._trigger( type, event, instance._uiHash( instance ) );
1210
+ };
1211
+ }
1174
1212
  for (i = this.containers.length - 1; i >= 0; i--){
1175
- if(!noPropagation) {
1176
- delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
1213
+ if (!noPropagation) {
1214
+ delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
1177
1215
  }
1178
1216
  if(this.containers[i].containerCache.over) {
1179
- delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
1217
+ delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
1180
1218
  this.containers[i].containerCache.over = 0;
1181
1219
  }
1182
1220
  }
1183
1221
 
1184
1222
  //Do what was originally in plugins
1185
- if(this._storedCursor) {
1186
- $("body").css("cursor", this._storedCursor);
1223
+ if ( this.storedCursor ) {
1224
+ this.document.find( "body" ).css( "cursor", this.storedCursor );
1225
+ this.storedStylesheet.remove();
1187
1226
  }
1188
1227
  if(this._storedOpacity) {
1189
1228
  this.helper.css("opacity", this._storedOpacity);
@@ -3,10 +3,10 @@
3
3
  //= require jquery.ui.button
4
4
 
5
5
  /*!
6
- * jQuery UI Spinner 1.10.0
6
+ * jQuery UI Spinner 1.10.4
7
7
  * http://jqueryui.com
8
8
  *
9
- * Copyright 2013 jQuery Foundation and other contributors
9
+ * Copyright 2014 jQuery Foundation and other contributors
10
10
  * Released under the MIT license.
11
11
  * http://jquery.org/license
12
12
  *
@@ -31,7 +31,7 @@ function modifier( fn ) {
31
31
  }
32
32
 
33
33
  $.widget( "ui.spinner", {
34
- version: "1.10.0",
34
+ version: "1.10.4",
35
35
  defaultElement: "<input>",
36
36
  widgetEventPrefix: "spin",
37
37
  options: {
@@ -59,8 +59,12 @@ $.widget( "ui.spinner", {
59
59
  this._setOption( "min", this.options.min );
60
60
  this._setOption( "step", this.options.step );
61
61
 
62
- // format the value, but don't constrain
63
- this._value( this.element.val(), true );
62
+ // Only format if there is a value, prevents the field from being marked
63
+ // as invalid in Firefox, see #9573.
64
+ if ( this.value() !== "" ) {
65
+ // Format the value, but don't constrain.
66
+ this._value( this.element.val(), true );
67
+ }
64
68
 
65
69
  this._draw();
66
70
  this._on( this._events );
@@ -106,6 +110,7 @@ $.widget( "ui.spinner", {
106
110
  return;
107
111
  }
108
112
 
113
+ this._stop();
109
114
  this._refresh();
110
115
  if ( this.previous !== this.element.val() ) {
111
116
  this._trigger( "change", event );
@@ -2,10 +2,10 @@
2
2
  //= require jquery.ui.widget
3
3
 
4
4
  /*!
5
- * jQuery UI Tabs 1.10.0
5
+ * jQuery UI Tabs 1.10.4
6
6
  * http://jqueryui.com
7
7
  *
8
- * Copyright 2013 jQuery Foundation and other contributors
8
+ * Copyright 2014 jQuery Foundation and other contributors
9
9
  * Released under the MIT license.
10
10
  * http://jquery.org/license
11
11
  *
@@ -25,13 +25,17 @@ function getNextTabId() {
25
25
  }
26
26
 
27
27
  function isLocal( anchor ) {
28
+ // support: IE7
29
+ // IE7 doesn't normalize the href property when set via script (#9317)
30
+ anchor = anchor.cloneNode( false );
31
+
28
32
  return anchor.hash.length > 1 &&
29
33
  decodeURIComponent( anchor.href.replace( rhash, "" ) ) ===
30
34
  decodeURIComponent( location.href.replace( rhash, "" ) );
31
35
  }
32
36
 
33
37
  $.widget( "ui.tabs", {
34
- version: "1.10.0",
38
+ version: "1.10.4",
35
39
  delay: 300,
36
40
  options: {
37
41
  active: null,
@@ -153,7 +157,6 @@ $.widget( "ui.tabs", {
153
157
  },
154
158
 
155
159
  _tabKeydown: function( event ) {
156
- /*jshint maxcomplexity:15*/
157
160
  var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
158
161
  selectedIndex = this.tabs.index( focusedTab ),
159
162
  goingForward = true;
@@ -441,7 +444,7 @@ $.widget( "ui.tabs", {
441
444
 
442
445
  // allow overriding how to find the list for rare usage scenarios (#7715)
443
446
  _getList: function() {
444
- return this.element.find( "ol,ul" ).eq( 0 );
447
+ return this.tablist || this.element.find( "ol,ul" ).eq( 0 );
445
448
  },
446
449
 
447
450
  _createPanel: function( id ) {
@@ -3,10 +3,10 @@
3
3
  //= require jquery.ui.position
4
4
 
5
5
  /*!
6
- * jQuery UI Tooltip 1.10.0
6
+ * jQuery UI Tooltip 1.10.4
7
7
  * http://jqueryui.com
8
8
  *
9
- * Copyright 2013 jQuery Foundation and other contributors
9
+ * Copyright 2014 jQuery Foundation and other contributors
10
10
  * Released under the MIT license.
11
11
  * http://jquery.org/license
12
12
  *
@@ -47,7 +47,7 @@ function removeDescribedBy( elem ) {
47
47
  }
48
48
 
49
49
  $.widget( "ui.tooltip", {
50
- version: "1.10.0",
50
+ version: "1.10.4",
51
51
  options: {
52
52
  content: function() {
53
53
  // support: IE<9, Opera in jQuery <1.7
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * jQuery UI Widget 1.10.0
2
+ * jQuery UI Widget 1.10.4
3
3
  * http://jqueryui.com
4
4
  *
5
- * Copyright 2013 jQuery Foundation and other contributors
5
+ * Copyright 2014 jQuery Foundation and other contributors
6
6
  * Released under the MIT license.
7
7
  * http://jquery.org/license
8
8
  *
@@ -106,7 +106,7 @@ $.widget = function( name, base, prototype ) {
106
106
  // TODO: remove support for widgetEventPrefix
107
107
  // always use the name + a colon as the prefix, e.g., draggable:start
108
108
  // don't prefix for widgets that aren't DOM-based
109
- widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
109
+ widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
110
110
  }, proxiedPrototype, {
111
111
  constructor: constructor,
112
112
  namespace: namespace,
@@ -315,12 +315,12 @@ $.Widget.prototype = {
315
315
  curOption = curOption[ parts[ i ] ];
316
316
  }
317
317
  key = parts.pop();
318
- if ( value === undefined ) {
318
+ if ( arguments.length === 1 ) {
319
319
  return curOption[ key ] === undefined ? null : curOption[ key ];
320
320
  }
321
321
  curOption[ key ] = value;
322
322
  } else {
323
- if ( value === undefined ) {
323
+ if ( arguments.length === 1 ) {
324
324
  return this.options[ key ] === undefined ? null : this.options[ key ];
325
325
  }
326
326
  options[ key ] = value;