jquery-ui-rails 4.2.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of jquery-ui-rails might be problematic. Click here for more details.
- data/History.md +6 -0
- data/README.md +69 -73
- data/Rakefile +28 -24
- data/VERSIONS.md +1 -0
- data/app/assets/javascripts/jquery-ui.js +37 -0
- data/app/assets/javascripts/{jquery.ui.accordion.js → jquery-ui/accordion.js} +62 -57
- data/app/assets/javascripts/{jquery.ui.autocomplete.js → jquery-ui/autocomplete.js} +70 -50
- data/app/assets/javascripts/{jquery.ui.button.js → jquery-ui/button.js} +41 -25
- data/app/assets/javascripts/{jquery.ui.core.js → jquery-ui/core.js} +106 -123
- data/app/assets/javascripts/jquery-ui/datepicker-af.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ar-DZ.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ar.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-az.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-be.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-bg.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-bs.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ca.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-cs.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-cy-GB.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-da.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-de.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-el.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-en-AU.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-en-GB.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-en-NZ.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-eo.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-es.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-et.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-eu.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fa.js +73 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fi.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fo.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CA.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CH.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fr.js +39 -0
- data/app/assets/javascripts/jquery-ui/datepicker-gl.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-he.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hi.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hr.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hu.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hy.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-id.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-is.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-it-CH.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-it.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ja.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ka.js +35 -0
- data/app/assets/javascripts/jquery-ui/datepicker-kk.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-km.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ko.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ky.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-lb.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-lt.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-lv.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-mk.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ml.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ms.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nb.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nl-BE.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nl.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nn.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-no.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-pl.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-pt-BR.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-pt.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-rm.js +35 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ro.js +40 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ru.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sk.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sl.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sq.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sr-SR.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sr.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sv.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ta.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-th.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-tj.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-tr.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-uk.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-vi.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-zh-CN.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-zh-HK.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-zh-TW.js +37 -0
- data/app/assets/javascripts/{jquery.ui.datepicker.js → jquery-ui/datepicker.js} +72 -37
- data/app/assets/javascripts/{jquery.ui.dialog.js → jquery-ui/dialog.js} +215 -180
- data/app/assets/javascripts/{jquery.ui.draggable.js → jquery-ui/draggable.js} +219 -161
- data/app/assets/javascripts/jquery-ui/droppable.js +421 -0
- data/app/assets/javascripts/{jquery.ui.effect-blind.js → jquery-ui/effect-blind.js} +20 -12
- data/app/assets/javascripts/{jquery.ui.effect-bounce.js → jquery-ui/effect-bounce.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-clip.js → jquery-ui/effect-clip.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-drop.js → jquery-ui/effect-drop.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-explode.js → jquery-ui/effect-explode.js} +20 -10
- data/app/assets/javascripts/{jquery.ui.effect-fade.js → jquery-ui/effect-fade.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-fold.js → jquery-ui/effect-fold.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-highlight.js → jquery-ui/effect-highlight.js} +18 -8
- data/app/assets/javascripts/jquery-ui/effect-puff.js +63 -0
- data/app/assets/javascripts/{jquery.ui.effect-pulsate.js → jquery-ui/effect-pulsate.js} +18 -8
- data/app/assets/javascripts/jquery-ui/effect-scale.js +92 -0
- data/app/assets/javascripts/{jquery.ui.effect-shake.js → jquery-ui/effect-shake.js} +19 -9
- data/app/assets/javascripts/{jquery.ui.effect-scale.js → jquery-ui/effect-size.js} +19 -104
- data/app/assets/javascripts/{jquery.ui.effect-slide.js → jquery-ui/effect-slide.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-transfer.js → jquery-ui/effect-transfer.js} +22 -12
- data/app/assets/javascripts/jquery-ui/effect.all.js +16 -0
- data/app/assets/javascripts/{jquery.ui.effect.js → jquery-ui/effect.js} +28 -20
- data/app/assets/javascripts/{jquery.ui.menu.js → jquery-ui/menu.js} +93 -80
- data/app/assets/javascripts/{jquery.ui.mouse.js → jquery-ui/mouse.js} +41 -23
- data/app/assets/javascripts/{jquery.ui.position.js → jquery-ui/position.js} +25 -12
- data/app/assets/javascripts/{jquery.ui.progressbar.js → jquery-ui/progressbar.js} +26 -12
- data/app/assets/javascripts/{jquery.ui.resizable.js → jquery-ui/resizable.js} +196 -146
- data/app/assets/javascripts/{jquery.ui.selectable.js → jquery-ui/selectable.js} +25 -15
- data/app/assets/javascripts/jquery-ui/selectmenu.js +560 -0
- data/app/assets/javascripts/{jquery.ui.slider.js → jquery-ui/slider.js} +43 -31
- data/app/assets/javascripts/{jquery.ui.sortable.js → jquery-ui/sortable.js} +71 -50
- data/app/assets/javascripts/{jquery.ui.spinner.js → jquery-ui/spinner.js} +46 -29
- data/app/assets/javascripts/{jquery.ui.tabs.js → jquery-ui/tabs.js} +69 -52
- data/app/assets/javascripts/{jquery.ui.tooltip.js → jquery-ui/tooltip.js} +97 -55
- data/app/assets/javascripts/{jquery.ui.widget.js → jquery-ui/widget.js} +52 -30
- data/app/assets/stylesheets/jquery-ui.css +1 -0
- data/app/assets/stylesheets/{jquery.ui.accordion.css.erb → jquery-ui/accordion.css.erb} +5 -7
- data/app/assets/stylesheets/{jquery.ui.all.css.erb → jquery-ui/all.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.autocomplete.css.erb → jquery-ui/autocomplete.css.erb} +4 -4
- data/app/assets/stylesheets/jquery-ui/base.css.erb +30 -0
- data/app/assets/stylesheets/{jquery.ui.button.css.erb → jquery-ui/button.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.core.css.erb → jquery-ui/core.css.erb} +4 -1
- data/app/assets/stylesheets/{jquery.ui.datepicker.css.erb → jquery-ui/datepicker.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.dialog.css.erb → jquery-ui/dialog.css.erb} +6 -5
- data/app/assets/stylesheets/jquery-ui/draggable.css.erb +16 -0
- data/app/assets/stylesheets/{jquery.ui.menu.css.erb → jquery-ui/menu.css.erb} +18 -34
- data/app/assets/stylesheets/{jquery.ui.progressbar.css.erb → jquery-ui/progressbar.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.resizable.css.erb → jquery-ui/resizable.css.erb} +5 -3
- data/app/assets/stylesheets/{jquery.ui.selectable.css.erb → jquery-ui/selectable.css.erb} +7 -3
- data/app/assets/stylesheets/jquery-ui/selectmenu.css.erb +64 -0
- data/app/assets/stylesheets/{jquery.ui.slider.css.erb → jquery-ui/slider.css.erb} +5 -3
- data/app/assets/stylesheets/jquery-ui/sortable.css.erb +16 -0
- data/app/assets/stylesheets/{jquery.ui.spinner.css.erb → jquery-ui/spinner.css.erb} +4 -4
- data/app/assets/stylesheets/{jquery.ui.tabs.css.erb → jquery-ui/tabs.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.theme.css.erb → jquery-ui/theme.css.erb} +1 -4
- data/app/assets/stylesheets/{jquery.ui.tooltip.css.erb → jquery-ui/tooltip.css.erb} +3 -3
- data/lib/jquery/ui/rails/version.rb +2 -2
- metadata +137 -129
- data/app/assets/javascripts/jquery.ui.all.js +0 -34
- data/app/assets/javascripts/jquery.ui.datepicker-af.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ar.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-az.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-be.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-bg.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-bs.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ca.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-cs.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-cy-GB.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-da.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-de.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-el.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-en-AU.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-en-GB.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-en-NZ.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-eo.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-es.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-et.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-eu.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fa.js +0 -59
- data/app/assets/javascripts/jquery.ui.datepicker-fi.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fo.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fr-CA.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fr-CH.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fr.js +0 -25
- data/app/assets/javascripts/jquery.ui.datepicker-gl.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-he.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hi.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hr.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hu.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hy.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-id.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-is.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-it.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ja.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ka.js +0 -21
- data/app/assets/javascripts/jquery.ui.datepicker-kk.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-km.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ko.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ky.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-lb.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-lt.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-lv.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-mk.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ml.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ms.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-nb.js +0 -22
- data/app/assets/javascripts/jquery.ui.datepicker-nl-BE.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-nl.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-nn.js +0 -22
- data/app/assets/javascripts/jquery.ui.datepicker-no.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-pl.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-pt-BR.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-pt.js +0 -22
- data/app/assets/javascripts/jquery.ui.datepicker-rm.js +0 -21
- data/app/assets/javascripts/jquery.ui.datepicker-ro.js +0 -26
- data/app/assets/javascripts/jquery.ui.datepicker-ru.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sk.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sl.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-sq.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sr-SR.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sr.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sv.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ta.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-th.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-tj.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-tr.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-uk.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-vi.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-zh-CN.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-zh-HK.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-zh-TW.js +0 -23
- data/app/assets/javascripts/jquery.ui.droppable.js +0 -394
- data/app/assets/javascripts/jquery.ui.effect.all.js +0 -14
- data/app/assets/stylesheets/jquery.ui.base.css.erb +0 -27
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery UI Position 1.
|
2
|
+
* jQuery UI Position 1.11.0
|
3
3
|
* http://jqueryui.com
|
4
4
|
*
|
5
5
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -8,11 +8,22 @@
|
|
8
8
|
*
|
9
9
|
* http://api.jqueryui.com/position/
|
10
10
|
*/
|
11
|
-
(function(
|
11
|
+
(function( factory ) {
|
12
|
+
if ( typeof define === "function" && define.amd ) {
|
13
|
+
|
14
|
+
// AMD. Register as an anonymous module.
|
15
|
+
define( [ "jquery" ], factory );
|
16
|
+
} else {
|
17
|
+
|
18
|
+
// Browser globals
|
19
|
+
factory( jQuery );
|
20
|
+
}
|
21
|
+
}(function( $ ) {
|
22
|
+
(function() {
|
12
23
|
|
13
24
|
$.ui = $.ui || {};
|
14
25
|
|
15
|
-
var cachedScrollbarWidth,
|
26
|
+
var cachedScrollbarWidth, supportsOffsetFractions,
|
16
27
|
max = Math.max,
|
17
28
|
abs = Math.abs,
|
18
29
|
round = Math.round,
|
@@ -225,7 +236,7 @@ $.fn.position = function( options ) {
|
|
225
236
|
position.top += myOffset[ 1 ];
|
226
237
|
|
227
238
|
// if the browser doesn't support fractions, then round for consistent results
|
228
|
-
if (
|
239
|
+
if ( !supportsOffsetFractions ) {
|
229
240
|
position.left = round( position.left );
|
230
241
|
position.top = round( position.top );
|
231
242
|
}
|
@@ -249,7 +260,7 @@ $.fn.position = function( options ) {
|
|
249
260
|
my: options.my,
|
250
261
|
at: options.at,
|
251
262
|
within: within,
|
252
|
-
elem
|
263
|
+
elem: elem
|
253
264
|
});
|
254
265
|
}
|
255
266
|
});
|
@@ -403,8 +414,7 @@ $.ui.position = {
|
|
403
414
|
if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
|
404
415
|
position.left += myOffset + atOffset + offset;
|
405
416
|
}
|
406
|
-
}
|
407
|
-
else if ( overRight > 0 ) {
|
417
|
+
} else if ( overRight > 0 ) {
|
408
418
|
newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
|
409
419
|
if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
|
410
420
|
position.left += myOffset + atOffset + offset;
|
@@ -438,8 +448,7 @@ $.ui.position = {
|
|
438
448
|
if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
|
439
449
|
position.top += myOffset + atOffset + offset;
|
440
450
|
}
|
441
|
-
}
|
442
|
-
else if ( overBottom > 0 ) {
|
451
|
+
} else if ( overBottom > 0 ) {
|
443
452
|
newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
|
444
453
|
if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
|
445
454
|
position.top += myOffset + atOffset + offset;
|
@@ -460,7 +469,7 @@ $.ui.position = {
|
|
460
469
|
};
|
461
470
|
|
462
471
|
// fraction support test
|
463
|
-
(function
|
472
|
+
(function() {
|
464
473
|
var testElement, testElementParent, testElementStyle, offsetLeft, i,
|
465
474
|
body = document.getElementsByTagName( "body" )[ 0 ],
|
466
475
|
div = document.createElement( "div" );
|
@@ -492,10 +501,14 @@ $.ui.position = {
|
|
492
501
|
div.style.cssText = "position: absolute; left: 10.7432222px;";
|
493
502
|
|
494
503
|
offsetLeft = $( div ).offset().left;
|
495
|
-
|
504
|
+
supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11;
|
496
505
|
|
497
506
|
testElement.innerHTML = "";
|
498
507
|
testElementParent.removeChild( testElement );
|
499
508
|
})();
|
500
509
|
|
501
|
-
}(
|
510
|
+
})();
|
511
|
+
|
512
|
+
return $.ui.position;
|
513
|
+
|
514
|
+
}));
|
@@ -1,8 +1,8 @@
|
|
1
|
-
//= require jquery
|
2
|
-
//= require jquery
|
1
|
+
//= require jquery-ui/core
|
2
|
+
//= require jquery-ui/widget
|
3
3
|
|
4
4
|
/*!
|
5
|
-
* jQuery UI Progressbar 1.
|
5
|
+
* jQuery UI Progressbar 1.11.0
|
6
6
|
* http://jqueryui.com
|
7
7
|
*
|
8
8
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -10,15 +10,25 @@
|
|
10
10
|
* http://jquery.org/license
|
11
11
|
*
|
12
12
|
* http://api.jqueryui.com/progressbar/
|
13
|
-
*
|
14
|
-
* Depends:
|
15
|
-
* jquery.ui.core.js
|
16
|
-
* jquery.ui.widget.js
|
17
13
|
*/
|
18
|
-
(function(
|
14
|
+
(function( factory ) {
|
15
|
+
if ( typeof define === "function" && define.amd ) {
|
16
|
+
|
17
|
+
// AMD. Register as an anonymous module.
|
18
|
+
define([
|
19
|
+
"jquery",
|
20
|
+
"./core",
|
21
|
+
"./widget"
|
22
|
+
], factory );
|
23
|
+
} else {
|
24
|
+
|
25
|
+
// Browser globals
|
26
|
+
factory( jQuery );
|
27
|
+
}
|
28
|
+
}(function( $ ) {
|
19
29
|
|
20
|
-
$.widget( "ui.progressbar", {
|
21
|
-
version: "1.
|
30
|
+
return $.widget( "ui.progressbar", {
|
31
|
+
version: "1.11.0",
|
22
32
|
options: {
|
23
33
|
max: 100,
|
24
34
|
value: 0,
|
@@ -100,7 +110,11 @@ $.widget( "ui.progressbar", {
|
|
100
110
|
// Don't allow a max less than min
|
101
111
|
value = Math.max( this.min, value );
|
102
112
|
}
|
103
|
-
|
113
|
+
if ( key === "disabled" ) {
|
114
|
+
this.element
|
115
|
+
.toggleClass( "ui-state-disabled", !!value )
|
116
|
+
.attr( "aria-disabled", value );
|
117
|
+
}
|
104
118
|
this._super( key, value );
|
105
119
|
},
|
106
120
|
|
@@ -145,4 +159,4 @@ $.widget( "ui.progressbar", {
|
|
145
159
|
}
|
146
160
|
});
|
147
161
|
|
148
|
-
})
|
162
|
+
}));
|
@@ -1,9 +1,9 @@
|
|
1
|
-
//= require jquery
|
2
|
-
//= require jquery
|
3
|
-
//= require jquery
|
1
|
+
//= require jquery-ui/core
|
2
|
+
//= require jquery-ui/widget
|
3
|
+
//= require jquery-ui/mouse
|
4
4
|
|
5
5
|
/*!
|
6
|
-
* jQuery UI Resizable 1.
|
6
|
+
* jQuery UI Resizable 1.11.0
|
7
7
|
* http://jqueryui.com
|
8
8
|
*
|
9
9
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -11,24 +11,26 @@
|
|
11
11
|
* http://jquery.org/license
|
12
12
|
*
|
13
13
|
* http://api.jqueryui.com/resizable/
|
14
|
-
*
|
15
|
-
* Depends:
|
16
|
-
* jquery.ui.core.js
|
17
|
-
* jquery.ui.mouse.js
|
18
|
-
* jquery.ui.widget.js
|
19
14
|
*/
|
20
|
-
(function(
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
15
|
+
(function( factory ) {
|
16
|
+
if ( typeof define === "function" && define.amd ) {
|
17
|
+
|
18
|
+
// AMD. Register as an anonymous module.
|
19
|
+
define([
|
20
|
+
"jquery",
|
21
|
+
"./core",
|
22
|
+
"./mouse",
|
23
|
+
"./widget"
|
24
|
+
], factory );
|
25
|
+
} else {
|
26
|
+
|
27
|
+
// Browser globals
|
28
|
+
factory( jQuery );
|
29
|
+
}
|
30
|
+
}(function( $ ) {
|
29
31
|
|
30
32
|
$.widget("ui.resizable", $.ui.mouse, {
|
31
|
-
version: "1.
|
33
|
+
version: "1.11.0",
|
32
34
|
widgetEventPrefix: "resize",
|
33
35
|
options: {
|
34
36
|
alsoResize: false,
|
@@ -54,6 +56,37 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
54
56
|
start: null,
|
55
57
|
stop: null
|
56
58
|
},
|
59
|
+
|
60
|
+
_num: function( value ) {
|
61
|
+
return parseInt( value, 10 ) || 0;
|
62
|
+
},
|
63
|
+
|
64
|
+
_isNumber: function( value ) {
|
65
|
+
return !isNaN( parseInt( value , 10 ) );
|
66
|
+
},
|
67
|
+
|
68
|
+
_hasScroll: function( el, a ) {
|
69
|
+
|
70
|
+
if ( $( el ).css( "overflow" ) === "hidden") {
|
71
|
+
return false;
|
72
|
+
}
|
73
|
+
|
74
|
+
var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
|
75
|
+
has = false;
|
76
|
+
|
77
|
+
if ( el[ scroll ] > 0 ) {
|
78
|
+
return true;
|
79
|
+
}
|
80
|
+
|
81
|
+
// TODO: determine which cases actually cause this to happen
|
82
|
+
// if the element doesn't have the scroll set, see if it's possible to
|
83
|
+
// set the scroll
|
84
|
+
el[ scroll ] = 1;
|
85
|
+
has = ( el[ scroll ] > 0 );
|
86
|
+
el[ scroll ] = 0;
|
87
|
+
return has;
|
88
|
+
},
|
89
|
+
|
57
90
|
_create: function() {
|
58
91
|
|
59
92
|
var n, i, handle, axis, hname,
|
@@ -69,10 +102,9 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
69
102
|
_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
|
70
103
|
});
|
71
104
|
|
72
|
-
//Wrap the element if it cannot hold child nodes
|
105
|
+
// Wrap the element if it cannot hold child nodes
|
73
106
|
if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
|
74
107
|
|
75
|
-
//Create a wrapper element and set the wrapper to the new current internal element
|
76
108
|
this.element.wrap(
|
77
109
|
$("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
|
78
110
|
position: this.element.css("position"),
|
@@ -83,30 +115,26 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
83
115
|
})
|
84
116
|
);
|
85
117
|
|
86
|
-
//Overwrite the original this.element
|
87
118
|
this.element = this.element.parent().data(
|
88
|
-
"ui-resizable", this.element.
|
119
|
+
"ui-resizable", this.element.resizable( "instance" )
|
89
120
|
);
|
90
121
|
|
91
122
|
this.elementIsWrapper = true;
|
92
123
|
|
93
|
-
//Move margins to the wrapper
|
94
124
|
this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
|
95
125
|
this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
|
96
|
-
|
97
|
-
//Prevent Safari textarea resize
|
126
|
+
// support: Safari
|
127
|
+
// Prevent Safari textarea resize
|
98
128
|
this.originalResizeStyle = this.originalElement.css("resize");
|
99
129
|
this.originalElement.css("resize", "none");
|
100
130
|
|
101
|
-
//Push the actual element to our proportionallyResize internal array
|
102
131
|
this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" }));
|
103
132
|
|
133
|
+
// support: IE9
|
104
134
|
// avoid IE jump (hard set the margin)
|
105
135
|
this.originalElement.css({ margin: this.originalElement.css("margin") });
|
106
136
|
|
107
|
-
// fix handlers offset
|
108
137
|
this._proportionallyResize();
|
109
|
-
|
110
138
|
}
|
111
139
|
|
112
140
|
this.handles = o.handles || (!$(".ui-resizable-handle", this.element).length ? "e,s,se" : { n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw" });
|
@@ -125,15 +153,13 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
125
153
|
hname = "ui-resizable-"+handle;
|
126
154
|
axis = $("<div class='ui-resizable-handle " + hname + "'></div>");
|
127
155
|
|
128
|
-
// Apply zIndex to all handles - see #7960
|
129
156
|
axis.css({ zIndex: o.zIndex });
|
130
157
|
|
131
|
-
//TODO : What's going on here?
|
158
|
+
// TODO : What's going on here?
|
132
159
|
if ("se" === handle) {
|
133
160
|
axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
|
134
161
|
}
|
135
162
|
|
136
|
-
//Insert into internal handles object and append to element
|
137
163
|
this.handles[handle] = ".ui-resizable-"+handle;
|
138
164
|
this.element.append(axis);
|
139
165
|
}
|
@@ -149,18 +175,15 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
149
175
|
for(i in this.handles) {
|
150
176
|
|
151
177
|
if(this.handles[i].constructor === String) {
|
152
|
-
this.handles[i] =
|
178
|
+
this.handles[i] = this.element.children( this.handles[ i ] ).first().show();
|
153
179
|
}
|
154
180
|
|
155
|
-
//Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
|
156
181
|
if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
|
157
182
|
|
158
183
|
axis = $(this.handles[i], this.element);
|
159
184
|
|
160
|
-
//Checking the correct pad and border
|
161
185
|
padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
|
162
186
|
|
163
|
-
//The padding type i have to apply...
|
164
187
|
padPos = [ "padding",
|
165
188
|
/ne|nw|n/.test(i) ? "Top" :
|
166
189
|
/se|sw|s/.test(i) ? "Bottom" :
|
@@ -172,31 +195,28 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
172
195
|
|
173
196
|
}
|
174
197
|
|
175
|
-
//TODO: What's that good for? There's not anything to be executed left
|
198
|
+
// TODO: What's that good for? There's not anything to be executed left
|
176
199
|
if(!$(this.handles[i]).length) {
|
177
200
|
continue;
|
178
201
|
}
|
179
202
|
}
|
180
203
|
};
|
181
204
|
|
182
|
-
//TODO: make renderAxis a prototype function
|
205
|
+
// TODO: make renderAxis a prototype function
|
183
206
|
this._renderAxis(this.element);
|
184
207
|
|
185
208
|
this._handles = $(".ui-resizable-handle", this.element)
|
186
209
|
.disableSelection();
|
187
210
|
|
188
|
-
//Matching axis name
|
189
211
|
this._handles.mouseover(function() {
|
190
212
|
if (!that.resizing) {
|
191
213
|
if (this.className) {
|
192
214
|
axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
|
193
215
|
}
|
194
|
-
//Axis, default = se
|
195
216
|
that.axis = axis && axis[1] ? axis[1] : "se";
|
196
217
|
}
|
197
218
|
});
|
198
219
|
|
199
|
-
//If we want to auto hide the elements
|
200
220
|
if (o.autoHide) {
|
201
221
|
this._handles.hide();
|
202
222
|
$(this.element)
|
@@ -219,7 +239,6 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
219
239
|
});
|
220
240
|
}
|
221
241
|
|
222
|
-
//Initialize the mouse interaction
|
223
242
|
this._mouseInit();
|
224
243
|
|
225
244
|
},
|
@@ -234,7 +253,7 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
234
253
|
.removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove();
|
235
254
|
};
|
236
255
|
|
237
|
-
//TODO: Unwrap at same DOM position
|
256
|
+
// TODO: Unwrap at same DOM position
|
238
257
|
if (this.elementIsWrapper) {
|
239
258
|
_destroy(this.element);
|
240
259
|
wrapper = this.element;
|
@@ -272,29 +291,20 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
272
291
|
|
273
292
|
var curleft, curtop, cursor,
|
274
293
|
o = this.options,
|
275
|
-
iniPos = this.element.position(),
|
276
294
|
el = this.element;
|
277
295
|
|
278
296
|
this.resizing = true;
|
279
297
|
|
280
|
-
// bugfix for http://dev.jquery.com/ticket/1749
|
281
|
-
if ( (/absolute/).test( el.css("position") ) ) {
|
282
|
-
el.css({ position: "absolute", top: el.css("top"), left: el.css("left") });
|
283
|
-
} else if (el.is(".ui-draggable")) {
|
284
|
-
el.css({ position: "absolute", top: iniPos.top, left: iniPos.left });
|
285
|
-
}
|
286
|
-
|
287
298
|
this._renderProxy();
|
288
299
|
|
289
|
-
curleft =
|
290
|
-
curtop =
|
300
|
+
curleft = this._num(this.helper.css("left"));
|
301
|
+
curtop = this._num(this.helper.css("top"));
|
291
302
|
|
292
303
|
if (o.containment) {
|
293
304
|
curleft += $(o.containment).scrollLeft() || 0;
|
294
305
|
curtop += $(o.containment).scrollTop() || 0;
|
295
306
|
}
|
296
307
|
|
297
|
-
//Store needed variables
|
298
308
|
this.offset = this.helper.offset();
|
299
309
|
this.position = { left: curleft, top: curtop };
|
300
310
|
this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: el.width(), height: el.height() };
|
@@ -303,7 +313,6 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
303
313
|
this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
|
304
314
|
this.originalMousePosition = { left: event.pageX, top: event.pageY };
|
305
315
|
|
306
|
-
//Aspect Ratio
|
307
316
|
this.aspectRatio = (typeof o.aspectRatio === "number") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
|
308
317
|
|
309
318
|
cursor = $(".ui-resizable-" + this.axis).css("cursor");
|
@@ -316,27 +325,29 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
316
325
|
|
317
326
|
_mouseDrag: function(event) {
|
318
327
|
|
319
|
-
//Increase performance, avoid regex
|
320
328
|
var data,
|
321
329
|
el = this.helper, props = {},
|
322
330
|
smp = this.originalMousePosition,
|
323
331
|
a = this.axis,
|
324
|
-
prevTop = this.position.top,
|
325
|
-
prevLeft = this.position.left,
|
326
|
-
prevWidth = this.size.width,
|
327
|
-
prevHeight = this.size.height,
|
328
332
|
dx = (event.pageX-smp.left)||0,
|
329
333
|
dy = (event.pageY-smp.top)||0,
|
330
334
|
trigger = this._change[a];
|
331
335
|
|
336
|
+
this.prevPosition = {
|
337
|
+
top: this.position.top,
|
338
|
+
left: this.position.left
|
339
|
+
};
|
340
|
+
this.prevSize = {
|
341
|
+
width: this.size.width,
|
342
|
+
height: this.size.height
|
343
|
+
};
|
344
|
+
|
332
345
|
if (!trigger) {
|
333
346
|
return false;
|
334
347
|
}
|
335
348
|
|
336
|
-
// Calculate the attrs that will be change
|
337
349
|
data = trigger.apply(this, [event, dx, dy]);
|
338
350
|
|
339
|
-
// Put this in the mouseDrag handler since the user can start pressing shift while resizing
|
340
351
|
this._updateVirtualBoundaries(event.shiftKey);
|
341
352
|
if (this._aspectRatio || event.shiftKey) {
|
342
353
|
data = this._updateRatio(data, event);
|
@@ -346,30 +357,28 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
346
357
|
|
347
358
|
this._updateCache(data);
|
348
359
|
|
349
|
-
// plugins callbacks need to be called first
|
350
360
|
this._propagate("resize", event);
|
351
361
|
|
352
|
-
if (this.position.top !==
|
362
|
+
if ( this.position.top !== this.prevPosition.top ) {
|
353
363
|
props.top = this.position.top + "px";
|
354
364
|
}
|
355
|
-
if (this.position.left !==
|
365
|
+
if ( this.position.left !== this.prevPosition.left ) {
|
356
366
|
props.left = this.position.left + "px";
|
357
367
|
}
|
358
|
-
if (this.size.width !==
|
368
|
+
if ( this.size.width !== this.prevSize.width ) {
|
359
369
|
props.width = this.size.width + "px";
|
360
370
|
}
|
361
|
-
if (this.size.height !==
|
371
|
+
if ( this.size.height !== this.prevSize.height ) {
|
362
372
|
props.height = this.size.height + "px";
|
363
373
|
}
|
364
|
-
el.css(props);
|
374
|
+
el.css( props );
|
365
375
|
|
366
|
-
if (!this._helper && this._proportionallyResizeElements.length) {
|
376
|
+
if ( !this._helper && this._proportionallyResizeElements.length ) {
|
367
377
|
this._proportionallyResize();
|
368
378
|
}
|
369
379
|
|
370
|
-
|
371
|
-
|
372
|
-
this._trigger("resize", event, this.ui());
|
380
|
+
if ( !$.isEmptyObject( props ) ) {
|
381
|
+
this._trigger( "resize", event, this.ui() );
|
373
382
|
}
|
374
383
|
|
375
384
|
return false;
|
@@ -385,7 +394,7 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
385
394
|
|
386
395
|
pr = this._proportionallyResizeElements;
|
387
396
|
ista = pr.length && (/textarea/i).test(pr[0].nodeName);
|
388
|
-
soffseth = ista &&
|
397
|
+
soffseth = ista && this._hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height;
|
389
398
|
soffsetw = ista ? 0 : that.sizeDiff.width;
|
390
399
|
|
391
400
|
s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) };
|
@@ -423,15 +432,13 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
423
432
|
o = this.options;
|
424
433
|
|
425
434
|
b = {
|
426
|
-
minWidth:
|
427
|
-
maxWidth:
|
428
|
-
minHeight:
|
429
|
-
maxHeight:
|
435
|
+
minWidth: this._isNumber(o.minWidth) ? o.minWidth : 0,
|
436
|
+
maxWidth: this._isNumber(o.maxWidth) ? o.maxWidth : Infinity,
|
437
|
+
minHeight: this._isNumber(o.minHeight) ? o.minHeight : 0,
|
438
|
+
maxHeight: this._isNumber(o.maxHeight) ? o.maxHeight : Infinity
|
430
439
|
};
|
431
440
|
|
432
441
|
if(this._aspectRatio || forceAspectRatio) {
|
433
|
-
// We want to create an enclosing box whose aspect ration is the requested one
|
434
|
-
// First, compute the "projected" size for each dimension based on the aspect ratio and other dimension
|
435
442
|
pMinWidth = b.minHeight * this.aspectRatio;
|
436
443
|
pMinHeight = b.minWidth / this.aspectRatio;
|
437
444
|
pMaxWidth = b.maxHeight * this.aspectRatio;
|
@@ -455,16 +462,16 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
455
462
|
|
456
463
|
_updateCache: function(data) {
|
457
464
|
this.offset = this.helper.offset();
|
458
|
-
if (
|
465
|
+
if (this._isNumber(data.left)) {
|
459
466
|
this.position.left = data.left;
|
460
467
|
}
|
461
|
-
if (
|
468
|
+
if (this._isNumber(data.top)) {
|
462
469
|
this.position.top = data.top;
|
463
470
|
}
|
464
|
-
if (
|
471
|
+
if (this._isNumber(data.height)) {
|
465
472
|
this.size.height = data.height;
|
466
473
|
}
|
467
|
-
if (
|
474
|
+
if (this._isNumber(data.width)) {
|
468
475
|
this.size.width = data.width;
|
469
476
|
}
|
470
477
|
},
|
@@ -475,9 +482,9 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
475
482
|
csize = this.size,
|
476
483
|
a = this.axis;
|
477
484
|
|
478
|
-
if (
|
485
|
+
if (this._isNumber(data.height)) {
|
479
486
|
data.width = (data.height * this.aspectRatio);
|
480
|
-
} else if (
|
487
|
+
} else if (this._isNumber(data.width)) {
|
481
488
|
data.height = (data.width / this.aspectRatio);
|
482
489
|
}
|
483
490
|
|
@@ -497,8 +504,8 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
497
504
|
|
498
505
|
var o = this._vBoundaries,
|
499
506
|
a = this.axis,
|
500
|
-
ismaxw =
|
501
|
-
isminw =
|
507
|
+
ismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = this._isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
|
508
|
+
isminw = this._isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = this._isNumber(data.height) && o.minHeight && (o.minHeight > data.height),
|
502
509
|
dw = this.originalPosition.left + this.originalSize.width,
|
503
510
|
dh = this.position.top + this.size.height,
|
504
511
|
cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
|
@@ -528,7 +535,7 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
528
535
|
data.top = dh - o.maxHeight;
|
529
536
|
}
|
530
537
|
|
531
|
-
//
|
538
|
+
// Fixing jump error on top/left - bug #2330
|
532
539
|
if (!data.width && !data.height && !data.left && data.top) {
|
533
540
|
data.top = null;
|
534
541
|
} else if (!data.width && !data.height && !data.top && data.left) {
|
@@ -642,7 +649,9 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
642
649
|
position: this.position,
|
643
650
|
size: this.size,
|
644
651
|
originalSize: this.originalSize,
|
645
|
-
originalPosition: this.originalPosition
|
652
|
+
originalPosition: this.originalPosition,
|
653
|
+
prevSize: this.prevSize,
|
654
|
+
prevPosition: this.prevPosition
|
646
655
|
};
|
647
656
|
}
|
648
657
|
|
@@ -655,11 +664,11 @@ $.widget("ui.resizable", $.ui.mouse, {
|
|
655
664
|
$.ui.plugin.add("resizable", "animate", {
|
656
665
|
|
657
666
|
stop: function( event ) {
|
658
|
-
var that = $(this).
|
667
|
+
var that = $(this).resizable( "instance" ),
|
659
668
|
o = that.options,
|
660
669
|
pr = that._proportionallyResizeElements,
|
661
670
|
ista = pr.length && (/textarea/i).test(pr[0].nodeName),
|
662
|
-
soffseth = ista &&
|
671
|
+
soffseth = ista && that._hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height,
|
663
672
|
soffsetw = ista ? 0 : that.sizeDiff.width,
|
664
673
|
style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
|
665
674
|
left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null,
|
@@ -693,136 +702,175 @@ $.ui.plugin.add("resizable", "animate", {
|
|
693
702
|
|
694
703
|
});
|
695
704
|
|
696
|
-
$.ui.plugin.add("resizable", "containment", {
|
705
|
+
$.ui.plugin.add( "resizable", "containment", {
|
697
706
|
|
698
707
|
start: function() {
|
699
708
|
var element, p, co, ch, cw, width, height,
|
700
|
-
that = $(this).
|
709
|
+
that = $( this ).resizable( "instance" ),
|
701
710
|
o = that.options,
|
702
711
|
el = that.element,
|
703
712
|
oc = o.containment,
|
704
|
-
ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
|
713
|
+
ce = ( oc instanceof $ ) ? oc.get( 0 ) : ( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;
|
705
714
|
|
706
|
-
if (!ce) {
|
715
|
+
if ( !ce ) {
|
707
716
|
return;
|
708
717
|
}
|
709
718
|
|
710
|
-
that.containerElement = $(ce);
|
719
|
+
that.containerElement = $( ce );
|
711
720
|
|
712
|
-
if (/document/.test(oc) || oc === document) {
|
713
|
-
that.containerOffset = {
|
714
|
-
|
721
|
+
if ( /document/.test( oc ) || oc === document ) {
|
722
|
+
that.containerOffset = {
|
723
|
+
left: 0,
|
724
|
+
top: 0
|
725
|
+
};
|
726
|
+
that.containerPosition = {
|
727
|
+
left: 0,
|
728
|
+
top: 0
|
729
|
+
};
|
715
730
|
|
716
731
|
that.parentData = {
|
717
|
-
element: $(document),
|
718
|
-
|
732
|
+
element: $( document ),
|
733
|
+
left: 0,
|
734
|
+
top: 0,
|
735
|
+
width: $( document ).width(),
|
736
|
+
height: $( document ).height() || document.body.parentNode.scrollHeight
|
719
737
|
};
|
720
|
-
}
|
721
|
-
|
722
|
-
// i'm a node, so compute top, left, right, bottom
|
723
|
-
else {
|
724
|
-
element = $(ce);
|
738
|
+
} else {
|
739
|
+
element = $( ce );
|
725
740
|
p = [];
|
726
|
-
$([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) {
|
741
|
+
$([ "Top", "Right", "Left", "Bottom" ]).each(function( i, name ) {
|
742
|
+
p[ i ] = that._num( element.css( "padding" + name ) );
|
743
|
+
});
|
727
744
|
|
728
745
|
that.containerOffset = element.offset();
|
729
746
|
that.containerPosition = element.position();
|
730
|
-
that.containerSize = {
|
747
|
+
that.containerSize = {
|
748
|
+
height: ( element.innerHeight() - p[ 3 ] ),
|
749
|
+
width: ( element.innerWidth() - p[ 1 ] )
|
750
|
+
};
|
731
751
|
|
732
752
|
co = that.containerOffset;
|
733
753
|
ch = that.containerSize.height;
|
734
754
|
cw = that.containerSize.width;
|
735
|
-
width = (
|
736
|
-
height = (
|
755
|
+
width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw );
|
756
|
+
height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ;
|
737
757
|
|
738
758
|
that.parentData = {
|
739
|
-
element: ce,
|
759
|
+
element: ce,
|
760
|
+
left: co.left,
|
761
|
+
top: co.top,
|
762
|
+
width: width,
|
763
|
+
height: height
|
740
764
|
};
|
741
765
|
}
|
742
766
|
},
|
743
767
|
|
744
|
-
resize: function( event ) {
|
768
|
+
resize: function( event, ui ) {
|
745
769
|
var woset, hoset, isParent, isOffsetRelative,
|
746
|
-
that = $(this).
|
770
|
+
that = $( this ).resizable( "instance" ),
|
747
771
|
o = that.options,
|
748
|
-
co = that.containerOffset,
|
772
|
+
co = that.containerOffset,
|
773
|
+
cp = that.position,
|
749
774
|
pRatio = that._aspectRatio || event.shiftKey,
|
750
|
-
cop = {
|
775
|
+
cop = {
|
776
|
+
top: 0,
|
777
|
+
left: 0
|
778
|
+
},
|
779
|
+
ce = that.containerElement,
|
780
|
+
continueResize = true;
|
751
781
|
|
752
|
-
if (ce[0] !== document && (/static/).test(ce.css("position"))) {
|
782
|
+
if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) {
|
753
783
|
cop = co;
|
754
784
|
}
|
755
785
|
|
756
|
-
if (cp.left < (that._helper ? co.left : 0)) {
|
757
|
-
that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));
|
758
|
-
if (pRatio) {
|
786
|
+
if ( cp.left < ( that._helper ? co.left : 0 ) ) {
|
787
|
+
that.size.width = that.size.width + ( that._helper ? ( that.position.left - co.left ) : ( that.position.left - cop.left ) );
|
788
|
+
if ( pRatio ) {
|
759
789
|
that.size.height = that.size.width / that.aspectRatio;
|
790
|
+
continueResize = false;
|
760
791
|
}
|
761
792
|
that.position.left = o.helper ? co.left : 0;
|
762
793
|
}
|
763
794
|
|
764
|
-
if (cp.top < (that._helper ? co.top : 0)) {
|
765
|
-
that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);
|
766
|
-
if (pRatio) {
|
795
|
+
if ( cp.top < ( that._helper ? co.top : 0 ) ) {
|
796
|
+
that.size.height = that.size.height + ( that._helper ? ( that.position.top - co.top ) : that.position.top );
|
797
|
+
if ( pRatio ) {
|
767
798
|
that.size.width = that.size.height * that.aspectRatio;
|
799
|
+
continueResize = false;
|
768
800
|
}
|
769
801
|
that.position.top = that._helper ? co.top : 0;
|
770
802
|
}
|
771
803
|
|
772
|
-
that.offset.left = that.parentData.left+that.position.left;
|
773
|
-
that.offset.top = that.parentData.top+that.position.top;
|
804
|
+
that.offset.left = that.parentData.left + that.position.left;
|
805
|
+
that.offset.top = that.parentData.top + that.position.top;
|
774
806
|
|
775
|
-
woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left -
|
776
|
-
hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
|
807
|
+
woset = Math.abs( ( that._helper ? that.offset.left - cop.left : ( that.offset.left - co.left ) ) + that.sizeDiff.width );
|
808
|
+
hoset = Math.abs( ( that._helper ? that.offset.top - cop.top : ( that.offset.top - co.top ) ) + that.sizeDiff.height );
|
777
809
|
|
778
|
-
isParent = that.containerElement.get(0) === that.element.parent().get(0);
|
779
|
-
isOffsetRelative = /relative|absolute/.test(that.containerElement.css("position"));
|
810
|
+
isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
|
811
|
+
isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );
|
780
812
|
|
781
813
|
if ( isParent && isOffsetRelative ) {
|
782
814
|
woset -= Math.abs( that.parentData.left );
|
783
815
|
}
|
784
816
|
|
785
|
-
if (woset + that.size.width >= that.parentData.width) {
|
817
|
+
if ( woset + that.size.width >= that.parentData.width ) {
|
786
818
|
that.size.width = that.parentData.width - woset;
|
787
|
-
if (pRatio) {
|
819
|
+
if ( pRatio ) {
|
788
820
|
that.size.height = that.size.width / that.aspectRatio;
|
821
|
+
continueResize = false;
|
789
822
|
}
|
790
823
|
}
|
791
824
|
|
792
|
-
if (hoset + that.size.height >= that.parentData.height) {
|
825
|
+
if ( hoset + that.size.height >= that.parentData.height ) {
|
793
826
|
that.size.height = that.parentData.height - hoset;
|
794
|
-
if (pRatio) {
|
827
|
+
if ( pRatio ) {
|
795
828
|
that.size.width = that.size.height * that.aspectRatio;
|
829
|
+
continueResize = false;
|
796
830
|
}
|
797
831
|
}
|
832
|
+
|
833
|
+
if ( !continueResize ){
|
834
|
+
that.position.left = ui.prevPosition.left;
|
835
|
+
that.position.top = ui.prevPosition.top;
|
836
|
+
that.size.width = ui.prevSize.width;
|
837
|
+
that.size.height = ui.prevSize.height;
|
838
|
+
}
|
798
839
|
},
|
799
840
|
|
800
841
|
stop: function(){
|
801
|
-
var that = $(this).
|
842
|
+
var that = $( this ).resizable( "instance" ),
|
802
843
|
o = that.options,
|
803
844
|
co = that.containerOffset,
|
804
845
|
cop = that.containerPosition,
|
805
846
|
ce = that.containerElement,
|
806
|
-
helper = $(that.helper),
|
847
|
+
helper = $( that.helper ),
|
807
848
|
ho = helper.offset(),
|
808
849
|
w = helper.outerWidth() - that.sizeDiff.width,
|
809
850
|
h = helper.outerHeight() - that.sizeDiff.height;
|
810
851
|
|
811
|
-
if (that._helper && !o.animate && (/relative/).test(ce.css("position"))) {
|
812
|
-
$(this).css({
|
852
|
+
if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) {
|
853
|
+
$( this ).css({
|
854
|
+
left: ho.left - cop.left - co.left,
|
855
|
+
width: w,
|
856
|
+
height: h
|
857
|
+
});
|
813
858
|
}
|
814
859
|
|
815
|
-
if (that._helper && !o.animate && (/static/).test(ce.css("position"))) {
|
816
|
-
$(this).css({
|
860
|
+
if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) {
|
861
|
+
$( this ).css({
|
862
|
+
left: ho.left - cop.left - co.left,
|
863
|
+
width: w,
|
864
|
+
height: h
|
865
|
+
});
|
817
866
|
}
|
818
|
-
|
819
867
|
}
|
820
868
|
});
|
821
869
|
|
822
870
|
$.ui.plugin.add("resizable", "alsoResize", {
|
823
871
|
|
824
872
|
start: function () {
|
825
|
-
var that = $(this).
|
873
|
+
var that = $(this).resizable( "instance" ),
|
826
874
|
o = that.options,
|
827
875
|
_store = function (exp) {
|
828
876
|
$(exp).each(function() {
|
@@ -843,7 +891,7 @@ $.ui.plugin.add("resizable", "alsoResize", {
|
|
843
891
|
},
|
844
892
|
|
845
893
|
resize: function (event, ui) {
|
846
|
-
var that = $(this).
|
894
|
+
var that = $(this).resizable( "instance" ),
|
847
895
|
o = that.options,
|
848
896
|
os = that.originalSize,
|
849
897
|
op = that.originalPosition,
|
@@ -884,7 +932,7 @@ $.ui.plugin.add("resizable", "ghost", {
|
|
884
932
|
|
885
933
|
start: function() {
|
886
934
|
|
887
|
-
var that = $(this).
|
935
|
+
var that = $(this).resizable( "instance" ), o = that.options, cs = that.size;
|
888
936
|
|
889
937
|
that.ghost = that.originalElement.clone();
|
890
938
|
that.ghost
|
@@ -897,14 +945,14 @@ $.ui.plugin.add("resizable", "ghost", {
|
|
897
945
|
},
|
898
946
|
|
899
947
|
resize: function(){
|
900
|
-
var that = $(this).
|
948
|
+
var that = $(this).resizable( "instance" );
|
901
949
|
if (that.ghost) {
|
902
950
|
that.ghost.css({ position: "relative", height: that.size.height, width: that.size.width });
|
903
951
|
}
|
904
952
|
},
|
905
953
|
|
906
954
|
stop: function() {
|
907
|
-
var that = $(this).
|
955
|
+
var that = $(this).resizable( "instance" );
|
908
956
|
if (that.ghost && that.helper) {
|
909
957
|
that.helper.get(0).removeChild(that.ghost.get(0));
|
910
958
|
}
|
@@ -915,7 +963,7 @@ $.ui.plugin.add("resizable", "ghost", {
|
|
915
963
|
$.ui.plugin.add("resizable", "grid", {
|
916
964
|
|
917
965
|
resize: function() {
|
918
|
-
var that = $(this).
|
966
|
+
var that = $(this).resizable( "instance" ),
|
919
967
|
o = that.options,
|
920
968
|
cs = that.size,
|
921
969
|
os = that.originalSize,
|
@@ -979,4 +1027,6 @@ $.ui.plugin.add("resizable", "grid", {
|
|
979
1027
|
|
980
1028
|
});
|
981
1029
|
|
982
|
-
|
1030
|
+
return $.ui.resizable;
|
1031
|
+
|
1032
|
+
}));
|