jquery-ui-middleman 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/.gitmodules +3 -0
  4. data/.travis.yml +2 -0
  5. data/Gemfile +3 -0
  6. data/History.md +115 -0
  7. data/License.txt +2 -0
  8. data/README.md +226 -0
  9. data/Rakefile +221 -0
  10. data/VERSIONS.md +27 -0
  11. data/app/assets/images/jquery-ui/animated-overlay.gif +0 -0
  12. data/app/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  13. data/app/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  14. data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  15. data/app/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  16. data/app/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  17. data/app/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  18. data/app/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  19. data/app/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  20. data/app/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  21. data/app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  22. data/app/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  23. data/app/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
  24. data/app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  25. data/app/assets/javascripts/jquery.ui.accordion.js +575 -0
  26. data/app/assets/javascripts/jquery.ui.all.js +34 -0
  27. data/app/assets/javascripts/jquery.ui.autocomplete.js +615 -0
  28. data/app/assets/javascripts/jquery.ui.button.js +422 -0
  29. data/app/assets/javascripts/jquery.ui.core.js +320 -0
  30. data/app/assets/javascripts/jquery.ui.datepicker-af.js +23 -0
  31. data/app/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +23 -0
  32. data/app/assets/javascripts/jquery.ui.datepicker-ar.js +23 -0
  33. data/app/assets/javascripts/jquery.ui.datepicker-az.js +23 -0
  34. data/app/assets/javascripts/jquery.ui.datepicker-be.js +23 -0
  35. data/app/assets/javascripts/jquery.ui.datepicker-bg.js +24 -0
  36. data/app/assets/javascripts/jquery.ui.datepicker-bs.js +23 -0
  37. data/app/assets/javascripts/jquery.ui.datepicker-ca.js +23 -0
  38. data/app/assets/javascripts/jquery.ui.datepicker-cs.js +23 -0
  39. data/app/assets/javascripts/jquery.ui.datepicker-cy-GB.js +23 -0
  40. data/app/assets/javascripts/jquery.ui.datepicker-da.js +23 -0
  41. data/app/assets/javascripts/jquery.ui.datepicker-de.js +23 -0
  42. data/app/assets/javascripts/jquery.ui.datepicker-el.js +23 -0
  43. data/app/assets/javascripts/jquery.ui.datepicker-en-AU.js +23 -0
  44. data/app/assets/javascripts/jquery.ui.datepicker-en-GB.js +23 -0
  45. data/app/assets/javascripts/jquery.ui.datepicker-en-NZ.js +23 -0
  46. data/app/assets/javascripts/jquery.ui.datepicker-eo.js +23 -0
  47. data/app/assets/javascripts/jquery.ui.datepicker-es.js +23 -0
  48. data/app/assets/javascripts/jquery.ui.datepicker-et.js +23 -0
  49. data/app/assets/javascripts/jquery.ui.datepicker-eu.js +23 -0
  50. data/app/assets/javascripts/jquery.ui.datepicker-fa.js +59 -0
  51. data/app/assets/javascripts/jquery.ui.datepicker-fi.js +23 -0
  52. data/app/assets/javascripts/jquery.ui.datepicker-fo.js +23 -0
  53. data/app/assets/javascripts/jquery.ui.datepicker-fr-CA.js +23 -0
  54. data/app/assets/javascripts/jquery.ui.datepicker-fr-CH.js +23 -0
  55. data/app/assets/javascripts/jquery.ui.datepicker-fr.js +25 -0
  56. data/app/assets/javascripts/jquery.ui.datepicker-gl.js +23 -0
  57. data/app/assets/javascripts/jquery.ui.datepicker-he.js +23 -0
  58. data/app/assets/javascripts/jquery.ui.datepicker-hi.js +23 -0
  59. data/app/assets/javascripts/jquery.ui.datepicker-hr.js +23 -0
  60. data/app/assets/javascripts/jquery.ui.datepicker-hu.js +23 -0
  61. data/app/assets/javascripts/jquery.ui.datepicker-hy.js +23 -0
  62. data/app/assets/javascripts/jquery.ui.datepicker-id.js +23 -0
  63. data/app/assets/javascripts/jquery.ui.datepicker-is.js +23 -0
  64. data/app/assets/javascripts/jquery.ui.datepicker-it.js +23 -0
  65. data/app/assets/javascripts/jquery.ui.datepicker-ja.js +23 -0
  66. data/app/assets/javascripts/jquery.ui.datepicker-ka.js +21 -0
  67. data/app/assets/javascripts/jquery.ui.datepicker-kk.js +23 -0
  68. data/app/assets/javascripts/jquery.ui.datepicker-km.js +23 -0
  69. data/app/assets/javascripts/jquery.ui.datepicker-ko.js +23 -0
  70. data/app/assets/javascripts/jquery.ui.datepicker-ky.js +24 -0
  71. data/app/assets/javascripts/jquery.ui.datepicker-lb.js +23 -0
  72. data/app/assets/javascripts/jquery.ui.datepicker-lt.js +23 -0
  73. data/app/assets/javascripts/jquery.ui.datepicker-lv.js +23 -0
  74. data/app/assets/javascripts/jquery.ui.datepicker-mk.js +23 -0
  75. data/app/assets/javascripts/jquery.ui.datepicker-ml.js +23 -0
  76. data/app/assets/javascripts/jquery.ui.datepicker-ms.js +23 -0
  77. data/app/assets/javascripts/jquery.ui.datepicker-nb.js +22 -0
  78. data/app/assets/javascripts/jquery.ui.datepicker-nl-BE.js +23 -0
  79. data/app/assets/javascripts/jquery.ui.datepicker-nl.js +23 -0
  80. data/app/assets/javascripts/jquery.ui.datepicker-nn.js +22 -0
  81. data/app/assets/javascripts/jquery.ui.datepicker-no.js +23 -0
  82. data/app/assets/javascripts/jquery.ui.datepicker-pl.js +23 -0
  83. data/app/assets/javascripts/jquery.ui.datepicker-pt-BR.js +23 -0
  84. data/app/assets/javascripts/jquery.ui.datepicker-pt.js +22 -0
  85. data/app/assets/javascripts/jquery.ui.datepicker-rm.js +21 -0
  86. data/app/assets/javascripts/jquery.ui.datepicker-ro.js +26 -0
  87. data/app/assets/javascripts/jquery.ui.datepicker-ru.js +23 -0
  88. data/app/assets/javascripts/jquery.ui.datepicker-sk.js +23 -0
  89. data/app/assets/javascripts/jquery.ui.datepicker-sl.js +24 -0
  90. data/app/assets/javascripts/jquery.ui.datepicker-sq.js +23 -0
  91. data/app/assets/javascripts/jquery.ui.datepicker-sr-SR.js +23 -0
  92. data/app/assets/javascripts/jquery.ui.datepicker-sr.js +23 -0
  93. data/app/assets/javascripts/jquery.ui.datepicker-sv.js +23 -0
  94. data/app/assets/javascripts/jquery.ui.datepicker-ta.js +23 -0
  95. data/app/assets/javascripts/jquery.ui.datepicker-th.js +23 -0
  96. data/app/assets/javascripts/jquery.ui.datepicker-tj.js +23 -0
  97. data/app/assets/javascripts/jquery.ui.datepicker-tr.js +23 -0
  98. data/app/assets/javascripts/jquery.ui.datepicker-uk.js +24 -0
  99. data/app/assets/javascripts/jquery.ui.datepicker-vi.js +23 -0
  100. data/app/assets/javascripts/jquery.ui.datepicker-zh-CN.js +23 -0
  101. data/app/assets/javascripts/jquery.ui.datepicker-zh-HK.js +23 -0
  102. data/app/assets/javascripts/jquery.ui.datepicker-zh-TW.js +23 -0
  103. data/app/assets/javascripts/jquery.ui.datepicker.js +2040 -0
  104. data/app/assets/javascripts/jquery.ui.dialog.js +815 -0
  105. data/app/assets/javascripts/jquery.ui.draggable.js +962 -0
  106. data/app/assets/javascripts/jquery.ui.droppable.js +377 -0
  107. data/app/assets/javascripts/jquery.ui.effect-blind.js +84 -0
  108. data/app/assets/javascripts/jquery.ui.effect-bounce.js +115 -0
  109. data/app/assets/javascripts/jquery.ui.effect-clip.js +69 -0
  110. data/app/assets/javascripts/jquery.ui.effect-drop.js +67 -0
  111. data/app/assets/javascripts/jquery.ui.effect-explode.js +99 -0
  112. data/app/assets/javascripts/jquery.ui.effect-fade.js +32 -0
  113. data/app/assets/javascripts/jquery.ui.effect-fold.js +78 -0
  114. data/app/assets/javascripts/jquery.ui.effect-highlight.js +52 -0
  115. data/app/assets/javascripts/jquery.ui.effect-pulsate.js +65 -0
  116. data/app/assets/javascripts/jquery.ui.effect-scale.js +320 -0
  117. data/app/assets/javascripts/jquery.ui.effect-shake.js +76 -0
  118. data/app/assets/javascripts/jquery.ui.effect-slide.js +66 -0
  119. data/app/assets/javascripts/jquery.ui.effect-transfer.js +49 -0
  120. data/app/assets/javascripts/jquery.ui.effect.all.js +14 -0
  121. data/app/assets/javascripts/jquery.ui.effect.js +1289 -0
  122. data/app/assets/javascripts/jquery.ui.menu.js +625 -0
  123. data/app/assets/javascripts/jquery.ui.mouse.js +172 -0
  124. data/app/assets/javascripts/jquery.ui.position.js +497 -0
  125. data/app/assets/javascripts/jquery.ui.progressbar.js +148 -0
  126. data/app/assets/javascripts/jquery.ui.resizable.js +972 -0
  127. data/app/assets/javascripts/jquery.ui.selectable.js +281 -0
  128. data/app/assets/javascripts/jquery.ui.slider.js +676 -0
  129. data/app/assets/javascripts/jquery.ui.sortable.js +1289 -0
  130. data/app/assets/javascripts/jquery.ui.spinner.js +497 -0
  131. data/app/assets/javascripts/jquery.ui.tabs.js +849 -0
  132. data/app/assets/javascripts/jquery.ui.tooltip.js +406 -0
  133. data/app/assets/javascripts/jquery.ui.widget.js +521 -0
  134. data/app/assets/stylesheets/jquery.ui.accordion.css.erb +42 -0
  135. data/app/assets/stylesheets/jquery.ui.all.css.erb +14 -0
  136. data/app/assets/stylesheets/jquery.ui.autocomplete.css.erb +21 -0
  137. data/app/assets/stylesheets/jquery.ui.base.css.erb +27 -0
  138. data/app/assets/stylesheets/jquery.ui.button.css.erb +118 -0
  139. data/app/assets/stylesheets/jquery.ui.core.css.erb +93 -0
  140. data/app/assets/stylesheets/jquery.ui.datepicker.css.erb +182 -0
  141. data/app/assets/stylesheets/jquery.ui.dialog.css.erb +75 -0
  142. data/app/assets/stylesheets/jquery.ui.menu.css.erb +83 -0
  143. data/app/assets/stylesheets/jquery.ui.progressbar.css.erb +32 -0
  144. data/app/assets/stylesheets/jquery.ui.resizable.css.erb +82 -0
  145. data/app/assets/stylesheets/jquery.ui.selectable.css.erb +19 -0
  146. data/app/assets/stylesheets/jquery.ui.slider.css.erb +77 -0
  147. data/app/assets/stylesheets/jquery.ui.spinner.css.erb +70 -0
  148. data/app/assets/stylesheets/jquery.ui.tabs.css.erb +56 -0
  149. data/app/assets/stylesheets/jquery.ui.theme.css.erb +409 -0
  150. data/app/assets/stylesheets/jquery.ui.tooltip.css.erb +23 -0
  151. data/lib/jquery-ui-middleman.rb +1 -0
  152. data/lib/jquery/ui/version.rb +6 -0
  153. metadata +209 -0
