jquery-ui-rails 0.4.0 → 0.4.1

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 (137) hide show
  1. data/.gitignore +0 -1
  2. data/History.md +6 -0
  3. data/README.md +1 -0
  4. data/Rakefile +13 -2
  5. data/lib/jquery/ui/rails/version.rb +1 -1
  6. data/vendor/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  7. data/vendor/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  8. data/vendor/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  9. data/vendor/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  10. data/vendor/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  11. data/vendor/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  12. data/vendor/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  13. data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  14. data/vendor/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  15. data/vendor/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  16. data/vendor/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  17. data/vendor/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
  18. data/vendor/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  19. data/vendor/assets/javascripts/jquery.effects.all.js +14 -0
  20. data/vendor/assets/javascripts/jquery.effects.blind.js +51 -0
  21. data/vendor/assets/javascripts/jquery.effects.bounce.js +80 -0
  22. data/vendor/assets/javascripts/jquery.effects.clip.js +56 -0
  23. data/vendor/assets/javascripts/jquery.effects.core.js +763 -0
  24. data/vendor/assets/javascripts/jquery.effects.drop.js +52 -0
  25. data/vendor/assets/javascripts/jquery.effects.explode.js +81 -0
  26. data/vendor/assets/javascripts/jquery.effects.fade.js +34 -0
  27. data/vendor/assets/javascripts/jquery.effects.fold.js +58 -0
  28. data/vendor/assets/javascripts/jquery.effects.highlight.js +52 -0
  29. data/vendor/assets/javascripts/jquery.effects.pulsate.js +53 -0
  30. data/vendor/assets/javascripts/jquery.effects.scale.js +180 -0
  31. data/vendor/assets/javascripts/jquery.effects.shake.js +59 -0
  32. data/vendor/assets/javascripts/jquery.effects.slide.js +52 -0
  33. data/vendor/assets/javascripts/jquery.effects.transfer.js +47 -0
  34. data/vendor/assets/javascripts/jquery.ui.accordion.js +614 -0
  35. data/vendor/assets/javascripts/jquery.ui.all.js +31 -0
  36. data/vendor/assets/javascripts/jquery.ui.autocomplete.js +635 -0
  37. data/vendor/assets/javascripts/jquery.ui.button.js +417 -0
  38. data/vendor/assets/javascripts/jquery.ui.core.js +321 -0
  39. data/vendor/assets/javascripts/jquery.ui.datepicker-af.js +25 -0
  40. data/vendor/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +25 -0
  41. data/vendor/assets/javascripts/jquery.ui.datepicker-ar.js +25 -0
  42. data/vendor/assets/javascripts/jquery.ui.datepicker-az.js +25 -0
  43. data/vendor/assets/javascripts/jquery.ui.datepicker-bg.js +26 -0
  44. data/vendor/assets/javascripts/jquery.ui.datepicker-bs.js +25 -0
  45. data/vendor/assets/javascripts/jquery.ui.datepicker-ca.js +25 -0
  46. data/vendor/assets/javascripts/jquery.ui.datepicker-cs.js +25 -0
  47. data/vendor/assets/javascripts/jquery.ui.datepicker-cy-GB.js +25 -0
  48. data/vendor/assets/javascripts/jquery.ui.datepicker-da.js +25 -0
  49. data/vendor/assets/javascripts/jquery.ui.datepicker-de.js +25 -0
  50. data/vendor/assets/javascripts/jquery.ui.datepicker-el.js +25 -0
  51. data/vendor/assets/javascripts/jquery.ui.datepicker-en-AU.js +25 -0
  52. data/vendor/assets/javascripts/jquery.ui.datepicker-en-GB.js +25 -0
  53. data/vendor/assets/javascripts/jquery.ui.datepicker-en-NZ.js +25 -0
  54. data/vendor/assets/javascripts/jquery.ui.datepicker-eo.js +25 -0
  55. data/vendor/assets/javascripts/jquery.ui.datepicker-es.js +25 -0
  56. data/vendor/assets/javascripts/jquery.ui.datepicker-et.js +25 -0
  57. data/vendor/assets/javascripts/jquery.ui.datepicker-eu.js +25 -0
  58. data/vendor/assets/javascripts/jquery.ui.datepicker-fa.js +61 -0
  59. data/vendor/assets/javascripts/jquery.ui.datepicker-fi.js +25 -0
  60. data/vendor/assets/javascripts/jquery.ui.datepicker-fo.js +25 -0
  61. data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +25 -0
  62. data/vendor/assets/javascripts/jquery.ui.datepicker-fr.js +27 -0
  63. data/vendor/assets/javascripts/jquery.ui.datepicker-ge.js +23 -0
  64. data/vendor/assets/javascripts/jquery.ui.datepicker-gl.js +25 -0
  65. data/vendor/assets/javascripts/jquery.ui.datepicker-he.js +25 -0
  66. data/vendor/assets/javascripts/jquery.ui.datepicker-hi.js +25 -0
  67. data/vendor/assets/javascripts/jquery.ui.datepicker-hr.js +25 -0
  68. data/vendor/assets/javascripts/jquery.ui.datepicker-hu.js +25 -0
  69. data/vendor/assets/javascripts/jquery.ui.datepicker-hy.js +25 -0
  70. data/vendor/assets/javascripts/jquery.ui.datepicker-id.js +25 -0
  71. data/vendor/assets/javascripts/jquery.ui.datepicker-is.js +25 -0
  72. data/vendor/assets/javascripts/jquery.ui.datepicker-it.js +25 -0
  73. data/vendor/assets/javascripts/jquery.ui.datepicker-ja.js +25 -0
  74. data/vendor/assets/javascripts/jquery.ui.datepicker-kk.js +25 -0
  75. data/vendor/assets/javascripts/jquery.ui.datepicker-km.js +25 -0
  76. data/vendor/assets/javascripts/jquery.ui.datepicker-ko.js +25 -0
  77. data/vendor/assets/javascripts/jquery.ui.datepicker-lb.js +25 -0
  78. data/vendor/assets/javascripts/jquery.ui.datepicker-lt.js +25 -0
  79. data/vendor/assets/javascripts/jquery.ui.datepicker-lv.js +25 -0
  80. data/vendor/assets/javascripts/jquery.ui.datepicker-mk.js +25 -0
  81. data/vendor/assets/javascripts/jquery.ui.datepicker-ml.js +25 -0
  82. data/vendor/assets/javascripts/jquery.ui.datepicker-ms.js +25 -0
  83. data/vendor/assets/javascripts/jquery.ui.datepicker-nl-BE.js +25 -0
  84. data/vendor/assets/javascripts/jquery.ui.datepicker-nl.js +25 -0
  85. data/vendor/assets/javascripts/jquery.ui.datepicker-no.js +25 -0
  86. data/vendor/assets/javascripts/jquery.ui.datepicker-pl.js +25 -0
  87. data/vendor/assets/javascripts/jquery.ui.datepicker-pt-BR.js +25 -0
  88. data/vendor/assets/javascripts/jquery.ui.datepicker-pt.js +24 -0
  89. data/vendor/assets/javascripts/jquery.ui.datepicker-rm.js +23 -0
  90. data/vendor/assets/javascripts/jquery.ui.datepicker-ro.js +28 -0
  91. data/vendor/assets/javascripts/jquery.ui.datepicker-ru.js +25 -0
  92. data/vendor/assets/javascripts/jquery.ui.datepicker-sk.js +25 -0
  93. data/vendor/assets/javascripts/jquery.ui.datepicker-sl.js +26 -0
  94. data/vendor/assets/javascripts/jquery.ui.datepicker-sq.js +25 -0
  95. data/vendor/assets/javascripts/jquery.ui.datepicker-sr-SR.js +25 -0
  96. data/vendor/assets/javascripts/jquery.ui.datepicker-sr.js +25 -0
  97. data/vendor/assets/javascripts/jquery.ui.datepicker-sv.js +25 -0
  98. data/vendor/assets/javascripts/jquery.ui.datepicker-ta.js +25 -0
  99. data/vendor/assets/javascripts/jquery.ui.datepicker-th.js +25 -0
  100. data/vendor/assets/javascripts/jquery.ui.datepicker-tj.js +25 -0
  101. data/vendor/assets/javascripts/jquery.ui.datepicker-tr.js +25 -0
  102. data/vendor/assets/javascripts/jquery.ui.datepicker-uk.js +26 -0
  103. data/vendor/assets/javascripts/jquery.ui.datepicker-vi.js +25 -0
  104. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-CN.js +25 -0
  105. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-HK.js +25 -0
  106. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-TW.js +25 -0
  107. data/vendor/assets/javascripts/jquery.ui.datepicker.js +1826 -0
  108. data/vendor/assets/javascripts/jquery.ui.dialog.js +882 -0
  109. data/vendor/assets/javascripts/jquery.ui.draggable.js +835 -0
  110. data/vendor/assets/javascripts/jquery.ui.droppable.js +301 -0
  111. data/vendor/assets/javascripts/jquery.ui.mouse.js +168 -0
  112. data/vendor/assets/javascripts/jquery.ui.position.js +298 -0
  113. data/vendor/assets/javascripts/jquery.ui.progressbar.js +112 -0
  114. data/vendor/assets/javascripts/jquery.ui.resizable.js +811 -0
  115. data/vendor/assets/javascripts/jquery.ui.selectable.js +271 -0
  116. data/vendor/assets/javascripts/jquery.ui.slider.js +666 -0
  117. data/vendor/assets/javascripts/jquery.ui.sortable.js +1085 -0
  118. data/vendor/assets/javascripts/jquery.ui.tabs.js +760 -0
  119. data/vendor/assets/javascripts/jquery.ui.widget.js +272 -0
  120. data/vendor/assets/stylesheets/jquery.ui.accordion.css.erb +23 -0
  121. data/vendor/assets/stylesheets/jquery.ui.all.css.erb +13 -0
  122. data/vendor/assets/stylesheets/jquery.ui.autocomplete.css.erb +57 -0
  123. data/vendor/assets/stylesheets/jquery.ui.base.css.erb +23 -0
  124. data/vendor/assets/stylesheets/jquery.ui.button.css.erb +42 -0
  125. data/vendor/assets/stylesheets/jquery.ui.core.css.erb +38 -0
  126. data/vendor/assets/stylesheets/jquery.ui.datepicker.css.erb +72 -0
  127. data/vendor/assets/stylesheets/jquery.ui.dialog.css.erb +25 -0
  128. data/vendor/assets/stylesheets/jquery.ui.progressbar.css.erb +15 -0
  129. data/vendor/assets/stylesheets/jquery.ui.resizable.css.erb +24 -0
  130. data/vendor/assets/stylesheets/jquery.ui.selectable.css.erb +14 -0
  131. data/vendor/assets/stylesheets/jquery.ui.slider.css.erb +28 -0
  132. data/vendor/assets/stylesheets/jquery.ui.tabs.css.erb +22 -0
  133. data/vendor/assets/stylesheets/jquery.ui.theme.css.erb +250 -0
  134. metadata +111 -113
  135. data/jquery-ui/GPL-LICENSE.txt +0 -278
  136. data/jquery-ui/MIT-LICENSE.txt +0 -25
  137. data/jquery-ui/package.json +0 -36
