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,402 +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/tooltip/
|
10
|
-
*
|
11
|
-
* Depends:
|
12
|
-
* jquery.ui.core.js
|
13
|
-
* jquery.ui.widget.js
|
14
|
-
* jquery.ui.position.js
|
15
|
-
*/
|
16
|
-
(function( $ ) {
|
17
|
-
|
18
|
-
var increments = 0;
|
19
|
-
|
20
|
-
function addDescribedBy( elem, id ) {
|
21
|
-
var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ );
|
22
|
-
describedby.push( id );
|
23
|
-
elem
|
24
|
-
.data( "ui-tooltip-id", id )
|
25
|
-
.attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
|
26
|
-
}
|
27
|
-
|
28
|
-
function removeDescribedBy( elem ) {
|
29
|
-
var id = elem.data( "ui-tooltip-id" ),
|
30
|
-
describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ),
|
31
|
-
index = $.inArray( id, describedby );
|
32
|
-
if ( index !== -1 ) {
|
33
|
-
describedby.splice( index, 1 );
|
34
|
-
}
|
35
|
-
|
36
|
-
elem.removeData( "ui-tooltip-id" );
|
37
|
-
describedby = $.trim( describedby.join( " " ) );
|
38
|
-
if ( describedby ) {
|
39
|
-
elem.attr( "aria-describedby", describedby );
|
40
|
-
} else {
|
41
|
-
elem.removeAttr( "aria-describedby" );
|
42
|
-
}
|
43
|
-
}
|
44
|
-
|
45
|
-
$.widget( "ui.tooltip", {
|
46
|
-
version: "1.10.2",
|
47
|
-
options: {
|
48
|
-
content: function() {
|
49
|
-
// support: IE<9, Opera in jQuery <1.7
|
50
|
-
// .text() can't accept undefined, so coerce to a string
|
51
|
-
var title = $( this ).attr( "title" ) || "";
|
52
|
-
// Escape title, since we're going from an attribute to raw HTML
|
53
|
-
return $( "<a>" ).text( title ).html();
|
54
|
-
},
|
55
|
-
hide: true,
|
56
|
-
// Disabled elements have inconsistent behavior across browsers (#8661)
|
57
|
-
items: "[title]:not([disabled])",
|
58
|
-
position: {
|
59
|
-
my: "left top+15",
|
60
|
-
at: "left bottom",
|
61
|
-
collision: "flipfit flip"
|
62
|
-
},
|
63
|
-
show: true,
|
64
|
-
tooltipClass: null,
|
65
|
-
track: false,
|
66
|
-
|
67
|
-
// callbacks
|
68
|
-
close: null,
|
69
|
-
open: null
|
70
|
-
},
|
71
|
-
|
72
|
-
_create: function() {
|
73
|
-
this._on({
|
74
|
-
mouseover: "open",
|
75
|
-
focusin: "open"
|
76
|
-
});
|
77
|
-
|
78
|
-
// IDs of generated tooltips, needed for destroy
|
79
|
-
this.tooltips = {};
|
80
|
-
// IDs of parent tooltips where we removed the title attribute
|
81
|
-
this.parents = {};
|
82
|
-
|
83
|
-
if ( this.options.disabled ) {
|
84
|
-
this._disable();
|
85
|
-
}
|
86
|
-
},
|
87
|
-
|
88
|
-
_setOption: function( key, value ) {
|
89
|
-
var that = this;
|
90
|
-
|
91
|
-
if ( key === "disabled" ) {
|
92
|
-
this[ value ? "_disable" : "_enable" ]();
|
93
|
-
this.options[ key ] = value;
|
94
|
-
// disable element style changes
|
95
|
-
return;
|
96
|
-
}
|
97
|
-
|
98
|
-
this._super( key, value );
|
99
|
-
|
100
|
-
if ( key === "content" ) {
|
101
|
-
$.each( this.tooltips, function( id, element ) {
|
102
|
-
that._updateContent( element );
|
103
|
-
});
|
104
|
-
}
|
105
|
-
},
|
106
|
-
|
107
|
-
_disable: function() {
|
108
|
-
var that = this;
|
109
|
-
|
110
|
-
// close open tooltips
|
111
|
-
$.each( this.tooltips, function( id, element ) {
|
112
|
-
var event = $.Event( "blur" );
|
113
|
-
event.target = event.currentTarget = element[0];
|
114
|
-
that.close( event, true );
|
115
|
-
});
|
116
|
-
|
117
|
-
// remove title attributes to prevent native tooltips
|
118
|
-
this.element.find( this.options.items ).addBack().each(function() {
|
119
|
-
var element = $( this );
|
120
|
-
if ( element.is( "[title]" ) ) {
|
121
|
-
element
|
122
|
-
.data( "ui-tooltip-title", element.attr( "title" ) )
|
123
|
-
.attr( "title", "" );
|
124
|
-
}
|
125
|
-
});
|
126
|
-
},
|
127
|
-
|
128
|
-
_enable: function() {
|
129
|
-
// restore title attributes
|
130
|
-
this.element.find( this.options.items ).addBack().each(function() {
|
131
|
-
var element = $( this );
|
132
|
-
if ( element.data( "ui-tooltip-title" ) ) {
|
133
|
-
element.attr( "title", element.data( "ui-tooltip-title" ) );
|
134
|
-
}
|
135
|
-
});
|
136
|
-
},
|
137
|
-
|
138
|
-
open: function( event ) {
|
139
|
-
var that = this,
|
140
|
-
target = $( event ? event.target : this.element )
|
141
|
-
// we need closest here due to mouseover bubbling,
|
142
|
-
// but always pointing at the same event target
|
143
|
-
.closest( this.options.items );
|
144
|
-
|
145
|
-
// No element to show a tooltip for or the tooltip is already open
|
146
|
-
if ( !target.length || target.data( "ui-tooltip-id" ) ) {
|
147
|
-
return;
|
148
|
-
}
|
149
|
-
|
150
|
-
if ( target.attr( "title" ) ) {
|
151
|
-
target.data( "ui-tooltip-title", target.attr( "title" ) );
|
152
|
-
}
|
153
|
-
|
154
|
-
target.data( "ui-tooltip-open", true );
|
155
|
-
|
156
|
-
// kill parent tooltips, custom or native, for hover
|
157
|
-
if ( event && event.type === "mouseover" ) {
|
158
|
-
target.parents().each(function() {
|
159
|
-
var parent = $( this ),
|
160
|
-
blurEvent;
|
161
|
-
if ( parent.data( "ui-tooltip-open" ) ) {
|
162
|
-
blurEvent = $.Event( "blur" );
|
163
|
-
blurEvent.target = blurEvent.currentTarget = this;
|
164
|
-
that.close( blurEvent, true );
|
165
|
-
}
|
166
|
-
if ( parent.attr( "title" ) ) {
|
167
|
-
parent.uniqueId();
|
168
|
-
that.parents[ this.id ] = {
|
169
|
-
element: this,
|
170
|
-
title: parent.attr( "title" )
|
171
|
-
};
|
172
|
-
parent.attr( "title", "" );
|
173
|
-
}
|
174
|
-
});
|
175
|
-
}
|
176
|
-
|
177
|
-
this._updateContent( target, event );
|
178
|
-
},
|
179
|
-
|
180
|
-
_updateContent: function( target, event ) {
|
181
|
-
var content,
|
182
|
-
contentOption = this.options.content,
|
183
|
-
that = this,
|
184
|
-
eventType = event ? event.type : null;
|
185
|
-
|
186
|
-
if ( typeof contentOption === "string" ) {
|
187
|
-
return this._open( event, target, contentOption );
|
188
|
-
}
|
189
|
-
|
190
|
-
content = contentOption.call( target[0], function( response ) {
|
191
|
-
// ignore async response if tooltip was closed already
|
192
|
-
if ( !target.data( "ui-tooltip-open" ) ) {
|
193
|
-
return;
|
194
|
-
}
|
195
|
-
// IE may instantly serve a cached response for ajax requests
|
196
|
-
// delay this call to _open so the other call to _open runs first
|
197
|
-
that._delay(function() {
|
198
|
-
// jQuery creates a special event for focusin when it doesn't
|
199
|
-
// exist natively. To improve performance, the native event
|
200
|
-
// object is reused and the type is changed. Therefore, we can't
|
201
|
-
// rely on the type being correct after the event finished
|
202
|
-
// bubbling, so we set it back to the previous value. (#8740)
|
203
|
-
if ( event ) {
|
204
|
-
event.type = eventType;
|
205
|
-
}
|
206
|
-
this._open( event, target, response );
|
207
|
-
});
|
208
|
-
});
|
209
|
-
if ( content ) {
|
210
|
-
this._open( event, target, content );
|
211
|
-
}
|
212
|
-
},
|
213
|
-
|
214
|
-
_open: function( event, target, content ) {
|
215
|
-
var tooltip, events, delayedShow,
|
216
|
-
positionOption = $.extend( {}, this.options.position );
|
217
|
-
|
218
|
-
if ( !content ) {
|
219
|
-
return;
|
220
|
-
}
|
221
|
-
|
222
|
-
// Content can be updated multiple times. If the tooltip already
|
223
|
-
// exists, then just update the content and bail.
|
224
|
-
tooltip = this._find( target );
|
225
|
-
if ( tooltip.length ) {
|
226
|
-
tooltip.find( ".ui-tooltip-content" ).html( content );
|
227
|
-
return;
|
228
|
-
}
|
229
|
-
|
230
|
-
// if we have a title, clear it to prevent the native tooltip
|
231
|
-
// we have to check first to avoid defining a title if none exists
|
232
|
-
// (we don't want to cause an element to start matching [title])
|
233
|
-
//
|
234
|
-
// We use removeAttr only for key events, to allow IE to export the correct
|
235
|
-
// accessible attributes. For mouse events, set to empty string to avoid
|
236
|
-
// native tooltip showing up (happens only when removing inside mouseover).
|
237
|
-
if ( target.is( "[title]" ) ) {
|
238
|
-
if ( event && event.type === "mouseover" ) {
|
239
|
-
target.attr( "title", "" );
|
240
|
-
} else {
|
241
|
-
target.removeAttr( "title" );
|
242
|
-
}
|
243
|
-
}
|
244
|
-
|
245
|
-
tooltip = this._tooltip( target );
|
246
|
-
addDescribedBy( target, tooltip.attr( "id" ) );
|
247
|
-
tooltip.find( ".ui-tooltip-content" ).html( content );
|
248
|
-
|
249
|
-
function position( event ) {
|
250
|
-
positionOption.of = event;
|
251
|
-
if ( tooltip.is( ":hidden" ) ) {
|
252
|
-
return;
|
253
|
-
}
|
254
|
-
tooltip.position( positionOption );
|
255
|
-
}
|
256
|
-
if ( this.options.track && event && /^mouse/.test( event.type ) ) {
|
257
|
-
this._on( this.document, {
|
258
|
-
mousemove: position
|
259
|
-
});
|
260
|
-
// trigger once to override element-relative positioning
|
261
|
-
position( event );
|
262
|
-
} else {
|
263
|
-
tooltip.position( $.extend({
|
264
|
-
of: target
|
265
|
-
}, this.options.position ) );
|
266
|
-
}
|
267
|
-
|
268
|
-
tooltip.hide();
|
269
|
-
|
270
|
-
this._show( tooltip, this.options.show );
|
271
|
-
// Handle tracking tooltips that are shown with a delay (#8644). As soon
|
272
|
-
// as the tooltip is visible, position the tooltip using the most recent
|
273
|
-
// event.
|
274
|
-
if ( this.options.show && this.options.show.delay ) {
|
275
|
-
delayedShow = this.delayedShow = setInterval(function() {
|
276
|
-
if ( tooltip.is( ":visible" ) ) {
|
277
|
-
position( positionOption.of );
|
278
|
-
clearInterval( delayedShow );
|
279
|
-
}
|
280
|
-
}, $.fx.interval );
|
281
|
-
}
|
282
|
-
|
283
|
-
this._trigger( "open", event, { tooltip: tooltip } );
|
284
|
-
|
285
|
-
events = {
|
286
|
-
keyup: function( event ) {
|
287
|
-
if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
|
288
|
-
var fakeEvent = $.Event(event);
|
289
|
-
fakeEvent.currentTarget = target[0];
|
290
|
-
this.close( fakeEvent, true );
|
291
|
-
}
|
292
|
-
},
|
293
|
-
remove: function() {
|
294
|
-
this._removeTooltip( tooltip );
|
295
|
-
}
|
296
|
-
};
|
297
|
-
if ( !event || event.type === "mouseover" ) {
|
298
|
-
events.mouseleave = "close";
|
299
|
-
}
|
300
|
-
if ( !event || event.type === "focusin" ) {
|
301
|
-
events.focusout = "close";
|
302
|
-
}
|
303
|
-
this._on( true, target, events );
|
304
|
-
},
|
305
|
-
|
306
|
-
close: function( event ) {
|
307
|
-
var that = this,
|
308
|
-
target = $( event ? event.currentTarget : this.element ),
|
309
|
-
tooltip = this._find( target );
|
310
|
-
|
311
|
-
// disabling closes the tooltip, so we need to track when we're closing
|
312
|
-
// to avoid an infinite loop in case the tooltip becomes disabled on close
|
313
|
-
if ( this.closing ) {
|
314
|
-
return;
|
315
|
-
}
|
316
|
-
|
317
|
-
// Clear the interval for delayed tracking tooltips
|
318
|
-
clearInterval( this.delayedShow );
|
319
|
-
|
320
|
-
// only set title if we had one before (see comment in _open())
|
321
|
-
if ( target.data( "ui-tooltip-title" ) ) {
|
322
|
-
target.attr( "title", target.data( "ui-tooltip-title" ) );
|
323
|
-
}
|
324
|
-
|
325
|
-
removeDescribedBy( target );
|
326
|
-
|
327
|
-
tooltip.stop( true );
|
328
|
-
this._hide( tooltip, this.options.hide, function() {
|
329
|
-
that._removeTooltip( $( this ) );
|
330
|
-
});
|
331
|
-
|
332
|
-
target.removeData( "ui-tooltip-open" );
|
333
|
-
this._off( target, "mouseleave focusout keyup" );
|
334
|
-
// Remove 'remove' binding only on delegated targets
|
335
|
-
if ( target[0] !== this.element[0] ) {
|
336
|
-
this._off( target, "remove" );
|
337
|
-
}
|
338
|
-
this._off( this.document, "mousemove" );
|
339
|
-
|
340
|
-
if ( event && event.type === "mouseleave" ) {
|
341
|
-
$.each( this.parents, function( id, parent ) {
|
342
|
-
$( parent.element ).attr( "title", parent.title );
|
343
|
-
delete that.parents[ id ];
|
344
|
-
});
|
345
|
-
}
|
346
|
-
|
347
|
-
this.closing = true;
|
348
|
-
this._trigger( "close", event, { tooltip: tooltip } );
|
349
|
-
this.closing = false;
|
350
|
-
},
|
351
|
-
|
352
|
-
_tooltip: function( element ) {
|
353
|
-
var id = "ui-tooltip-" + increments++,
|
354
|
-
tooltip = $( "<div>" )
|
355
|
-
.attr({
|
356
|
-
id: id,
|
357
|
-
role: "tooltip"
|
358
|
-
})
|
359
|
-
.addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
|
360
|
-
( this.options.tooltipClass || "" ) );
|
361
|
-
$( "<div>" )
|
362
|
-
.addClass( "ui-tooltip-content" )
|
363
|
-
.appendTo( tooltip );
|
364
|
-
tooltip.appendTo( this.document[0].body );
|
365
|
-
this.tooltips[ id ] = element;
|
366
|
-
return tooltip;
|
367
|
-
},
|
368
|
-
|
369
|
-
_find: function( target ) {
|
370
|
-
var id = target.data( "ui-tooltip-id" );
|
371
|
-
return id ? $( "#" + id ) : $();
|
372
|
-
},
|
373
|
-
|
374
|
-
_removeTooltip: function( tooltip ) {
|
375
|
-
tooltip.remove();
|
376
|
-
delete this.tooltips[ tooltip.attr( "id" ) ];
|
377
|
-
},
|
378
|
-
|
379
|
-
_destroy: function() {
|
380
|
-
var that = this;
|
381
|
-
|
382
|
-
// close open tooltips
|
383
|
-
$.each( this.tooltips, function( id, element ) {
|
384
|
-
// Delegate to close method to handle common cleanup
|
385
|
-
var event = $.Event( "blur" );
|
386
|
-
event.target = event.currentTarget = element[0];
|
387
|
-
that.close( event, true );
|
388
|
-
|
389
|
-
// Remove immediately; destroying an open tooltip doesn't use the
|
390
|
-
// hide animation
|
391
|
-
$( "#" + id ).remove();
|
392
|
-
|
393
|
-
// Restore the title
|
394
|
-
if ( element.data( "ui-tooltip-title" ) ) {
|
395
|
-
element.attr( "title", element.data( "ui-tooltip-title" ) );
|
396
|
-
element.removeData( "ui-tooltip-title" );
|
397
|
-
}
|
398
|
-
});
|
399
|
-
}
|
400
|
-
});
|
401
|
-
|
402
|
-
}( 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){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,a=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=a),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function a(t){l.of=t,o.is(":hidden")||o.position(l)}var o,r,h,l=t.extend({},this.options.position);if(n){if(o=this._find(s),o.length)return o.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),o=this._tooltip(s),e(s,o.attr("id")),o.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:a}),a(i)):o.position(t.extend({of:s},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){o.is(":visible")&&(a(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:o}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(o)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),a=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),a.stop(!0),this._hide(a,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:a}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery);
|
@@ -1,521 +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/jQuery.widget/
|
10
|
-
*/
|
11
|
-
(function( $, undefined ) {
|
12
|
-
|
13
|
-
var uuid = 0,
|
14
|
-
slice = Array.prototype.slice,
|
15
|
-
_cleanData = $.cleanData;
|
16
|
-
$.cleanData = function( elems ) {
|
17
|
-
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
18
|
-
try {
|
19
|
-
$( elem ).triggerHandler( "remove" );
|
20
|
-
// http://bugs.jquery.com/ticket/8235
|
21
|
-
} catch( e ) {}
|
22
|
-
}
|
23
|
-
_cleanData( elems );
|
24
|
-
};
|
25
|
-
|
26
|
-
$.widget = function( name, base, prototype ) {
|
27
|
-
var fullName, existingConstructor, constructor, basePrototype,
|
28
|
-
// proxiedPrototype allows the provided prototype to remain unmodified
|
29
|
-
// so that it can be used as a mixin for multiple widgets (#8876)
|
30
|
-
proxiedPrototype = {},
|
31
|
-
namespace = name.split( "." )[ 0 ];
|
32
|
-
|
33
|
-
name = name.split( "." )[ 1 ];
|
34
|
-
fullName = namespace + "-" + name;
|
35
|
-
|
36
|
-
if ( !prototype ) {
|
37
|
-
prototype = base;
|
38
|
-
base = $.Widget;
|
39
|
-
}
|
40
|
-
|
41
|
-
// create selector for plugin
|
42
|
-
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
|
43
|
-
return !!$.data( elem, fullName );
|
44
|
-
};
|
45
|
-
|
46
|
-
$[ namespace ] = $[ namespace ] || {};
|
47
|
-
existingConstructor = $[ namespace ][ name ];
|
48
|
-
constructor = $[ namespace ][ name ] = function( options, element ) {
|
49
|
-
// allow instantiation without "new" keyword
|
50
|
-
if ( !this._createWidget ) {
|
51
|
-
return new constructor( options, element );
|
52
|
-
}
|
53
|
-
|
54
|
-
// allow instantiation without initializing for simple inheritance
|
55
|
-
// must use "new" keyword (the code above always passes args)
|
56
|
-
if ( arguments.length ) {
|
57
|
-
this._createWidget( options, element );
|
58
|
-
}
|
59
|
-
};
|
60
|
-
// extend with the existing constructor to carry over any static properties
|
61
|
-
$.extend( constructor, existingConstructor, {
|
62
|
-
version: prototype.version,
|
63
|
-
// copy the object used to create the prototype in case we need to
|
64
|
-
// redefine the widget later
|
65
|
-
_proto: $.extend( {}, prototype ),
|
66
|
-
// track widgets that inherit from this widget in case this widget is
|
67
|
-
// redefined after a widget inherits from it
|
68
|
-
_childConstructors: []
|
69
|
-
});
|
70
|
-
|
71
|
-
basePrototype = new base();
|
72
|
-
// we need to make the options hash a property directly on the new instance
|
73
|
-
// otherwise we'll modify the options hash on the prototype that we're
|
74
|
-
// inheriting from
|
75
|
-
basePrototype.options = $.widget.extend( {}, basePrototype.options );
|
76
|
-
$.each( prototype, function( prop, value ) {
|
77
|
-
if ( !$.isFunction( value ) ) {
|
78
|
-
proxiedPrototype[ prop ] = value;
|
79
|
-
return;
|
80
|
-
}
|
81
|
-
proxiedPrototype[ prop ] = (function() {
|
82
|
-
var _super = function() {
|
83
|
-
return base.prototype[ prop ].apply( this, arguments );
|
84
|
-
},
|
85
|
-
_superApply = function( args ) {
|
86
|
-
return base.prototype[ prop ].apply( this, args );
|
87
|
-
};
|
88
|
-
return function() {
|
89
|
-
var __super = this._super,
|
90
|
-
__superApply = this._superApply,
|
91
|
-
returnValue;
|
92
|
-
|
93
|
-
this._super = _super;
|
94
|
-
this._superApply = _superApply;
|
95
|
-
|
96
|
-
returnValue = value.apply( this, arguments );
|
97
|
-
|
98
|
-
this._super = __super;
|
99
|
-
this._superApply = __superApply;
|
100
|
-
|
101
|
-
return returnValue;
|
102
|
-
};
|
103
|
-
})();
|
104
|
-
});
|
105
|
-
constructor.prototype = $.widget.extend( basePrototype, {
|
106
|
-
// TODO: remove support for widgetEventPrefix
|
107
|
-
// always use the name + a colon as the prefix, e.g., draggable:start
|
108
|
-
// don't prefix for widgets that aren't DOM-based
|
109
|
-
widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
|
110
|
-
}, proxiedPrototype, {
|
111
|
-
constructor: constructor,
|
112
|
-
namespace: namespace,
|
113
|
-
widgetName: name,
|
114
|
-
widgetFullName: fullName
|
115
|
-
});
|
116
|
-
|
117
|
-
// If this widget is being redefined then we need to find all widgets that
|
118
|
-
// are inheriting from it and redefine all of them so that they inherit from
|
119
|
-
// the new version of this widget. We're essentially trying to replace one
|
120
|
-
// level in the prototype chain.
|
121
|
-
if ( existingConstructor ) {
|
122
|
-
$.each( existingConstructor._childConstructors, function( i, child ) {
|
123
|
-
var childPrototype = child.prototype;
|
124
|
-
|
125
|
-
// redefine the child widget using the same prototype that was
|
126
|
-
// originally used, but inherit from the new version of the base
|
127
|
-
$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
|
128
|
-
});
|
129
|
-
// remove the list of existing child constructors from the old constructor
|
130
|
-
// so the old child constructors can be garbage collected
|
131
|
-
delete existingConstructor._childConstructors;
|
132
|
-
} else {
|
133
|
-
base._childConstructors.push( constructor );
|
134
|
-
}
|
135
|
-
|
136
|
-
$.widget.bridge( name, constructor );
|
137
|
-
};
|
138
|
-
|
139
|
-
$.widget.extend = function( target ) {
|
140
|
-
var input = slice.call( arguments, 1 ),
|
141
|
-
inputIndex = 0,
|
142
|
-
inputLength = input.length,
|
143
|
-
key,
|
144
|
-
value;
|
145
|
-
for ( ; inputIndex < inputLength; inputIndex++ ) {
|
146
|
-
for ( key in input[ inputIndex ] ) {
|
147
|
-
value = input[ inputIndex ][ key ];
|
148
|
-
if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
|
149
|
-
// Clone objects
|
150
|
-
if ( $.isPlainObject( value ) ) {
|
151
|
-
target[ key ] = $.isPlainObject( target[ key ] ) ?
|
152
|
-
$.widget.extend( {}, target[ key ], value ) :
|
153
|
-
// Don't extend strings, arrays, etc. with objects
|
154
|
-
$.widget.extend( {}, value );
|
155
|
-
// Copy everything else by reference
|
156
|
-
} else {
|
157
|
-
target[ key ] = value;
|
158
|
-
}
|
159
|
-
}
|
160
|
-
}
|
161
|
-
}
|
162
|
-
return target;
|
163
|
-
};
|
164
|
-
|
165
|
-
$.widget.bridge = function( name, object ) {
|
166
|
-
var fullName = object.prototype.widgetFullName || name;
|
167
|
-
$.fn[ name ] = function( options ) {
|
168
|
-
var isMethodCall = typeof options === "string",
|
169
|
-
args = slice.call( arguments, 1 ),
|
170
|
-
returnValue = this;
|
171
|
-
|
172
|
-
// allow multiple hashes to be passed on init
|
173
|
-
options = !isMethodCall && args.length ?
|
174
|
-
$.widget.extend.apply( null, [ options ].concat(args) ) :
|
175
|
-
options;
|
176
|
-
|
177
|
-
if ( isMethodCall ) {
|
178
|
-
this.each(function() {
|
179
|
-
var methodValue,
|
180
|
-
instance = $.data( this, fullName );
|
181
|
-
if ( !instance ) {
|
182
|
-
return $.error( "cannot call methods on " + name + " prior to initialization; " +
|
183
|
-
"attempted to call method '" + options + "'" );
|
184
|
-
}
|
185
|
-
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
|
186
|
-
return $.error( "no such method '" + options + "' for " + name + " widget instance" );
|
187
|
-
}
|
188
|
-
methodValue = instance[ options ].apply( instance, args );
|
189
|
-
if ( methodValue !== instance && methodValue !== undefined ) {
|
190
|
-
returnValue = methodValue && methodValue.jquery ?
|
191
|
-
returnValue.pushStack( methodValue.get() ) :
|
192
|
-
methodValue;
|
193
|
-
return false;
|
194
|
-
}
|
195
|
-
});
|
196
|
-
} else {
|
197
|
-
this.each(function() {
|
198
|
-
var instance = $.data( this, fullName );
|
199
|
-
if ( instance ) {
|
200
|
-
instance.option( options || {} )._init();
|
201
|
-
} else {
|
202
|
-
$.data( this, fullName, new object( options, this ) );
|
203
|
-
}
|
204
|
-
});
|
205
|
-
}
|
206
|
-
|
207
|
-
return returnValue;
|
208
|
-
};
|
209
|
-
};
|
210
|
-
|
211
|
-
$.Widget = function( /* options, element */ ) {};
|
212
|
-
$.Widget._childConstructors = [];
|
213
|
-
|
214
|
-
$.Widget.prototype = {
|
215
|
-
widgetName: "widget",
|
216
|
-
widgetEventPrefix: "",
|
217
|
-
defaultElement: "<div>",
|
218
|
-
options: {
|
219
|
-
disabled: false,
|
220
|
-
|
221
|
-
// callbacks
|
222
|
-
create: null
|
223
|
-
},
|
224
|
-
_createWidget: function( options, element ) {
|
225
|
-
element = $( element || this.defaultElement || this )[ 0 ];
|
226
|
-
this.element = $( element );
|
227
|
-
this.uuid = uuid++;
|
228
|
-
this.eventNamespace = "." + this.widgetName + this.uuid;
|
229
|
-
this.options = $.widget.extend( {},
|
230
|
-
this.options,
|
231
|
-
this._getCreateOptions(),
|
232
|
-
options );
|
233
|
-
|
234
|
-
this.bindings = $();
|
235
|
-
this.hoverable = $();
|
236
|
-
this.focusable = $();
|
237
|
-
|
238
|
-
if ( element !== this ) {
|
239
|
-
$.data( element, this.widgetFullName, this );
|
240
|
-
this._on( true, this.element, {
|
241
|
-
remove: function( event ) {
|
242
|
-
if ( event.target === element ) {
|
243
|
-
this.destroy();
|
244
|
-
}
|
245
|
-
}
|
246
|
-
});
|
247
|
-
this.document = $( element.style ?
|
248
|
-
// element within the document
|
249
|
-
element.ownerDocument :
|
250
|
-
// element is window or document
|
251
|
-
element.document || element );
|
252
|
-
this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
|
253
|
-
}
|
254
|
-
|
255
|
-
this._create();
|
256
|
-
this._trigger( "create", null, this._getCreateEventData() );
|
257
|
-
this._init();
|
258
|
-
},
|
259
|
-
_getCreateOptions: $.noop,
|
260
|
-
_getCreateEventData: $.noop,
|
261
|
-
_create: $.noop,
|
262
|
-
_init: $.noop,
|
263
|
-
|
264
|
-
destroy: function() {
|
265
|
-
this._destroy();
|
266
|
-
// we can probably remove the unbind calls in 2.0
|
267
|
-
// all event bindings should go through this._on()
|
268
|
-
this.element
|
269
|
-
.unbind( this.eventNamespace )
|
270
|
-
// 1.9 BC for #7810
|
271
|
-
// TODO remove dual storage
|
272
|
-
.removeData( this.widgetName )
|
273
|
-
.removeData( this.widgetFullName )
|
274
|
-
// support: jquery <1.6.3
|
275
|
-
// http://bugs.jquery.com/ticket/9413
|
276
|
-
.removeData( $.camelCase( this.widgetFullName ) );
|
277
|
-
this.widget()
|
278
|
-
.unbind( this.eventNamespace )
|
279
|
-
.removeAttr( "aria-disabled" )
|
280
|
-
.removeClass(
|
281
|
-
this.widgetFullName + "-disabled " +
|
282
|
-
"ui-state-disabled" );
|
283
|
-
|
284
|
-
// clean up events and states
|
285
|
-
this.bindings.unbind( this.eventNamespace );
|
286
|
-
this.hoverable.removeClass( "ui-state-hover" );
|
287
|
-
this.focusable.removeClass( "ui-state-focus" );
|
288
|
-
},
|
289
|
-
_destroy: $.noop,
|
290
|
-
|
291
|
-
widget: function() {
|
292
|
-
return this.element;
|
293
|
-
},
|
294
|
-
|
295
|
-
option: function( key, value ) {
|
296
|
-
var options = key,
|
297
|
-
parts,
|
298
|
-
curOption,
|
299
|
-
i;
|
300
|
-
|
301
|
-
if ( arguments.length === 0 ) {
|
302
|
-
// don't return a reference to the internal hash
|
303
|
-
return $.widget.extend( {}, this.options );
|
304
|
-
}
|
305
|
-
|
306
|
-
if ( typeof key === "string" ) {
|
307
|
-
// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
|
308
|
-
options = {};
|
309
|
-
parts = key.split( "." );
|
310
|
-
key = parts.shift();
|
311
|
-
if ( parts.length ) {
|
312
|
-
curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
|
313
|
-
for ( i = 0; i < parts.length - 1; i++ ) {
|
314
|
-
curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
|
315
|
-
curOption = curOption[ parts[ i ] ];
|
316
|
-
}
|
317
|
-
key = parts.pop();
|
318
|
-
if ( value === undefined ) {
|
319
|
-
return curOption[ key ] === undefined ? null : curOption[ key ];
|
320
|
-
}
|
321
|
-
curOption[ key ] = value;
|
322
|
-
} else {
|
323
|
-
if ( value === undefined ) {
|
324
|
-
return this.options[ key ] === undefined ? null : this.options[ key ];
|
325
|
-
}
|
326
|
-
options[ key ] = value;
|
327
|
-
}
|
328
|
-
}
|
329
|
-
|
330
|
-
this._setOptions( options );
|
331
|
-
|
332
|
-
return this;
|
333
|
-
},
|
334
|
-
_setOptions: function( options ) {
|
335
|
-
var key;
|
336
|
-
|
337
|
-
for ( key in options ) {
|
338
|
-
this._setOption( key, options[ key ] );
|
339
|
-
}
|
340
|
-
|
341
|
-
return this;
|
342
|
-
},
|
343
|
-
_setOption: function( key, value ) {
|
344
|
-
this.options[ key ] = value;
|
345
|
-
|
346
|
-
if ( key === "disabled" ) {
|
347
|
-
this.widget()
|
348
|
-
.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
|
349
|
-
.attr( "aria-disabled", value );
|
350
|
-
this.hoverable.removeClass( "ui-state-hover" );
|
351
|
-
this.focusable.removeClass( "ui-state-focus" );
|
352
|
-
}
|
353
|
-
|
354
|
-
return this;
|
355
|
-
},
|
356
|
-
|
357
|
-
enable: function() {
|
358
|
-
return this._setOption( "disabled", false );
|
359
|
-
},
|
360
|
-
disable: function() {
|
361
|
-
return this._setOption( "disabled", true );
|
362
|
-
},
|
363
|
-
|
364
|
-
_on: function( suppressDisabledCheck, element, handlers ) {
|
365
|
-
var delegateElement,
|
366
|
-
instance = this;
|
367
|
-
|
368
|
-
// no suppressDisabledCheck flag, shuffle arguments
|
369
|
-
if ( typeof suppressDisabledCheck !== "boolean" ) {
|
370
|
-
handlers = element;
|
371
|
-
element = suppressDisabledCheck;
|
372
|
-
suppressDisabledCheck = false;
|
373
|
-
}
|
374
|
-
|
375
|
-
// no element argument, shuffle and use this.element
|
376
|
-
if ( !handlers ) {
|
377
|
-
handlers = element;
|
378
|
-
element = this.element;
|
379
|
-
delegateElement = this.widget();
|
380
|
-
} else {
|
381
|
-
// accept selectors, DOM elements
|
382
|
-
element = delegateElement = $( element );
|
383
|
-
this.bindings = this.bindings.add( element );
|
384
|
-
}
|
385
|
-
|
386
|
-
$.each( handlers, function( event, handler ) {
|
387
|
-
function handlerProxy() {
|
388
|
-
// allow widgets to customize the disabled handling
|
389
|
-
// - disabled as an array instead of boolean
|
390
|
-
// - disabled class as method for disabling individual parts
|
391
|
-
if ( !suppressDisabledCheck &&
|
392
|
-
( instance.options.disabled === true ||
|
393
|
-
$( this ).hasClass( "ui-state-disabled" ) ) ) {
|
394
|
-
return;
|
395
|
-
}
|
396
|
-
return ( typeof handler === "string" ? instance[ handler ] : handler )
|
397
|
-
.apply( instance, arguments );
|
398
|
-
}
|
399
|
-
|
400
|
-
// copy the guid so direct unbinding works
|
401
|
-
if ( typeof handler !== "string" ) {
|
402
|
-
handlerProxy.guid = handler.guid =
|
403
|
-
handler.guid || handlerProxy.guid || $.guid++;
|
404
|
-
}
|
405
|
-
|
406
|
-
var match = event.match( /^(\w+)\s*(.*)$/ ),
|
407
|
-
eventName = match[1] + instance.eventNamespace,
|
408
|
-
selector = match[2];
|
409
|
-
if ( selector ) {
|
410
|
-
delegateElement.delegate( selector, eventName, handlerProxy );
|
411
|
-
} else {
|
412
|
-
element.bind( eventName, handlerProxy );
|
413
|
-
}
|
414
|
-
});
|
415
|
-
},
|
416
|
-
|
417
|
-
_off: function( element, eventName ) {
|
418
|
-
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
|
419
|
-
element.unbind( eventName ).undelegate( eventName );
|
420
|
-
},
|
421
|
-
|
422
|
-
_delay: function( handler, delay ) {
|
423
|
-
function handlerProxy() {
|
424
|
-
return ( typeof handler === "string" ? instance[ handler ] : handler )
|
425
|
-
.apply( instance, arguments );
|
426
|
-
}
|
427
|
-
var instance = this;
|
428
|
-
return setTimeout( handlerProxy, delay || 0 );
|
429
|
-
},
|
430
|
-
|
431
|
-
_hoverable: function( element ) {
|
432
|
-
this.hoverable = this.hoverable.add( element );
|
433
|
-
this._on( element, {
|
434
|
-
mouseenter: function( event ) {
|
435
|
-
$( event.currentTarget ).addClass( "ui-state-hover" );
|
436
|
-
},
|
437
|
-
mouseleave: function( event ) {
|
438
|
-
$( event.currentTarget ).removeClass( "ui-state-hover" );
|
439
|
-
}
|
440
|
-
});
|
441
|
-
},
|
442
|
-
|
443
|
-
_focusable: function( element ) {
|
444
|
-
this.focusable = this.focusable.add( element );
|
445
|
-
this._on( element, {
|
446
|
-
focusin: function( event ) {
|
447
|
-
$( event.currentTarget ).addClass( "ui-state-focus" );
|
448
|
-
},
|
449
|
-
focusout: function( event ) {
|
450
|
-
$( event.currentTarget ).removeClass( "ui-state-focus" );
|
451
|
-
}
|
452
|
-
});
|
453
|
-
},
|
454
|
-
|
455
|
-
_trigger: function( type, event, data ) {
|
456
|
-
var prop, orig,
|
457
|
-
callback = this.options[ type ];
|
458
|
-
|
459
|
-
data = data || {};
|
460
|
-
event = $.Event( event );
|
461
|
-
event.type = ( type === this.widgetEventPrefix ?
|
462
|
-
type :
|
463
|
-
this.widgetEventPrefix + type ).toLowerCase();
|
464
|
-
// the original event may come from any element
|
465
|
-
// so we need to reset the target on the new event
|
466
|
-
event.target = this.element[ 0 ];
|
467
|
-
|
468
|
-
// copy original event properties over to the new event
|
469
|
-
orig = event.originalEvent;
|
470
|
-
if ( orig ) {
|
471
|
-
for ( prop in orig ) {
|
472
|
-
if ( !( prop in event ) ) {
|
473
|
-
event[ prop ] = orig[ prop ];
|
474
|
-
}
|
475
|
-
}
|
476
|
-
}
|
477
|
-
|
478
|
-
this.element.trigger( event, data );
|
479
|
-
return !( $.isFunction( callback ) &&
|
480
|
-
callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
|
481
|
-
event.isDefaultPrevented() );
|
482
|
-
}
|
483
|
-
};
|
484
|
-
|
485
|
-
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
|
486
|
-
$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
|
487
|
-
if ( typeof options === "string" ) {
|
488
|
-
options = { effect: options };
|
489
|
-
}
|
490
|
-
var hasOptions,
|
491
|
-
effectName = !options ?
|
492
|
-
method :
|
493
|
-
options === true || typeof options === "number" ?
|
494
|
-
defaultEffect :
|
495
|
-
options.effect || defaultEffect;
|
496
|
-
options = options || {};
|
497
|
-
if ( typeof options === "number" ) {
|
498
|
-
options = { duration: options };
|
499
|
-
}
|
500
|
-
hasOptions = !$.isEmptyObject( options );
|
501
|
-
options.complete = callback;
|
502
|
-
if ( options.delay ) {
|
503
|
-
element.delay( options.delay );
|
504
|
-
}
|
505
|
-
if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
|
506
|
-
element[ method ]( options );
|
507
|
-
} else if ( effectName !== method && element[ effectName ] ) {
|
508
|
-
element[ effectName ]( options.duration, options.easing, callback );
|
509
|
-
} else {
|
510
|
-
element.queue(function( next ) {
|
511
|
-
$( this )[ method ]();
|
512
|
-
if ( callback ) {
|
513
|
-
callback.call( element[ 0 ] );
|
514
|
-
}
|
515
|
-
next();
|
516
|
-
});
|
517
|
-
}
|
518
|
-
};
|
519
|
-
});
|
520
|
-
|
521
|
-
})( 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,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery);
|