jquery-ui-rails 2.0.2 → 3.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.

Files changed (131) hide show
  1. data/History.md +15 -0
  2. data/License.txt +2 -3
  3. data/README.md +17 -19
  4. data/Rakefile +79 -28
  5. data/lib/jquery/ui/rails/version.rb +1 -1
  6. data/vendor/assets/javascripts/jquery.ui.accordion.js +537 -417
  7. data/vendor/assets/javascripts/jquery.ui.all.js +17 -14
  8. data/vendor/assets/javascripts/jquery.ui.autocomplete.js +311 -339
  9. data/vendor/assets/javascripts/jquery.ui.button.js +63 -59
  10. data/vendor/assets/javascripts/jquery.ui.core.js +134 -112
  11. data/vendor/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +2 -2
  12. data/vendor/assets/javascripts/jquery.ui.datepicker-ar.js +3 -3
  13. data/vendor/assets/javascripts/jquery.ui.datepicker-az.js +3 -3
  14. data/vendor/assets/javascripts/jquery.ui.datepicker-bg.js +16 -16
  15. data/vendor/assets/javascripts/jquery.ui.datepicker-bs.js +5 -5
  16. data/vendor/assets/javascripts/jquery.ui.datepicker-ca.js +13 -13
  17. data/vendor/assets/javascripts/jquery.ui.datepicker-cs.js +3 -3
  18. data/vendor/assets/javascripts/jquery.ui.datepicker-cy-GB.js +1 -1
  19. data/vendor/assets/javascripts/jquery.ui.datepicker-da.js +9 -9
  20. data/vendor/assets/javascripts/jquery.ui.datepicker-de.js +2 -2
  21. data/vendor/assets/javascripts/jquery.ui.datepicker-el.js +1 -1
  22. data/vendor/assets/javascripts/jquery.ui.datepicker-eo.js +2 -2
  23. data/vendor/assets/javascripts/jquery.ui.datepicker-es.js +6 -6
  24. data/vendor/assets/javascripts/jquery.ui.datepicker-et.js +1 -1
  25. data/vendor/assets/javascripts/jquery.ui.datepicker-eu.js +3 -3
  26. data/vendor/assets/javascripts/jquery.ui.datepicker-fa.js +3 -3
  27. data/vendor/assets/javascripts/jquery.ui.datepicker-fi.js +5 -5
  28. data/vendor/assets/javascripts/jquery.ui.datepicker-fo.js +3 -3
  29. data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +3 -3
  30. data/vendor/assets/javascripts/jquery.ui.datepicker-fr.js +2 -2
  31. data/vendor/assets/javascripts/jquery.ui.datepicker-gl.js +6 -6
  32. data/vendor/assets/javascripts/jquery.ui.datepicker-he.js +2 -2
  33. data/vendor/assets/javascripts/jquery.ui.datepicker-hr.js +3 -3
  34. data/vendor/assets/javascripts/jquery.ui.datepicker-hy.js +3 -3
  35. data/vendor/assets/javascripts/jquery.ui.datepicker-id.js +3 -3
  36. data/vendor/assets/javascripts/jquery.ui.datepicker-is.js +11 -11
  37. data/vendor/assets/javascripts/jquery.ui.datepicker-it.js +3 -3
  38. data/vendor/assets/javascripts/jquery.ui.datepicker-ja.js +3 -3
  39. data/vendor/assets/javascripts/jquery.ui.datepicker-kk.js +2 -2
  40. data/vendor/assets/javascripts/jquery.ui.datepicker-ko.js +1 -1
  41. data/vendor/assets/javascripts/jquery.ui.datepicker-lt.js +3 -3
  42. data/vendor/assets/javascripts/jquery.ui.datepicker-lv.js +1 -1
  43. data/vendor/assets/javascripts/jquery.ui.datepicker-ml.js +1 -1
  44. data/vendor/assets/javascripts/jquery.ui.datepicker-ms.js +3 -3
  45. data/vendor/assets/javascripts/jquery.ui.datepicker-nl.js +1 -1
  46. data/vendor/assets/javascripts/jquery.ui.datepicker-no.js +18 -18
  47. data/vendor/assets/javascripts/jquery.ui.datepicker-pl.js +2 -2
  48. data/vendor/assets/javascripts/jquery.ui.datepicker-pt-BR.js +7 -7
  49. data/vendor/assets/javascripts/jquery.ui.datepicker-pt.js +6 -6
  50. data/vendor/assets/javascripts/jquery.ui.datepicker-rm.js +2 -2
  51. data/vendor/assets/javascripts/jquery.ui.datepicker-ro.js +2 -2
  52. data/vendor/assets/javascripts/jquery.ui.datepicker-ru.js +3 -3
  53. data/vendor/assets/javascripts/jquery.ui.datepicker-sk.js +2 -2
  54. data/vendor/assets/javascripts/jquery.ui.datepicker-sl.js +6 -6
  55. data/vendor/assets/javascripts/jquery.ui.datepicker-sq.js +2 -2
  56. data/vendor/assets/javascripts/jquery.ui.datepicker-sr-SR.js +2 -2
  57. data/vendor/assets/javascripts/jquery.ui.datepicker-sr.js +2 -2
  58. data/vendor/assets/javascripts/jquery.ui.datepicker-sv.js +9 -9
  59. data/vendor/assets/javascripts/jquery.ui.datepicker-th.js +3 -3
  60. data/vendor/assets/javascripts/jquery.ui.datepicker-tj.js +1 -1
  61. data/vendor/assets/javascripts/jquery.ui.datepicker-tr.js +2 -2
  62. data/vendor/assets/javascripts/jquery.ui.datepicker-uk.js +3 -3
  63. data/vendor/assets/javascripts/jquery.ui.datepicker-vi.js +2 -2
  64. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-CN.js +2 -2
  65. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-HK.js +2 -2
  66. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-TW.js +2 -2
  67. data/vendor/assets/javascripts/jquery.ui.datepicker.js +51 -59
  68. data/vendor/assets/javascripts/jquery.ui.dialog.js +402 -409
  69. data/vendor/assets/javascripts/jquery.ui.draggable.js +79 -75
  70. data/vendor/assets/javascripts/jquery.ui.droppable.js +10 -17
  71. data/vendor/assets/javascripts/jquery.ui.effect-blind.js +84 -0
  72. data/vendor/assets/javascripts/jquery.ui.effect-bounce.js +115 -0
  73. data/vendor/assets/javascripts/jquery.ui.effect-clip.js +69 -0
  74. data/vendor/assets/javascripts/jquery.ui.effect-drop.js +67 -0
  75. data/vendor/assets/javascripts/jquery.ui.effect-explode.js +99 -0
  76. data/vendor/assets/javascripts/jquery.ui.effect-fade.js +32 -0
  77. data/vendor/assets/javascripts/jquery.ui.effect-fold.js +78 -0
  78. data/vendor/assets/javascripts/jquery.ui.effect-highlight.js +52 -0
  79. data/vendor/assets/javascripts/jquery.ui.effect-pulsate.js +65 -0
  80. data/vendor/assets/javascripts/jquery.ui.effect-scale.js +320 -0
  81. data/vendor/assets/javascripts/jquery.ui.effect-shake.js +76 -0
  82. data/vendor/assets/javascripts/jquery.ui.effect-slide.js +66 -0
  83. data/vendor/assets/javascripts/jquery.ui.effect-transfer.js +49 -0
  84. data/vendor/assets/javascripts/jquery.ui.effect.all.js +14 -0
  85. data/vendor/assets/javascripts/jquery.ui.effect.js +1276 -0
  86. data/vendor/assets/javascripts/jquery.ui.menu.js +614 -0
  87. data/vendor/assets/javascripts/jquery.ui.mouse.js +22 -20
  88. data/vendor/assets/javascripts/jquery.ui.position.js +367 -158
  89. data/vendor/assets/javascripts/jquery.ui.progressbar.js +10 -14
  90. data/vendor/assets/javascripts/jquery.ui.resizable.js +143 -149
  91. data/vendor/assets/javascripts/jquery.ui.selectable.js +22 -28
  92. data/vendor/assets/javascripts/jquery.ui.slider.js +88 -106
  93. data/vendor/assets/javascripts/jquery.ui.sortable.js +97 -95
  94. data/vendor/assets/javascripts/jquery.ui.spinner.js +482 -0
  95. data/vendor/assets/javascripts/jquery.ui.tabs.js +1189 -580
  96. data/vendor/assets/javascripts/jquery.ui.tooltip.js +402 -0
  97. data/vendor/assets/javascripts/jquery.ui.widget.js +373 -117
  98. data/vendor/assets/stylesheets/jquery.ui.accordion.css.erb +10 -13
  99. data/vendor/assets/stylesheets/jquery.ui.all.css.erb +4 -3
  100. data/vendor/assets/stylesheets/jquery.ui.autocomplete.css.erb +10 -44
  101. data/vendor/assets/stylesheets/jquery.ui.base.css.erb +7 -3
  102. data/vendor/assets/stylesheets/jquery.ui.button.css.erb +6 -4
  103. data/vendor/assets/stylesheets/jquery.ui.core.css.erb +5 -4
  104. data/vendor/assets/stylesheets/jquery.ui.datepicker.css.erb +4 -3
  105. data/vendor/assets/stylesheets/jquery.ui.dialog.css.erb +6 -5
  106. data/vendor/assets/stylesheets/jquery.ui.menu.css.erb +34 -0
  107. data/vendor/assets/stylesheets/jquery.ui.progressbar.css.erb +4 -3
  108. data/vendor/assets/stylesheets/jquery.ui.resizable.css.erb +4 -3
  109. data/vendor/assets/stylesheets/jquery.ui.selectable.css.erb +4 -3
  110. data/vendor/assets/stylesheets/jquery.ui.slider.css.erb +4 -3
  111. data/vendor/assets/stylesheets/jquery.ui.spinner.css.erb +27 -0
  112. data/vendor/assets/stylesheets/jquery.ui.tabs.css.erb +8 -8
  113. data/vendor/assets/stylesheets/jquery.ui.theme.css.erb +8 -7
  114. data/vendor/assets/stylesheets/jquery.ui.tooltip.css.erb +25 -0
  115. metadata +24 -19
  116. data/dependencies.js +0 -31
  117. data/vendor/assets/javascripts/jquery.effects.all.js +0 -14
  118. data/vendor/assets/javascripts/jquery.effects.blind.js +0 -51
  119. data/vendor/assets/javascripts/jquery.effects.bounce.js +0 -80
  120. data/vendor/assets/javascripts/jquery.effects.clip.js +0 -56
  121. data/vendor/assets/javascripts/jquery.effects.core.js +0 -612
  122. data/vendor/assets/javascripts/jquery.effects.drop.js +0 -52
  123. data/vendor/assets/javascripts/jquery.effects.explode.js +0 -81
  124. data/vendor/assets/javascripts/jquery.effects.fade.js +0 -34
  125. data/vendor/assets/javascripts/jquery.effects.fold.js +0 -58
  126. data/vendor/assets/javascripts/jquery.effects.highlight.js +0 -52
  127. data/vendor/assets/javascripts/jquery.effects.pulsate.js +0 -53
  128. data/vendor/assets/javascripts/jquery.effects.scale.js +0 -180
  129. data/vendor/assets/javascripts/jquery.effects.shake.js +0 -59
  130. data/vendor/assets/javascripts/jquery.effects.slide.js +0 -52
  131. data/vendor/assets/javascripts/jquery.effects.transfer.js +0 -47
