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
@@ -2,13 +2,14 @@
2
2
  //= require jquery.ui.widget
3
3
 
4
4
  /*!
5
- * jQuery UI Button 1.8.24
5
+ * jQuery UI Button 1.9.2
6
+ * http://jqueryui.com
6
7
  *
7
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
8
- * Dual licensed under the MIT or GPL Version 2 licenses.
8
+ * Copyright 2012 jQuery Foundation and other contributors
9
+ * Released under the MIT license.
9
10
  * http://jquery.org/license
10
11
  *
11
- * http://docs.jquery.com/UI/Button
12
+ * http://api.jqueryui.com/button/
12
13
  *
13
14
  * Depends:
14
15
  * jquery.ui.core.js
@@ -44,6 +45,8 @@ var lastActive, startXPos, startYPos, clickDragged,
44
45
  };
45
46
 
46
47
  $.widget( "ui.button", {
48
+ version: "1.9.2",
49
+ defaultElement: "<button>",
47
50
  options: {
48
51
  disabled: null,
49
52
  text: true,
@@ -55,47 +58,48 @@ $.widget( "ui.button", {
55
58
  },
56
59
  _create: function() {
57
60
  this.element.closest( "form" )
58
- .unbind( "reset.button" )
59
- .bind( "reset.button", formResetHandler );
61
+ .unbind( "reset" + this.eventNamespace )
62
+ .bind( "reset" + this.eventNamespace, formResetHandler );
60
63
 
61
64
  if ( typeof this.options.disabled !== "boolean" ) {
62
- this.options.disabled = !!this.element.propAttr( "disabled" );
65
+ this.options.disabled = !!this.element.prop( "disabled" );
63
66
  } else {
64
- this.element.propAttr( "disabled", this.options.disabled );
67
+ this.element.prop( "disabled", this.options.disabled );
65
68
  }
66
69
 
67
70
  this._determineButtonType();
68
71
  this.hasTitle = !!this.buttonElement.attr( "title" );
69
72
 
70
- var self = this,
73
+ var that = this,
71
74
  options = this.options,
72
75
  toggleButton = this.type === "checkbox" || this.type === "radio",
73
- hoverClass = "ui-state-hover" + ( !toggleButton ? " ui-state-active" : "" ),
76
+ activeClass = !toggleButton ? "ui-state-active" : "",
74
77
  focusClass = "ui-state-focus";
75
78
 
76
79
  if ( options.label === null ) {
77
- options.label = this.buttonElement.html();
80
+ options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
78
81
  }
79
82
 
83
+ this._hoverable( this.buttonElement );
84
+
80
85
  this.buttonElement
81
86
  .addClass( baseClasses )
82
87
  .attr( "role", "button" )
83
- .bind( "mouseenter.button", function() {
88
+ .bind( "mouseenter" + this.eventNamespace, function() {
84
89
  if ( options.disabled ) {
85
90
  return;
86
91
  }
87
- $( this ).addClass( "ui-state-hover" );
88
92
  if ( this === lastActive ) {
89
93
  $( this ).addClass( "ui-state-active" );
90
94
  }
91
95
  })
92
- .bind( "mouseleave.button", function() {
96
+ .bind( "mouseleave" + this.eventNamespace, function() {
93
97
  if ( options.disabled ) {
94
98
  return;
95
99
  }
96
- $( this ).removeClass( hoverClass );
100
+ $( this ).removeClass( activeClass );
97
101
  })
98
- .bind( "click.button", function( event ) {
102
+ .bind( "click" + this.eventNamespace, function( event ) {
99
103
  if ( options.disabled ) {
100
104
  event.preventDefault();
101
105
  event.stopImmediatePropagation();
@@ -103,26 +107,26 @@ $.widget( "ui.button", {
103
107
  });
104
108
 
105
109
  this.element
106
- .bind( "focus.button", function() {
110
+ .bind( "focus" + this.eventNamespace, function() {
107
111
  // no need to check disabled, focus won't be triggered anyway
108
- self.buttonElement.addClass( focusClass );
112
+ that.buttonElement.addClass( focusClass );
109
113
  })
110
- .bind( "blur.button", function() {
111
- self.buttonElement.removeClass( focusClass );
114
+ .bind( "blur" + this.eventNamespace, function() {
115
+ that.buttonElement.removeClass( focusClass );
112
116
  });
113
117
 
114
118
  if ( toggleButton ) {
115
- this.element.bind( "change.button", function() {
119
+ this.element.bind( "change" + this.eventNamespace, function() {
116
120
  if ( clickDragged ) {
117
121
  return;
118
122
  }
119
- self.refresh();
123
+ that.refresh();
120
124
  });
121
125
  // if mouse moves between mousedown and mouseup (drag) set clickDragged flag
122
126
  // prevents issue where button state changes but checkbox/radio checked state
123
127
  // does not in Firefox (see ticket #6970)
124
128
  this.buttonElement
125
- .bind( "mousedown.button", function( event ) {
129
+ .bind( "mousedown" + this.eventNamespace, function( event ) {
126
130
  if ( options.disabled ) {
127
131
  return;
128
132
  }
@@ -130,7 +134,7 @@ $.widget( "ui.button", {
130
134
  startXPos = event.pageX;
131
135
  startYPos = event.pageY;
132
136
  })
133
- .bind( "mouseup.button", function( event ) {
137
+ .bind( "mouseup" + this.eventNamespace, function( event ) {
134
138
  if ( options.disabled ) {
135
139
  return;
136
140
  }
@@ -141,22 +145,22 @@ $.widget( "ui.button", {
141
145
  }
142
146
 
143
147
  if ( this.type === "checkbox" ) {
144
- this.buttonElement.bind( "click.button", function() {
148
+ this.buttonElement.bind( "click" + this.eventNamespace, function() {
145
149
  if ( options.disabled || clickDragged ) {
146
150
  return false;
147
151
  }
148
152
  $( this ).toggleClass( "ui-state-active" );
149
- self.buttonElement.attr( "aria-pressed", self.element[0].checked );
153
+ that.buttonElement.attr( "aria-pressed", that.element[0].checked );
150
154
  });
151
155
  } else if ( this.type === "radio" ) {
152
- this.buttonElement.bind( "click.button", function() {
156
+ this.buttonElement.bind( "click" + this.eventNamespace, function() {
153
157
  if ( options.disabled || clickDragged ) {
154
158
  return false;
155
159
  }
156
160
  $( this ).addClass( "ui-state-active" );
157
- self.buttonElement.attr( "aria-pressed", "true" );
161
+ that.buttonElement.attr( "aria-pressed", "true" );
158
162
 
159
- var radio = self.element[ 0 ];
163
+ var radio = that.element[ 0 ];
160
164
  radioGroup( radio )
161
165
  .not( radio )
162
166
  .map(function() {
@@ -167,31 +171,31 @@ $.widget( "ui.button", {
167
171
  });
168
172
  } else {
169
173
  this.buttonElement
170
- .bind( "mousedown.button", function() {
174
+ .bind( "mousedown" + this.eventNamespace, function() {
171
175
  if ( options.disabled ) {
172
176
  return false;
173
177
  }
174
178
  $( this ).addClass( "ui-state-active" );
175
179
  lastActive = this;
176
- $( document ).one( "mouseup", function() {
180
+ that.document.one( "mouseup", function() {
177
181
  lastActive = null;
178
182
  });
179
183
  })
180
- .bind( "mouseup.button", function() {
184
+ .bind( "mouseup" + this.eventNamespace, function() {
181
185
  if ( options.disabled ) {
182
186
  return false;
183
187
  }
184
188
  $( this ).removeClass( "ui-state-active" );
185
189
  })
186
- .bind( "keydown.button", function(event) {
190
+ .bind( "keydown" + this.eventNamespace, function(event) {
187
191
  if ( options.disabled ) {
188
192
  return false;
189
193
  }
190
- if ( event.keyCode == $.ui.keyCode.SPACE || event.keyCode == $.ui.keyCode.ENTER ) {
194
+ if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
191
195
  $( this ).addClass( "ui-state-active" );
192
196
  }
193
197
  })
194
- .bind( "keyup.button", function() {
198
+ .bind( "keyup" + this.eventNamespace, function() {
195
199
  $( this ).removeClass( "ui-state-active" );
196
200
  });
197
201
 
@@ -213,10 +217,11 @@ $.widget( "ui.button", {
213
217
  },
214
218
 
215
219
  _determineButtonType: function() {
220
+ var ancestor, labelSelector, checked;
216
221
 
217
- if ( this.element.is(":checkbox") ) {
222
+ if ( this.element.is("[type=checkbox]") ) {
218
223
  this.type = "checkbox";
219
- } else if ( this.element.is(":radio") ) {
224
+ } else if ( this.element.is("[type=radio]") ) {
220
225
  this.type = "radio";
221
226
  } else if ( this.element.is("input") ) {
222
227
  this.type = "input";
@@ -227,8 +232,8 @@ $.widget( "ui.button", {
227
232
  if ( this.type === "checkbox" || this.type === "radio" ) {
228
233
  // we don't search against the document in case the element
229
234
  // is disconnected from the DOM
230
- var ancestor = this.element.parents().filter(":last"),
231
- labelSelector = "label[for='" + this.element.attr("id") + "']";
235
+ ancestor = this.element.parents().last();
236
+ labelSelector = "label[for='" + this.element.attr("id") + "']";
232
237
  this.buttonElement = ancestor.find( labelSelector );
233
238
  if ( !this.buttonElement.length ) {
234
239
  ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
@@ -239,11 +244,11 @@ $.widget( "ui.button", {
239
244
  }
240
245
  this.element.addClass( "ui-helper-hidden-accessible" );
241
246
 
242
- var checked = this.element.is( ":checked" );
247
+ checked = this.element.is( ":checked" );
243
248
  if ( checked ) {
244
249
  this.buttonElement.addClass( "ui-state-active" );
245
250
  }
246
- this.buttonElement.attr( "aria-pressed", checked );
251
+ this.buttonElement.prop( "aria-pressed", checked );
247
252
  } else {
248
253
  this.buttonElement = this.element;
249
254
  }
@@ -253,7 +258,7 @@ $.widget( "ui.button", {
253
258
  return this.buttonElement;
254
259
  },
255
260
 
256
- destroy: function() {
261
+ _destroy: function() {
257
262
  this.element
258
263
  .removeClass( "ui-helper-hidden-accessible" );
259
264
  this.buttonElement
@@ -265,17 +270,15 @@ $.widget( "ui.button", {
265
270
  if ( !this.hasTitle ) {
266
271
  this.buttonElement.removeAttr( "title" );
267
272
  }
268
-
269
- $.Widget.prototype.destroy.call( this );
270
273
  },
271
274
 
272
275
  _setOption: function( key, value ) {
273
- $.Widget.prototype._setOption.apply( this, arguments );
276
+ this._super( key, value );
274
277
  if ( key === "disabled" ) {
275
278
  if ( value ) {
276
- this.element.propAttr( "disabled", true );
279
+ this.element.prop( "disabled", true );
277
280
  } else {
278
- this.element.propAttr( "disabled", false );
281
+ this.element.prop( "disabled", false );
279
282
  }
280
283
  return;
281
284
  }
@@ -283,7 +286,9 @@ $.widget( "ui.button", {
283
286
  },
284
287
 
285
288
  refresh: function() {
286
- var isDisabled = this.element.is( ":disabled" );
289
+ //See #8237 & #8828
290
+ var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
291
+
287
292
  if ( isDisabled !== this.options.disabled ) {
288
293
  this._setOption( "disabled", isDisabled );
289
294
  }
@@ -320,14 +325,14 @@ $.widget( "ui.button", {
320
325
  return;
321
326
  }
322
327
  var buttonElement = this.buttonElement.removeClass( typeClasses ),
323
- buttonText = $( "<span></span>", this.element[0].ownerDocument )
328
+ buttonText = $( "<span></span>", this.document[0] )
324
329
  .addClass( "ui-button-text" )
325
330
  .html( this.options.label )
326
331
  .appendTo( buttonElement.empty() )
327
332
  .text(),
328
333
  icons = this.options.icons,
329
334
  multipleIcons = icons.primary && icons.secondary,
330
- buttonClasses = [];
335
+ buttonClasses = [];
331
336
 
332
337
  if ( icons.primary || icons.secondary ) {
333
338
  if ( this.options.text ) {
@@ -346,7 +351,7 @@ $.widget( "ui.button", {
346
351
  buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
347
352
 
348
353
  if ( !this.hasTitle ) {
349
- buttonElement.attr( "title", buttonText );
354
+ buttonElement.attr( "title", $.trim( buttonText ) );
350
355
  }
351
356
  }
352
357
  } else {
@@ -357,14 +362,15 @@ $.widget( "ui.button", {
357
362
  });
358
363
 
359
364
  $.widget( "ui.buttonset", {
365
+ version: "1.9.2",
360
366
  options: {
361
- items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)"
367
+ items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"
362
368
  },
363
369
 
364
370
  _create: function() {
365
371
  this.element.addClass( "ui-buttonset" );
366
372
  },
367
-
373
+
368
374
  _init: function() {
369
375
  this.refresh();
370
376
  },
@@ -374,12 +380,12 @@ $.widget( "ui.buttonset", {
374
380
  this.buttons.button( "option", key, value );
375
381
  }
376
382
 
377
- $.Widget.prototype._setOption.apply( this, arguments );
383
+ this._super( key, value );
378
384
  },
379
-
385
+
380
386
  refresh: function() {
381
387
  var rtl = this.element.css( "direction" ) === "rtl";
382
-
388
+
383
389
  this.buttons = this.element.find( this.options.items )
384
390
  .filter( ":ui-button" )
385
391
  .button( "refresh" )
@@ -400,7 +406,7 @@ $.widget( "ui.buttonset", {
400
406
  .end();
401
407
  },
402
408
 
403
- destroy: function() {
409
+ _destroy: function() {
404
410
  this.element.removeClass( "ui-buttonset" );
405
411
  this.buttons
406
412
  .map(function() {
@@ -409,8 +415,6 @@ $.widget( "ui.buttonset", {
409
415
  .removeClass( "ui-corner-left ui-corner-right" )
410
416
  .end()
411
417
  .button( "destroy" );
412
-
413
- $.Widget.prototype.destroy.call( this );
414
418
  }
415
419
  });
416
420
 
@@ -1,16 +1,20 @@
1
1
  //= require jquery
2
2
 
3
3
  /*!
4
- * jQuery UI 1.8.24
4
+ * jQuery UI Core 1.9.2
5
+ * http://jqueryui.com
5
6
  *
6
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
7
- * Dual licensed under the MIT or GPL Version 2 licenses.
7
+ * Copyright 2012 jQuery Foundation and other contributors
8
+ * Released under the MIT license.
8
9
  * http://jquery.org/license
9
10
  *
10
- * http://docs.jquery.com/UI
11
+ * http://api.jqueryui.com/category/ui-core/
11
12
  */