@@ -0,0 +1,52 @@
1
+ //= require jquery.ui.effect
2
+
3
+ /*!
4
+ * jQuery UI Effects Highlight 1.10.3
5
+ * http://jqueryui.com
6
+ *
7
+ * Copyright 2013 jQuery Foundation and other contributors
8
+ * Released under the MIT license.
9
+ * http://jquery.org/license
10
+ *
11
+ * http://api.jqueryui.com/highlight-effect/
12
+ *
13
+ * Depends:
14
+ * jquery.ui.effect.js
15
+ */
16
+ (function( $, undefined ) {
17
+
18
+ $.effects.effect.highlight = function( o, done ) {
19
+ var elem = $( this ),
20
+ props = [ "backgroundImage", "backgroundColor", "opacity" ],
21
+ mode = $.effects.setMode( elem, o.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
+
32
+ elem
33
+ .show()
34
+ .css({
35
+ backgroundImage: "none",
36
+ backgroundColor: o.color || "#ffff99"
37
+ })
38
+ .animate( animation, {
39
+ queue: false,
40
+ duration: o.duration,
41
+ easing: o.easing,
42
+ complete: function() {
43
+ if ( mode === "hide" ) {
44
+ elem.hide();
45
+ }
46
+ $.effects.restore( elem, props );
47
+ done();
48
+ }
49
+ });
50
+ };
51
+
52
+ })(jQuery);
@@ -0,0 +1,65 @@
1
+ //= require jquery.ui.effect
2
+
3
+ /*!
4
+ * jQuery UI Effects Pulsate 1.10.3
5
+ * http://jqueryui.com
6
+ *
7
+ * Copyright 2013 jQuery Foundation and other contributors
8
+ * Released under the MIT license.
9
+ * http://jquery.org/license
10
+ *
11
+ * http://api.jqueryui.com/pulsate-effect/
12
+ *
13
+ * Depends:
14
+ * jquery.ui.effect.js
15
+ */
16
+ (function( $, undefined ) {
17
+
18
+ $.effects.effect.pulsate = function( o, done ) {
19
+ var elem = $( this ),
20
+ mode = $.effects.setMode( elem, o.mode || "show" ),
21
+ show = mode === "show",
22
+ hide = mode === "hide",
23
+ showhide = ( show || mode === "hide" ),
24
+
25
+ // showing or hiding leaves of the "last" animation
26
+ anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
27
+ duration = o.duration / anims,
28
+ animateTo = 0,
29
+ queue = elem.queue(),
30
+ queuelen = queue.length,
31
+ i;
32
+
33
+ if ( show || !elem.is(":visible")) {
34
+ elem.css( "opacity", 0 ).show();
35
+ animateTo = 1;
36
+ }
37
+
38
+ // anims - 1 opacity "toggles"
39
+ for ( i = 1; i < anims; i++ ) {
40
+ elem.animate({
41
+ opacity: animateTo
42
+ }, duration, o.easing );
43
+ animateTo = 1 - animateTo;
44
+ }
45
+
46
+ elem.animate({
47
+ opacity: animateTo
48
+ }, duration, o.easing);
49
+
50
+ elem.queue(function() {
51
+ if ( hide ) {
52
+ elem.hide();
53
+ }
54
+ done();
55
+ });
56
+
57
+ // We just queued up "anims" animations, we need to put them next in the queue
58
+ if ( queuelen > 1 ) {
59
+ queue.splice.apply( queue,
60
+ [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
61
+ }
62
+ elem.dequeue();
63
+ };
64
+
65
+ })(jQuery);
@@ -0,0 +1,320 @@
1
+ //= require jquery.ui.effect
2
+
3
+ /*!
4
+ * jQuery UI Effects Scale 1.10.3
5
+ * http://jqueryui.com
6
+ *
7
+ * Copyright 2013 jQuery Foundation and other contributors
8
+ * Released under the MIT license.
9
+ * http://jquery.org/license
10
+ *
11
+ * http://api.jqueryui.com/scale-effect/
12
+ *
13
+ * Depends:
14
+ * jquery.ui.effect.js
15
+ */
16
+ (function( $, undefined ) {
17
+
18
+ $.effects.effect.puff = function( o, done ) {
19
+ var elem = $( this ),
20
+ mode = $.effects.setMode( elem, o.mode || "hide" ),
21
+ hide = mode === "hide",
22
+ percent = parseInt( o.percent, 10 ) || 150,
23
+ factor = percent / 100,
24
+ original = {
25
+ height: elem.height(),
26
+ width: elem.width(),
27
+ outerHeight: elem.outerHeight(),
28
+ outerWidth: elem.outerWidth()
29
+ };
30
+
31
+ $.extend( o, {
32
+ effect: "scale",
33
+ queue: false,
34
+ fade: true,
35
+ mode: mode,
36
+ complete: done,
37
+ percent: hide ? percent : 100,
38
+ from: hide ?
39
+ original :
40
+ {
41
+ height: original.height * factor,
42
+ width: original.width * factor,
43
+ outerHeight: original.outerHeight * factor,
44
+ outerWidth: original.outerWidth * factor
45
+ }
46
+ });
47
+
48
+ elem.effect( o );
49
+ };
50
+
51
+ $.effects.effect.scale = function( o, done ) {
52
+
53
+ // Create element
54
+ var el = $( this ),
55
+ options = $.extend( true, {}, o ),
56
+ mode = $.effects.setMode( el, o.mode || "effect" ),
57
+ percent = parseInt( o.percent, 10 ) ||
58
+ ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
59
+ direction = o.direction || "both",
60
+ origin = o.origin,
61
+ original = {
62
+ height: el.height(),
63
+ width: el.width(),
64
+ outerHeight: el.outerHeight(),
65
+ outerWidth: el.outerWidth()
66
+ },
67
+ factor = {
68
+ y: direction !== "horizontal" ? (percent / 100) : 1,
69
+ x: direction !== "vertical" ? (percent / 100) : 1
70
+ };
71
+
72
+ // We are going to pass this effect to the size effect:
73
+ options.effect = "size";
74
+ options.queue = false;
75
+ options.complete = done;
76
+
77
+ // Set default origin and restore for show/hide
78
+ if ( mode !== "effect" ) {
79
+ options.origin = origin || ["middle","center"];
80
+ options.restore = true;
81
+ }
82
+
83
+ options.from = o.from || ( mode === "show" ? {
84
+ height: 0,
85
+ width: 0,
86
+ outerHeight: 0,
87
+ outerWidth: 0
88
+ } : original );
89
+ options.to = {
90
+ height: original.height * factor.y,
91
+ width: original.width * factor.x,
92
+ outerHeight: original.outerHeight * factor.y,
93
+ outerWidth: original.outerWidth * factor.x
94
+ };
95
+
96
+ // Fade option to support puff
97
+ if ( options.fade ) {
98
+ if ( mode === "show" ) {
99
+ options.from.opacity = 0;
100
+ options.to.opacity = 1;
101
+ }
102
+ if ( mode === "hide" ) {
103
+ options.from.opacity = 1;
104
+ options.to.opacity = 0;
105
+ }
106
+ }
107
+
108
+ // Animate
109
+ el.effect( options );
110
+
111
+ };
112
+
113
+ $.effects.effect.size = function( o, done ) {
114
+
115
+ // Create element
116
+ var original, baseline, factor,
117
+ el = $( this ),
118
+ props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
119
+
120
+ // Always restore
121
+ props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ],
122
+
123
+ // Copy for children
124
+ props2 = [ "width", "height", "overflow" ],
125
+ cProps = [ "fontSize" ],
126
+ vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
127
+ hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
128
+
129
+ // Set options
130
+ mode = $.effects.setMode( el, o.mode || "effect" ),
131
+ restore = o.restore || mode !== "effect",
132
+ scale = o.scale || "both",
133
+ origin = o.origin || [ "middle", "center" ],
134
+ position = el.css( "position" ),
135
+ props = restore ? props0 : props1,
136
+ zero = {
137
+ height: 0,
138
+ width: 0,
139
+ outerHeight: 0,
140
+ outerWidth: 0
141
+ };
142
+
143
+ if ( mode === "show" ) {
144
+ el.show();
145
+ }
146
+ original = {
147
+ height: el.height(),
148
+ width: el.width(),
149
+ outerHeight: el.outerHeight(),
150
+ outerWidth: el.outerWidth()
151
+ };
152
+
153
+ if ( o.mode === "toggle" && mode === "show" ) {
154
+ el.from = o.to || zero;
155
+ el.to = o.from || original;
156
+ } else {
157
+ el.from = o.from || ( mode === "show" ? zero : original );
158
+ el.to = o.to || ( mode === "hide" ? zero : original );
159
+ }
160
+
161
+ // Set scaling factor
162
+ factor = {
163
+ from: {
164
+ y: el.from.height / original.height,
165
+ x: el.from.width / original.width
166
+ },
167
+ to: {
168
+ y: el.to.height / original.height,
169
+ x: el.to.width / original.width
170
+ }
171
+ };
172
+
173
+ // Scale the css box
174
+ if ( scale === "box" || scale === "both" ) {
175
+
176
+ // Vertical props scaling
177
+ if ( factor.from.y !== factor.to.y ) {
178
+ props = props.concat( vProps );
179
+ el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
180
+ el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
181
+ }
182
+
183
+ // Horizontal props scaling
184
+ if ( factor.from.x !== factor.to.x ) {
185
+ props = props.concat( hProps );
186
+ el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
187
+ el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
188
+ }
189
+ }
190
+
191
+ // Scale the content
192
+ if ( scale === "content" || scale === "both" ) {
193
+
194
+ // Vertical props scaling
195
+ if ( factor.from.y !== factor.to.y ) {
196
+ props = props.concat( cProps ).concat( props2 );
197
+ el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
198
+ el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
199
+ }
200
+ }
201
+
202
+ $.effects.save( el, props );
203
+ el.show();
204
+ $.effects.createWrapper( el );
205
+ el.css( "overflow", "hidden" ).css( el.from );
206
+
207
+ // Adjust
208
+ if (origin) { // Calculate baseline shifts
209
+ baseline = $.effects.getBaseline( origin, original );
210
+ el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
211
+ el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
212
+ el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
213
+ el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
214
+ }
215
+ el.css( el.from ); // set top & left
216
+
217
+ // Animate
218
+ if ( scale === "content" || scale === "both" ) { // Scale the children
219
+
220
+ // Add margins/font-size
221
+ vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
222
+ hProps = hProps.concat([ "marginLeft", "marginRight" ]);
223
+ props2 = props0.concat(vProps).concat(hProps);
224
+
225
+ el.find( "*[width]" ).each( function(){
226
+ var child = $( this ),
227
+ c_original = {
228
+ height: child.height(),
229
+ width: child.width(),
230
+ outerHeight: child.outerHeight(),
231
+ outerWidth: child.outerWidth()
232
+ };
233
+ if (restore) {
234
+ $.effects.save(child, props2);
235
+ }
236
+
237
+ child.from = {
238
+ height: c_original.height * factor.from.y,
239
+ width: c_original.width * factor.from.x,
240
+ outerHeight: c_original.outerHeight * factor.from.y,
241
+ outerWidth: c_original.outerWidth * factor.from.x
242
+ };
243
+ child.to = {
244
+ height: c_original.height * factor.to.y,
245
+ width: c_original.width * factor.to.x,
246
+ outerHeight: c_original.height * factor.to.y,
247
+ outerWidth: c_original.width * factor.to.x
248
+ };
249
+
250
+ // Vertical props scaling
251
+ if ( factor.from.y !== factor.to.y ) {
252
+ child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
253
+ child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
254
+ }
255
+
256
+ // Horizontal props scaling
257
+ if ( factor.from.x !== factor.to.x ) {
258
+ child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
259
+ child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
260
+ }
261
+
262
+ // Animate children
263
+ child.css( child.from );
264
+ child.animate( child.to, o.duration, o.easing, function() {
265
+
266
+ // Restore children
267
+ if ( restore ) {
268
+ $.effects.restore( child, props2 );
269
+ }
270
+ });
271
+ });
272
+ }
273
+
274
+ // Animate
275
+ el.animate( el.to, {
276
+ queue: false,
277
+ duration: o.duration,
278
+ easing: o.easing,
279
+ complete: function() {
280
+ if ( el.to.opacity === 0 ) {
281
+ el.css( "opacity", el.from.opacity );
282
+ }
283
+ if( mode === "hide" ) {
284
+ el.hide();
285
+ }
286
+ $.effects.restore( el, props );
287
+ if ( !restore ) {
288
+
289
+ // we need to calculate our new positioning based on the scaling
290
+ if ( position === "static" ) {
291
+ el.css({
292
+ position: "relative",
293
+ top: el.to.top,
294
+ left: el.to.left
295
+ });
296
+ } else {
297
+ $.each([ "top", "left" ], function( idx, pos ) {
298
+ el.css( pos, function( _, str ) {
299
+ var val = parseInt( str, 10 ),
300
+ toRef = idx ? el.to.left : el.to.top;
301
+
302
+ // if original was "auto", recalculate the new value from wrapper
303
+ if ( str === "auto" ) {
304
+ return toRef + "px";
305
+ }
306
+
307
+ return val + toRef + "px";
308
+ });
309
+ });
310
+ }
311
+ }
312
+
313
+ $.effects.removeWrapper( el );
314
+ done();
315
+ }
316
+ });
317
+
318
+ };
319
+
320
+ })(jQuery);
@@ -0,0 +1,76 @@
1
+ //= require jquery.ui.effect
2
+
3
+ /*!
4
+ * jQuery UI Effects Shake 1.10.3
5
+ * http://jqueryui.com
6
+ *
7
+ * Copyright 2013 jQuery Foundation and other contributors
8
+ * Released under the MIT license.
9
+ * http://jquery.org/license
10
+ *
11
+ * http://api.jqueryui.com/shake-effect/
12
+ *
13
+ * Depends:
14
+ * jquery.ui.effect.js
15
+ */
16
+ (function( $, undefined ) {
17
+
18
+ $.effects.effect.shake = function( o, done ) {
19
+
20
+ var el = $( this ),
21
+ props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
22
+ mode = $.effects.setMode( el, o.mode || "effect" ),
23
+ direction = o.direction || "left",
24
+ distance = o.distance || 20,
25
+ times = o.times || 3,
26
+ anims = times * 2 + 1,
27
+ speed = Math.round(o.duration/anims),
28
+ ref = (direction === "up" || direction === "down") ? "top" : "left",
29
+ positiveMotion = (direction === "up" || direction === "left"),
30
+ animation = {},
31
+ animation1 = {},
32
+ animation2 = {},
33
+ i,
34
+
35
+ // we will need to re-assemble the queue to stack our animations in place
36
+ queue = el.queue(),
37
+ queuelen = queue.length;
38
+
39
+ $.effects.save( el, props );
40
+ el.show();
41
+ $.effects.createWrapper( el );
42
+
43
+ // Animation
44
+ animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
45
+ animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
46
+ animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
47
+
48
+ // Animate
49
+ el.animate( animation, speed, o.easing );
50
+
51
+ // Shakes
52
+ for ( i = 1; i < times; i++ ) {
53
+ el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
54
+ }
55
+ el
56
+ .animate( animation1, speed, o.easing )
57
+ .animate( animation, speed / 2, o.easing )
58
+ .queue(function() {
59
+ if ( mode === "hide" ) {
60
+ el.hide();
61
+ }
62
+ $.effects.restore( el, props );
63
+ $.effects.removeWrapper( el );
64
+ done();
65
+ });
66
+
67
+ // inject all the animations we just queued to be first in line (after "inprogress")
68
+ if ( queuelen > 1) {
69
+ queue.splice.apply( queue,
70
+ [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
71
+ }
72
+ el.dequeue();
73
+
74
+ };
75
+
76
+ })(jQuery);