jqueryui-requirejs-rails 0.1.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.
Files changed (114) hide show
  1. data/LICENSE +22 -0
  2. data/README.md +3 -0
  3. data/Rakefile +27 -0
  4. data/app/assets/javascripts/jqueryui/accordion.js +575 -0
  5. data/app/assets/javascripts/jqueryui/autocomplete.js +613 -0
  6. data/app/assets/javascripts/jqueryui/button.js +422 -0
  7. data/app/assets/javascripts/jqueryui/core.js +323 -0
  8. data/app/assets/javascripts/jqueryui/datepicker-af.js +26 -0
  9. data/app/assets/javascripts/jqueryui/datepicker-ar-DZ.js +26 -0
  10. data/app/assets/javascripts/jqueryui/datepicker-ar.js +26 -0
  11. data/app/assets/javascripts/jqueryui/datepicker-az.js +26 -0
  12. data/app/assets/javascripts/jqueryui/datepicker-be.js +26 -0
  13. data/app/assets/javascripts/jqueryui/datepicker-bg.js +27 -0
  14. data/app/assets/javascripts/jqueryui/datepicker-bs.js +26 -0
  15. data/app/assets/javascripts/jqueryui/datepicker-ca.js +26 -0
  16. data/app/assets/javascripts/jqueryui/datepicker-cs.js +26 -0
  17. data/app/assets/javascripts/jqueryui/datepicker-cy-GB.js +26 -0
  18. data/app/assets/javascripts/jqueryui/datepicker-da.js +26 -0
  19. data/app/assets/javascripts/jqueryui/datepicker-de.js +26 -0
  20. data/app/assets/javascripts/jqueryui/datepicker-el.js +26 -0
  21. data/app/assets/javascripts/jqueryui/datepicker-en-AU.js +26 -0
  22. data/app/assets/javascripts/jqueryui/datepicker-en-GB.js +26 -0
  23. data/app/assets/javascripts/jqueryui/datepicker-en-NZ.js +26 -0
  24. data/app/assets/javascripts/jqueryui/datepicker-eo.js +26 -0
  25. data/app/assets/javascripts/jqueryui/datepicker-es.js +26 -0
  26. data/app/assets/javascripts/jqueryui/datepicker-et.js +26 -0
  27. data/app/assets/javascripts/jqueryui/datepicker-eu.js +26 -0
  28. data/app/assets/javascripts/jqueryui/datepicker-fa.js +62 -0
  29. data/app/assets/javascripts/jqueryui/datepicker-fi.js +26 -0
  30. data/app/assets/javascripts/jqueryui/datepicker-fo.js +26 -0
  31. data/app/assets/javascripts/jqueryui/datepicker-fr-CA.js +26 -0
  32. data/app/assets/javascripts/jqueryui/datepicker-fr-CH.js +26 -0
  33. data/app/assets/javascripts/jqueryui/datepicker-fr.js +28 -0
  34. data/app/assets/javascripts/jqueryui/datepicker-gl.js +26 -0
  35. data/app/assets/javascripts/jqueryui/datepicker-he.js +26 -0
  36. data/app/assets/javascripts/jqueryui/datepicker-hi.js +26 -0
  37. data/app/assets/javascripts/jqueryui/datepicker-hr.js +26 -0
  38. data/app/assets/javascripts/jqueryui/datepicker-hu.js +26 -0
  39. data/app/assets/javascripts/jqueryui/datepicker-hy.js +26 -0
  40. data/app/assets/javascripts/jqueryui/datepicker-id.js +26 -0
  41. data/app/assets/javascripts/jqueryui/datepicker-is.js +26 -0
  42. data/app/assets/javascripts/jqueryui/datepicker-it.js +26 -0
  43. data/app/assets/javascripts/jqueryui/datepicker-ja.js +26 -0
  44. data/app/assets/javascripts/jqueryui/datepicker-ka.js +24 -0
  45. data/app/assets/javascripts/jqueryui/datepicker-kk.js +26 -0
  46. data/app/assets/javascripts/jqueryui/datepicker-km.js +26 -0
  47. data/app/assets/javascripts/jqueryui/datepicker-ko.js +26 -0
  48. data/app/assets/javascripts/jqueryui/datepicker-ky.js +27 -0
  49. data/app/assets/javascripts/jqueryui/datepicker-lb.js +26 -0
  50. data/app/assets/javascripts/jqueryui/datepicker-lt.js +26 -0
  51. data/app/assets/javascripts/jqueryui/datepicker-lv.js +26 -0
  52. data/app/assets/javascripts/jqueryui/datepicker-mk.js +26 -0
  53. data/app/assets/javascripts/jqueryui/datepicker-ml.js +26 -0
  54. data/app/assets/javascripts/jqueryui/datepicker-ms.js +26 -0
  55. data/app/assets/javascripts/jqueryui/datepicker-nb.js +25 -0
  56. data/app/assets/javascripts/jqueryui/datepicker-nl-BE.js +26 -0
  57. data/app/assets/javascripts/jqueryui/datepicker-nl.js +26 -0
  58. data/app/assets/javascripts/jqueryui/datepicker-nn.js +25 -0
  59. data/app/assets/javascripts/jqueryui/datepicker-no.js +26 -0
  60. data/app/assets/javascripts/jqueryui/datepicker-pl.js +26 -0
  61. data/app/assets/javascripts/jqueryui/datepicker-pt-BR.js +26 -0
  62. data/app/assets/javascripts/jqueryui/datepicker-pt.js +25 -0
  63. data/app/assets/javascripts/jqueryui/datepicker-rm.js +24 -0
  64. data/app/assets/javascripts/jqueryui/datepicker-ro.js +29 -0
  65. data/app/assets/javascripts/jqueryui/datepicker-ru.js +26 -0
  66. data/app/assets/javascripts/jqueryui/datepicker-sk.js +26 -0
  67. data/app/assets/javascripts/jqueryui/datepicker-sl.js +27 -0
  68. data/app/assets/javascripts/jqueryui/datepicker-sq.js +26 -0
  69. data/app/assets/javascripts/jqueryui/datepicker-sr-SR.js +26 -0
  70. data/app/assets/javascripts/jqueryui/datepicker-sr.js +26 -0
  71. data/app/assets/javascripts/jqueryui/datepicker-sv.js +26 -0
  72. data/app/assets/javascripts/jqueryui/datepicker-ta.js +26 -0
  73. data/app/assets/javascripts/jqueryui/datepicker-th.js +26 -0
  74. data/app/assets/javascripts/jqueryui/datepicker-tj.js +26 -0
  75. data/app/assets/javascripts/jqueryui/datepicker-tr.js +26 -0
  76. data/app/assets/javascripts/jqueryui/datepicker-uk.js +27 -0
  77. data/app/assets/javascripts/jqueryui/datepicker-vi.js +26 -0
  78. data/app/assets/javascripts/jqueryui/datepicker-zh-CN.js +26 -0
  79. data/app/assets/javascripts/jqueryui/datepicker-zh-HK.js +26 -0
  80. data/app/assets/javascripts/jqueryui/datepicker-zh-TW.js +26 -0
  81. data/app/assets/javascripts/jqueryui/datepicker.js +2053 -0
  82. data/app/assets/javascripts/jqueryui/dialog.js +811 -0
  83. data/app/assets/javascripts/jqueryui/draggable.js +936 -0
  84. data/app/assets/javascripts/jqueryui/droppable.js +375 -0
  85. data/app/assets/javascripts/jqueryui/effect-blind.js +85 -0
  86. data/app/assets/javascripts/jqueryui/effect-bounce.js +116 -0
  87. data/app/assets/javascripts/jqueryui/effect-clip.js +70 -0
  88. data/app/assets/javascripts/jqueryui/effect-drop.js +68 -0
  89. data/app/assets/javascripts/jqueryui/effect-explode.js +100 -0
  90. data/app/assets/javascripts/jqueryui/effect-fade.js +33 -0
  91. data/app/assets/javascripts/jqueryui/effect-fold.js +79 -0
  92. data/app/assets/javascripts/jqueryui/effect-highlight.js +53 -0
  93. data/app/assets/javascripts/jqueryui/effect-pulsate.js +66 -0
  94. data/app/assets/javascripts/jqueryui/effect-scale.js +321 -0
  95. data/app/assets/javascripts/jqueryui/effect-shake.js +77 -0
  96. data/app/assets/javascripts/jqueryui/effect-slide.js +67 -0
  97. data/app/assets/javascripts/jqueryui/effect-transfer.js +50 -0
  98. data/app/assets/javascripts/jqueryui/effect.js +1292 -0
  99. data/app/assets/javascripts/jqueryui/menu.js +624 -0
  100. data/app/assets/javascripts/jqueryui/mouse.js +172 -0
  101. data/app/assets/javascripts/jqueryui/position.js +500 -0
  102. data/app/assets/javascripts/jqueryui/progressbar.js +148 -0
  103. data/app/assets/javascripts/jqueryui/resizable.js +971 -0
  104. data/app/assets/javascripts/jqueryui/selectable.js +280 -0
  105. data/app/assets/javascripts/jqueryui/slider.js +675 -0
  106. data/app/assets/javascripts/jqueryui/sortable.js +1285 -0
  107. data/app/assets/javascripts/jqueryui/spinner.js +496 -0
  108. data/app/assets/javascripts/jqueryui/tabs.js +849 -0
  109. data/app/assets/javascripts/jqueryui/tooltip.js +405 -0
  110. data/app/assets/javascripts/jqueryui/widget.js +524 -0
  111. data/lib/jqueryui-requirejs-rails.rb +4 -0
  112. data/lib/jqueryui-requirejs-rails/engine.rb +4 -0
  113. data/lib/jqueryui-requirejs-rails/version.rb +3 -0
  114. metadata +196 -0
