jquery-ui-rails 2.0.2 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

Files changed (131) hide show
  1. data/History.md +15 -0
  2. data/License.txt +2 -3
  3. data/README.md +17 -19
  4. data/Rakefile +79 -28
  5. data/lib/jquery/ui/rails/version.rb +1 -1
  6. data/vendor/assets/javascripts/jquery.ui.accordion.js +537 -417
  7. data/vendor/assets/javascripts/jquery.ui.all.js +17 -14
  8. data/vendor/assets/javascripts/jquery.ui.autocomplete.js +311 -339
  9. data/vendor/assets/javascripts/jquery.ui.button.js +63 -59
  10. data/vendor/assets/javascripts/jquery.ui.core.js +134 -112
  11. data/vendor/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +2 -2
  12. data/vendor/assets/javascripts/jquery.ui.datepicker-ar.js +3 -3
  13. data/vendor/assets/javascripts/jquery.ui.datepicker-az.js +3 -3
  14. data/vendor/assets/javascripts/jquery.ui.datepicker-bg.js +16 -16
  15. data/vendor/assets/javascripts/jquery.ui.datepicker-bs.js +5 -5
  16. data/vendor/assets/javascripts/jquery.ui.datepicker-ca.js +13 -13
  17. data/vendor/assets/javascripts/jquery.ui.datepicker-cs.js +3 -3
  18. data/vendor/assets/javascripts/jquery.ui.datepicker-cy-GB.js +1 -1
  19. data/vendor/assets/javascripts/jquery.ui.datepicker-da.js +9 -9
  20. data/vendor/assets/javascripts/jquery.ui.datepicker-de.js +2 -2
  21. data/vendor/assets/javascripts/jquery.ui.datepicker-el.js +1 -1
  22. data/vendor/assets/javascripts/jquery.ui.datepicker-eo.js +2 -2
  23. data/vendor/assets/javascripts/jquery.ui.datepicker-es.js +6 -6
  24. data/vendor/assets/javascripts/jquery.ui.datepicker-et.js +1 -1
  25. data/vendor/assets/javascripts/jquery.ui.datepicker-eu.js +3 -3
  26. data/vendor/assets/javascripts/jquery.ui.datepicker-fa.js +3 -3
  27. data/vendor/assets/javascripts/jquery.ui.datepicker-fi.js +5 -5
  28. data/vendor/assets/javascripts/jquery.ui.datepicker-fo.js +3 -3
  29. data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +3 -3
  30. data/vendor/assets/javascripts/jquery.ui.datepicker-fr.js +2 -2
  31. data/vendor/assets/javascripts/jquery.ui.datepicker-gl.js +6 -6
  32. data/vendor/assets/javascripts/jquery.ui.datepicker-he.js +2 -2
  33. data/vendor/assets/javascripts/jquery.ui.datepicker-hr.js +3 -3
  34. data/vendor/assets/javascripts/jquery.ui.datepicker-hy.js +3 -3
  35. data/vendor/assets/javascripts/jquery.ui.datepicker-id.js +3 -3
  36. data/vendor/assets/javascripts/jquery.ui.datepicker-is.js +11 -11
  37. data/vendor/assets/javascripts/jquery.ui.datepicker-it.js +3 -3
  38. data/vendor/assets/javascripts/jquery.ui.datepicker-ja.js +3 -3
  39. data/vendor/assets/javascripts/jquery.ui.datepicker-kk.js +2 -2
  40. data/vendor/assets/javascripts/jquery.ui.datepicker-ko.js +1 -1
  41. data/vendor/assets/javascripts/jquery.ui.datepicker-lt.js +3 -3
  42. data/vendor/assets/javascripts/jquery.ui.datepicker-lv.js +1 -1
  43. data/vendor/assets/javascripts/jquery.ui.datepicker-ml.js +1 -1
  44. data/vendor/assets/javascripts/jquery.ui.datepicker-ms.js +3 -3
  45. data/vendor/assets/javascripts/jquery.ui.datepicker-nl.js +1 -1
  46. data/vendor/assets/javascripts/jquery.ui.datepicker-no.js +18 -18
  47. data/vendor/assets/javascripts/jquery.ui.datepicker-pl.js +2 -2
  48. data/vendor/assets/javascripts/jquery.ui.datepicker-pt-BR.js +7 -7
  49. data/vendor/assets/javascripts/jquery.ui.datepicker-pt.js +6 -6
  50. data/vendor/assets/javascripts/jquery.ui.datepicker-rm.js +2 -2
  51. data/vendor/assets/javascripts/jquery.ui.datepicker-ro.js +2 -2
  52. data/vendor/assets/javascripts/jquery.ui.datepicker-ru.js +3 -3
  53. data/vendor/assets/javascripts/jquery.ui.datepicker-sk.js +2 -2
  54. data/vendor/assets/javascripts/jquery.ui.datepicker-sl.js +6 -6
  55. data/vendor/assets/javascripts/jquery.ui.datepicker-sq.js +2 -2
  56. data/vendor/assets/javascripts/jquery.ui.datepicker-sr-SR.js +2 -2
  57. data/vendor/assets/javascripts/jquery.ui.datepicker-sr.js +2 -2
  58. data/vendor/assets/javascripts/jquery.ui.datepicker-sv.js +9 -9
  59. data/vendor/assets/javascripts/jquery.ui.datepicker-th.js +3 -3
  60. data/vendor/assets/javascripts/jquery.ui.datepicker-tj.js +1 -1
  61. data/vendor/assets/javascripts/jquery.ui.datepicker-tr.js +2 -2
  62. data/vendor/assets/javascripts/jquery.ui.datepicker-uk.js +3 -3
  63. data/vendor/assets/javascripts/jquery.ui.datepicker-vi.js +2 -2
  64. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-CN.js +2 -2
  65. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-HK.js +2 -2
  66. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-TW.js +2 -2
  67. data/vendor/assets/javascripts/jquery.ui.datepicker.js +51 -59
  68. data/vendor/assets/javascripts/jquery.ui.dialog.js +402 -409
  69. data/vendor/assets/javascripts/jquery.ui.draggable.js +79 -75
  70. data/vendor/assets/javascripts/jquery.ui.droppable.js +10 -17
  71. data/vendor/assets/javascripts/jquery.ui.effect-blind.js +84 -0
  72. data/vendor/assets/javascripts/jquery.ui.effect-bounce.js +115 -0
  73. data/vendor/assets/javascripts/jquery.ui.effect-clip.js +69 -0
  74. data/vendor/assets/javascripts/jquery.ui.effect-drop.js +67 -0
  75. data/vendor/assets/javascripts/jquery.ui.effect-explode.js +99 -0
  76. data/vendor/assets/javascripts/jquery.ui.effect-fade.js +32 -0
  77. data/vendor/assets/javascripts/jquery.ui.effect-fold.js +78 -0
  78. data/vendor/assets/javascripts/jquery.ui.effect-highlight.js +52 -0
  79. data/vendor/assets/javascripts/jquery.ui.effect-pulsate.js +65 -0
  80. data/vendor/assets/javascripts/jquery.ui.effect-scale.js +320 -0
  81. data/vendor/assets/javascripts/jquery.ui.effect-shake.js +76 -0
  82. data/vendor/assets/javascripts/jquery.ui.effect-slide.js +66 -0
  83. data/vendor/assets/javascripts/jquery.ui.effect-transfer.js +49 -0
  84. data/vendor/assets/javascripts/jquery.ui.effect.all.js +14 -0
  85. data/vendor/assets/javascripts/jquery.ui.effect.js +1276 -0
  86. data/vendor/assets/javascripts/jquery.ui.menu.js +614 -0
  87. data/vendor/assets/javascripts/jquery.ui.mouse.js +22 -20
  88. data/vendor/assets/javascripts/jquery.ui.position.js +367 -158
  89. data/vendor/assets/javascripts/jquery.ui.progressbar.js +10 -14
  90. data/vendor/assets/javascripts/jquery.ui.resizable.js +143 -149
  91. data/vendor/assets/javascripts/jquery.ui.selectable.js +22 -28
  92. data/vendor/assets/javascripts/jquery.ui.slider.js +88 -106
  93. data/vendor/assets/javascripts/jquery.ui.sortable.js +97 -95
  94. data/vendor/assets/javascripts/jquery.ui.spinner.js +482 -0
  95. data/vendor/assets/javascripts/jquery.ui.tabs.js +1189 -580
  96. data/vendor/assets/javascripts/jquery.ui.tooltip.js +402 -0
  97. data/vendor/assets/javascripts/jquery.ui.widget.js +373 -117
  98. data/vendor/assets/stylesheets/jquery.ui.accordion.css.erb +10 -13
  99. data/vendor/assets/stylesheets/jquery.ui.all.css.erb +4 -3
  100. data/vendor/assets/stylesheets/jquery.ui.autocomplete.css.erb +10 -44
  101. data/vendor/assets/stylesheets/jquery.ui.base.css.erb +7 -3
  102. data/vendor/assets/stylesheets/jquery.ui.button.css.erb +6 -4
  103. data/vendor/assets/stylesheets/jquery.ui.core.css.erb +5 -4
  104. data/vendor/assets/stylesheets/jquery.ui.datepicker.css.erb +4 -3
  105. data/vendor/assets/stylesheets/jquery.ui.dialog.css.erb +6 -5
  106. data/vendor/assets/stylesheets/jquery.ui.menu.css.erb +34 -0
  107. data/vendor/assets/stylesheets/jquery.ui.progressbar.css.erb +4 -3
  108. data/vendor/assets/stylesheets/jquery.ui.resizable.css.erb +4 -3
  109. data/vendor/assets/stylesheets/jquery.ui.selectable.css.erb +4 -3
  110. data/vendor/assets/stylesheets/jquery.ui.slider.css.erb +4 -3
  111. data/vendor/assets/stylesheets/jquery.ui.spinner.css.erb +27 -0
  112. data/vendor/assets/stylesheets/jquery.ui.tabs.css.erb +8 -8
  113. data/vendor/assets/stylesheets/jquery.ui.theme.css.erb +8 -7
  114. data/vendor/assets/stylesheets/jquery.ui.tooltip.css.erb +25 -0
  115. metadata +24 -19
  116. data/dependencies.js +0 -31
  117. data/vendor/assets/javascripts/jquery.effects.all.js +0 -14
  118. data/vendor/assets/javascripts/jquery.effects.blind.js +0 -51
  119. data/vendor/assets/javascripts/jquery.effects.bounce.js +0 -80
  120. data/vendor/assets/javascripts/jquery.effects.clip.js +0 -56
  121. data/vendor/assets/javascripts/jquery.effects.core.js +0 -612
  122. data/vendor/assets/javascripts/jquery.effects.drop.js +0 -52
  123. data/vendor/assets/javascripts/jquery.effects.explode.js +0 -81
  124. data/vendor/assets/javascripts/jquery.effects.fade.js +0 -34
  125. data/vendor/assets/javascripts/jquery.effects.fold.js +0 -58
  126. data/vendor/assets/javascripts/jquery.effects.highlight.js +0 -52
  127. data/vendor/assets/javascripts/jquery.effects.pulsate.js +0 -53
  128. data/vendor/assets/javascripts/jquery.effects.scale.js +0 -180
  129. data/vendor/assets/javascripts/jquery.effects.shake.js +0 -59
  130. data/vendor/assets/javascripts/jquery.effects.slide.js +0 -52
  131. data/vendor/assets/javascripts/jquery.effects.transfer.js +0 -47