12
13
  (function( $, undefined ) {
13
14
 
15
+ var uuid = 0,
16
+ runiqueId = /^ui-id-\d+$/;
17
+
14
18
  // prevent duplicate loading
15
19
  // this is only a problem because we proxy existing functions
16
20
  // and we don't want to double proxy them
@@ -20,26 +24,18 @@ if ( $.ui.version ) {
20
24
  }
21
25
 
22
26
  $.extend( $.ui, {
23
- version: "1.8.24",
27
+ version: "1.9.2",
24
28
 
25
29
  keyCode: {
26
- ALT: 18,
27
30
  BACKSPACE: 8,
28
- CAPS_LOCK: 20,
29
31
  COMMA: 188,
30
- COMMAND: 91,
31
- COMMAND_LEFT: 91, // COMMAND
32
- COMMAND_RIGHT: 93,
33
- CONTROL: 17,
34
32
  DELETE: 46,
35
33
  DOWN: 40,
36
34
  END: 35,
37
35
  ENTER: 13,
38
36
  ESCAPE: 27,
39
37
  HOME: 36,
40
- INSERT: 45,
41
38
  LEFT: 37,
42
- MENU: 93, // COMMAND_RIGHT
43
39
  NUMPAD_ADD: 107,
44
40
  NUMPAD_DECIMAL: 110,
45
41
  NUMPAD_DIVIDE: 111,
@@ -50,18 +46,14 @@ $.extend( $.ui, {
50
46
  PAGE_UP: 33,
51
47
  PERIOD: 190,
52
48
  RIGHT: 39,
53
- SHIFT: 16,
54
49
  SPACE: 32,
55
50
  TAB: 9,
56
- UP: 38,
57
- WINDOWS: 91 // COMMAND
51
+ UP: 38
58
52
  }
59
53
  });
60
54
 
61
55
  // plugins
62
56
  $.fn.extend({
63
- propAttr: $.fn.prop || $.fn.attr,
64
-
65
57
  _focus: $.fn.focus,
66
58
  focus: function( delay, fn ) {
67
59
  return typeof delay === "number" ?
@@ -79,13 +71,13 @@ $.fn.extend({
79
71
 
80
72
  scrollParent: function() {
81
73
  var scrollParent;
82
- if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
74
+ if (($.ui.ie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
83
75
  scrollParent = this.parents().filter(function() {
84
- return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
76
+ return (/(relative|absolute|fixed)/).test($.css(this,'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
85
77
  }).eq(0);
86
78
  } else {
87
79
  scrollParent = this.parents().filter(function() {
88
- return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
80
+ return (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
89
81
  }).eq(0);
90
82
  }
91
83
 
@@ -121,92 +113,50 @@ $.fn.extend({
121
113
  return 0;
122
114
  },
123
115
 
124
- disableSelection: function() {
125
- return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
126
- ".ui-disableSelection", function( event ) {
127
- event.preventDefault();
128
- });
116
+ uniqueId: function() {
117
+ return this.each(function() {
118
+ if ( !this.id ) {
119
+ this.id = "ui-id-" + (++uuid);
120
+ }
121
+ });
129
122
  },
130
123
 
131
- enableSelection: function() {
132
- return this.unbind( ".ui-disableSelection" );
124
+ removeUniqueId: function() {
125
+ return this.each(function() {
126
+ if ( runiqueId.test( this.id ) ) {
127
+ $( this ).removeAttr( "id" );
128
+ }
129
+ });
133
130
  }
134
131
  });
135
132
 
136
- // support: jQuery <1.8
137
- if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
138
- $.each( [ "Width", "Height" ], function( i, name ) {
139
- var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
140
- type = name.toLowerCase(),
141
- orig = {
142
- innerWidth: $.fn.innerWidth,
143
- innerHeight: $.fn.innerHeight,
144
- outerWidth: $.fn.outerWidth,
145
- outerHeight: $.fn.outerHeight
146
- };
147
-
148
- function reduce( elem, size, border, margin ) {
149
- $.each( side, function() {
150
- size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
151
- if ( border ) {
152
- size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
153
- }
154
- if ( margin ) {
155
- size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
156
- }
157
- });
158
- return size;
159
- }
160
-
161
- $.fn[ "inner" + name ] = function( size ) {
162
- if ( size === undefined ) {
163
- return orig[ "inner" + name ].call( this );
164
- }
165
-
166
- return this.each(function() {
167
- $( this ).css( type, reduce( this, size ) + "px" );
168
- });
169
- };
170
-
171
- $.fn[ "outer" + name] = function( size, margin ) {
172
- if ( typeof size !== "number" ) {
173
- return orig[ "outer" + name ].call( this, size );
174
- }
175
-
176
- return this.each(function() {
177
- $( this).css( type, reduce( this, size, true, margin ) + "px" );
178
- });
179
- };
180
- });
181
- }
182
-
183
133
  // selectors
184
134
  function focusable( element, isTabIndexNotNaN ) {
185
- var nodeName = element.nodeName.toLowerCase();
135
+ var map, mapName, img,
136
+ nodeName = element.nodeName.toLowerCase();
186
137
  if ( "area" === nodeName ) {
187
- var map = element.parentNode,
188
- mapName = map.name,
189
- img;
138
+ map = element.parentNode;
139
+ mapName = map.name;
190
140
  if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
191
141
  return false;
192
142
  }
193
143
  img = $( "img[usemap=#" + mapName + "]" )[0];
194
144
  return !!img && visible( img );
195
145
  }
196
- return ( /input|select|textarea|button|object/.test( nodeName )
197
- ? !element.disabled
198
- : "a" == nodeName
199
- ? element.href || isTabIndexNotNaN
200
- : isTabIndexNotNaN)
146
+ return ( /input|select|textarea|button|object/.test( nodeName ) ?
147
+ !element.disabled :
148
+ "a" === nodeName ?
149
+ element.href || isTabIndexNotNaN :
150
+ isTabIndexNotNaN) &&
201
151
  // the element and all of its ancestors must be visible
202
- && visible( element );
152
+ visible( element );
203
153
  }
204
154
 
205
155
  function visible( element ) {
206
- return !$( element ).parents().andSelf().filter(function() {
207
- return $.curCSS( this, "visibility" ) === "hidden" ||
208
- $.expr.filters.hidden( this );
209
- }).length;
156
+ return $.expr.filters.visible( element ) &&
157
+ !$( element ).parents().andSelf().filter(function() {
158
+ return $.css( this, "visibility" ) === "hidden";
159
+ }).length;
210
160
  }
211
161
 
212
162
  $.extend( $.expr[ ":" ], {
@@ -238,7 +188,7 @@ $(function() {
238
188
  div = body.appendChild( div = document.createElement( "div" ) );
239
189
 
240
190
  // access offsetHeight before setting the style to prevent a layout bug
241
- // in IE 9 which causes the elemnt to continue to take up space even
191
+ // in IE 9 which causes the element to continue to take up space even
242
192
  // after it is removed from the DOM (#8026)
243
193
  div.offsetHeight;
244
194
 
@@ -257,9 +207,64 @@ $(function() {
257
207
  body.removeChild( div ).style.display = "none";
258
208
  });
259
209
 
260
- // jQuery <1.4.3 uses curCSS, in 1.4.3 - 1.7.2 curCSS = css, 1.8+ only has css
261
- if ( !$.curCSS ) {
262
- $.curCSS = $.css;
210
+ // support: jQuery <1.8
211
+ if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
212
+ $.each( [ "Width", "Height" ], function( i, name ) {
213
+ var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
214
+ type = name.toLowerCase(),
215
+ orig = {
216
+ innerWidth: $.fn.innerWidth,
217
+ innerHeight: $.fn.innerHeight,
218
+ outerWidth: $.fn.outerWidth,
219
+ outerHeight: $.fn.outerHeight
220
+ };
221
+
222
+ function reduce( elem, size, border, margin ) {
223
+ $.each( side, function() {
224
+ size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
225
+ if ( border ) {
226
+ size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
227
+ }
228
+ if ( margin ) {
229
+ size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
230
+ }
231
+ });
232
+ return size;
233
+ }
234
+
235
+ $.fn[ "inner" + name ] = function( size ) {
236
+ if ( size === undefined ) {
237
+ return orig[ "inner" + name ].call( this );
238
+ }
239
+
240
+ return this.each(function() {
241
+ $( this ).css( type, reduce( this, size ) + "px" );
242
+ });
243
+ };
244
+
245
+ $.fn[ "outer" + name] = function( size, margin ) {
246
+ if ( typeof size !== "number" ) {
247
+ return orig[ "outer" + name ].call( this, size );
248
+ }
249
+
250
+ return this.each(function() {
251
+ $( this).css( type, reduce( this, size, true, margin ) + "px" );
252
+ });
253
+ };
254
+ });
255
+ }
256
+
257
+ // support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
258
+ if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
259
+ $.fn.removeData = (function( removeData ) {
260
+ return function( key ) {
261
+ if ( arguments.length ) {
262
+ return removeData.call( this, $.camelCase( key ) );
263
+ } else {
264
+ return removeData.call( this );
265
+ }
266
+ };
267
+ })( $.fn.removeData );
263
268
  }
264
269
 
265
270
 
@@ -267,52 +272,69 @@ if ( !$.curCSS ) {
267
272
 
268
273
 
269
274
  // deprecated
275
+
276
+ (function() {
277
+ var uaMatch = /msie ([\w.]+)/.exec( navigator.userAgent.toLowerCase() ) || [];
278
+ $.ui.ie = uaMatch.length ? true : false;
279
+ $.ui.ie6 = parseFloat( uaMatch[ 1 ], 10 ) === 6;
280
+ })();
281
+
282
+ $.fn.extend({
283
+ disableSelection: function() {
284
+ return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
285
+ ".ui-disableSelection", function( event ) {
286
+ event.preventDefault();
287
+ });
288
+ },
289
+
290
+ enableSelection: function() {
291
+ return this.unbind( ".ui-disableSelection" );
292
+ }
293
+ });
294
+
270
295
  $.extend( $.ui, {
271
296
  // $.ui.plugin is deprecated. Use the proxy pattern instead.
272
297
  plugin: {
273
298
  add: function( module, option, set ) {
274
- var proto = $.ui[ module ].prototype;
275
- for ( var i in set ) {
299
+ var i,
300
+ proto = $.ui[ module ].prototype;
301
+ for ( i in set ) {
276
302
  proto.plugins[ i ] = proto.plugins[ i ] || [];
277
303
  proto.plugins[ i ].push( [ option, set[ i ] ] );
278
304
  }
279
305
  },
280
306
  call: function( instance, name, args ) {
281
- var set = instance.plugins[ name ];
282
- if ( !set || !instance.element[ 0 ].parentNode ) {
307
+ var i,
308
+ set = instance.plugins[ name ];
309
+ if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
283
310
  return;
284
311
  }
285
-
286
- for ( var i = 0; i < set.length; i++ ) {
312
+
313
+ for ( i = 0; i < set.length; i++ ) {
287
314
  if ( instance.options[ set[ i ][ 0 ] ] ) {
288
315
  set[ i ][ 1 ].apply( instance.element, args );
289
316
  }
290
317
  }
291
318
  }
292
319
  },
293
-
294
- // will be deprecated when we switch to jQuery 1.4 - use jQuery.contains()
295
- contains: function( a, b ) {
296
- return document.compareDocumentPosition ?
297
- a.compareDocumentPosition( b ) & 16 :
298
- a !== b && a.contains( b );
299
- },
300
-
320
+
321
+ contains: $.contains,
322
+
301
323
  // only used by resizable
302
324
  hasScroll: function( el, a ) {
303
-
325
+
304
326
  //If overflow is hidden, the element might have extra content, but the user wants to hide it
305
327
  if ( $( el ).css( "overflow" ) === "hidden") {
306
328
  return false;
307
329
  }
308
-
330
+
309
331
  var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
310
332
  has = false;
311
-
333
+
312
334
  if ( el[ scroll ] > 0 ) {
313
335
  return true;
314
336
  }
315
-
337
+
316
338
  // TODO: determine which cases actually cause this to happen
317
339
  // if the element doesn't have the scroll set, see if it's possible to
318
340
  // set the scroll
@@ -321,7 +343,7 @@ $.extend( $.ui, {
321
343
  el[ scroll ] = 0;
322
344
  return has;
323
345
  },
324
-
346
+
325
347
  // these are odd functions, fix the API or move into individual plugins
326
348
  isOverAxis: function( x, reference, size ) {
327
349
  //Determines when x coordinate is over "b" element axis