@@ -1,31 +0,0 @@
1
- {"ui.core.js": [],
2
- "ui.widget.js": [],
3
- "ui.mouse.js": ["ui.core.js","ui.widget.js"],
4
- "ui.position.js": [],
5
- "ui.draggable.js": ["ui.core.js","ui.widget.js","ui.mouse.js"],
6
- "ui.droppable.js": ["ui.core.js","ui.widget.js","ui.mouse.js","ui.draggable.js"],
7
- "ui.resizable.js": ["ui.core.js","ui.widget.js","ui.mouse.js","theme"],
8
- "ui.selectable.js": ["ui.core.js","ui.widget.js","ui.mouse.js","theme"],
9
- "ui.sortable.js": ["ui.core.js","ui.widget.js","ui.mouse.js"],
10
- "ui.accordion.js": ["ui.core.js","ui.widget.js","theme"],
11
- "ui.autocomplete.js": ["ui.core.js","ui.widget.js","ui.position.js","theme"],
12
- "ui.button.js": ["ui.core.js","ui.widget.js","theme"],
13
- "ui.dialog.js": ["ui.core.js","ui.widget.js","ui.position.js","theme"],
14
- "ui.slider.js": ["ui.core.js","ui.widget.js","ui.mouse.js","theme"],
15
- "ui.tabs.js": ["ui.core.js","ui.widget.js","theme"],
16
- "ui.datepicker.js": ["ui.core.js","theme"],
17
- "ui.progressbar.js": ["ui.core.js","ui.widget.js","theme"],
18
- "effects.core.js": [],
19
- "effects.blind.js": ["effects.core.js"],
20
- "effects.bounce.js": ["effects.core.js"],
21
- "effects.clip.js": ["effects.core.js"],
22
- "effects.drop.js": ["effects.core.js"],
23
- "effects.explode.js": ["effects.core.js"],
24
- "effects.fade.js": ["effects.core.js"],
25
- "effects.fold.js": ["effects.core.js"],
26
- "effects.highlight.js": ["effects.core.js"],
27
- "effects.pulsate.js": ["effects.core.js"],
28
- "effects.scale.js": ["effects.core.js"],
29
- "effects.shake.js": ["effects.core.js"],
30
- "effects.slide.js": ["effects.core.js"],
31
- "effects.transfer.js": ["effects.core.js"]}
@@ -1,14 +0,0 @@
1
- //= require jquery.effects.blind
2
- //= require jquery.effects.bounce
3
- //= require jquery.effects.clip
4
- //= require jquery.effects.core
5
- //= require jquery.effects.drop
6
- //= require jquery.effects.explode
7
- //= require jquery.effects.fade
8
- //= require jquery.effects.fold
9
- //= require jquery.effects.highlight
10
- //= require jquery.effects.pulsate
11
- //= require jquery.effects.scale
12
- //= require jquery.effects.shake
13
- //= require jquery.effects.slide
14
- //= require jquery.effects.transfer
@@ -1,51 +0,0 @@
1
- //= require jquery.effects.core
2
-
3
- /*!
4
- * jQuery UI Effects Blind 1.8.24
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/Blind
11
- *
12
- * Depends:
13
- * jquery.effects.core.js
14
- */
15
- (function( $, undefined ) {
16
-
17
- $.effects.blind = 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 direction = o.options.direction || 'vertical'; // Default direction
27
-
28
- // Adjust
29
- $.effects.save(el, props); el.show(); // Save & Show
30
- var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
31
- var ref = (direction == 'vertical') ? 'height' : 'width';
32
- var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width();
33
- if(mode == 'show') wrapper.css(ref, 0); // Shift
34
-
35
- // Animation
36
- var animation = {};
37
- animation[ref] = mode == 'show' ? distance : 0;
38
-
39
- // Animate
40
- wrapper.animate(animation, o.duration, o.options.easing, function() {
41
- if(mode == 'hide') el.hide(); // Hide
42
- $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
43
- if(o.callback) o.callback.apply(el[0], arguments); // Callback
44
- el.dequeue();
45
- });
46
-
47
- });
48
-
49
- };
50
-
51
- })(jQuery);
@@ -1,80 +0,0 @@
1
- //= require jquery.effects.core
2
-
3
- /*!
4
- * jQuery UI Effects Bounce 1.8.24
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/Bounce
11
- *
12
- * Depends:
13
- * jquery.effects.core.js
14
- */
15
- (function( $, undefined ) {
16
-
17
- $.effects.bounce = 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 || 'effect'); // Set Mode
26
- var direction = o.options.direction || 'up'; // Default direction
27
- var distance = o.options.distance || 20; // Default distance
28
- var times = o.options.times || 5; // Default # of times
29
- var speed = o.duration || 250; // Default speed per bounce
30
- if (/show|hide/.test(mode)) props.push('opacity'); // Avoid touching opacity to prevent clearType and PNG issues in IE
31
-
32
- // Adjust
33
- $.effects.save(el, props); el.show(); // Save & Show
34
- $.effects.createWrapper(el); // Create Wrapper
35
- var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
36
- var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
37
- var distance = o.options.distance || (ref == 'top' ? el.outerHeight(true) / 3 : el.outerWidth(true) / 3);
38
- if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
39
- if (mode == 'hide') distance = distance / (times * 2);
40
- if (mode != 'hide') times--;
41
-
42
- // Animate
43
- if (mode == 'show') { // Show Bounce
44
- var animation = {opacity: 1};
45
- animation[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
46
- el.animate(animation, speed / 2, o.options.easing);
47
- distance = distance / 2;
48
- times--;
49
- };
50
- for (var i = 0; i < times; i++) { // Bounces
51
- var animation1 = {}, animation2 = {};
52
- animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
53
- animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
54
- el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing);
55
- distance = (mode == 'hide') ? distance * 2 : distance / 2;
56
- };
57
- if (mode == 'hide') { // Last Bounce
58
- var animation = {opacity: 0};
59
- animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
60
- el.animate(animation, speed / 2, o.options.easing, function(){
61
- el.hide(); // Hide
62
- $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
63
- if(o.callback) o.callback.apply(this, arguments); // Callback
64
- });
65
- } else {
66
- var animation1 = {}, animation2 = {};
67
- animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
68
- animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
69
- el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing, function(){
70
- $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
71
- if(o.callback) o.callback.apply(this, arguments); // Callback
72
- });
73
- };
74
- el.queue('fx', function() { el.dequeue(); });
75
- el.dequeue();
76
- });
77
-
78
- };
79
-
80
- })(jQuery);
@@ -1,56 +0,0 @@
1
- //= require jquery.effects.core
2
-
3
- /*!
4
- * jQuery UI Effects Clip 1.8.24
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/Clip
11
- *
12
- * Depends:
13
- * jquery.effects.core.js
14
- */
15
- (function( $, undefined ) {
16
-
17
- $.effects.clip = function(o) {
18
-
19
- return this.queue(function() {
20
-
21
- // Create element
22
- var el = $(this), props = ['position','top','bottom','left','right','height','width'];
23
-
24
- // Set options
25
- var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
26
- var direction = o.options.direction || 'vertical'; // Default direction
27
-
28
- // Adjust
29
- $.effects.save(el, props); el.show(); // Save & Show
30
- var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
31
- var animate = el[0].tagName == 'IMG' ? wrapper : el;
32
- var ref = {
33
- size: (direction == 'vertical') ? 'height' : 'width',
34
- position: (direction == 'vertical') ? 'top' : 'left'
35
- };
36
- var distance = (direction == 'vertical') ? animate.height() : animate.width();
37
- if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift
38
-
39
- // Animation
40
- var animation = {};
41
- animation[ref.size] = mode == 'show' ? distance : 0;
42
- animation[ref.position] = mode == 'show' ? 0 : distance / 2;
43
-
44
- // Animate
45
- animate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
46
- if(mode == 'hide') el.hide(); // Hide
47
- $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
48
- if(o.callback) o.callback.apply(el[0], arguments); // Callback
49
- el.dequeue();
50
- }});
51
-
52
- });
53
-
54
- };
55
-
56
- })(jQuery);
@@ -1,612 +0,0 @@
1
- /*!
2
- * jQuery UI Effects 1.8.24
3
- *
4
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
5
- * Dual licensed under the MIT or GPL Version 2 licenses.
6
- * http://jquery.org/license
7
- *
8
- * http://docs.jquery.com/UI/Effects/
9
- */
10
- ;jQuery.effects || (function($, undefined) {
11
-
12
- $.effects = {};
13
-
14
-
15
-
16
- /******************************************************************************/
17
- /****************************** COLOR ANIMATIONS ******************************/
18
- /******************************************************************************/
19
-
20
- // override the animation for color styles
21
- $.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor',
22
- 'borderRightColor', 'borderTopColor', 'borderColor', 'color', 'outlineColor'],
23
- function(i, attr) {
24
- $.fx.step[attr] = function(fx) {
25
- if (!fx.colorInit) {
26
- fx.start = getColor(fx.elem, attr);
27
- fx.end = getRGB(fx.end);
28
- fx.colorInit = true;
29
- }
30
-
31
- fx.elem.style[attr] = 'rgb(' +
32
- Math.max(Math.min(parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0], 10), 255), 0) + ',' +
33
- Math.max(Math.min(parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1], 10), 255), 0) + ',' +
34
- Math.max(Math.min(parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2], 10), 255), 0) + ')';
35
- };
36
- });
37
-
38
- // Color Conversion functions from highlightFade
39
- // By Blair Mitchelmore
40
- // http://jquery.offput.ca/highlightFade/
41
-
42
- // Parse strings looking for color tuples [255,255,255]
43
- function getRGB(color) {
44
- var result;
45
-
46
- // Check if we're already dealing with an array of colors
47
- if ( color && color.constructor == Array && color.length == 3 )
48
- return color;
49
-
50
- // Look for rgb(num,num,num)
51
- if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
52
- return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)];
53
-
54
- // Look for rgb(num%,num%,num%)
55
- if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
56
- return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
57
-
58
- // Look for #a0b1c2
59
- if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
60
- return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
61
-
62
- // Look for #fff
63
- if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
64
- return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
65
-
66
- // Look for rgba(0, 0, 0, 0) == transparent in Safari 3
67
- if (result = /rgba\(0, 0, 0, 0\)/.exec(color))
68
- return colors['transparent'];
69
-
70
- // Otherwise, we're most likely dealing with a named color
71
- return colors[$.trim(color).toLowerCase()];
72
- }
73
-
74
- function getColor(elem, attr) {
75
- var color;
76
-
77
- do {
78
- // jQuery <1.4.3 uses curCSS, in 1.4.3 - 1.7.2 curCSS = css, 1.8+ only has css
79
- color = ($.curCSS || $.css)(elem, attr);
80
-
81
- // Keep going until we find an element that has color, or we hit the body
82
- if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") )
83
- break;
84
-
85
- attr = "backgroundColor";
86
- } while ( elem = elem.parentNode );
87
-
88
- return getRGB(color);
89
- };
90
-
91
- // Some named colors to work with
92
- // From Interface by Stefan Petre
93
- // http://interface.eyecon.ro/
94
-
95
- var colors = {
96
- aqua:[0,255,255],
97
- azure:[240,255,255],
98
- beige:[245,245,220],
99
- black:[0,0,0],
100
- blue:[0,0,255],
101
- brown:[165,42,42],
102
- cyan:[0,255,255],
103
- darkblue:[0,0,139],
104
- darkcyan:[0,139,139],
105
- darkgrey:[169,169,169],
106
- darkgreen:[0,100,0],
107
- darkkhaki:[189,183,107],
108
- darkmagenta:[139,0,139],
109
- darkolivegreen:[85,107,47],
110
- darkorange:[255,140,0],
111
- darkorchid:[153,50,204],
112
- darkred:[139,0,0],
113
- darksalmon:[233,150,122],
114
- darkviolet:[148,0,211],
115
- fuchsia:[255,0,255],
116
- gold:[255,215,0],
117
- green:[0,128,0],
118
- indigo:[75,0,130],
119
- khaki:[240,230,140],
120
- lightblue:[173,216,230],
121
- lightcyan:[224,255,255],
122
- lightgreen:[144,238,144],
123
- lightgrey:[211,211,211],
124
- lightpink:[255,182,193],
125
- lightyellow:[255,255,224],
126
- lime:[0,255,0],
127
- magenta:[255,0,255],
128
- maroon:[128,0,0],
129
- navy:[0,0,128],
130
- olive:[128,128,0],
131
- orange:[255,165,0],
132
- pink:[255,192,203],
133
- purple:[128,0,128],
134
- violet:[128,0,128],
135
- red:[255,0,0],
136
- silver:[192,192,192],
137
- white:[255,255,255],
138
- yellow:[255,255,0],
139
- transparent: [255,255,255]
140
- };
141
-
142
-
143
-
144
- /******************************************************************************/
145
- /****************************** CLASS ANIMATIONS ******************************/
146
- /******************************************************************************/
147
-
148
- var classAnimationActions = ['add', 'remove', 'toggle'],
149
- shorthandStyles = {
150
- border: 1,
151
- borderBottom: 1,
152
- borderColor: 1,
153
- borderLeft: 1,
154
- borderRight: 1,
155
- borderTop: 1,
156
- borderWidth: 1,
157
- margin: 1,
158
- padding: 1
159
- };
160
-
161
- function getElementStyles() {
162
- var style = document.defaultView
163
- ? document.defaultView.getComputedStyle(this, null)
164
- : this.currentStyle,
165
- newStyle = {},
166
- key,
167
- camelCase;
168
-
169
- // webkit enumerates style porperties
170
- if (style && style.length && style[0] && style[style[0]]) {
171
- var len = style.length;
172
- while (len--) {
173
- key = style[len];
174
- if (typeof style[key] == 'string') {
175
- camelCase = key.replace(/\-(\w)/g, function(all, letter){
176
- return letter.toUpperCase();
177
- });
178
- newStyle[camelCase] = style[key];
179
- }
180
- }
181
- } else {
182
- for (key in style) {
183
- if (typeof style[key] === 'string') {
184
- newStyle[key] = style[key];
185
- }
186
- }
187
- }
188
-
189
- return newStyle;
190
- }
191
-
192
- function filterStyles(styles) {
193
- var name, value;
194
- for (name in styles) {
195
- value = styles[name];
196
- if (
197
- // ignore null and undefined values
198
- value == null ||
199
- // ignore functions (when does this occur?)
200
- $.isFunction(value) ||
201
- // shorthand styles that need to be expanded
202
- name in shorthandStyles ||
203
- // ignore scrollbars (break in IE)
204
- (/scrollbar/).test(name) ||
205
-
206
- // only colors or values that can be converted to numbers
207
- (!(/color/i).test(name) && isNaN(parseFloat(value)))
208
- ) {
209
- delete styles[name];
210
- }
211
- }
212
-
213
- return styles;
214
- }
215
-
216
- function styleDifference(oldStyle, newStyle) {
217
- var diff = { _: 0 }, // http://dev.jquery.com/ticket/5459
218
- name;
219
-
220
- for (name in newStyle) {
221
- if (oldStyle[name] != newStyle[name]) {
222
- diff[name] = newStyle[name];
223
- }
224
- }
225
-
226
- return diff;
227
- }
228
-
229
- $.effects.animateClass = function(value, duration, easing, callback) {
230
- if ($.isFunction(easing)) {
231
- callback = easing;
232
- easing = null;
233
- }
234
-
235
- return this.queue(function() {
236
- var that = $(this),
237
- originalStyleAttr = that.attr('style') || ' ',
238
- originalStyle = filterStyles(getElementStyles.call(this)),
239
- newStyle,
240
- className = that.attr('class') || "";
241
-
242
- $.each(classAnimationActions, function(i, action) {
243
- if (value[action]) {
244
- that[action + 'Class'](value[action]);
245
- }
246
- });
247
- newStyle = filterStyles(getElementStyles.call(this));
248
- that.attr('class', className);
249
-
250
- that.animate(styleDifference(originalStyle, newStyle), {
251
- queue: false,
252
- duration: duration,
253
- easing: easing,
254
- complete: function() {
255
- $.each(classAnimationActions, function(i, action) {
256
- if (value[action]) { that[action + 'Class'](value[action]); }
257
- });
258
- // work around bug in IE by clearing the cssText before setting it
259
- if (typeof that.attr('style') == 'object') {
260
- that.attr('style').cssText = '';
261
- that.attr('style').cssText = originalStyleAttr;
262
- } else {
263
- that.attr('style', originalStyleAttr);
264
- }
265
- if (callback) { callback.apply(this, arguments); }
266
- $.dequeue( this );
267
- }
268
- });
269
- });
270
- };
271
-
272
- $.fn.extend({
273
- _addClass: $.fn.addClass,
274
- addClass: function(classNames, speed, easing, callback) {
275
- return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
276
- },
277
-
278
- _removeClass: $.fn.removeClass,
279
- removeClass: function(classNames,speed,easing,callback) {
280
- return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);
281
- },
282
-
283
- _toggleClass: $.fn.toggleClass,
284
- toggleClass: function(classNames, force, speed, easing, callback) {
285
- if ( typeof force == "boolean" || force === undefined ) {
286
- if ( !speed ) {
287
- // without speed parameter;
288
- return this._toggleClass(classNames, force);
289
- } else {
290
- return $.effects.animateClass.apply(this, [(force?{add:classNames}:{remove:classNames}),speed,easing,callback]);
291
- }
292
- } else {
293
- // without switch parameter;
294
- return $.effects.animateClass.apply(this, [{ toggle: classNames },force,speed,easing]);
295
- }
296
- },
297
-
298
- switchClass: function(remove,add,speed,easing,callback) {
299
- return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);
300
- }
301
- });
302
-
303
-
304
-
305
- /******************************************************************************/
306
- /*********************************** EFFECTS **********************************/
307
- /******************************************************************************/
308
-
309
- $.extend($.effects, {
310
- version: "1.8.24",
311
-
312
- // Saves a set of properties in a data storage
313
- save: function(element, set) {
314
- for(var i=0; i < set.length; i++) {
315
- if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]);
316
- }
317
- },
318
-
319
- // Restores a set of previously saved properties from a data storage
320
- restore: function(element, set) {
321
- for(var i=0; i < set.length; i++) {
322
- if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i]));
323
- }
324
- },
325
-
326
- setMode: function(el, mode) {
327
- if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle
328
- return mode;
329
- },
330
-
331
- getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value
332
- // this should be a little more flexible in the future to handle a string & hash
333
- var y, x;
334
- switch (origin[0]) {
335
- case 'top': y = 0; break;
336
- case 'middle': y = 0.5; break;
337
- case 'bottom': y = 1; break;
338
- default: y = origin[0] / original.height;
339
- };
340
- switch (origin[1]) {
341
- case 'left': x = 0; break;
342
- case 'center': x = 0.5; break;
343
- case 'right': x = 1; break;
344
- default: x = origin[1] / original.width;
345
- };
346
- return {x: x, y: y};
347
- },
348
-
349
- // Wraps the element around a wrapper that copies position properties
350
- createWrapper: function(element) {
351
-
352
- // if the element is already wrapped, return it
353
- if (element.parent().is('.ui-effects-wrapper')) {
354
- return element.parent();
355
- }
356
-
357
- // wrap the element
358
- var props = {
359
- width: element.outerWidth(true),
360
- height: element.outerHeight(true),
361
- 'float': element.css('float')
362
- },
363
- wrapper = $('<div></div>')
364
- .addClass('ui-effects-wrapper')
365
- .css({
366
- fontSize: '100%',
367
- background: 'transparent',
368
- border: 'none',
369
- margin: 0,
370
- padding: 0
371
- }),
372
- active = document.activeElement;
373
-
374
- // support: Firefox
375
- // Firefox incorrectly exposes anonymous content
376
- // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
377
- try {
378
- active.id;
379
- } catch( e ) {
380
- active = document.body;
381
- }
382
-
383
- element.wrap( wrapper );
384
-
385
- // Fixes #7595 - Elements lose focus when wrapped.
386
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
387
- $( active ).focus();
388
- }
389
-
390
- wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element
391
-
392
- // transfer positioning properties to the wrapper
393
- if (element.css('position') == 'static') {
394
- wrapper.css({ position: 'relative' });
395
- element.css({ position: 'relative' });
396
- } else {
397
- $.extend(props, {
398
- position: element.css('position'),
399
- zIndex: element.css('z-index')
400
- });
401
- $.each(['top', 'left', 'bottom', 'right'], function(i, pos) {
402
- props[pos] = element.css(pos);
403
- if (isNaN(parseInt(props[pos], 10))) {
404
- props[pos] = 'auto';
405
- }
406
- });
407
- element.css({position: 'relative', top: 0, left: 0, right: 'auto', bottom: 'auto' });
408
- }
409
-
410
- return wrapper.css(props).show();
411
- },
412
-
413
- removeWrapper: function(element) {
414
- var parent,
415
- active = document.activeElement;
416
-
417
- if (element.parent().is('.ui-effects-wrapper')) {
418
- parent = element.parent().replaceWith(element);
419
- // Fixes #7595 - Elements lose focus when wrapped.
420
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
421
- $( active ).focus();
422
- }
423
- return parent;
424
- }
425
-
426
- return element;
427
- },
428
-
429
- setTransition: function(element, list, factor, value) {
430
- value = value || {};
431
- $.each(list, function(i, x){
432
- var unit = element.cssUnit(x);
433
- if (unit[0] > 0) value[x] = unit[0] * factor + unit[1];
434
- });
435
- return value;
436
- }
437
- });
438
-
439
-
440
- function _normalizeArguments(effect, options, speed, callback) {
441
- // shift params for method overloading
442
- if (typeof effect == 'object') {
443
- callback = options;
444
- speed = null;
445
- options = effect;
446
- effect = options.effect;
447
- }
448
- if ($.isFunction(options)) {
449
- callback = options;
450
- speed = null;
451
- options = {};
452
- }
453
- if (typeof options == 'number' || $.fx.speeds[options]) {
454
- callback = speed;
455
- speed = options;
456
- options = {};
457
- }
458
- if ($.isFunction(speed)) {
459
- callback = speed;
460
- speed = null;
461
- }
462
-
463
- options = options || {};
464
-
465
- speed = speed || options.duration;
466
- speed = $.fx.off ? 0 : typeof speed == 'number'
467
- ? speed : speed in $.fx.speeds ? $.fx.speeds[speed] : $.fx.speeds._default;
468
-
469
- callback = callback || options.complete;
470
-
471
- return [effect, options, speed, callback];
472
- }
473
-
474
- function standardSpeed( speed ) {
475
- // valid standard speeds
476
- if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
477
- return true;
478
- }
479
-
480
- // invalid strings - treat as "normal" speed
481
- if ( typeof speed === "string" && !$.effects[ speed ] ) {
482
- return true;
483
- }
484
-
485
- return false;
486
- }
487
-
488
- $.fn.extend({
489
- effect: function(effect, options, speed, callback) {
490
- var args = _normalizeArguments.apply(this, arguments),
491
- // TODO: make effects take actual parameters instead of a hash
492
- args2 = {
493
- options: args[1],
494
- duration: args[2],
495
- callback: args[3]
496
- },
497
- mode = args2.options.mode,
498
- effectMethod = $.effects[effect];
499
-
500
- if ( $.fx.off || !effectMethod ) {
501
- // delegate to the original method (e.g., .show()) if possible
502
- if ( mode ) {
503
- return this[ mode ]( args2.duration, args2.callback );
504
- } else {
505
- return this.each(function() {
506
- if ( args2.callback ) {
507
- args2.callback.call( this );
508
- }
509
- });
510
- }
511
- }
512
-
513
- return effectMethod.call(this, args2);
514
- },
515
-
516
- _show: $.fn.show,
517
- show: function(speed) {
518
- if ( standardSpeed( speed ) ) {
519
- return this._show.apply(this, arguments);
520
- } else {
521
- var args = _normalizeArguments.apply(this, arguments);
522
- args[1].mode = 'show';
523
- return this.effect.apply(this, args);
524
- }
525
- },
526
-
527
- _hide: $.fn.hide,
528
- hide: function(speed) {
529
- if ( standardSpeed( speed ) ) {
530
- return this._hide.apply(this, arguments);
531
- } else {
532
- var args = _normalizeArguments.apply(this, arguments);
533
- args[1].mode = 'hide';
534
- return this.effect.apply(this, args);
535
- }
536
- },
537
-
538
- // jQuery core overloads toggle and creates _toggle
539
- __toggle: $.fn.toggle,
540
- toggle: function(speed) {
541
- if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
542
- return this.__toggle.apply(this, arguments);
543
- } else {
544
- var args = _normalizeArguments.apply(this, arguments);
545
- args[1].mode = 'toggle';
546
- return this.effect.apply(this, args);
547
- }
548
- },
549
-
550
- // helper functions
551
- cssUnit: function(key) {
552
- var style = this.css(key), val = [];
553
- $.each( ['em','px','%','pt'], function(i, unit){
554
- if(style.indexOf(unit) > 0)
555
- val = [parseFloat(style), unit];
556
- });
557
- return val;
558
- }
559
- });
560
-
561
-
562
-
563
- /******************************************************************************/
564
- /*********************************** EASING ***********************************/
565
- /******************************************************************************/
566
-
567
- // based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
568
-
569
- var baseEasings = {};
570
-
571
- $.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
572
- baseEasings[ name ] = function( p ) {
573
- return Math.pow( p, i + 2 );
574
- };
575
- });
576
-
577
- $.extend( baseEasings, {
578
- Sine: function ( p ) {
579
- return 1 - Math.cos( p * Math.PI / 2 );
580
- },
581
- Circ: function ( p ) {
582
- return 1 - Math.sqrt( 1 - p * p );
583
- },
584
- Elastic: function( p ) {
585
- return p === 0 || p === 1 ? p :
586
- -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
587
- },
588
- Back: function( p ) {
589
- return p * p * ( 3 * p - 2 );
590
- },
591
- Bounce: function ( p ) {
592
- var pow2,
593
- bounce = 4;
594
-
595
- while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
596
- return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
597
- }
598
- });
599
-
600
- $.each( baseEasings, function( name, easeIn ) {
601
- $.easing[ "easeIn" + name ] = easeIn;
602
- $.easing[ "easeOut" + name ] = function( p ) {
603
- return 1 - easeIn( 1 - p );
604
- };
605
- $.easing[ "easeInOut" + name ] = function( p ) {
606
- return p < .5 ?
607
- easeIn( p * 2 ) / 2 :
608
- easeIn( p * -2 + 2 ) / -2 + 1;
609
- };
610
- });
611
-
612
- })(jQuery);