@@ -3,13 +3,14 @@
3
3
  //= require jquery.ui.mouse
4
4
 
5
5
  /*!
6
- * jQuery UI Selectable 1.8.24
6
+ * jQuery UI Selectable 1.9.2
7
+ * http://jqueryui.com
7
8
  *
8
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
9
- * Dual licensed under the MIT or GPL Version 2 licenses.
9
+ * Copyright 2012 jQuery Foundation and other contributors
10
+ * Released under the MIT license.
10
11
  * http://jquery.org/license
11
12
  *
12
- * http://docs.jquery.com/UI/Selectables
13
+ * http://api.jqueryui.com/selectable/
13
14
  *
14
15
  * Depends:
15
16
  * jquery.ui.core.js
@@ -19,6 +20,7 @@
19
20
  (function( $, undefined ) {
20
21
 
21
22
  $.widget("ui.selectable", $.ui.mouse, {
23
+ version: "1.9.2",
22
24
  options: {
23
25
  appendTo: 'body',
24
26
  autoRefresh: true,
@@ -27,7 +29,7 @@ $.widget("ui.selectable", $.ui.mouse, {
27
29
  tolerance: 'touch'
28
30
  },
29
31
  _create: function() {
30
- var self = this;
32
+ var that = this;
31
33
 
32
34
  this.element.addClass("ui-selectable");
33
35
 
@@ -36,7 +38,7 @@ $.widget("ui.selectable", $.ui.mouse, {
36
38
  // cache selectee children based on filter
37
39
  var selectees;
38
40
  this.refresh = function() {
39
- selectees = $(self.options.filter, self.element[0]);
41
+ selectees = $(that.options.filter, that.element[0]);
40
42
  selectees.addClass("ui-selectee");
41
43
  selectees.each(function() {
42
44
  var $this = $(this);
@@ -64,21 +66,17 @@ $.widget("ui.selectable", $.ui.mouse, {
64
66
  this.helper = $("<div class='ui-selectable-helper'></div>");
65
67
  },
66
68
 
67
- destroy: function() {
69
+ _destroy: function() {
68
70
  this.selectees
69
71
  .removeClass("ui-selectee")
70
72
  .removeData("selectable-item");
71
73
  this.element
72
- .removeClass("ui-selectable ui-selectable-disabled")
73
- .removeData("selectable")
74
- .unbind(".selectable");
74
+ .removeClass("ui-selectable ui-selectable-disabled");
75
75
  this._mouseDestroy();
76
-
77
- return this;
78
76
  },
79
77
 
80
78
  _mouseStart: function(event) {
81
- var self = this;
79
+ var that = this;
82
80
 
83
81
  this.opos = [event.pageX, event.pageY];
84
82
 
@@ -113,7 +111,7 @@ $.widget("ui.selectable", $.ui.mouse, {
113
111
  selectee.$element.addClass('ui-unselecting');
114
112
  selectee.unselecting = true;
115
113
  // selectable UNSELECTING callback
116
- self._trigger("unselecting", event, {
114
+ that._trigger("unselecting", event, {
117
115
  unselecting: selectee.element
118
116
  });
119
117
  }
@@ -131,11 +129,11 @@ $.widget("ui.selectable", $.ui.mouse, {
131
129
  selectee.selected = doSelect;
132
130
  // selectable (UN)SELECTING callback
133
131
  if (doSelect) {
134
- self._trigger("selecting", event, {
132
+ that._trigger("selecting", event, {
135
133
  selecting: selectee.element
136
134
  });
137
135
  } else {
138
- self._trigger("unselecting", event, {
136
+ that._trigger("unselecting", event, {
139
137
  unselecting: selectee.element
140
138
  });
141
139
  }
@@ -146,7 +144,7 @@ $.widget("ui.selectable", $.ui.mouse, {
146
144
  },
147
145
 
148
146
  _mouseDrag: function(event) {
149
- var self = this;
147
+ var that = this;
150
148
  this.dragged = true;
151
149
 
152
150
  if (this.options.disabled)
@@ -162,7 +160,7 @@ $.widget("ui.selectable", $.ui.mouse, {
162
160
  this.selectees.each(function() {
163
161
  var selectee = $.data(this, "selectable-item");
164
162
  //prevent helper from being selected if appendTo: selectable
165
- if (!selectee || selectee.element == self.element[0])
163
+ if (!selectee || selectee.element == that.element[0])
166
164
  return;
167
165
  var hit = false;
168
166
  if (options.tolerance == 'touch') {
@@ -185,7 +183,7 @@ $.widget("ui.selectable", $.ui.mouse, {
185
183
  selectee.$element.addClass('ui-selecting');
186
184
  selectee.selecting = true;
187
185
  // selectable SELECTING callback
188
- self._trigger("selecting", event, {
186
+ that._trigger("selecting", event, {
189
187
  selecting: selectee.element
190
188
  });
191
189
  }
@@ -205,7 +203,7 @@ $.widget("ui.selectable", $.ui.mouse, {
205
203
  selectee.unselecting = true;
206
204
  }
207
205
  // selectable UNSELECTING callback
208
- self._trigger("unselecting", event, {
206
+ that._trigger("unselecting", event, {
209
207
  unselecting: selectee.element
210
208
  });
211
209
  }
@@ -218,7 +216,7 @@ $.widget("ui.selectable", $.ui.mouse, {
218
216
  selectee.$element.addClass('ui-unselecting');
219
217
  selectee.unselecting = true;
220
218
  // selectable UNSELECTING callback
221
- self._trigger("unselecting", event, {
219
+ that._trigger("unselecting", event, {
222
220
  unselecting: selectee.element
223
221
  });
224
222
  }
@@ -230,7 +228,7 @@ $.widget("ui.selectable", $.ui.mouse, {
230
228
  },
231
229
 
232
230
  _mouseStop: function(event) {
233
- var self = this;
231
+ var that = this;
234
232
 
235
233
  this.dragged = false;
236
234
 
@@ -241,7 +239,7 @@ $.widget("ui.selectable", $.ui.mouse, {
241
239
  selectee.$element.removeClass('ui-unselecting');
242
240
  selectee.unselecting = false;
243
241
  selectee.startselected = false;
244
- self._trigger("unselected", event, {
242
+ that._trigger("unselected", event, {
245
243
  unselected: selectee.element
246
244
  });
247
245
  });
@@ -251,7 +249,7 @@ $.widget("ui.selectable", $.ui.mouse, {
251
249
  selectee.selecting = false;
252
250
  selectee.selected = true;
253
251
  selectee.startselected = true;
254
- self._trigger("selected", event, {
252
+ that._trigger("selected", event, {
255
253
  selected: selectee.element
256
254
  });
257
255
  });
@@ -264,8 +262,4 @@ $.widget("ui.selectable", $.ui.mouse, {
264
262
 
265
263
  });
266
264
 
267
- $.extend($.ui.selectable, {
268
- version: "1.8.24"
269
- });
270
-
271
265
  })(jQuery);
@@ -3,13 +3,14 @@
3
3
  //= require jquery.ui.mouse
4
4
 
5
5
  /*!
6
- * jQuery UI Slider 1.8.24
6
+ * jQuery UI Slider 1.9.2
7
+ * http://jqueryui.com
7
8
  *
8
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
9
- * Dual licensed under the MIT or GPL Version 2 licenses.
9
+ * Copyright 2012 jQuery Foundation and other contributors
10
+ * Released under the MIT license.
10
11
  * http://jquery.org/license
11
12
  *
12
- * http://docs.jquery.com/UI/Slider
13
+ * http://api.jqueryui.com/slider/
13
14
  *
14
15
  * Depends:
15
16
  * jquery.ui.core.js
@@ -23,7 +24,7 @@
23
24
  var numPages = 5;
24
25
 
25
26
  $.widget( "ui.slider", $.ui.mouse, {
26
-
27
+ version: "1.9.2",
27
28
  widgetEventPrefix: "slide",
28
29
 
29
30
  options: {
@@ -39,11 +40,10 @@ $.widget( "ui.slider", $.ui.mouse, {
39
40
  },
40
41
 
41
42
  _create: function() {
42
- var self = this,
43
+ var i, handleCount,
43
44
  o = this.options,
44
45
  existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
45
46
  handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
46
- handleCount = ( o.values && o.values.length ) || 1,
47
47
  handles = [];
48
48
 
49
49
  this._keySliding = false;
@@ -78,15 +78,17 @@ $.widget( "ui.slider", $.ui.mouse, {
78
78
  .addClass( "ui-slider-range" +
79
79
  // note: this isn't the most fittingly semantic framework class for this element,
80
80
  // but worked best visually with a variety of themes
81
- " ui-widget-header" +
81
+ " ui-widget-header" +
82
82
  ( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) );
83
83
  }
84
84
 
85
- for ( var i = existingHandles.length; i < handleCount; i += 1 ) {
85
+ handleCount = ( o.values && o.values.length ) || 1;
86
+
87
+ for ( i = existingHandles.length; i < handleCount; i++ ) {
86
88
  handles.push( handle );
87
89
  }
88
90
 
89
- this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( self.element ) );
91
+ this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
90
92
 
91
93
  this.handle = this.handles.eq( 0 );
92
94
 
@@ -94,11 +96,12 @@ $.widget( "ui.slider", $.ui.mouse, {
94
96
  .click(function( event ) {
95
97
  event.preventDefault();
96
98
  })
97
- .hover(function() {
99
+ .mouseenter(function() {
98
100
  if ( !o.disabled ) {
99
101
  $( this ).addClass( "ui-state-hover" );
100
102
  }
101
- }, function() {
103
+ })
104
+ .mouseleave(function() {
102
105
  $( this ).removeClass( "ui-state-hover" );
103
106
  })
104
107
  .focus(function() {
@@ -114,21 +117,14 @@ $.widget( "ui.slider", $.ui.mouse, {
114
117
  });
115
118
 
116
119
  this.handles.each(function( i ) {
117
- $( this ).data( "index.ui-slider-handle", i );
120
+ $( this ).data( "ui-slider-handle-index", i );
118
121
  });
119
122
 
120
- this.handles
121
- .keydown(function( event ) {
122
- var index = $( this ).data( "index.ui-slider-handle" ),
123
- allowed,
124
- curVal,
125
- newVal,
126
- step;
127
-
128
- if ( self.options.disabled ) {
129
- return;
130
- }
131
-
123
+ this._on( this.handles, {
124
+ keydown: function( event ) {
125
+ var allowed, curVal, newVal, step,
126
+ index = $( event.target ).data( "ui-slider-handle-index" );
127
+
132
128
  switch ( event.keyCode ) {
133
129
  case $.ui.keyCode.HOME:
134
130
  case $.ui.keyCode.END:
@@ -139,73 +135,73 @@ $.widget( "ui.slider", $.ui.mouse, {
139
135
  case $.ui.keyCode.DOWN:
140
136
  case $.ui.keyCode.LEFT:
141
137
  event.preventDefault();
142
- if ( !self._keySliding ) {
143
- self._keySliding = true;
144
- $( this ).addClass( "ui-state-active" );
145
- allowed = self._start( event, index );
138
+ if ( !this._keySliding ) {
139
+ this._keySliding = true;
140
+ $( event.target ).addClass( "ui-state-active" );
141
+ allowed = this._start( event, index );
146
142
  if ( allowed === false ) {
147
143
  return;
148
144
  }
149
145
  }
150
146
  break;
151
147
  }
152
-
153
- step = self.options.step;
154
- if ( self.options.values && self.options.values.length ) {
155
- curVal = newVal = self.values( index );
148
+
149
+ step = this.options.step;
150
+ if ( this.options.values && this.options.values.length ) {
151
+ curVal = newVal = this.values( index );
156
152
  } else {
157
- curVal = newVal = self.value();
153
+ curVal = newVal = this.value();
158
154
  }
159
-
155
+
160
156
  switch ( event.keyCode ) {
161
157
  case $.ui.keyCode.HOME:
162
- newVal = self._valueMin();
158
+ newVal = this._valueMin();
163
159
  break;
164
160
  case $.ui.keyCode.END:
165
- newVal = self._valueMax();
161
+ newVal = this._valueMax();
166
162
  break;
167
163
  case $.ui.keyCode.PAGE_UP:
168
- newVal = self._trimAlignValue( curVal + ( (self._valueMax() - self._valueMin()) / numPages ) );
164
+ newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );
169
165
  break;
170
166
  case $.ui.keyCode.PAGE_DOWN:
171
- newVal = self._trimAlignValue( curVal - ( (self._valueMax() - self._valueMin()) / numPages ) );
167
+ newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );
172
168
  break;
173
169
  case $.ui.keyCode.UP:
174
170
  case $.ui.keyCode.RIGHT:
175
- if ( curVal === self._valueMax() ) {
171
+ if ( curVal === this._valueMax() ) {
176
172
  return;
177
173
  }
178
- newVal = self._trimAlignValue( curVal + step );
174
+ newVal = this._trimAlignValue( curVal + step );
179
175
  break;
180
176
  case $.ui.keyCode.DOWN:
181
177
  case $.ui.keyCode.LEFT:
182
- if ( curVal === self._valueMin() ) {
178
+ if ( curVal === this._valueMin() ) {
183
179
  return;
184
180
  }
185
- newVal = self._trimAlignValue( curVal - step );
181
+ newVal = this._trimAlignValue( curVal - step );
186
182
  break;
187
183
  }
188
-
189
- self._slide( event, index, newVal );
190
- })
191
- .keyup(function( event ) {
192
- var index = $( this ).data( "index.ui-slider-handle" );
193
-
194
- if ( self._keySliding ) {
195
- self._keySliding = false;
196
- self._stop( event, index );
197
- self._change( event, index );
198
- $( this ).removeClass( "ui-state-active" );
184
+
185
+ this._slide( event, index, newVal );
186
+ },
187
+ keyup: function( event ) {
188
+ var index = $( event.target ).data( "ui-slider-handle-index" );
189
+
190
+ if ( this._keySliding ) {
191
+ this._keySliding = false;
192
+ this._stop( event, index );
193
+ this._change( event, index );
194
+ $( event.target ).removeClass( "ui-state-active" );
199
195
  }
200
-
201
- });
196
+ }
197
+ });
202
198
 
203
199
  this._refreshValue();
204
200
 
205
201
  this._animateOff = false;
206
202
  },
207
203
 
208
- destroy: function() {
204
+ _destroy: function() {
209
205
  this.handles.remove();
210
206
  this.range.remove();
211
207
 
@@ -216,26 +212,15 @@ $.widget( "ui.slider", $.ui.mouse, {
216
212
  " ui-slider-disabled" +
217
213
  " ui-widget" +
218
214
  " ui-widget-content" +
219
- " ui-corner-all" )
220
- .removeData( "slider" )
221
- .unbind( ".slider" );
215
+ " ui-corner-all" );
222
216
 
223
217
  this._mouseDestroy();
224
-
225
- return this;
226
218
  },
227
219
 
228
220
  _mouseCapture: function( event ) {
229
- var o = this.options,
230
- position,
231
- normValue,
232
- distance,
233
- closestHandle,
234
- self,
235
- index,
236
- allowed,
237
- offset,
238
- mouseOverHandle;
221
+ var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
222
+ that = this,
223
+ o = this.options;
239
224
 
240
225
  if ( o.disabled ) {
241
226
  return false;
@@ -250,9 +235,8 @@ $.widget( "ui.slider", $.ui.mouse, {
250
235
  position = { x: event.pageX, y: event.pageY };
251
236
  normValue = this._normValueFromMouse( position );
252
237
  distance = this._valueMax() - this._valueMin() + 1;
253
- self = this;
254
238
  this.handles.each(function( i ) {
255
- var thisDistance = Math.abs( normValue - self.values(i) );
239
+ var thisDistance = Math.abs( normValue - that.values(i) );
256
240
  if ( distance > thisDistance ) {
257
241
  distance = thisDistance;
258
242
  closestHandle = $( this );
@@ -274,12 +258,12 @@ $.widget( "ui.slider", $.ui.mouse, {
274
258
  }
275
259
  this._mouseSliding = true;
276
260
 
277
- self._handleIndex = index;
261
+ this._handleIndex = index;
278
262
 
279
263
  closestHandle
280
264
  .addClass( "ui-state-active" )
281
265
  .focus();
282
-
266
+
283
267
  offset = closestHandle.offset();
284
268
  mouseOverHandle = !$( event.target ).parents().andSelf().is( ".ui-slider-handle" );
285
269
  this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
@@ -298,14 +282,14 @@ $.widget( "ui.slider", $.ui.mouse, {
298
282
  return true;
299
283
  },
300
284
 
301
- _mouseStart: function( event ) {
285
+ _mouseStart: function() {
302
286
  return true;
303
287
  },
304
288
 
305
289
  _mouseDrag: function( event ) {
306
290
  var position = { x: event.pageX, y: event.pageY },
307
291
  normValue = this._normValueFromMouse( position );
308
-
292
+
309
293
  this._slide( event, this._handleIndex, normValue );
310
294
 
311
295
  return false;
@@ -324,7 +308,7 @@ $.widget( "ui.slider", $.ui.mouse, {
324
308
 
325
309
  return false;
326
310
  },
327
-
311
+
328
312
  _detectOrientation: function() {
329
313
  this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
330
314
  },
@@ -381,7 +365,7 @@ $.widget( "ui.slider", $.ui.mouse, {
381
365
  if ( this.options.values && this.options.values.length ) {
382
366
  otherVal = this.values( index ? 0 : 1 );
383
367
 
384
- if ( ( this.options.values.length === 2 && this.options.range === true ) &&
368
+ if ( ( this.options.values.length === 2 && this.options.range === true ) &&
385
369
  ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
386
370
  ) {
387
371
  newVal = otherVal;
@@ -502,10 +486,10 @@ $.widget( "ui.slider", $.ui.mouse, {
502
486
  if ( value ) {
503
487
  this.handles.filter( ".ui-state-focus" ).blur();
504
488
  this.handles.removeClass( "ui-state-hover" );
505
- this.handles.propAttr( "disabled", true );
489
+ this.handles.prop( "disabled", true );
506
490
  this.element.addClass( "ui-disabled" );
507
491
  } else {
508
- this.handles.propAttr( "disabled", false );
492
+ this.handles.prop( "disabled", false );
509
493
  this.element.removeClass( "ui-disabled" );
510
494
  }
511
495
  break;
@@ -530,6 +514,12 @@ $.widget( "ui.slider", $.ui.mouse, {
530
514
  }
531
515
  this._animateOff = false;
532
516
  break;
517
+ case "min":
518
+ case "max":
519
+ this._animateOff = true;
520
+ this._refreshValue();
521
+ this._animateOff = false;
522
+ break;
533
523
  }
534
524
  },
535
525
 
@@ -566,7 +556,7 @@ $.widget( "ui.slider", $.ui.mouse, {
566
556
  return vals;
567
557
  }
568
558
  },
569
-
559
+
570
560
  // returns the step-aligned value that val is closest to, between (inclusive) min and max
571
561
  _trimAlignValue: function( val ) {
572
562
  if ( val <= this._valueMin() ) {
@@ -595,38 +585,34 @@ $.widget( "ui.slider", $.ui.mouse, {
595
585
  _valueMax: function() {
596
586
  return this.options.max;
597
587
  },
598
-
588
+
599
589
  _refreshValue: function() {
600
- var oRange = this.options.range,
590
+ var lastValPercent, valPercent, value, valueMin, valueMax,
591
+ oRange = this.options.range,
601
592
  o = this.options,
602
- self = this,
593
+ that = this,
603
594
  animate = ( !this._animateOff ) ? o.animate : false,
604
- valPercent,
605
- _set = {},
606
- lastValPercent,
607
- value,
608
- valueMin,
609
- valueMax;
595
+ _set = {};
610
596
 
611
597
  if ( this.options.values && this.options.values.length ) {
612
- this.handles.each(function( i, j ) {
613
- valPercent = ( self.values(i) - self._valueMin() ) / ( self._valueMax() - self._valueMin() ) * 100;
614
- _set[ self.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
598
+ this.handles.each(function( i ) {
599
+ valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
600
+ _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
615
601
  $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
616
- if ( self.options.range === true ) {
617
- if ( self.orientation === "horizontal" ) {
602
+ if ( that.options.range === true ) {
603
+ if ( that.orientation === "horizontal" ) {
618
604
  if ( i === 0 ) {
619
- self.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
605
+ that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
620
606
  }
621
607
  if ( i === 1 ) {
622
- self.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
608
+ that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
623
609
  }
624
610
  } else {
625
611
  if ( i === 0 ) {
626
- self.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
612
+ that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
627
613
  }
628
614
  if ( i === 1 ) {
629
- self.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
615
+ that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
630
616
  }
631
617
  }
632
618
  }
@@ -639,7 +625,7 @@ $.widget( "ui.slider", $.ui.mouse, {
639
625
  valPercent = ( valueMax !== valueMin ) ?
640
626
  ( value - valueMin ) / ( valueMax - valueMin ) * 100 :
641
627
  0;
642
- _set[ self.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
628
+ _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
643
629
  this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
644
630
 
645
631
  if ( oRange === "min" && this.orientation === "horizontal" ) {
@@ -659,8 +645,4 @@ $.widget( "ui.slider", $.ui.mouse, {
659
645
 
660
646
  });
661
647
 
662
- $.extend( $.ui.slider, {
663
- version: "1.8.24"
664
- });
665
-
666
648
  }(jQuery));