@@ -0,0 +1,52 @@
1
+ //= require jquery.effects.core
2
+
3
+ /*!
4
+ * jQuery UI Effects Drop 1.8.20
5
+ *
6
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
7
+ * Dual licensed under the MIT or GPL Version 2 licenses.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://docs.jquery.com/UI/Effects/Drop
11
+ *
12
+ * Depends:
13
+ * jquery.effects.core.js
14
+ */
15
+ (function( $, undefined ) {
16
+
17
+ $.effects.drop = function(o) {
18
+
19
+ return this.queue(function() {
20
+
21
+ // Create element
22
+ var el = $(this), props = ['position','top','bottom','left','right','opacity'];
23
+
24
+ // Set options
25
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
26
+ var direction = o.options.direction || 'left'; // Default Direction
27
+
28
+ // Adjust
29
+ $.effects.save(el, props); el.show(); // Save & Show
30
+ $.effects.createWrapper(el); // Create Wrapper
31
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
32
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
33
+ var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 2 : el.outerWidth({margin:true}) / 2);
34
+ if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
35
+
36
+ // Animation
37
+ var animation = {opacity: mode == 'show' ? 1 : 0};
38
+ animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
39
+
40
+ // Animate
41
+ el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
42
+ if(mode == 'hide') el.hide(); // Hide
43
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
44
+ if(o.callback) o.callback.apply(this, arguments); // Callback
45
+ el.dequeue();
46
+ }});
47
+
48
+ });
49
+
50
+ };
51
+
52
+ })(jQuery);
@@ -0,0 +1,81 @@
1
+ //= require jquery.effects.core
2
+
3
+ /*!
4
+ * jQuery UI Effects Explode 1.8.20
5
+ *
6
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
7
+ * Dual licensed under the MIT or GPL Version 2 licenses.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://docs.jquery.com/UI/Effects/Explode
11
+ *
12
+ * Depends:
13
+ * jquery.effects.core.js
14
+ */
15
+ (function( $, undefined ) {
16
+
17
+ $.effects.explode = function(o) {
18
+
19
+ return this.queue(function() {
20
+
21
+ var rows = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
22
+ var cells = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
23
+
24
+ o.options.mode = o.options.mode == 'toggle' ? ($(this).is(':visible') ? 'hide' : 'show') : o.options.mode;
25
+ var el = $(this).show().css('visibility', 'hidden');
26
+ var offset = el.offset();
27
+
28
+ //Substract the margins - not fixing the problem yet.
29
+ offset.top -= parseInt(el.css("marginTop"),10) || 0;
30
+ offset.left -= parseInt(el.css("marginLeft"),10) || 0;
31
+
32
+ var width = el.outerWidth(true);
33
+ var height = el.outerHeight(true);
34
+
35
+ for(var i=0;i<rows;i++) { // =
36
+ for(var j=0;j<cells;j++) { // ||
37
+ el
38
+ .clone()
39
+ .appendTo('body')
40
+ .wrap('<div></div>')
41
+ .css({
42
+ position: 'absolute',
43
+ visibility: 'visible',
44
+ left: -j*(width/cells),
45
+ top: -i*(height/rows)
46
+ })
47
+ .parent()
48
+ .addClass('ui-effects-explode')
49
+ .css({
50
+ position: 'absolute',
51
+ overflow: 'hidden',
52
+ width: width/cells,
53
+ height: height/rows,
54
+ left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? (j-Math.floor(cells/2))*(width/cells) : 0),
55
+ top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? (i-Math.floor(rows/2))*(height/rows) : 0),
56
+ opacity: o.options.mode == 'show' ? 0 : 1
57
+ }).animate({
58
+ left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? 0 : (j-Math.floor(cells/2))*(width/cells)),
59
+ top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? 0 : (i-Math.floor(rows/2))*(height/rows)),
60
+ opacity: o.options.mode == 'show' ? 1 : 0
61
+ }, o.duration || 500);
62
+ }
63
+ }
64
+
65
+ // Set a timeout, to call the callback approx. when the other animations have finished
66
+ setTimeout(function() {
67
+
68
+ o.options.mode == 'show' ? el.css({ visibility: 'visible' }) : el.css({ visibility: 'visible' }).hide();
69
+ if(o.callback) o.callback.apply(el[0]); // Callback
70
+ el.dequeue();
71
+
72
+ $('div.ui-effects-explode').remove();
73
+
74
+ }, o.duration || 500);
75
+
76
+
77
+ });
78
+
79
+ };
80
+
81
+ })(jQuery);
@@ -0,0 +1,34 @@
1
+ //= require jquery.effects.core
2
+
3
+ /*!
4
+ * jQuery UI Effects Fade 1.8.20
5
+ *
6
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
7
+ * Dual licensed under the MIT or GPL Version 2 licenses.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://docs.jquery.com/UI/Effects/Fade
11
+ *
12
+ * Depends:
13
+ * jquery.effects.core.js
14
+ */
15
+ (function( $, undefined ) {
16
+
17
+ $.effects.fade = function(o) {
18
+ return this.queue(function() {
19
+ var elem = $(this),
20
+ mode = $.effects.setMode(elem, o.options.mode || 'hide');
21
+
22
+ elem.animate({ opacity: mode }, {
23
+ queue: false,
24
+ duration: o.duration,
25
+ easing: o.options.easing,
26
+ complete: function() {
27
+ (o.callback && o.callback.apply(this, arguments));
28
+ elem.dequeue();
29
+ }
30
+ });
31
+ });
32
+ };
33
+
34
+ })(jQuery);
@@ -0,0 +1,58 @@
1
+ //= require jquery.effects.core
2
+
3
+ /*!
4
+ * jQuery UI Effects Fold 1.8.20
5
+ *
6
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
7
+ * Dual licensed under the MIT or GPL Version 2 licenses.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://docs.jquery.com/UI/Effects/Fold
11
+ *
12
+ * Depends:
13
+ * jquery.effects.core.js
14
+ */
15
+ (function( $, undefined ) {
16
+
17
+ $.effects.fold = function(o) {
18
+
19
+ return this.queue(function() {
20
+
21
+ // Create element
22
+ var el = $(this), props = ['position','top','bottom','left','right'];
23
+
24
+ // Set options
25
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
26
+ var size = o.options.size || 15; // Default fold size
27
+ var horizFirst = !(!o.options.horizFirst); // Ensure a boolean value
28
+ var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2;
29
+
30
+ // Adjust
31
+ $.effects.save(el, props); el.show(); // Save & Show
32
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
33
+ var widthFirst = ((mode == 'show') != horizFirst);
34
+ var ref = widthFirst ? ['width', 'height'] : ['height', 'width'];
35
+ var distance = widthFirst ? [wrapper.width(), wrapper.height()] : [wrapper.height(), wrapper.width()];
36
+ var percent = /([0-9]+)%/.exec(size);
37
+ if(percent) size = parseInt(percent[1],10) / 100 * distance[mode == 'hide' ? 0 : 1];
38
+ if(mode == 'show') wrapper.css(horizFirst ? {height: 0, width: size} : {height: size, width: 0}); // Shift
39
+
40
+ // Animation
41
+ var animation1 = {}, animation2 = {};
42
+ animation1[ref[0]] = mode == 'show' ? distance[0] : size;
43
+ animation2[ref[1]] = mode == 'show' ? distance[1] : 0;
44
+
45
+ // Animate
46
+ wrapper.animate(animation1, duration, o.options.easing)
47
+ .animate(animation2, duration, o.options.easing, function() {
48
+ if(mode == 'hide') el.hide(); // Hide
49
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
50
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
51
+ el.dequeue();
52
+ });
53
+
54
+ });
55
+
56
+ };
57
+
58
+ })(jQuery);
@@ -0,0 +1,52 @@
1
+ //= require jquery.effects.core
2
+
3
+ /*!
4
+ * jQuery UI Effects Highlight 1.8.20
5
+ *
6
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
7
+ * Dual licensed under the MIT or GPL Version 2 licenses.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://docs.jquery.com/UI/Effects/Highlight
11
+ *
12
+ * Depends:
13
+ * jquery.effects.core.js
14
+ */
15
+ (function( $, undefined ) {
16
+
17
+ $.effects.highlight = function(o) {
18
+ return this.queue(function() {
19
+ var elem = $(this),
20
+ props = ['backgroundImage', 'backgroundColor', 'opacity'],
21
+ mode = $.effects.setMode(elem, o.options.mode || 'show'),
22
+ animation = {
23
+ backgroundColor: elem.css('backgroundColor')
24
+ };
25
+
26
+ if (mode == 'hide') {
27
+ animation.opacity = 0;
28
+ }
29
+
30
+ $.effects.save(elem, props);
31
+ elem
32
+ .show()
33
+ .css({
34
+ backgroundImage: 'none',
35
+ backgroundColor: o.options.color || '#ffff99'
36
+ })
37
+ .animate(animation, {
38
+ queue: false,
39
+ duration: o.duration,
40
+ easing: o.options.easing,
41
+ complete: function() {
42
+ (mode == 'hide' && elem.hide());
43
+ $.effects.restore(elem, props);
44
+ (mode == 'show' && !$.support.opacity && this.style.removeAttribute('filter'));
45
+ (o.callback && o.callback.apply(this, arguments));
46
+ elem.dequeue();
47
+ }
48
+ });
49
+ });
50
+ };
51
+
52
+ })(jQuery);
@@ -0,0 +1,53 @@
1
+ //= require jquery.effects.core
2
+
3
+ /*!
4
+ * jQuery UI Effects Pulsate 1.8.20
5
+ *
6
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
7
+ * Dual licensed under the MIT or GPL Version 2 licenses.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://docs.jquery.com/UI/Effects/Pulsate
11
+ *
12
+ * Depends:
13
+ * jquery.effects.core.js
14
+ */
15
+ (function( $, undefined ) {
16
+
17
+ $.effects.pulsate = function(o) {
18
+ return this.queue(function() {
19
+ var elem = $(this),
20
+ mode = $.effects.setMode(elem, o.options.mode || 'show'),
21
+ times = ((o.options.times || 5) * 2) - 1,
22
+ duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2,
23
+ isVisible = elem.is(':visible'),
24
+ animateTo = 0;
25
+
26
+ if (!isVisible) {
27
+ elem.css('opacity', 0).show();
28
+ animateTo = 1;
29
+ }
30
+
31
+ if ((mode == 'hide' && isVisible) || (mode == 'show' && !isVisible)) {
32
+ times--;
33
+ }
34
+
35
+ for (var i = 0; i < times; i++) {
36
+ elem.animate({ opacity: animateTo }, duration, o.options.easing);
37
+ animateTo = (animateTo + 1) % 2;
38
+ }
39
+
40
+ elem.animate({ opacity: animateTo }, duration, o.options.easing, function() {
41
+ if (animateTo == 0) {
42
+ elem.hide();
43
+ }
44
+ (o.callback && o.callback.apply(this, arguments));
45
+ });
46
+
47
+ elem
48
+ .queue('fx', function() { elem.dequeue(); })
49
+ .dequeue();
50
+ });
51
+ };
52
+
53
+ })(jQuery);
@@ -0,0 +1,180 @@
1
+ //= require jquery.effects.core
2
+
3
+ /*!
4
+ * jQuery UI Effects Scale 1.8.20
5
+ *
6
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
7
+ * Dual licensed under the MIT or GPL Version 2 licenses.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://docs.jquery.com/UI/Effects/Scale
11
+ *
12
+ * Depends:
13
+ * jquery.effects.core.js
14
+ */
15
+ (function( $, undefined ) {
16
+
17
+ $.effects.puff = function(o) {
18
+ return this.queue(function() {
19
+ var elem = $(this),
20
+ mode = $.effects.setMode(elem, o.options.mode || 'hide'),
21
+ percent = parseInt(o.options.percent, 10) || 150,
22
+ factor = percent / 100,
23
+ original = { height: elem.height(), width: elem.width() };
24
+
25
+ $.extend(o.options, {
26
+ fade: true,
27
+ mode: mode,
28
+ percent: mode == 'hide' ? percent : 100,
29
+ from: mode == 'hide'
30
+ ? original
31
+ : {
32
+ height: original.height * factor,
33
+ width: original.width * factor
34
+ }
35
+ });
36
+
37
+ elem.effect('scale', o.options, o.duration, o.callback);
38
+ elem.dequeue();
39
+ });
40
+ };
41
+
42
+ $.effects.scale = function(o) {
43
+
44
+ return this.queue(function() {
45
+
46
+ // Create element
47
+ var el = $(this);
48
+
49
+ // Set options
50
+ var options = $.extend(true, {}, o.options);
51
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
52
+ var percent = parseInt(o.options.percent,10) || (parseInt(o.options.percent,10) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent
53
+ var direction = o.options.direction || 'both'; // Set default axis
54
+ var origin = o.options.origin; // The origin of the scaling
55
+ if (mode != 'effect') { // Set default origin and restore for show/hide
56
+ options.origin = origin || ['middle','center'];
57
+ options.restore = true;
58
+ }
59
+ var original = {height: el.height(), width: el.width()}; // Save original
60
+ el.from = o.options.from || (mode == 'show' ? {height: 0, width: 0} : original); // Default from state
61
+
62
+ // Adjust
63
+ var factor = { // Set scaling factor
64
+ y: direction != 'horizontal' ? (percent / 100) : 1,
65
+ x: direction != 'vertical' ? (percent / 100) : 1
66
+ };
67
+ el.to = {height: original.height * factor.y, width: original.width * factor.x}; // Set to state
68
+
69
+ if (o.options.fade) { // Fade option to support puff
70
+ if (mode == 'show') {el.from.opacity = 0; el.to.opacity = 1;};
71
+ if (mode == 'hide') {el.from.opacity = 1; el.to.opacity = 0;};
72
+ };
73
+
74
+ // Animation
75
+ options.from = el.from; options.to = el.to; options.mode = mode;
76
+
77
+ // Animate
78
+ el.effect('size', options, o.duration, o.callback);
79
+ el.dequeue();
80
+ });
81
+
82
+ };
83
+
84
+ $.effects.size = function(o) {
85
+
86
+ return this.queue(function() {
87
+
88
+ // Create element
89
+ var el = $(this), props = ['position','top','bottom','left','right','width','height','overflow','opacity'];
90
+ var props1 = ['position','top','bottom','left','right','overflow','opacity']; // Always restore
91
+ var props2 = ['width','height','overflow']; // Copy for children
92
+ var cProps = ['fontSize'];
93
+ var vProps = ['borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'];
94
+ var hProps = ['borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'];
95
+
96
+ // Set options
97
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
98
+ var restore = o.options.restore || false; // Default restore
99
+ var scale = o.options.scale || 'both'; // Default scale mode
100
+ var origin = o.options.origin; // The origin of the sizing
101
+ var original = {height: el.height(), width: el.width()}; // Save original
102
+ el.from = o.options.from || original; // Default from state
103
+ el.to = o.options.to || original; // Default to state
104
+ // Adjust
105
+ if (origin) { // Calculate baseline shifts
106
+ var baseline = $.effects.getBaseline(origin, original);
107
+ el.from.top = (original.height - el.from.height) * baseline.y;
108
+ el.from.left = (original.width - el.from.width) * baseline.x;
109
+ el.to.top = (original.height - el.to.height) * baseline.y;
110
+ el.to.left = (original.width - el.to.width) * baseline.x;
111
+ };
112
+ var factor = { // Set scaling factor
113
+ from: {y: el.from.height / original.height, x: el.from.width / original.width},
114
+ to: {y: el.to.height / original.height, x: el.to.width / original.width}
115
+ };
116
+ if (scale == 'box' || scale == 'both') { // Scale the css box
117
+ if (factor.from.y != factor.to.y) { // Vertical props scaling
118
+ props = props.concat(vProps);
119
+ el.from = $.effects.setTransition(el, vProps, factor.from.y, el.from);
120
+ el.to = $.effects.setTransition(el, vProps, factor.to.y, el.to);
121
+ };
122
+ if (factor.from.x != factor.to.x) { // Horizontal props scaling
123
+ props = props.concat(hProps);
124
+ el.from = $.effects.setTransition(el, hProps, factor.from.x, el.from);
125
+ el.to = $.effects.setTransition(el, hProps, factor.to.x, el.to);
126
+ };
127
+ };
128
+ if (scale == 'content' || scale == 'both') { // Scale the content
129
+ if (factor.from.y != factor.to.y) { // Vertical props scaling
130
+ props = props.concat(cProps);
131
+ el.from = $.effects.setTransition(el, cProps, factor.from.y, el.from);
132
+ el.to = $.effects.setTransition(el, cProps, factor.to.y, el.to);
133
+ };
134
+ };
135
+ $.effects.save(el, restore ? props : props1); el.show(); // Save & Show
136
+ $.effects.createWrapper(el); // Create Wrapper
137
+ el.css('overflow','hidden').css(el.from); // Shift
138
+
139
+ // Animate
140
+ if (scale == 'content' || scale == 'both') { // Scale the children
141
+ vProps = vProps.concat(['marginTop','marginBottom']).concat(cProps); // Add margins/font-size
142
+ hProps = hProps.concat(['marginLeft','marginRight']); // Add margins
143
+ props2 = props.concat(vProps).concat(hProps); // Concat
144
+ el.find("*[width]").each(function(){
145
+ var child = $(this);
146
+ if (restore) $.effects.save(child, props2);
147
+ var c_original = {height: child.height(), width: child.width()}; // Save original
148
+ child.from = {height: c_original.height * factor.from.y, width: c_original.width * factor.from.x};
149
+ child.to = {height: c_original.height * factor.to.y, width: c_original.width * factor.to.x};
150
+ if (factor.from.y != factor.to.y) { // Vertical props scaling
151
+ child.from = $.effects.setTransition(child, vProps, factor.from.y, child.from);
152
+ child.to = $.effects.setTransition(child, vProps, factor.to.y, child.to);
153
+ };
154
+ if (factor.from.x != factor.to.x) { // Horizontal props scaling
155
+ child.from = $.effects.setTransition(child, hProps, factor.from.x, child.from);
156
+ child.to = $.effects.setTransition(child, hProps, factor.to.x, child.to);
157
+ };
158
+ child.css(child.from); // Shift children
159
+ child.animate(child.to, o.duration, o.options.easing, function(){
160
+ if (restore) $.effects.restore(child, props2); // Restore children
161
+ }); // Animate children
162
+ });
163
+ };
164
+
165
+ // Animate
166
+ el.animate(el.to, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
167
+ if (el.to.opacity === 0) {
168
+ el.css('opacity', el.from.opacity);
169
+ }
170
+ if(mode == 'hide') el.hide(); // Hide
171
+ $.effects.restore(el, restore ? props : props1); $.effects.removeWrapper(el); // Restore
172
+ if(o.callback) o.callback.apply(this, arguments); // Callback
173
+ el.dequeue();
174
+ }});
175
+
176
+ });
177
+
178
+ };
179
+
180
+ })(jQuery);