jquery-ui-rails 0.0.1

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