h2ocube_rails_assets 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +1 -0
- data/Vendorfile +196 -0
- data/h2ocube_rails_assets.gemspec +3 -4
- data/lib/h2ocube_rails_assets.rb +8 -6
- data/test/jquery_test.rb +1 -1
- data/test/turbolinks_test.rb +1 -3
- data/vendor/assets/images/jquery.fancybox/fancybox_loading.gif +0 -0
- data/vendor/assets/images/jquery.fancybox/fancybox_loading@2x.gif +0 -0
- data/vendor/assets/images/jquery.fancybox/fancybox_sprite@2x.png +0 -0
- data/vendor/assets/javascripts/backbone.js +4 -1571
- data/vendor/assets/javascripts/bootstrap.js +6 -2276
- data/vendor/assets/javascripts/highcharts.js +272 -15281
- data/vendor/assets/javascripts/jasny-bootstrap.js +7 -3060
- data/vendor/assets/javascripts/jquery/1.10.js +6 -9807
- data/vendor/assets/javascripts/jquery/1.8.js +2 -9472
- data/vendor/assets/javascripts/jquery/1.9.js +5 -9597
- data/vendor/assets/javascripts/jquery/2.0.js +5 -8841
- data/vendor/assets/javascripts/jquery.cookie.js +26 -23
- data/vendor/assets/javascripts/jquery.fancybox.js +46 -1983
- data/vendor/assets/javascripts/jquery.fileupload.js +1329 -4
- data/vendor/assets/javascripts/jquery.iframe-transport.js +24 -4
- data/vendor/assets/javascripts/jquery.js +1 -1
- data/vendor/assets/javascripts/jquery.lazyload.js +3 -216
- data/vendor/assets/javascripts/jquery.mobile.js +7 -11092
- data/vendor/assets/javascripts/jquery.pnotify.js +29 -903
- data/vendor/assets/javascripts/jquery.timeago.coffee +2 -4
- data/vendor/assets/javascripts/jquery.turbolinks.coffee +40 -51
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.accordion.js +4 -572
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.autocomplete.js +4 -610
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.button.js +4 -419
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.core.js +4 -320
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.datepicker.js +5 -2050
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.dialog.js +4 -808
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.draggable.js +4 -933
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.droppable.js +4 -372
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-blind.js +4 -82
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-bounce.js +4 -113
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-clip.js +4 -67
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-drop.js +4 -65
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-explode.js +4 -97
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-fade.js +4 -30
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-fold.js +4 -76
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-highlight.js +4 -50
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-pulsate.js +4 -63
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-scale.js +4 -318
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-shake.js +4 -74
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-slide.js +4 -64
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-transfer.js +4 -47
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect.js +4 -1289
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.menu.js +4 -621
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.mouse.js +4 -169
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.position.js +4 -497
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.progressbar.js +4 -145
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.resizable.js +4 -968
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.selectable.js +4 -277
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.slider.js +4 -672
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.sortable.js +4 -1282
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.spinner.js +4 -493
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.tabs.js +4 -846
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.tooltip.js +4 -402
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.widget.js +4 -521
- data/vendor/assets/javascripts/jquery.validate.js +2 -1207
- data/vendor/assets/javascripts/lazyload.js +4 -391
- data/vendor/assets/javascripts/sammy.js +5 -2117
- data/vendor/assets/javascripts/underscore.js +4 -1224
- data/vendor/assets/javascripts/zepto.js +1 -1564
- data/vendor/assets/stylesheets/bootstrap.responsive.css +2 -1102
- data/vendor/assets/stylesheets/bootstrap.scss +2 -6151
- data/vendor/assets/stylesheets/jasny-bootstrap.responsive.css +2 -1263
- data/vendor/assets/stylesheets/jasny-bootstrap.scss +2 -7591
- data/vendor/assets/stylesheets/jquery.fancybox.scss +27 -2
- data/vendor/assets/stylesheets/jquery.mobile.scss +2 -3356
- data/vendor/assets/stylesheets/jquery.ui.scss +2 -1184
- metadata +43 -19
- data/vendor/assets/images/jquery.mobile/ajax-loader.gif +0 -0
- data/vendor/assets/images/jquery.mobile/icons-18-black.png +0 -0
- data/vendor/assets/images/jquery.mobile/icons-18-white.png +0 -0
- data/vendor/assets/images/jquery.mobile/icons-36-black.png +0 -0
- data/vendor/assets/images/jquery.mobile/icons-36-white.png +0 -0
- data/vendor/assets/javascripts/_jquery.fileupload.js +0 -1164
- data/vendor/assets/javascripts/zepto/fx_methods.js +0 -71
@@ -1,372 +1,4 @@
|
|
1
|
-
/*!
|
2
|
-
|
3
|
-
|
4
|
-
*
|
5
|
-
* Copyright 2013 jQuery Foundation and other contributors
|
6
|
-
* Released under the MIT license.
|
7
|
-
* http://jquery.org/license
|
8
|
-
*
|
9
|
-
* http://api.jqueryui.com/droppable/
|
10
|
-
*
|
11
|
-
* Depends:
|
12
|
-
* jquery.ui.core.js
|
13
|
-
* jquery.ui.widget.js
|
14
|
-
* jquery.ui.mouse.js
|
15
|
-
* jquery.ui.draggable.js
|
16
|
-
*/
|
17
|
-
(function( $, undefined ) {
|
18
|
-
|
19
|
-
function isOverAxis( x, reference, size ) {
|
20
|
-
return ( x > reference ) && ( x < ( reference + size ) );
|
21
|
-
}
|
22
|
-
|
23
|
-
$.widget("ui.droppable", {
|
24
|
-
version: "1.10.2",
|
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
|
-
// callbacks
|
36
|
-
activate: null,
|
37
|
-
deactivate: null,
|
38
|
-
drop: null,
|
39
|
-
out: null,
|
40
|
-
over: null
|
41
|
-
},
|
42
|
-
_create: function() {
|
43
|
-
|
44
|
-
var o = this.options,
|
45
|
-
accept = o.accept;
|
46
|
-
|
47
|
-
this.isover = false;
|
48
|
-
this.isout = true;
|
49
|
-
|
50
|
-
this.accept = $.isFunction(accept) ? accept : function(d) {
|
51
|
-
return d.is(accept);
|
52
|
-
};
|
53
|
-
|
54
|
-
//Store the droppable's proportions
|
55
|
-
this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
|
56
|
-
|
57
|
-
// Add the reference and positions to the manager
|
58
|
-
$.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
|
59
|
-
$.ui.ddmanager.droppables[o.scope].push(this);
|
60
|
-
|
61
|
-
(o.addClasses && this.element.addClass("ui-droppable"));
|
62
|
-
|
63
|
-
},
|
64
|
-
|
65
|
-
_destroy: function() {
|
66
|
-
var i = 0,
|
67
|
-
drop = $.ui.ddmanager.droppables[this.options.scope];
|
68
|
-
|
69
|
-
for ( ; i < drop.length; i++ ) {
|
70
|
-
if ( drop[i] === this ) {
|
71
|
-
drop.splice(i, 1);
|
72
|
-
}
|
73
|
-
}
|
74
|
-
|
75
|
-
this.element.removeClass("ui-droppable ui-droppable-disabled");
|
76
|
-
},
|
77
|
-
|
78
|
-
_setOption: function(key, value) {
|
79
|
-
|
80
|
-
if(key === "accept") {
|
81
|
-
this.accept = $.isFunction(value) ? value : function(d) {
|
82
|
-
return d.is(value);
|
83
|
-
};
|
84
|
-
}
|
85
|
-
$.Widget.prototype._setOption.apply(this, arguments);
|
86
|
-
},
|
87
|
-
|
88
|
-
_activate: function(event) {
|
89
|
-
var draggable = $.ui.ddmanager.current;
|
90
|
-
if(this.options.activeClass) {
|
91
|
-
this.element.addClass(this.options.activeClass);
|
92
|
-
}
|
93
|
-
if(draggable){
|
94
|
-
this._trigger("activate", event, this.ui(draggable));
|
95
|
-
}
|
96
|
-
},
|
97
|
-
|
98
|
-
_deactivate: function(event) {
|
99
|
-
var draggable = $.ui.ddmanager.current;
|
100
|
-
if(this.options.activeClass) {
|
101
|
-
this.element.removeClass(this.options.activeClass);
|
102
|
-
}
|
103
|
-
if(draggable){
|
104
|
-
this._trigger("deactivate", event, this.ui(draggable));
|
105
|
-
}
|
106
|
-
},
|
107
|
-
|
108
|
-
_over: function(event) {
|
109
|
-
|
110
|
-
var draggable = $.ui.ddmanager.current;
|
111
|
-
|
112
|
-
// Bail if draggable and droppable are same element
|
113
|
-
if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
|
114
|
-
return;
|
115
|
-
}
|
116
|
-
|
117
|
-
if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
|
118
|
-
if(this.options.hoverClass) {
|
119
|
-
this.element.addClass(this.options.hoverClass);
|
120
|
-
}
|
121
|
-
this._trigger("over", event, this.ui(draggable));
|
122
|
-
}
|
123
|
-
|
124
|
-
},
|
125
|
-
|
126
|
-
_out: function(event) {
|
127
|
-
|
128
|
-
var draggable = $.ui.ddmanager.current;
|
129
|
-
|
130
|
-
// Bail if draggable and droppable are same element
|
131
|
-
if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
|
132
|
-
return;
|
133
|
-
}
|
134
|
-
|
135
|
-
if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
|
136
|
-
if(this.options.hoverClass) {
|
137
|
-
this.element.removeClass(this.options.hoverClass);
|
138
|
-
}
|
139
|
-
this._trigger("out", event, this.ui(draggable));
|
140
|
-
}
|
141
|
-
|
142
|
-
},
|
143
|
-
|
144
|
-
_drop: function(event,custom) {
|
145
|
-
|
146
|
-
var draggable = custom || $.ui.ddmanager.current,
|
147
|
-
childrenIntersection = false;
|
148
|
-
|
149
|
-
// Bail if draggable and droppable are same element
|
150
|
-
if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
|
151
|
-
return false;
|
152
|
-
}
|
153
|
-
|
154
|
-
this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
|
155
|
-
var inst = $.data(this, "ui-droppable");
|
156
|
-
if(
|
157
|
-
inst.options.greedy &&
|
158
|
-
!inst.options.disabled &&
|
159
|
-
inst.options.scope === draggable.options.scope &&
|
160
|
-
inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
|
161
|
-
$.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
|
162
|
-
) { childrenIntersection = true; return false; }
|
163
|
-
});
|
164
|
-
if(childrenIntersection) {
|
165
|
-
return false;
|
166
|
-
}
|
167
|
-
|
168
|
-
if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
|
169
|
-
if(this.options.activeClass) {
|
170
|
-
this.element.removeClass(this.options.activeClass);
|
171
|
-
}
|
172
|
-
if(this.options.hoverClass) {
|
173
|
-
this.element.removeClass(this.options.hoverClass);
|
174
|
-
}
|
175
|
-
this._trigger("drop", event, this.ui(draggable));
|
176
|
-
return this.element;
|
177
|
-
}
|
178
|
-
|
179
|
-
return false;
|
180
|
-
|
181
|
-
},
|
182
|
-
|
183
|
-
ui: function(c) {
|
184
|
-
return {
|
185
|
-
draggable: (c.currentItem || c.element),
|
186
|
-
helper: c.helper,
|
187
|
-
position: c.position,
|
188
|
-
offset: c.positionAbs
|
189
|
-
};
|
190
|
-
}
|
191
|
-
|
192
|
-
});
|
193
|
-
|
194
|
-
$.ui.intersect = function(draggable, droppable, toleranceMode) {
|
195
|
-
|
196
|
-
if (!droppable.offset) {
|
197
|
-
return false;
|
198
|
-
}
|
199
|
-
|
200
|
-
var draggableLeft, draggableTop,
|
201
|
-
x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
|
202
|
-
y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,
|
203
|
-
l = droppable.offset.left, r = l + droppable.proportions.width,
|
204
|
-
t = droppable.offset.top, b = t + droppable.proportions.height;
|
205
|
-
|
206
|
-
switch (toleranceMode) {
|
207
|
-
case "fit":
|
208
|
-
return (l <= x1 && x2 <= r && t <= y1 && y2 <= b);
|
209
|
-
case "intersect":
|
210
|
-
return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half
|
211
|
-
x2 - (draggable.helperProportions.width / 2) < r && // Left Half
|
212
|
-
t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half
|
213
|
-
y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
|
214
|
-
case "pointer":
|
215
|
-
draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
|
216
|
-
draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
|
217
|
-
return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
|
218
|
-
case "touch":
|
219
|
-
return (
|
220
|
-
(y1 >= t && y1 <= b) || // Top edge touching
|
221
|
-
(y2 >= t && y2 <= b) || // Bottom edge touching
|
222
|
-
(y1 < t && y2 > b) // Surrounded vertically
|
223
|
-
) && (
|
224
|
-
(x1 >= l && x1 <= r) || // Left edge touching
|
225
|
-
(x2 >= l && x2 <= r) || // Right edge touching
|
226
|
-
(x1 < l && x2 > r) // Surrounded horizontally
|
227
|
-
);
|
228
|
-
default:
|
229
|
-
return false;
|
230
|
-
}
|
231
|
-
|
232
|
-
};
|
233
|
-
|
234
|
-
/*
|
235
|
-
This manager tracks offsets of draggables and droppables
|
236
|
-
*/
|
237
|
-
$.ui.ddmanager = {
|
238
|
-
current: null,
|
239
|
-
droppables: { "default": [] },
|
240
|
-
prepareOffsets: function(t, event) {
|
241
|
-
|
242
|
-
var i, j,
|
243
|
-
m = $.ui.ddmanager.droppables[t.options.scope] || [],
|
244
|
-
type = event ? event.type : null, // workaround for #2317
|
245
|
-
list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
|
246
|
-
|
247
|
-
droppablesLoop: for (i = 0; i < m.length; i++) {
|
248
|
-
|
249
|
-
//No disabled and non-accepted
|
250
|
-
if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {
|
251
|
-
continue;
|
252
|
-
}
|
253
|
-
|
254
|
-
// Filter out elements in the current dragged item
|
255
|
-
for (j=0; j < list.length; j++) {
|
256
|
-
if(list[j] === m[i].element[0]) {
|
257
|
-
m[i].proportions.height = 0;
|
258
|
-
continue droppablesLoop;
|
259
|
-
}
|
260
|
-
}
|
261
|
-
|
262
|
-
m[i].visible = m[i].element.css("display") !== "none";
|
263
|
-
if(!m[i].visible) {
|
264
|
-
continue;
|
265
|
-
}
|
266
|
-
|
267
|
-
//Activate the droppable if used directly from draggables
|
268
|
-
if(type === "mousedown") {
|
269
|
-
m[i]._activate.call(m[i], event);
|
270
|
-
}
|
271
|
-
|
272
|
-
m[i].offset = m[i].element.offset();
|
273
|
-
m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
|
274
|
-
|
275
|
-
}
|
276
|
-
|
277
|
-
},
|
278
|
-
drop: function(draggable, event) {
|
279
|
-
|
280
|
-
var dropped = false;
|
281
|
-
// Create a copy of the droppables in case the list changes during the drop (#9116)
|
282
|
-
$.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() {
|
283
|
-
|
284
|
-
if(!this.options) {
|
285
|
-
return;
|
286
|
-
}
|
287
|
-
if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {
|
288
|
-
dropped = this._drop.call(this, event) || dropped;
|
289
|
-
}
|
290
|
-
|
291
|
-
if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
|
292
|
-
this.isout = true;
|
293
|
-
this.isover = false;
|
294
|
-
this._deactivate.call(this, event);
|
295
|
-
}
|
296
|
-
|
297
|
-
});
|
298
|
-
return dropped;
|
299
|
-
|
300
|
-
},
|
301
|
-
dragStart: function( draggable, event ) {
|
302
|
-
//Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
|
303
|
-
draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
|
304
|
-
if( !draggable.options.refreshPositions ) {
|
305
|
-
$.ui.ddmanager.prepareOffsets( draggable, event );
|
306
|
-
}
|
307
|
-
});
|
308
|
-
},
|
309
|
-
drag: function(draggable, event) {
|
310
|
-
|
311
|
-
//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
|
312
|
-
if(draggable.options.refreshPositions) {
|
313
|
-
$.ui.ddmanager.prepareOffsets(draggable, event);
|
314
|
-
}
|
315
|
-
|
316
|
-
//Run through all droppables and check their positions based on specific tolerance options
|
317
|
-
$.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
|
318
|
-
|
319
|
-
if(this.options.disabled || this.greedyChild || !this.visible) {
|
320
|
-
return;
|
321
|
-
}
|
322
|
-
|
323
|
-
var parentInstance, scope, parent,
|
324
|
-
intersects = $.ui.intersect(draggable, this, this.options.tolerance),
|
325
|
-
c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null);
|
326
|
-
if(!c) {
|
327
|
-
return;
|
328
|
-
}
|
329
|
-
|
330
|
-
if (this.options.greedy) {
|
331
|
-
// find droppable parents with same scope
|
332
|
-
scope = this.options.scope;
|
333
|
-
parent = this.element.parents(":data(ui-droppable)").filter(function () {
|
334
|
-
return $.data(this, "ui-droppable").options.scope === scope;
|
335
|
-
});
|
336
|
-
|
337
|
-
if (parent.length) {
|
338
|
-
parentInstance = $.data(parent[0], "ui-droppable");
|
339
|
-
parentInstance.greedyChild = (c === "isover");
|
340
|
-
}
|
341
|
-
}
|
342
|
-
|
343
|
-
// we just moved into a greedy child
|
344
|
-
if (parentInstance && c === "isover") {
|
345
|
-
parentInstance.isover = false;
|
346
|
-
parentInstance.isout = true;
|
347
|
-
parentInstance._out.call(parentInstance, event);
|
348
|
-
}
|
349
|
-
|
350
|
-
this[c] = true;
|
351
|
-
this[c === "isout" ? "isover" : "isout"] = false;
|
352
|
-
this[c === "isover" ? "_over" : "_out"].call(this, event);
|
353
|
-
|
354
|
-
// we just moved out of a greedy child
|
355
|
-
if (parentInstance && c === "isout") {
|
356
|
-
parentInstance.isout = false;
|
357
|
-
parentInstance.isover = true;
|
358
|
-
parentInstance._over.call(parentInstance, event);
|
359
|
-
}
|
360
|
-
});
|
361
|
-
|
362
|
-
},
|
363
|
-
dragStop: function( draggable, event ) {
|
364
|
-
draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
|
365
|
-
//Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
|
366
|
-
if( !draggable.options.refreshPositions ) {
|
367
|
-
$.ui.ddmanager.prepareOffsets( draggable, event );
|
368
|
-
}
|
369
|
-
}
|
370
|
-
};
|
371
|
-
|
372
|
-
})(jQuery);
|
1
|
+
/*! jQuery UI - v1.10.3 - 2013-05-03
|
2
|
+
* http://jqueryui.com
|
3
|
+
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
|
4
|
+
(function(e){function t(e,t,i){return e>t&&t+i>e}e.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,i=t.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,i=e.ui.ddmanager.droppables[this.options.scope];i.length>t;t++)i[t]===this&&i.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){"accept"===t&&(this.accept=e.isFunction(i)?i:function(e){return e.is(i)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"ui-droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope===s.options.scope&&t.accept.call(t.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(e,i,s){if(!i.offset)return!1;var n,a,o=(e.positionAbs||e.position.absolute).left,r=o+e.helperProportions.width,h=(e.positionAbs||e.position.absolute).top,l=h+e.helperProportions.height,u=i.offset.left,c=u+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return o>=u&&c>=r&&h>=d&&p>=l;case"intersect":return o+e.helperProportions.width/2>u&&c>r-e.helperProportions.width/2&&h+e.helperProportions.height/2>d&&p>l-e.helperProportions.height/2;case"pointer":return n=(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,a=(e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,t(a,d,i.proportions.height)&&t(n,u,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(o>=u&&c>=o||r>=u&&c>=r||u>o&&r>c);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions.height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions={width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight})}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e.data(this,"ui-droppable").options.scope===n}),a.length&&(s=e.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}}})(jQuery);
|
@@ -1,82 +1,4 @@
|
|
1
|
-
/*!
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
* Copyright 2013 jQuery Foundation and other contributors
|
6
|
-
* Released under the MIT license.
|
7
|
-
* http://jquery.org/license
|
8
|
-
*
|
9
|
-
* http://api.jqueryui.com/blind-effect/
|
10
|
-
*
|
11
|
-
* Depends:
|
12
|
-
* jquery.ui.effect.js
|
13
|
-
*/
|
14
|
-
(function( $, undefined ) {
|
15
|
-
|
16
|
-
var rvertical = /up|down|vertical/,
|
17
|
-
rpositivemotion = /up|left|vertical|horizontal/;
|
18
|
-
|
19
|
-
$.effects.effect.blind = function( o, done ) {
|
20
|
-
// Create element
|
21
|
-
var el = $( this ),
|
22
|
-
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
|
23
|
-
mode = $.effects.setMode( el, o.mode || "hide" ),
|
24
|
-
direction = o.direction || "up",
|
25
|
-
vertical = rvertical.test( direction ),
|
26
|
-
ref = vertical ? "height" : "width",
|
27
|
-
ref2 = vertical ? "top" : "left",
|
28
|
-
motion = rpositivemotion.test( direction ),
|
29
|
-
animation = {},
|
30
|
-
show = mode === "show",
|
31
|
-
wrapper, distance, margin;
|
32
|
-
|
33
|
-
// if already wrapped, the wrapper's properties are my property. #6245
|
34
|
-
if ( el.parent().is( ".ui-effects-wrapper" ) ) {
|
35
|
-
$.effects.save( el.parent(), props );
|
36
|
-
} else {
|
37
|
-
$.effects.save( el, props );
|
38
|
-
}
|
39
|
-
el.show();
|
40
|
-
wrapper = $.effects.createWrapper( el ).css({
|
41
|
-
overflow: "hidden"
|
42
|
-
});
|
43
|
-
|
44
|
-
distance = wrapper[ ref ]();
|
45
|
-
margin = parseFloat( wrapper.css( ref2 ) ) || 0;
|
46
|
-
|
47
|
-
animation[ ref ] = show ? distance : 0;
|
48
|
-
if ( !motion ) {
|
49
|
-
el
|
50
|
-
.css( vertical ? "bottom" : "right", 0 )
|
51
|
-
.css( vertical ? "top" : "left", "auto" )
|
52
|
-
.css({ position: "absolute" });
|
53
|
-
|
54
|
-
animation[ ref2 ] = show ? margin : distance + margin;
|
55
|
-
}
|
56
|
-
|
57
|
-
// start at 0 if we are showing
|
58
|
-
if ( show ) {
|
59
|
-
wrapper.css( ref, 0 );
|
60
|
-
if ( ! motion ) {
|
61
|
-
wrapper.css( ref2, margin + distance );
|
62
|
-
}
|
63
|
-
}
|
64
|
-
|
65
|
-
// Animate
|
66
|
-
wrapper.animate( animation, {
|
67
|
-
duration: o.duration,
|
68
|
-
easing: o.easing,
|
69
|
-
queue: false,
|
70
|
-
complete: function() {
|
71
|
-
if ( mode === "hide" ) {
|
72
|
-
el.hide();
|
73
|
-
}
|
74
|
-
$.effects.restore( el, props );
|
75
|
-
$.effects.removeWrapper( el );
|
76
|
-
done();
|
77
|
-
}
|
78
|
-
});
|
79
|
-
|
80
|
-
};
|
81
|
-
|
82
|
-
})(jQuery);
|
1
|
+
/*! jQuery UI - v1.10.3 - 2013-05-03
|
2
|
+
* http://jqueryui.com
|
3
|
+
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
|
4
|
+
(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",m=i.test(u),g={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),a=t.effects.createWrapper(h).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,g[p]=v?o:0,m||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),g[f]=v?r:o+r),v&&(a.css(p,0),m||a.css(f,r+o)),a.animate(g,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}})(jQuery);
|