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.
- data/History.md +15 -0
- data/License.txt +2 -3
- data/README.md +17 -19
- data/Rakefile +79 -28
- data/lib/jquery/ui/rails/version.rb +1 -1
- data/vendor/assets/javascripts/jquery.ui.accordion.js +537 -417
- data/vendor/assets/javascripts/jquery.ui.all.js +17 -14
- data/vendor/assets/javascripts/jquery.ui.autocomplete.js +311 -339
- data/vendor/assets/javascripts/jquery.ui.button.js +63 -59
- data/vendor/assets/javascripts/jquery.ui.core.js +134 -112
- data/vendor/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-ar.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-az.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-bg.js +16 -16
- data/vendor/assets/javascripts/jquery.ui.datepicker-bs.js +5 -5
- data/vendor/assets/javascripts/jquery.ui.datepicker-ca.js +13 -13
- data/vendor/assets/javascripts/jquery.ui.datepicker-cs.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-cy-GB.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-da.js +9 -9
- data/vendor/assets/javascripts/jquery.ui.datepicker-de.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-el.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-eo.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-es.js +6 -6
- data/vendor/assets/javascripts/jquery.ui.datepicker-et.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-eu.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-fa.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-fi.js +5 -5
- data/vendor/assets/javascripts/jquery.ui.datepicker-fo.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-gl.js +6 -6
- data/vendor/assets/javascripts/jquery.ui.datepicker-he.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-hr.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-hy.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-id.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-is.js +11 -11
- data/vendor/assets/javascripts/jquery.ui.datepicker-it.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-ja.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-kk.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-ko.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-lt.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-lv.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-ml.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-ms.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-nl.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-no.js +18 -18
- data/vendor/assets/javascripts/jquery.ui.datepicker-pl.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-pt-BR.js +7 -7
- data/vendor/assets/javascripts/jquery.ui.datepicker-pt.js +6 -6
- data/vendor/assets/javascripts/jquery.ui.datepicker-rm.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-ro.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-ru.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-sk.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-sl.js +6 -6
- data/vendor/assets/javascripts/jquery.ui.datepicker-sq.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-sr-SR.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-sr.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-sv.js +9 -9
- data/vendor/assets/javascripts/jquery.ui.datepicker-th.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-tj.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-tr.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-uk.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-vi.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-CN.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-HK.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-TW.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker.js +51 -59
- data/vendor/assets/javascripts/jquery.ui.dialog.js +402 -409
- data/vendor/assets/javascripts/jquery.ui.draggable.js +79 -75
- data/vendor/assets/javascripts/jquery.ui.droppable.js +10 -17
- data/vendor/assets/javascripts/jquery.ui.effect-blind.js +84 -0
- data/vendor/assets/javascripts/jquery.ui.effect-bounce.js +115 -0
- data/vendor/assets/javascripts/jquery.ui.effect-clip.js +69 -0
- data/vendor/assets/javascripts/jquery.ui.effect-drop.js +67 -0
- data/vendor/assets/javascripts/jquery.ui.effect-explode.js +99 -0
- data/vendor/assets/javascripts/jquery.ui.effect-fade.js +32 -0
- data/vendor/assets/javascripts/jquery.ui.effect-fold.js +78 -0
- data/vendor/assets/javascripts/jquery.ui.effect-highlight.js +52 -0
- data/vendor/assets/javascripts/jquery.ui.effect-pulsate.js +65 -0
- data/vendor/assets/javascripts/jquery.ui.effect-scale.js +320 -0
- data/vendor/assets/javascripts/jquery.ui.effect-shake.js +76 -0
- data/vendor/assets/javascripts/jquery.ui.effect-slide.js +66 -0
- data/vendor/assets/javascripts/jquery.ui.effect-transfer.js +49 -0
- data/vendor/assets/javascripts/jquery.ui.effect.all.js +14 -0
- data/vendor/assets/javascripts/jquery.ui.effect.js +1276 -0
- data/vendor/assets/javascripts/jquery.ui.menu.js +614 -0
- data/vendor/assets/javascripts/jquery.ui.mouse.js +22 -20
- data/vendor/assets/javascripts/jquery.ui.position.js +367 -158
- data/vendor/assets/javascripts/jquery.ui.progressbar.js +10 -14
- data/vendor/assets/javascripts/jquery.ui.resizable.js +143 -149
- data/vendor/assets/javascripts/jquery.ui.selectable.js +22 -28
- data/vendor/assets/javascripts/jquery.ui.slider.js +88 -106
- data/vendor/assets/javascripts/jquery.ui.sortable.js +97 -95
- data/vendor/assets/javascripts/jquery.ui.spinner.js +482 -0
- data/vendor/assets/javascripts/jquery.ui.tabs.js +1189 -580
- data/vendor/assets/javascripts/jquery.ui.tooltip.js +402 -0
- data/vendor/assets/javascripts/jquery.ui.widget.js +373 -117
- data/vendor/assets/stylesheets/jquery.ui.accordion.css.erb +10 -13
- data/vendor/assets/stylesheets/jquery.ui.all.css.erb +4 -3
- data/vendor/assets/stylesheets/jquery.ui.autocomplete.css.erb +10 -44
- data/vendor/assets/stylesheets/jquery.ui.base.css.erb +7 -3
- data/vendor/assets/stylesheets/jquery.ui.button.css.erb +6 -4
- data/vendor/assets/stylesheets/jquery.ui.core.css.erb +5 -4
- data/vendor/assets/stylesheets/jquery.ui.datepicker.css.erb +4 -3
- data/vendor/assets/stylesheets/jquery.ui.dialog.css.erb +6 -5
- data/vendor/assets/stylesheets/jquery.ui.menu.css.erb +34 -0
- data/vendor/assets/stylesheets/jquery.ui.progressbar.css.erb +4 -3
- data/vendor/assets/stylesheets/jquery.ui.resizable.css.erb +4 -3
- data/vendor/assets/stylesheets/jquery.ui.selectable.css.erb +4 -3
- data/vendor/assets/stylesheets/jquery.ui.slider.css.erb +4 -3
- data/vendor/assets/stylesheets/jquery.ui.spinner.css.erb +27 -0
- data/vendor/assets/stylesheets/jquery.ui.tabs.css.erb +8 -8
- data/vendor/assets/stylesheets/jquery.ui.theme.css.erb +8 -7
- data/vendor/assets/stylesheets/jquery.ui.tooltip.css.erb +25 -0
- metadata +24 -19
- data/dependencies.js +0 -31
- data/vendor/assets/javascripts/jquery.effects.all.js +0 -14
- data/vendor/assets/javascripts/jquery.effects.blind.js +0 -51
- data/vendor/assets/javascripts/jquery.effects.bounce.js +0 -80
- data/vendor/assets/javascripts/jquery.effects.clip.js +0 -56
- data/vendor/assets/javascripts/jquery.effects.core.js +0 -612
- data/vendor/assets/javascripts/jquery.effects.drop.js +0 -52
- data/vendor/assets/javascripts/jquery.effects.explode.js +0 -81
- data/vendor/assets/javascripts/jquery.effects.fade.js +0 -34
- data/vendor/assets/javascripts/jquery.effects.fold.js +0 -58
- data/vendor/assets/javascripts/jquery.effects.highlight.js +0 -52
- data/vendor/assets/javascripts/jquery.effects.pulsate.js +0 -53
- data/vendor/assets/javascripts/jquery.effects.scale.js +0 -180
- data/vendor/assets/javascripts/jquery.effects.shake.js +0 -59
- data/vendor/assets/javascripts/jquery.effects.slide.js +0 -52
- 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.
|
5
|
+
* jQuery UI Progressbar 1.9.2
|
6
|
+
* http://jqueryui.com
|
6
7
|
*
|
7
|
-
* Copyright 2012
|
8
|
-
*
|
8
|
+
* Copyright 2012 jQuery Foundation and other contributors
|
9
|
+
* Released under the MIT license.
|
9
10
|
* http://jquery.org/license
|
10
11
|
*
|
11
|
-
* http://
|
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
|
-
|
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
|
-
|
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
|
-
|
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.
|
6
|
+
* jQuery UI Resizable 1.9.2
|
7
|
+
* http://jqueryui.com
|
7
8
|
*
|
8
|
-
* Copyright 2012
|
9
|
-
*
|
9
|
+
* Copyright 2012 jQuery Foundation and other contributors
|
10
|
+
* Released under the MIT license.
|
10
11
|
* http://jquery.org/license
|
11
12
|
*
|
12
|
-
* http://
|
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
|
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 (!
|
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
|
-
|
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
|
-
.
|
179
|
+
.mouseenter(function() {
|
178
180
|
if (o.disabled) return;
|
179
181
|
$(this).removeClass("ui-resizable-autohide");
|
180
|
-
|
181
|
-
}
|
182
|
-
function(){
|
182
|
+
that._handles.show();
|
183
|
+
})
|
184
|
+
.mouseleave(function(){
|
183
185
|
if (o.disabled) return;
|
184
|
-
if (!
|
186
|
+
if (!that.resizing) {
|
185
187
|
$(this).addClass("ui-resizable-autohide");
|
186
|
-
|
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
|
-
|
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
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
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
|
-
|
271
|
-
|
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
|
-
|
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])
|
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,
|
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 :
|
325
|
-
soffsetw = ista ? 0 :
|
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: (
|
328
|
-
left = (parseInt(
|
329
|
-
top = (parseInt(
|
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
|
-
|
335
|
-
|
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
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
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
|
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
|
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
|
572
|
+
var that = $(this).data("resizable"), o = that.options, os = that.originalSize, op = that.originalPosition;
|
579
573
|
|
580
574
|
var delta = {
|
581
|
-
height: (
|
582
|
-
top: (
|
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
|
609
|
+
var that = $(this).data("resizable"), o = that.options;
|
616
610
|
|
617
|
-
var pr =
|
618
|
-
soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 :
|
619
|
-
soffsetw = ista ? 0 :
|
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: (
|
622
|
-
left = (parseInt(
|
623
|
-
top = (parseInt(
|
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
|
-
|
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(
|
633
|
-
height: parseInt(
|
634
|
-
top: parseInt(
|
635
|
-
left: parseInt(
|
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
|
-
|
642
|
-
|
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
|
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
|
-
|
652
|
+
that.containerElement = $(ce);
|
659
653
|
|
660
654
|
if (/document/.test(oc) || oc == document) {
|
661
|
-
|
662
|
-
|
655
|
+
that.containerOffset = { left: 0, top: 0 };
|
656
|
+
that.containerPosition = { left: 0, top: 0 };
|
663
657
|
|
664
|
-
|
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
|
-
|
676
|
-
|
677
|
-
|
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 =
|
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
|
-
|
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
|
690
|
-
ps =
|
691
|
-
pRatio =
|
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 < (
|
696
|
-
|
697
|
-
if (pRatio)
|
698
|
-
|
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 < (
|
702
|
-
|
703
|
-
if (pRatio)
|
704
|
-
|
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
|
-
|
708
|
-
|
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( (
|
711
|
-
hoset = Math.abs( (
|
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 =
|
714
|
-
|
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 -=
|
710
|
+
if(isParent && isOffsetRelative) woset -= that.parentData.left;
|
717
711
|
|
718
|
-
if (woset +
|
719
|
-
|
720
|
-
if (pRatio)
|
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 +
|
724
|
-
|
725
|
-
if (pRatio)
|
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
|
731
|
-
co =
|
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 = $(
|
727
|
+
var helper = $(that.helper), ho = helper.offset(), w = helper.outerWidth() - that.sizeDiff.width, h = helper.outerHeight() - that.sizeDiff.height;
|
734
728
|
|
735
|
-
if (
|
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 (
|
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
|
742
|
+
var that = $(this).data("resizable"), o = that.options, cs = that.size;
|
749
743
|
|
750
|
-
|
751
|
-
|
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
|
-
|
750
|
+
that.ghost.appendTo(that.helper);
|
757
751
|
|
758
752
|
},
|
759
753
|
|
760
754
|
resize: function(event, ui){
|
761
|
-
var
|
762
|
-
if (
|
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
|
767
|
-
if (
|
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
|
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
|
-
|
781
|
-
|
774
|
+
that.size.width = os.width + ox;
|
775
|
+
that.size.height = os.height + oy;
|
782
776
|
}
|
783
777
|
else if (/^(ne)$/.test(a)) {
|
784
|
-
|
785
|
-
|
786
|
-
|
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
|
-
|
790
|
-
|
791
|
-
|
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
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
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
|
|