jquery-ui-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jquery-ui-rails might be problematic. Click here for more details.

Files changed (137) hide show
  1. data/.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,302 @@
1
+ //= require jquery
2
+ //= require jquery.ui.core
3
+ //= require jquery.ui.widget
4
+ //= require jquery.ui.mouse
5
+ //= require jquery.ui.draggable
6
+
7
+ /*
8
+ * jQuery UI Droppable 1.8.17
9
+ *
10
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
11
+ * Dual licensed under the MIT or GPL Version 2 licenses.
12
+ * http://jquery.org/license
13
+ *
14
+ * http://docs.jquery.com/UI/Droppables
15
+ *
16
+ * Depends:
17
+ * jquery.ui.core.js
18
+ * jquery.ui.widget.js
19
+ * jquery.ui.mouse.js
20
+ * jquery.ui.draggable.js
21
+ */
22
+ (function( $, undefined ) {
23
+
24
+ $.widget("ui.droppable", {
25
+ widgetEventPrefix: "drop",
26
+ options: {
27
+ accept: '*',
28
+ activeClass: false,
29
+ addClasses: true,
30
+ greedy: false,
31
+ hoverClass: false,
32
+ scope: 'default',
33
+ tolerance: 'intersect'
34
+ },
35
+ _create: function() {
36
+
37
+ var o = this.options, accept = o.accept;
38
+ this.isover = 0; this.isout = 1;
39
+
40
+ this.accept = $.isFunction(accept) ? accept : function(d) {
41
+ return d.is(accept);
42
+ };
43
+
44
+ //Store the droppable's proportions
45
+ this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
46
+
47
+ // Add the reference and positions to the manager
48
+ $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
49
+ $.ui.ddmanager.droppables[o.scope].push(this);
50
+
51
+ (o.addClasses && this.element.addClass("ui-droppable"));
52
+
53
+ },
54
+
55
+ destroy: function() {
56
+ var drop = $.ui.ddmanager.droppables[this.options.scope];
57
+ for ( var i = 0; i < drop.length; i++ )
58
+ if ( drop[i] == this )
59
+ drop.splice(i, 1);
60
+
61
+ this.element
62
+ .removeClass("ui-droppable ui-droppable-disabled")
63
+ .removeData("droppable")
64
+ .unbind(".droppable");
65
+
66
+ return this;
67
+ },
68
+
69
+ _setOption: function(key, value) {
70
+
71
+ if(key == 'accept') {
72
+ this.accept = $.isFunction(value) ? value : function(d) {
73
+ return d.is(value);
74
+ };
75
+ }
76
+ $.Widget.prototype._setOption.apply(this, arguments);
77
+ },
78
+
79
+ _activate: function(event) {
80
+ var draggable = $.ui.ddmanager.current;
81
+ if(this.options.activeClass) this.element.addClass(this.options.activeClass);
82
+ (draggable && this._trigger('activate', event, this.ui(draggable)));
83
+ },
84
+
85
+ _deactivate: function(event) {
86
+ var draggable = $.ui.ddmanager.current;
87
+ if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
88
+ (draggable && this._trigger('deactivate', event, this.ui(draggable)));
89
+ },
90
+
91
+ _over: function(event) {
92
+
93
+ var draggable = $.ui.ddmanager.current;
94
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
95
+
96
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
97
+ if(this.options.hoverClass) this.element.addClass(this.options.hoverClass);
98
+ this._trigger('over', event, this.ui(draggable));
99
+ }
100
+
101
+ },
102
+
103
+ _out: function(event) {
104
+
105
+ var draggable = $.ui.ddmanager.current;
106
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
107
+
108
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
109
+ if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
110
+ this._trigger('out', event, this.ui(draggable));
111
+ }
112
+
113
+ },
114
+
115
+ _drop: function(event,custom) {
116
+
117
+ var draggable = custom || $.ui.ddmanager.current;
118
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
119
+
120
+ var childrenIntersection = false;
121
+ this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {
122
+ var inst = $.data(this, 'droppable');
123
+ if(
124
+ inst.options.greedy
125
+ && !inst.options.disabled
126
+ && inst.options.scope == draggable.options.scope
127
+ && inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element))
128
+ && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
129
+ ) { childrenIntersection = true; return false; }
130
+ });
131
+ if(childrenIntersection) return false;
132
+
133
+ if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
134
+ if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
135
+ if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
136
+ this._trigger('drop', event, this.ui(draggable));
137
+ return this.element;
138
+ }
139
+
140
+ return false;
141
+
142
+ },
143
+
144
+ ui: function(c) {
145
+ return {
146
+ draggable: (c.currentItem || c.element),
147
+ helper: c.helper,
148
+ position: c.position,
149
+ offset: c.positionAbs
150
+ };
151
+ }
152
+
153
+ });
154
+
155
+ $.extend($.ui.droppable, {
156
+ version: "1.8.17"
157
+ });
158
+
159
+ $.ui.intersect = function(draggable, droppable, toleranceMode) {
160
+
161
+ if (!droppable.offset) return false;
162
+
163
+ var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
164
+ y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
165
+ var l = droppable.offset.left, r = l + droppable.proportions.width,
166
+ t = droppable.offset.top, b = t + droppable.proportions.height;
167
+
168
+ switch (toleranceMode) {
169
+ case 'fit':
170
+ return (l <= x1 && x2 <= r
171
+ && t <= y1 && y2 <= b);
172
+ break;
173
+ case 'intersect':
174
+ return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
175
+ && x2 - (draggable.helperProportions.width / 2) < r // Left Half
176
+ && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half
177
+ && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
178
+ break;
179
+ case 'pointer':
180
+ var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left),
181
+ draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top),
182
+ isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);
183
+ return isOver;
184
+ break;
185
+ case 'touch':
186
+ return (
187
+ (y1 >= t && y1 <= b) || // Top edge touching
188
+ (y2 >= t && y2 <= b) || // Bottom edge touching
189
+ (y1 < t && y2 > b) // Surrounded vertically
190
+ ) && (
191
+ (x1 >= l && x1 <= r) || // Left edge touching
192
+ (x2 >= l && x2 <= r) || // Right edge touching
193
+ (x1 < l && x2 > r) // Surrounded horizontally
194
+ );
195
+ break;
196
+ default:
197
+ return false;
198
+ break;
199
+ }
200
+
201
+ };
202
+
203
+ /*
204
+ This manager tracks offsets of draggables and droppables
205
+ */
206
+ $.ui.ddmanager = {
207
+ current: null,
208
+ droppables: { 'default': [] },
209
+ prepareOffsets: function(t, event) {
210
+
211
+ var m = $.ui.ddmanager.droppables[t.options.scope] || [];
212
+ var type = event ? event.type : null; // workaround for #2317
213
+ var list = (t.currentItem || t.element).find(":data(droppable)").andSelf();
214
+
215
+ droppablesLoop: for (var i = 0; i < m.length; i++) {
216
+
217
+ if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted
218
+ for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
219
+ m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
220
+
221
+ if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
222
+
223
+ m[i].offset = m[i].element.offset();
224
+ m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
225
+
226
+ }
227
+
228
+ },
229
+ drop: function(draggable, event) {
230
+
231
+ var dropped = false;
232
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
233
+
234
+ if(!this.options) return;
235
+ if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
236
+ dropped = this._drop.call(this, event) || dropped;
237
+
238
+ if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
239
+ this.isout = 1; this.isover = 0;
240
+ this._deactivate.call(this, event);
241
+ }
242
+
243
+ });
244
+ return dropped;
245
+
246
+ },
247
+ dragStart: function( draggable, event ) {
248
+ //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
249
+ draggable.element.parents( ":not(body,html)" ).bind( "scroll.droppable", function() {
250
+ if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
251
+ });
252
+ },
253
+ drag: function(draggable, event) {
254
+
255
+ //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
256
+ if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
257
+
258
+ //Run through all droppables and check their positions based on specific tolerance options
259
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
260
+
261
+ if(this.options.disabled || this.greedyChild || !this.visible) return;
262
+ var intersects = $.ui.intersect(draggable, this, this.options.tolerance);
263
+
264
+ var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);
265
+ if(!c) return;
266
+
267
+ var parentInstance;
268
+ if (this.options.greedy) {
269
+ var parent = this.element.parents(':data(droppable):eq(0)');
270
+ if (parent.length) {
271
+ parentInstance = $.data(parent[0], 'droppable');
272
+ parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
273
+ }
274
+ }
275
+
276
+ // we just moved into a greedy child
277
+ if (parentInstance && c == 'isover') {
278
+ parentInstance['isover'] = 0;
279
+ parentInstance['isout'] = 1;
280
+ parentInstance._out.call(parentInstance, event);
281
+ }
282
+
283
+ this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;
284
+ this[c == "isover" ? "_over" : "_out"].call(this, event);
285
+
286
+ // we just moved out of a greedy child
287
+ if (parentInstance && c == 'isout') {
288
+ parentInstance['isout'] = 0;
289
+ parentInstance['isover'] = 1;
290
+ parentInstance._over.call(parentInstance, event);
291
+ }
292
+ });
293
+
294
+ },
295
+ dragStop: function( draggable, event ) {
296
+ draggable.element.parents( ":not(body,html)" ).unbind( "scroll.droppable" );
297
+ //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
298
+ if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
299
+ }
300
+ };
301
+
302
+ })(jQuery);
@@ -0,0 +1,166 @@
1
+ //= require jquery
2
+ //= require jquery.ui.core
3
+ //= require jquery.ui.widget
4
+
5
+ /*!
6
+ * jQuery UI Mouse 1.8.17
7
+ *
8
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
9
+ * Dual licensed under the MIT or GPL Version 2 licenses.
10
+ * http://jquery.org/license
11
+ *
12
+ * http://docs.jquery.com/UI/Mouse
13
+ *
14
+ * Depends:
15
+ * jquery.ui.widget.js
16
+ */
17
+ (function( $, undefined ) {
18
+
19
+ var mouseHandled = false;
20
+ $( document ).mouseup( function( e ) {
21
+ mouseHandled = false;
22
+ });
23
+
24
+ $.widget("ui.mouse", {
25
+ options: {
26
+ cancel: ':input,option',
27
+ distance: 1,
28
+ delay: 0
29
+ },
30
+ _mouseInit: function() {
31
+ var self = this;
32
+
33
+ this.element
34
+ .bind('mousedown.'+this.widgetName, function(event) {
35
+ return self._mouseDown(event);
36
+ })
37
+ .bind('click.'+this.widgetName, function(event) {
38
+ if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) {
39
+ $.removeData(event.target, self.widgetName + '.preventClickEvent');
40
+ event.stopImmediatePropagation();
41
+ return false;
42
+ }
43
+ });
44
+
45
+ this.started = false;
46
+ },
47
+
48
+ // TODO: make sure destroying one instance of mouse doesn't mess with
49
+ // other instances of mouse
50
+ _mouseDestroy: function() {
51
+ this.element.unbind('.'+this.widgetName);
52
+ },
53
+
54
+ _mouseDown: function(event) {
55
+ // don't let more than one widget handle mouseStart
56
+ if( mouseHandled ) { return };
57
+
58
+ // we may have missed mouseup (out of window)
59
+ (this._mouseStarted && this._mouseUp(event));
60
+
61
+ this._mouseDownEvent = event;
62
+
63
+ var self = this,
64
+ btnIsLeft = (event.which == 1),
65
+ // event.target.nodeName works around a bug in IE 8 with
66
+ // disabled inputs (#7620)
67
+ elIsCancel = (typeof this.options.cancel == "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
68
+ if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
69
+ return true;
70
+ }
71
+
72
+ this.mouseDelayMet = !this.options.delay;
73
+ if (!this.mouseDelayMet) {
74
+ this._mouseDelayTimer = setTimeout(function() {
75
+ self.mouseDelayMet = true;
76
+ }, this.options.delay);
77
+ }
78
+
79
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
80
+ this._mouseStarted = (this._mouseStart(event) !== false);
81
+ if (!this._mouseStarted) {
82
+ event.preventDefault();
83
+ return true;
84
+ }
85
+ }
86
+
87
+ // Click event may never have fired (Gecko & Opera)
88
+ if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) {
89
+ $.removeData(event.target, this.widgetName + '.preventClickEvent');
90
+ }
91
+
92
+ // these delegates are required to keep context
93
+ this._mouseMoveDelegate = function(event) {
94
+ return self._mouseMove(event);
95
+ };
96
+ this._mouseUpDelegate = function(event) {
97
+ return self._mouseUp(event);
98
+ };
99
+ $(document)
100
+ .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
101
+ .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
102
+
103
+ event.preventDefault();
104
+
105
+ mouseHandled = true;
106
+ return true;
107
+ },
108
+
109
+ _mouseMove: function(event) {
110
+ // IE mouseup check - mouseup happened when mouse was out of window
111
+ if ($.browser.msie && !(document.documentMode >= 9) && !event.button) {
112
+ return this._mouseUp(event);
113
+ }
114
+
115
+ if (this._mouseStarted) {
116
+ this._mouseDrag(event);
117
+ return event.preventDefault();
118
+ }
119
+
120
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
121
+ this._mouseStarted =
122
+ (this._mouseStart(this._mouseDownEvent, event) !== false);
123
+ (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
124
+ }
125
+
126
+ return !this._mouseStarted;
127
+ },
128
+
129
+ _mouseUp: function(event) {
130
+ $(document)
131
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
132
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
133
+
134
+ if (this._mouseStarted) {
135
+ this._mouseStarted = false;
136
+
137
+ if (event.target == this._mouseDownEvent.target) {
138
+ $.data(event.target, this.widgetName + '.preventClickEvent', true);
139
+ }
140
+
141
+ this._mouseStop(event);
142
+ }
143
+
144
+ return false;
145
+ },
146
+
147
+ _mouseDistanceMet: function(event) {
148
+ return (Math.max(
149
+ Math.abs(this._mouseDownEvent.pageX - event.pageX),
150
+ Math.abs(this._mouseDownEvent.pageY - event.pageY)
151
+ ) >= this.options.distance
152
+ );
153
+ },
154
+
155
+ _mouseDelayMet: function(event) {
156
+ return this.mouseDelayMet;
157
+ },
158
+
159
+ // These are placeholder methods, to be overriden by extending plugin
160
+ _mouseStart: function(event) {},
161
+ _mouseDrag: function(event) {},
162
+ _mouseStop: function(event) {},
163
+ _mouseCapture: function(event) { return true; }
164
+ });
165
+
166
+ })(jQuery);