@@ -0,0 +1,375 @@
1
+ define(['jquery','./core','./widget','./mouse','./draggable'], function (jQuery) {
2
+ /*!
3
+ * jQuery UI Droppable 1.10.2
4
+ * http://jqueryui.com
5
+ *
6
+ * Copyright 2013 jQuery Foundation and other contributors
7
+ * Released under the MIT license.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://api.jqueryui.com/droppable/
11
+ *
12
+ * Depends:
13
+ * jquery.ui.core.js
14
+ * jquery.ui.widget.js
15
+ * jquery.ui.mouse.js
16
+ * jquery.ui.draggable.js
17
+ */
18
+ (function( $, undefined ) {
19
+
20
+ function isOverAxis( x, reference, size ) {
21
+ return ( x > reference ) && ( x < ( reference + size ) );
22
+ }
23
+
24
+ $.widget("ui.droppable", {
25
+ version: "1.10.2",
26
+ widgetEventPrefix: "drop",
27
+ options: {
28
+ accept: "*",
29
+ activeClass: false,
30
+ addClasses: true,
31
+ greedy: false,
32
+ hoverClass: false,
33
+ scope: "default",
34
+ tolerance: "intersect",
35
+
36
+ // callbacks
37
+ activate: null,
38
+ deactivate: null,
39
+ drop: null,
40
+ out: null,
41
+ over: null
42
+ },
43
+ _create: function() {
44
+
45
+ var o = this.options,
46
+ accept = o.accept;
47
+
48
+ this.isover = false;
49
+ this.isout = true;
50
+
51
+ this.accept = $.isFunction(accept) ? accept : function(d) {
52
+ return d.is(accept);
53
+ };
54
+
55
+ //Store the droppable's proportions
56
+ this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
57
+
58
+ // Add the reference and positions to the manager
59
+ $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
60
+ $.ui.ddmanager.droppables[o.scope].push(this);
61
+
62
+ (o.addClasses && this.element.addClass("ui-droppable"));
63
+
64
+ },
65
+
66
+ _destroy: function() {
67
+ var i = 0,
68
+ drop = $.ui.ddmanager.droppables[this.options.scope];
69
+
70
+ for ( ; i < drop.length; i++ ) {
71
+ if ( drop[i] === this ) {
72
+ drop.splice(i, 1);
73
+ }
74
+ }
75
+
76
+ this.element.removeClass("ui-droppable ui-droppable-disabled");
77
+ },
78
+
79
+ _setOption: function(key, value) {
80
+
81
+ if(key === "accept") {
82
+ this.accept = $.isFunction(value) ? value : function(d) {
83
+ return d.is(value);
84
+ };
85
+ }
86
+ $.Widget.prototype._setOption.apply(this, arguments);
87
+ },
88
+
89
+ _activate: function(event) {
90
+ var draggable = $.ui.ddmanager.current;
91
+ if(this.options.activeClass) {
92
+ this.element.addClass(this.options.activeClass);
93
+ }
94
+ if(draggable){
95
+ this._trigger("activate", event, this.ui(draggable));
96
+ }
97
+ },
98
+
99
+ _deactivate: function(event) {
100
+ var draggable = $.ui.ddmanager.current;
101
+ if(this.options.activeClass) {
102
+ this.element.removeClass(this.options.activeClass);
103
+ }
104
+ if(draggable){
105
+ this._trigger("deactivate", event, this.ui(draggable));
106
+ }
107
+ },
108
+
109
+ _over: function(event) {
110
+
111
+ var draggable = $.ui.ddmanager.current;
112
+
113
+ // Bail if draggable and droppable are same element
114
+ if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
115
+ return;
116
+ }
117
+
118
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
119
+ if(this.options.hoverClass) {
120
+ this.element.addClass(this.options.hoverClass);
121
+ }
122
+ this._trigger("over", event, this.ui(draggable));
123
+ }
124
+
125
+ },
126
+
127
+ _out: function(event) {
128
+
129
+ var draggable = $.ui.ddmanager.current;
130
+
131
+ // Bail if draggable and droppable are same element
132
+ if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
133
+ return;
134
+ }
135
+
136
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
137
+ if(this.options.hoverClass) {
138
+ this.element.removeClass(this.options.hoverClass);
139
+ }
140
+ this._trigger("out", event, this.ui(draggable));
141
+ }
142
+
143
+ },
144
+
145
+ _drop: function(event,custom) {
146
+
147
+ var draggable = custom || $.ui.ddmanager.current,
148
+ childrenIntersection = false;
149
+
150
+ // Bail if draggable and droppable are same element
151
+ if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
152
+ return false;
153
+ }
154
+
155
+ this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
156
+ var inst = $.data(this, "ui-droppable");
157
+ if(
158
+ inst.options.greedy &&
159
+ !inst.options.disabled &&
160
+ inst.options.scope === draggable.options.scope &&
161
+ inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
162
+ $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
163
+ ) { childrenIntersection = true; return false; }
164
+ });
165
+ if(childrenIntersection) {
166
+ return false;
167
+ }
168
+
169
+ if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
170
+ if(this.options.activeClass) {
171
+ this.element.removeClass(this.options.activeClass);
172
+ }
173
+ if(this.options.hoverClass) {
174
+ this.element.removeClass(this.options.hoverClass);
175
+ }
176
+ this._trigger("drop", event, this.ui(draggable));
177
+ return this.element;
178
+ }
179
+
180
+ return false;
181
+
182
+ },
183
+
184
+ ui: function(c) {
185
+ return {
186
+ draggable: (c.currentItem || c.element),
187
+ helper: c.helper,
188
+ position: c.position,
189
+ offset: c.positionAbs
190
+ };
191
+ }
192
+
193
+ });
194
+
195
+ $.ui.intersect = function(draggable, droppable, toleranceMode) {
196
+
197
+ if (!droppable.offset) {
198
+ return false;
199
+ }
200
+
201
+ var draggableLeft, draggableTop,
202
+ x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
203
+ y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,
204
+ l = droppable.offset.left, r = l + droppable.proportions.width,
205
+ t = droppable.offset.top, b = t + droppable.proportions.height;
206
+
207
+ switch (toleranceMode) {
208
+ case "fit":
209
+ return (l <= x1 && x2 <= r && t <= y1 && y2 <= b);
210
+ case "intersect":
211
+ return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half
212
+ x2 - (draggable.helperProportions.width / 2) < r && // Left Half
213
+ t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half
214
+ y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
215
+ case "pointer":
216
+ draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
217
+ draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
218
+ return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
219
+ case "touch":
220
+ return (
221
+ (y1 >= t && y1 <= b) || // Top edge touching
222
+ (y2 >= t && y2 <= b) || // Bottom edge touching
223
+ (y1 < t && y2 > b) // Surrounded vertically
224
+ ) && (
225
+ (x1 >= l && x1 <= r) || // Left edge touching
226
+ (x2 >= l && x2 <= r) || // Right edge touching
227
+ (x1 < l && x2 > r) // Surrounded horizontally
228
+ );
229
+ default:
230
+ return false;
231
+ }
232
+
233
+ };
234
+
235
+ /*
236
+ This manager tracks offsets of draggables and droppables
237
+ */
238
+ $.ui.ddmanager = {
239
+ current: null,
240
+ droppables: { "default": [] },
241
+ prepareOffsets: function(t, event) {
242
+
243
+ var i, j,
244
+ m = $.ui.ddmanager.droppables[t.options.scope] || [],
245
+ type = event ? event.type : null, // workaround for #2317
246
+ list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
247
+
248
+ droppablesLoop: for (i = 0; i < m.length; i++) {
249
+
250
+ //No disabled and non-accepted
251
+ if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {
252
+ continue;
253
+ }
254
+
255
+ // Filter out elements in the current dragged item
256
+ for (j=0; j < list.length; j++) {
257
+ if(list[j] === m[i].element[0]) {
258
+ m[i].proportions.height = 0;
259
+ continue droppablesLoop;
260
+ }
261
+ }
262
+
263
+ m[i].visible = m[i].element.css("display") !== "none";
264
+ if(!m[i].visible) {
265
+ continue;
266
+ }
267
+
268
+ //Activate the droppable if used directly from draggables
269
+ if(type === "mousedown") {
270
+ m[i]._activate.call(m[i], event);
271
+ }
272
+
273
+ m[i].offset = m[i].element.offset();
274
+ m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
275
+
276
+ }
277
+
278
+ },
279
+ drop: function(draggable, event) {
280
+
281
+ var dropped = false;
282
+ // Create a copy of the droppables in case the list changes during the drop (#9116)
283
+ $.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() {
284
+
285
+ if(!this.options) {
286
+ return;
287
+ }
288
+ if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {
289
+ dropped = this._drop.call(this, event) || dropped;
290
+ }
291
+
292
+ if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
293
+ this.isout = true;
294
+ this.isover = false;
295
+ this._deactivate.call(this, event);
296
+ }
297
+
298
+ });
299
+ return dropped;
300
+
301
+ },
302
+ dragStart: function( draggable, event ) {
303
+ //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
304
+ draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
305
+ if( !draggable.options.refreshPositions ) {
306
+ $.ui.ddmanager.prepareOffsets( draggable, event );
307
+ }
308
+ });
309
+ },
310
+ drag: function(draggable, event) {
311
+
312
+ //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
313
+ if(draggable.options.refreshPositions) {
314
+ $.ui.ddmanager.prepareOffsets(draggable, event);
315
+ }
316
+
317
+ //Run through all droppables and check their positions based on specific tolerance options
318
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
319
+
320
+ if(this.options.disabled || this.greedyChild || !this.visible) {
321
+ return;
322
+ }
323
+
324
+ var parentInstance, scope, parent,
325
+ intersects = $.ui.intersect(draggable, this, this.options.tolerance),
326
+ c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null);
327
+ if(!c) {
328
+ return;
329
+ }
330
+
331
+ if (this.options.greedy) {
332
+ // find droppable parents with same scope
333
+ scope = this.options.scope;
334
+ parent = this.element.parents(":data(ui-droppable)").filter(function () {
335
+ return $.data(this, "ui-droppable").options.scope === scope;
336
+ });
337
+
338
+ if (parent.length) {
339
+ parentInstance = $.data(parent[0], "ui-droppable");
340
+ parentInstance.greedyChild = (c === "isover");
341
+ }
342
+ }
343
+
344
+ // we just moved into a greedy child
345
+ if (parentInstance && c === "isover") {
346
+ parentInstance.isover = false;
347
+ parentInstance.isout = true;
348
+ parentInstance._out.call(parentInstance, event);
349
+ }
350
+
351
+ this[c] = true;
352
+ this[c === "isout" ? "isover" : "isout"] = false;
353
+ this[c === "isover" ? "_over" : "_out"].call(this, event);
354
+
355
+ // we just moved out of a greedy child
356
+ if (parentInstance && c === "isout") {
357
+ parentInstance.isout = false;
358
+ parentInstance.isover = true;
359
+ parentInstance._over.call(parentInstance, event);
360
+ }
361
+ });
362
+
363
+ },
364
+ dragStop: function( draggable, event ) {
365
+ draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
366
+ //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
367
+ if( !draggable.options.refreshPositions ) {
368
+ $.ui.ddmanager.prepareOffsets( draggable, event );
369
+ }
370
+ }
371
+ };
372
+
373
+ })(jQuery);
374
+
375
+ });
@@ -0,0 +1,85 @@
1
+ define(['jquery','./effect'], function (jQuery) {
2
+ /*!
3
+ * jQuery UI Effects Blind 1.10.2
4
+ * http://jqueryui.com
5
+ *
6
+ * Copyright 2013 jQuery Foundation and other contributors
7
+ * Released under the MIT license.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://api.jqueryui.com/blind-effect/
11
+ *
12
+ * Depends:
13
+ * jquery.ui.effect.js
14
+ */
15
+ (function( $, undefined ) {
16
+
17
+ var rvertical = /up|down|vertical/,
18
+ rpositivemotion = /up|left|vertical|horizontal/;
19
+
20
+ $.effects.effect.blind = function( o, done ) {
21
+ // Create element
22
+ var el = $( this ),
23
+ props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
24
+ mode = $.effects.setMode( el, o.mode || "hide" ),
25
+ direction = o.direction || "up",
26
+ vertical = rvertical.test( direction ),
27
+ ref = vertical ? "height" : "width",
28
+ ref2 = vertical ? "top" : "left",
29
+ motion = rpositivemotion.test( direction ),
30
+ animation = {},
31
+ show = mode === "show",
32
+ wrapper, distance, margin;
33
+
34
+ // if already wrapped, the wrapper's properties are my property. #6245
35
+ if ( el.parent().is( ".ui-effects-wrapper" ) ) {
36
+ $.effects.save( el.parent(), props );
37
+ } else {
38
+ $.effects.save( el, props );
39
+ }
40
+ el.show();
41
+ wrapper = $.effects.createWrapper( el ).css({
42
+ overflow: "hidden"
43
+ });
44
+
45
+ distance = wrapper[ ref ]();
46
+ margin = parseFloat( wrapper.css( ref2 ) ) || 0;
47
+
48
+ animation[ ref ] = show ? distance : 0;
49
+ if ( !motion ) {
50
+ el
51
+ .css( vertical ? "bottom" : "right", 0 )
52
+ .css( vertical ? "top" : "left", "auto" )
53
+ .css({ position: "absolute" });
54
+
55
+ animation[ ref2 ] = show ? margin : distance + margin;
56
+ }
57
+
58
+ // start at 0 if we are showing
59
+ if ( show ) {
60
+ wrapper.css( ref, 0 );
61
+ if ( ! motion ) {
62
+ wrapper.css( ref2, margin + distance );
63
+ }
64
+ }
65
+
66
+ // Animate
67
+ wrapper.animate( animation, {
68
+ duration: o.duration,
69
+ easing: o.easing,
70
+ queue: false,
71
+ complete: function() {
72
+ if ( mode === "hide" ) {
73
+ el.hide();
74
+ }
75
+ $.effects.restore( el, props );
76
+ $.effects.removeWrapper( el );
77
+ done();
78
+ }
79
+ });
80
+
81
+ };
82
+
83
+ })(jQuery);
84
+
85
+ });