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 Progressbar 1.8.24
5
+ * jQuery UI Progressbar 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/Progressbar
12
+ * http://api.jqueryui.com/progressbar/
12
13
  *
13
14
  * Depends:
14
15
  * jquery.ui.core.js
@@ -17,6 +18,7 @@
17
18
  (function( $, undefined ) {
18
19
 
19
20
  $.widget( "ui.progressbar", {
21
+ version: "1.9.2",
20
22
  options: {
21
23
  value: 0,
22
24
  max: 100
@@ -41,7 +43,7 @@ $.widget( "ui.progressbar", {
41
43
  this._refreshValue();
42
44
  },
43
45
 
44
- destroy: function() {
46
+ _destroy: function() {
45
47
  this.element
46
48
  .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
47
49
  .removeAttr( "role" )
@@ -50,8 +52,6 @@ $.widget( "ui.progressbar", {
50
52
  .removeAttr( "aria-valuenow" );
51
53
 
52
54
  this.valueDiv.remove();
53
-
54
- $.Widget.prototype.destroy.apply( this, arguments );
55
55
  },
56
56
 
57
57
  value: function( newValue ) {
@@ -72,7 +72,7 @@ $.widget( "ui.progressbar", {
72
72
  }
73
73
  }
74
74
 
75
- $.Widget.prototype._setOption.apply( this, arguments );
75
+ this._super( key, value );
76
76
  },
77
77
 
78
78
  _value: function() {
@@ -89,8 +89,8 @@ $.widget( "ui.progressbar", {
89
89
  },
90
90
 
91
91
  _refreshValue: function() {
92
- var value = this.value();
93
- var percentage = this._percentage();
92
+ var value = this.value(),
93
+ percentage = this._percentage();
94
94
 
95
95
  if ( this.oldValue !== value ) {
96
96
  this.oldValue = value;
@@ -105,8 +105,4 @@ $.widget( "ui.progressbar", {
105
105
  }
106
106
  });
107
107
 
108
- $.extend( $.ui.progressbar, {
109
- version: "1.8.24"
110
- });
111
-
112
108
  })( jQuery );
@@ -3,13 +3,14 @@
3
3
  //= require jquery.ui.mouse
4
4
 
5
5
  /*!
6
- * jQuery UI Resizable 1.8.24
6
+ * jQuery UI Resizable 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/Resizables
13
+ * http://api.jqueryui.com/resizable/
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.resizable", $.ui.mouse, {
23
+ version: "1.9.2",
22
24
  widgetEventPrefix: "resize",
23
25
  options: {
24
26
  alsoResize: false,
@@ -40,7 +42,7 @@ $.widget("ui.resizable", $.ui.mouse, {
40
42
  },
41
43
  _create: function() {
42
44
 
43
- var self = this, o = this.options;
45
+ var that = this, o = this.options;
44
46
  this.element.addClass("ui-resizable");
45
47
 
46
48
  $.extend(this, {
@@ -161,11 +163,11 @@ $.widget("ui.resizable", $.ui.mouse, {
161
163
 
162
164
  //Matching axis name
163
165
  this._handles.mouseover(function() {
164
- if (!self.resizing) {
166
+ if (!that.resizing) {
165
167
  if (this.className)
166
168
  var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
167
169
  //Axis, default = se
168
- self.axis = axis && axis[1] ? axis[1] : 'se';
170
+ that.axis = axis && axis[1] ? axis[1] : 'se';
169
171
  }
170
172
  });
171
173
 
@@ -174,16 +176,16 @@ $.widget("ui.resizable", $.ui.mouse, {
174
176
  this._handles.hide();
175
177
  $(this.element)
176
178
  .addClass("ui-resizable-autohide")
177
- .hover(function() {
179
+ .mouseenter(function() {
178
180
  if (o.disabled) return;
179
181
  $(this).removeClass("ui-resizable-autohide");
180
- self._handles.show();
181
- },
182
- function(){
182
+ that._handles.show();
183
+ })
184
+ .mouseleave(function(){
183
185
  if (o.disabled) return;
184
- if (!self.resizing) {
186
+ if (!that.resizing) {
185
187
  $(this).addClass("ui-resizable-autohide");
186
- self._handles.hide();
188
+ that._handles.hide();
187
189
  }
188
190
  });
189
191
  }
@@ -193,28 +195,27 @@ $.widget("ui.resizable", $.ui.mouse, {
193
195
 
194
196
  },
195
197
 
196
- destroy: function() {
198
+ _destroy: function() {
197
199
 
198
200
  this._mouseDestroy();
199
201
 
200
202
  var _destroy = function(exp) {
201
203
  $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
202
- .removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
204
+ .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
203
205
  };
204
206
 
205
207
  //TODO: Unwrap at same DOM position
206
208
  if (this.elementIsWrapper) {
207
209
  _destroy(this.element);
208
210
  var wrapper = this.element;
209
- wrapper.after(
210
- this.originalElement.css({
211
- position: wrapper.css('position'),
212
- width: wrapper.outerWidth(),
213
- height: wrapper.outerHeight(),
214
- top: wrapper.css('top'),
215
- left: wrapper.css('left')
216
- })
217
- ).remove();
211
+ this.originalElement.css({
212
+ position: wrapper.css('position'),
213
+ width: wrapper.outerWidth(),
214
+ height: wrapper.outerHeight(),
215
+ top: wrapper.css('top'),
216
+ left: wrapper.css('left')
217
+ }).insertAfter( wrapper );
218
+ wrapper.remove();
218
219
  }
219
220
 
220
221
  this.originalElement.css('resize', this.originalResizeStyle);
@@ -267,8 +268,8 @@ $.widget("ui.resizable", $.ui.mouse, {
267
268
  //Aspect Ratio
268
269
  this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
269
270
 
270
- var cursor = $('.ui-resizable-' + this.axis).css('cursor');
271
- $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor);
271
+ var cursor = $('.ui-resizable-' + this.axis).css('cursor');
272
+ $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor);
272
273
 
273
274
  el.addClass("ui-resizable-resizing");
274
275
  this._propagate("start", event);
@@ -279,14 +280,14 @@ $.widget("ui.resizable", $.ui.mouse, {
279
280
 
280
281
  //Increase performance, avoid regex
281
282
  var el = this.helper, o = this.options, props = {},
282
- self = this, smp = this.originalMousePosition, a = this.axis;
283
+ that = this, smp = this.originalMousePosition, a = this.axis;
283
284
 
284
285
  var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
285
286
  var trigger = this._change[a];
286
287
  if (!trigger) return false;
287
288
 
288
289
  // Calculate the attrs that will be change
289
- var data = trigger.apply(this, [event, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff;
290
+ var data = trigger.apply(this, [event, dx, dy]);
290
291
 
291
292
  // Put this in the mouseDrag handler since the user can start pressing shift while resizing
292
293
  this._updateVirtualBoundaries(event.shiftKey);
@@ -317,22 +318,22 @@ $.widget("ui.resizable", $.ui.mouse, {
317
318
  _mouseStop: function(event) {
318
319
 
319
320
  this.resizing = false;
320
- var o = this.options, self = this;
321
+ var o = this.options, that = this;
321
322
 
322
323
  if(this._helper) {
323
324
  var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
324
- soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
325
- soffsetw = ista ? 0 : self.sizeDiff.width;
325
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height,
326
+ soffsetw = ista ? 0 : that.sizeDiff.width;
326
327
 
327
- var s = { width: (self.helper.width() - soffsetw), height: (self.helper.height() - soffseth) },
328
- left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
329
- top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
328
+ var s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) },
329
+ left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null,
330
+ top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null;
330
331
 
331
332
  if (!o.animate)
332
333
  this.element.css($.extend(s, { top: top, left: left }));
333
334
 
334
- self.helper.height(self.size.height);
335
- self.helper.width(self.size.width);
335
+ that.helper.height(that.size.height);
336
+ that.helper.width(that.size.width);
336
337
 
337
338
  if (this._helper && !o.animate) this._proportionallyResize();
338
339
  }
@@ -348,31 +349,31 @@ $.widget("ui.resizable", $.ui.mouse, {
348
349
 
349
350
  },
350
351
 
351
- _updateVirtualBoundaries: function(forceAspectRatio) {
352
- var o = this.options, pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b;
353
-
354
- b = {
355
- minWidth: isNumber(o.minWidth) ? o.minWidth : 0,
356
- maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,
357
- minHeight: isNumber(o.minHeight) ? o.minHeight : 0,
358
- maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity
359
- };
360
-
361
- if(this._aspectRatio || forceAspectRatio) {
362
- // We want to create an enclosing box whose aspect ration is the requested one
363
- // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension
364
- pMinWidth = b.minHeight * this.aspectRatio;
365
- pMinHeight = b.minWidth / this.aspectRatio;
366
- pMaxWidth = b.maxHeight * this.aspectRatio;
367
- pMaxHeight = b.maxWidth / this.aspectRatio;
368
-
369
- if(pMinWidth > b.minWidth) b.minWidth = pMinWidth;
370
- if(pMinHeight > b.minHeight) b.minHeight = pMinHeight;
371
- if(pMaxWidth < b.maxWidth) b.maxWidth = pMaxWidth;
372
- if(pMaxHeight < b.maxHeight) b.maxHeight = pMaxHeight;
373
- }
374
- this._vBoundaries = b;
375
- },
352
+ _updateVirtualBoundaries: function(forceAspectRatio) {
353
+ var o = this.options, pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b;
354
+
355
+ b = {
356
+ minWidth: isNumber(o.minWidth) ? o.minWidth : 0,
357
+ maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,
358
+ minHeight: isNumber(o.minHeight) ? o.minHeight : 0,
359
+ maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity
360
+ };
361
+
362
+ if(this._aspectRatio || forceAspectRatio) {
363
+ // We want to create an enclosing box whose aspect ration is the requested one
364
+ // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension
365
+ pMinWidth = b.minHeight * this.aspectRatio;
366
+ pMinHeight = b.minWidth / this.aspectRatio;
367
+ pMaxWidth = b.maxHeight * this.aspectRatio;
368
+ pMaxHeight = b.maxWidth / this.aspectRatio;
369
+
370
+ if(pMinWidth > b.minWidth) b.minWidth = pMinWidth;
371
+ if(pMinHeight > b.minHeight) b.minHeight = pMinHeight;
372
+ if(pMaxWidth < b.maxWidth) b.maxWidth = pMaxWidth;
373
+ if(pMaxHeight < b.maxHeight) b.maxHeight = pMaxHeight;
374
+ }
375
+ this._vBoundaries = b;
376
+ },
376
377
 
377
378
  _updateCache: function(data) {
378
379
  var o = this.options;
@@ -449,9 +450,6 @@ $.widget("ui.resizable", $.ui.mouse, {
449
450
  });
450
451
  }
451
452
 
452
- if ($.browser.msie && !(!($(element).is(':hidden') || $(element).parents(':hidden').length)))
453
- continue;
454
-
455
453
  prel.css({
456
454
  height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
457
455
  width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
@@ -471,8 +469,8 @@ $.widget("ui.resizable", $.ui.mouse, {
471
469
  this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
472
470
 
473
471
  // fix ie6 offset TODO: This seems broken
474
- var ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0),
475
- pxyoffset = ( ie6 ? 2 : -1 );
472
+ var ie6offset = ($.ui.ie6 ? 1 : 0),
473
+ pxyoffset = ( $.ui.ie6 ? 2 : -1 );
476
474
 
477
475
  this.helper.addClass(this._helper).css({
478
476
  width: this.element.outerWidth() + pxyoffset,
@@ -543,10 +541,6 @@ $.widget("ui.resizable", $.ui.mouse, {
543
541
 
544
542
  });
545
543
 
546
- $.extend($.ui.resizable, {
547
- version: "1.8.24"
548
- });
549
-
550
544
  /*
551
545
  * Resizable Extensions
552
546
  */
@@ -554,7 +548,7 @@ $.extend($.ui.resizable, {
554
548
  $.ui.plugin.add("resizable", "alsoResize", {
555
549
 
556
550
  start: function (event, ui) {
557
- var self = $(this).data("resizable"), o = self.options;
551
+ var that = $(this).data("resizable"), o = that.options;
558
552
 
559
553
  var _store = function (exp) {
560
554
  $(exp).each(function() {
@@ -575,16 +569,16 @@ $.ui.plugin.add("resizable", "alsoResize", {
575
569
  },
576
570
 
577
571
  resize: function (event, ui) {
578
- var self = $(this).data("resizable"), o = self.options, os = self.originalSize, op = self.originalPosition;
572
+ var that = $(this).data("resizable"), o = that.options, os = that.originalSize, op = that.originalPosition;
579
573
 
580
574
  var delta = {
581
- height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,
582
- top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0
575
+ height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,
576
+ top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0
583
577
  },
584
578
 
585
579
  _alsoResize = function (exp, c) {
586
580
  $(exp).each(function() {
587
- var el = $(this), start = $(this).data("resizable-alsoresize"), style = {},
581
+ var el = $(this), start = $(this).data("resizable-alsoresize"), style = {},
588
582
  css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ['width', 'height'] : ['width', 'height', 'top', 'left'];
589
583
 
590
584
  $.each(css, function (i, prop) {
@@ -612,34 +606,34 @@ $.ui.plugin.add("resizable", "alsoResize", {
612
606
  $.ui.plugin.add("resizable", "animate", {
613
607
 
614
608
  stop: function(event, ui) {
615
- var self = $(this).data("resizable"), o = self.options;
609
+ var that = $(this).data("resizable"), o = that.options;
616
610
 
617
- var pr = self._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
618
- soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
619
- soffsetw = ista ? 0 : self.sizeDiff.width;
611
+ var pr = that._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
612
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height,
613
+ soffsetw = ista ? 0 : that.sizeDiff.width;
620
614
 
621
- var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
622
- left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
623
- top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
615
+ var style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
616
+ left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null,
617
+ top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null;
624
618
 
625
- self.element.animate(
619
+ that.element.animate(
626
620
  $.extend(style, top && left ? { top: top, left: left } : {}), {
627
621
  duration: o.animateDuration,
628
622
  easing: o.animateEasing,
629
623
  step: function() {
630
624
 
631
625
  var data = {
632
- width: parseInt(self.element.css('width'), 10),
633
- height: parseInt(self.element.css('height'), 10),
634
- top: parseInt(self.element.css('top'), 10),
635
- left: parseInt(self.element.css('left'), 10)
626
+ width: parseInt(that.element.css('width'), 10),
627
+ height: parseInt(that.element.css('height'), 10),
628
+ top: parseInt(that.element.css('top'), 10),
629
+ left: parseInt(that.element.css('left'), 10)
636
630
  };
637
631
 
638
632
  if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height });
639
633
 
640
634
  // propagating resize, and updating values for each animation step
641
- self._updateCache(data);
642
- self._propagate("resize", event);
635
+ that._updateCache(data);
636
+ that._propagate("resize", event);
643
637
 
644
638
  }
645
639
  }
@@ -651,17 +645,17 @@ $.ui.plugin.add("resizable", "animate", {
651
645
  $.ui.plugin.add("resizable", "containment", {
652
646
 
653
647
  start: function(event, ui) {
654
- var self = $(this).data("resizable"), o = self.options, el = self.element;
648
+ var that = $(this).data("resizable"), o = that.options, el = that.element;
655
649
  var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
656
650
  if (!ce) return;
657
651
 
658
- self.containerElement = $(ce);
652
+ that.containerElement = $(ce);
659
653
 
660
654
  if (/document/.test(oc) || oc == document) {
661
- self.containerOffset = { left: 0, top: 0 };
662
- self.containerPosition = { left: 0, top: 0 };
655
+ that.containerOffset = { left: 0, top: 0 };
656
+ that.containerPosition = { left: 0, top: 0 };
663
657
 
664
- self.parentData = {
658
+ that.parentData = {
665
659
  element: $(document), left: 0, top: 0,
666
660
  width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
667
661
  };
@@ -672,70 +666,70 @@ $.ui.plugin.add("resizable", "containment", {
672
666
  var element = $(ce), p = [];
673
667
  $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
674
668
 
675
- self.containerOffset = element.offset();
676
- self.containerPosition = element.position();
677
- self.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
669
+ that.containerOffset = element.offset();
670
+ that.containerPosition = element.position();
671
+ that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
678
672
 
679
- var co = self.containerOffset, ch = self.containerSize.height, cw = self.containerSize.width,
673
+ var co = that.containerOffset, ch = that.containerSize.height, cw = that.containerSize.width,
680
674
  width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
681
675
 
682
- self.parentData = {
676
+ that.parentData = {
683
677
  element: ce, left: co.left, top: co.top, width: width, height: height
684
678
  };
685
679
  }
686
680
  },
687
681
 
688
682
  resize: function(event, ui) {
689
- var self = $(this).data("resizable"), o = self.options,
690
- ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
691
- pRatio = self._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
683
+ var that = $(this).data("resizable"), o = that.options,
684
+ ps = that.containerSize, co = that.containerOffset, cs = that.size, cp = that.position,
685
+ pRatio = that._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = that.containerElement;
692
686
 
693
687
  if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;
694
688
 
695
- if (cp.left < (self._helper ? co.left : 0)) {
696
- self.size.width = self.size.width + (self._helper ? (self.position.left - co.left) : (self.position.left - cop.left));
697
- if (pRatio) self.size.height = self.size.width / self.aspectRatio;
698
- self.position.left = o.helper ? co.left : 0;
689
+ if (cp.left < (that._helper ? co.left : 0)) {
690
+ that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));
691
+ if (pRatio) that.size.height = that.size.width / that.aspectRatio;
692
+ that.position.left = o.helper ? co.left : 0;
699
693
  }
700
694
 
701
- if (cp.top < (self._helper ? co.top : 0)) {
702
- self.size.height = self.size.height + (self._helper ? (self.position.top - co.top) : self.position.top);
703
- if (pRatio) self.size.width = self.size.height * self.aspectRatio;
704
- self.position.top = self._helper ? co.top : 0;
695
+ if (cp.top < (that._helper ? co.top : 0)) {
696
+ that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);
697
+ if (pRatio) that.size.width = that.size.height * that.aspectRatio;
698
+ that.position.top = that._helper ? co.top : 0;
705
699
  }
706
700
 
707
- self.offset.left = self.parentData.left+self.position.left;
708
- self.offset.top = self.parentData.top+self.position.top;
701
+ that.offset.left = that.parentData.left+that.position.left;
702
+ that.offset.top = that.parentData.top+that.position.top;
709
703
 
710
- var woset = Math.abs( (self._helper ? self.offset.left - cop.left : (self.offset.left - cop.left)) + self.sizeDiff.width ),
711
- hoset = Math.abs( (self._helper ? self.offset.top - cop.top : (self.offset.top - co.top)) + self.sizeDiff.height );
704
+ var woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width ),
705
+ hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
712
706
 
713
- var isParent = self.containerElement.get(0) == self.element.parent().get(0),
714
- isOffsetRelative = /relative|absolute/.test(self.containerElement.css('position'));
707
+ var isParent = that.containerElement.get(0) == that.element.parent().get(0),
708
+ isOffsetRelative = /relative|absolute/.test(that.containerElement.css('position'));
715
709
 
716
- if(isParent && isOffsetRelative) woset -= self.parentData.left;
710
+ if(isParent && isOffsetRelative) woset -= that.parentData.left;
717
711
 
718
- if (woset + self.size.width >= self.parentData.width) {
719
- self.size.width = self.parentData.width - woset;
720
- if (pRatio) self.size.height = self.size.width / self.aspectRatio;
712
+ if (woset + that.size.width >= that.parentData.width) {
713
+ that.size.width = that.parentData.width - woset;
714
+ if (pRatio) that.size.height = that.size.width / that.aspectRatio;
721
715
  }
722
716
 
723
- if (hoset + self.size.height >= self.parentData.height) {
724
- self.size.height = self.parentData.height - hoset;
725
- if (pRatio) self.size.width = self.size.height * self.aspectRatio;
717
+ if (hoset + that.size.height >= that.parentData.height) {
718
+ that.size.height = that.parentData.height - hoset;
719
+ if (pRatio) that.size.width = that.size.height * that.aspectRatio;
726
720
  }
727
721
  },
728
722
 
729
723
  stop: function(event, ui){
730
- var self = $(this).data("resizable"), o = self.options, cp = self.position,
731
- co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement;
724
+ var that = $(this).data("resizable"), o = that.options, cp = that.position,
725
+ co = that.containerOffset, cop = that.containerPosition, ce = that.containerElement;
732
726
 
733
- var helper = $(self.helper), ho = helper.offset(), w = helper.outerWidth() - self.sizeDiff.width, h = helper.outerHeight() - self.sizeDiff.height;
727
+ var helper = $(that.helper), ho = helper.offset(), w = helper.outerWidth() - that.sizeDiff.width, h = helper.outerHeight() - that.sizeDiff.height;
734
728
 
735
- if (self._helper && !o.animate && (/relative/).test(ce.css('position')))
729
+ if (that._helper && !o.animate && (/relative/).test(ce.css('position')))
736
730
  $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
737
731
 
738
- if (self._helper && !o.animate && (/static/).test(ce.css('position')))
732
+ if (that._helper && !o.animate && (/static/).test(ce.css('position')))
739
733
  $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
740
734
 
741
735
  }
@@ -745,26 +739,26 @@ $.ui.plugin.add("resizable", "ghost", {
745
739
 
746
740
  start: function(event, ui) {
747
741
 
748
- var self = $(this).data("resizable"), o = self.options, cs = self.size;
742
+ var that = $(this).data("resizable"), o = that.options, cs = that.size;
749
743
 
750
- self.ghost = self.originalElement.clone();
751
- self.ghost
744
+ that.ghost = that.originalElement.clone();
745
+ that.ghost
752
746
  .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
753
747
  .addClass('ui-resizable-ghost')
754
748
  .addClass(typeof o.ghost == 'string' ? o.ghost : '');
755
749
 
756
- self.ghost.appendTo(self.helper);
750
+ that.ghost.appendTo(that.helper);
757
751
 
758
752
  },
759
753
 
760
754
  resize: function(event, ui){
761
- var self = $(this).data("resizable"), o = self.options;
762
- if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });
755
+ var that = $(this).data("resizable"), o = that.options;
756
+ if (that.ghost) that.ghost.css({ position: 'relative', height: that.size.height, width: that.size.width });
763
757
  },
764
758
 
765
759
  stop: function(event, ui){
766
- var self = $(this).data("resizable"), o = self.options;
767
- if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));
760
+ var that = $(this).data("resizable"), o = that.options;
761
+ if (that.ghost && that.helper) that.helper.get(0).removeChild(that.ghost.get(0));
768
762
  }
769
763
 
770
764
  });
@@ -772,29 +766,29 @@ $.ui.plugin.add("resizable", "ghost", {
772
766
  $.ui.plugin.add("resizable", "grid", {
773
767
 
774
768
  resize: function(event, ui) {
775
- var self = $(this).data("resizable"), o = self.options, cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || event.shiftKey;
769
+ var that = $(this).data("resizable"), o = that.options, cs = that.size, os = that.originalSize, op = that.originalPosition, a = that.axis, ratio = o._aspectRatio || event.shiftKey;
776
770
  o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
777
771
  var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
778
772
 
779
773
  if (/^(se|s|e)$/.test(a)) {
780
- self.size.width = os.width + ox;
781
- self.size.height = os.height + oy;
774
+ that.size.width = os.width + ox;
775
+ that.size.height = os.height + oy;
782
776
  }
783
777
  else if (/^(ne)$/.test(a)) {
784
- self.size.width = os.width + ox;
785
- self.size.height = os.height + oy;
786
- self.position.top = op.top - oy;
778
+ that.size.width = os.width + ox;
779
+ that.size.height = os.height + oy;
780
+ that.position.top = op.top - oy;
787
781
  }
788
782
  else if (/^(sw)$/.test(a)) {
789
- self.size.width = os.width + ox;
790
- self.size.height = os.height + oy;
791
- self.position.left = op.left - ox;
783
+ that.size.width = os.width + ox;
784
+ that.size.height = os.height + oy;
785
+ that.position.left = op.left - ox;
792
786
  }
793
787
  else {
794
- self.size.width = os.width + ox;
795
- self.size.height = os.height + oy;
796
- self.position.top = op.top - oy;
797
- self.position.left = op.left - ox;
788
+ that.size.width = os.width + ox;
789
+ that.size.height = os.height + oy;
790
+ that.position.top = op.top - oy;
791
+ that.position.left = op.left - ox;
798
792
  }
799
793
  }
800
794