h2ocube_rails_assets 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/h2ocube_rails_assets.gemspec +1 -1
  2. data/vendor/assets/javascripts/jquery.fileupload.js +1 -1
  3. data/vendor/assets/javascripts/jquery.ui.js +2 -14914
  4. data/vendor/assets/javascripts/jquery.ui/jquery-ui.custom.js +14879 -0
  5. data/vendor/assets/javascripts/jquery.ui/jquery.ui.accordion.js +731 -0
  6. data/vendor/assets/javascripts/jquery.ui/jquery.ui.autocomplete.js +602 -0
  7. data/vendor/assets/javascripts/jquery.ui/jquery.ui.button.js +418 -0
  8. data/vendor/assets/javascripts/jquery.ui/jquery.ui.core.js +356 -0
  9. data/vendor/assets/javascripts/jquery.ui/jquery.ui.datepicker.js +1846 -0
  10. data/vendor/assets/javascripts/jquery.ui/jquery.ui.dialog.js +858 -0
  11. data/vendor/assets/javascripts/jquery.ui/jquery.ui.draggable.js +836 -0
  12. data/vendor/assets/javascripts/jquery.ui/jquery.ui.droppable.js +294 -0
  13. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-blind.js +82 -0
  14. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-bounce.js +113 -0
  15. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-clip.js +67 -0
  16. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-drop.js +65 -0
  17. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-explode.js +97 -0
  18. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-fade.js +30 -0
  19. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-fold.js +76 -0
  20. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-highlight.js +50 -0
  21. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-pulsate.js +63 -0
  22. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-scale.js +318 -0
  23. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-shake.js +74 -0
  24. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-slide.js +64 -0
  25. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-transfer.js +47 -0
  26. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect.js +1276 -0
  27. data/vendor/assets/javascripts/jquery.ui/jquery.ui.menu.js +610 -0
  28. data/vendor/assets/javascripts/jquery.ui/jquery.ui.mouse.js +169 -0
  29. data/vendor/assets/javascripts/jquery.ui/jquery.ui.position.js +517 -0
  30. data/vendor/assets/javascripts/jquery.ui/jquery.ui.progressbar.js +105 -0
  31. data/vendor/assets/javascripts/jquery.ui/jquery.ui.resizable.js +801 -0
  32. data/vendor/assets/javascripts/jquery.ui/jquery.ui.selectable.js +261 -0
  33. data/vendor/assets/javascripts/jquery.ui/jquery.ui.slider.js +644 -0
  34. data/vendor/assets/javascripts/jquery.ui/jquery.ui.sortable.js +1096 -0
  35. data/vendor/assets/javascripts/jquery.ui/jquery.ui.spinner.js +478 -0
  36. data/vendor/assets/javascripts/jquery.ui/jquery.ui.tabs.js +1366 -0
  37. data/vendor/assets/javascripts/jquery.ui/jquery.ui.tooltip.js +398 -0
  38. data/vendor/assets/javascripts/{jquery.ui.widget.js → jquery.ui/jquery.ui.widget.js} +39 -34
  39. metadata +37 -9
@@ -0,0 +1,418 @@
1
+ /*!
2
+ * jQuery UI Button 1.9.2
3
+ * http://jqueryui.com
4
+ *
5
+ * Copyright 2012 jQuery Foundation and other contributors
6
+ * Released under the MIT license.
7
+ * http://jquery.org/license
8
+ *
9
+ * http://api.jqueryui.com/button/
10
+ *
11
+ * Depends:
12
+ * jquery.ui.core.js
13
+ * jquery.ui.widget.js
14
+ */
15
+ (function( $, undefined ) {
16
+
17
+ var lastActive, startXPos, startYPos, clickDragged,
18
+ baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
19
+ stateClasses = "ui-state-hover ui-state-active ",
20
+ typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
21
+ formResetHandler = function() {
22
+ var buttons = $( this ).find( ":ui-button" );
23
+ setTimeout(function() {
24
+ buttons.button( "refresh" );
25
+ }, 1 );
26
+ },
27
+ radioGroup = function( radio ) {
28
+ var name = radio.name,
29
+ form = radio.form,
30
+ radios = $( [] );
31
+ if ( name ) {
32
+ if ( form ) {
33
+ radios = $( form ).find( "[name='" + name + "']" );
34
+ } else {
35
+ radios = $( "[name='" + name + "']", radio.ownerDocument )
36
+ .filter(function() {
37
+ return !this.form;
38
+ });
39
+ }
40
+ }
41
+ return radios;
42
+ };
43
+
44
+ $.widget( "ui.button", {
45
+ version: "1.9.2",
46
+ defaultElement: "<button>",
47
+ options: {
48
+ disabled: null,
49
+ text: true,
50
+ label: null,
51
+ icons: {
52
+ primary: null,
53
+ secondary: null
54
+ }
55
+ },
56
+ _create: function() {
57
+ this.element.closest( "form" )
58
+ .unbind( "reset" + this.eventNamespace )
59
+ .bind( "reset" + this.eventNamespace, formResetHandler );
60
+
61
+ if ( typeof this.options.disabled !== "boolean" ) {
62
+ this.options.disabled = !!this.element.prop( "disabled" );
63
+ } else {
64
+ this.element.prop( "disabled", this.options.disabled );
65
+ }
66
+
67
+ this._determineButtonType();
68
+ this.hasTitle = !!this.buttonElement.attr( "title" );
69
+
70
+ var that = this,
71
+ options = this.options,
72
+ toggleButton = this.type === "checkbox" || this.type === "radio",
73
+ activeClass = !toggleButton ? "ui-state-active" : "",
74
+ focusClass = "ui-state-focus";
75
+
76
+ if ( options.label === null ) {
77
+ options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
78
+ }
79
+
80
+ this._hoverable( this.buttonElement );
81
+
82
+ this.buttonElement
83
+ .addClass( baseClasses )
84
+ .attr( "role", "button" )
85
+ .bind( "mouseenter" + this.eventNamespace, function() {
86
+ if ( options.disabled ) {
87
+ return;
88
+ }
89
+ if ( this === lastActive ) {
90
+ $( this ).addClass( "ui-state-active" );
91
+ }
92
+ })
93
+ .bind( "mouseleave" + this.eventNamespace, function() {
94
+ if ( options.disabled ) {
95
+ return;
96
+ }
97
+ $( this ).removeClass( activeClass );
98
+ })
99
+ .bind( "click" + this.eventNamespace, function( event ) {
100
+ if ( options.disabled ) {
101
+ event.preventDefault();
102
+ event.stopImmediatePropagation();
103
+ }
104
+ });
105
+
106
+ this.element
107
+ .bind( "focus" + this.eventNamespace, function() {
108
+ // no need to check disabled, focus won't be triggered anyway
109
+ that.buttonElement.addClass( focusClass );
110
+ })
111
+ .bind( "blur" + this.eventNamespace, function() {
112
+ that.buttonElement.removeClass( focusClass );
113
+ });
114
+
115
+ if ( toggleButton ) {
116
+ this.element.bind( "change" + this.eventNamespace, function() {
117
+ if ( clickDragged ) {
118
+ return;
119
+ }
120
+ that.refresh();
121
+ });
122
+ // if mouse moves between mousedown and mouseup (drag) set clickDragged flag
123
+ // prevents issue where button state changes but checkbox/radio checked state
124
+ // does not in Firefox (see ticket #6970)
125
+ this.buttonElement
126
+ .bind( "mousedown" + this.eventNamespace, function( event ) {
127
+ if ( options.disabled ) {
128
+ return;
129
+ }
130
+ clickDragged = false;
131
+ startXPos = event.pageX;
132
+ startYPos = event.pageY;
133
+ })
134
+ .bind( "mouseup" + this.eventNamespace, function( event ) {
135
+ if ( options.disabled ) {
136
+ return;
137
+ }
138
+ if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
139
+ clickDragged = true;
140
+ }
141
+ });
142
+ }
143
+
144
+ if ( this.type === "checkbox" ) {
145
+ this.buttonElement.bind( "click" + this.eventNamespace, function() {
146
+ if ( options.disabled || clickDragged ) {
147
+ return false;
148
+ }
149
+ $( this ).toggleClass( "ui-state-active" );
150
+ that.buttonElement.attr( "aria-pressed", that.element[0].checked );
151
+ });
152
+ } else if ( this.type === "radio" ) {
153
+ this.buttonElement.bind( "click" + this.eventNamespace, function() {
154
+ if ( options.disabled || clickDragged ) {
155
+ return false;
156
+ }
157
+ $( this ).addClass( "ui-state-active" );
158
+ that.buttonElement.attr( "aria-pressed", "true" );
159
+
160
+ var radio = that.element[ 0 ];
161
+ radioGroup( radio )
162
+ .not( radio )
163
+ .map(function() {
164
+ return $( this ).button( "widget" )[ 0 ];
165
+ })
166
+ .removeClass( "ui-state-active" )
167
+ .attr( "aria-pressed", "false" );
168
+ });
169
+ } else {
170
+ this.buttonElement
171
+ .bind( "mousedown" + this.eventNamespace, function() {
172
+ if ( options.disabled ) {
173
+ return false;
174
+ }
175
+ $( this ).addClass( "ui-state-active" );
176
+ lastActive = this;
177
+ that.document.one( "mouseup", function() {
178
+ lastActive = null;
179
+ });
180
+ })
181
+ .bind( "mouseup" + this.eventNamespace, function() {
182
+ if ( options.disabled ) {
183
+ return false;
184
+ }
185
+ $( this ).removeClass( "ui-state-active" );
186
+ })
187
+ .bind( "keydown" + this.eventNamespace, function(event) {
188
+ if ( options.disabled ) {
189
+ return false;
190
+ }
191
+ if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
192
+ $( this ).addClass( "ui-state-active" );
193
+ }
194
+ })
195
+ .bind( "keyup" + this.eventNamespace, function() {
196
+ $( this ).removeClass( "ui-state-active" );
197
+ });
198
+
199
+ if ( this.buttonElement.is("a") ) {
200
+ this.buttonElement.keyup(function(event) {
201
+ if ( event.keyCode === $.ui.keyCode.SPACE ) {
202
+ // TODO pass through original event correctly (just as 2nd argument doesn't work)
203
+ $( this ).click();
204
+ }
205
+ });
206
+ }
207
+ }
208
+
209
+ // TODO: pull out $.Widget's handling for the disabled option into
210
+ // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
211
+ // be overridden by individual plugins
212
+ this._setOption( "disabled", options.disabled );
213
+ this._resetButton();
214
+ },
215
+
216
+ _determineButtonType: function() {
217
+ var ancestor, labelSelector, checked;
218
+
219
+ if ( this.element.is("[type=checkbox]") ) {
220
+ this.type = "checkbox";
221
+ } else if ( this.element.is("[type=radio]") ) {
222
+ this.type = "radio";
223
+ } else if ( this.element.is("input") ) {
224
+ this.type = "input";
225
+ } else {
226
+ this.type = "button";
227
+ }
228
+
229
+ if ( this.type === "checkbox" || this.type === "radio" ) {
230
+ // we don't search against the document in case the element
231
+ // is disconnected from the DOM
232
+ ancestor = this.element.parents().last();
233
+ labelSelector = "label[for='" + this.element.attr("id") + "']";
234
+ this.buttonElement = ancestor.find( labelSelector );
235
+ if ( !this.buttonElement.length ) {
236
+ ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
237
+ this.buttonElement = ancestor.filter( labelSelector );
238
+ if ( !this.buttonElement.length ) {
239
+ this.buttonElement = ancestor.find( labelSelector );
240
+ }
241
+ }
242
+ this.element.addClass( "ui-helper-hidden-accessible" );
243
+
244
+ checked = this.element.is( ":checked" );
245
+ if ( checked ) {
246
+ this.buttonElement.addClass( "ui-state-active" );
247
+ }
248
+ this.buttonElement.prop( "aria-pressed", checked );
249
+ } else {
250
+ this.buttonElement = this.element;
251
+ }
252
+ },
253
+
254
+ widget: function() {
255
+ return this.buttonElement;
256
+ },
257
+
258
+ _destroy: function() {
259
+ this.element
260
+ .removeClass( "ui-helper-hidden-accessible" );
261
+ this.buttonElement
262
+ .removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
263
+ .removeAttr( "role" )
264
+ .removeAttr( "aria-pressed" )
265
+ .html( this.buttonElement.find(".ui-button-text").html() );
266
+
267
+ if ( !this.hasTitle ) {
268
+ this.buttonElement.removeAttr( "title" );
269
+ }
270
+ },
271
+
272
+ _setOption: function( key, value ) {
273
+ this._super( key, value );
274
+ if ( key === "disabled" ) {
275
+ if ( value ) {
276
+ this.element.prop( "disabled", true );
277
+ } else {
278
+ this.element.prop( "disabled", false );
279
+ }
280
+ return;
281
+ }
282
+ this._resetButton();
283
+ },
284
+
285
+ refresh: function() {
286
+ //See #8237 & #8828
287
+ var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
288
+
289
+ if ( isDisabled !== this.options.disabled ) {
290
+ this._setOption( "disabled", isDisabled );
291
+ }
292
+ if ( this.type === "radio" ) {
293
+ radioGroup( this.element[0] ).each(function() {
294
+ if ( $( this ).is( ":checked" ) ) {
295
+ $( this ).button( "widget" )
296
+ .addClass( "ui-state-active" )
297
+ .attr( "aria-pressed", "true" );
298
+ } else {
299
+ $( this ).button( "widget" )
300
+ .removeClass( "ui-state-active" )
301
+ .attr( "aria-pressed", "false" );
302
+ }
303
+ });
304
+ } else if ( this.type === "checkbox" ) {
305
+ if ( this.element.is( ":checked" ) ) {
306
+ this.buttonElement
307
+ .addClass( "ui-state-active" )
308
+ .attr( "aria-pressed", "true" );
309
+ } else {
310
+ this.buttonElement
311
+ .removeClass( "ui-state-active" )
312
+ .attr( "aria-pressed", "false" );
313
+ }
314
+ }
315
+ },
316
+
317
+ _resetButton: function() {
318
+ if ( this.type === "input" ) {
319
+ if ( this.options.label ) {
320
+ this.element.val( this.options.label );
321
+ }
322
+ return;
323
+ }
324
+ var buttonElement = this.buttonElement.removeClass( typeClasses ),
325
+ buttonText = $( "<span></span>", this.document[0] )
326
+ .addClass( "ui-button-text" )
327
+ .html( this.options.label )
328
+ .appendTo( buttonElement.empty() )
329
+ .text(),
330
+ icons = this.options.icons,
331
+ multipleIcons = icons.primary && icons.secondary,
332
+ buttonClasses = [];
333
+
334
+ if ( icons.primary || icons.secondary ) {
335
+ if ( this.options.text ) {
336
+ buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
337
+ }
338
+
339
+ if ( icons.primary ) {
340
+ buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
341
+ }
342
+
343
+ if ( icons.secondary ) {
344
+ buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
345
+ }
346
+
347
+ if ( !this.options.text ) {
348
+ buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
349
+
350
+ if ( !this.hasTitle ) {
351
+ buttonElement.attr( "title", $.trim( buttonText ) );
352
+ }
353
+ }
354
+ } else {
355
+ buttonClasses.push( "ui-button-text-only" );
356
+ }
357
+ buttonElement.addClass( buttonClasses.join( " " ) );
358
+ }
359
+ });
360
+
361
+ $.widget( "ui.buttonset", {
362
+ version: "1.9.2",
363
+ options: {
364
+ items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"
365
+ },
366
+
367
+ _create: function() {
368
+ this.element.addClass( "ui-buttonset" );
369
+ },
370
+
371
+ _init: function() {
372
+ this.refresh();
373
+ },
374
+
375
+ _setOption: function( key, value ) {
376
+ if ( key === "disabled" ) {
377
+ this.buttons.button( "option", key, value );
378
+ }
379
+
380
+ this._super( key, value );
381
+ },
382
+
383
+ refresh: function() {
384
+ var rtl = this.element.css( "direction" ) === "rtl";
385
+
386
+ this.buttons = this.element.find( this.options.items )
387
+ .filter( ":ui-button" )
388
+ .button( "refresh" )
389
+ .end()
390
+ .not( ":ui-button" )
391
+ .button()
392
+ .end()
393
+ .map(function() {
394
+ return $( this ).button( "widget" )[ 0 ];
395
+ })
396
+ .removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
397
+ .filter( ":first" )
398
+ .addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
399
+ .end()
400
+ .filter( ":last" )
401
+ .addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
402
+ .end()
403
+ .end();
404
+ },
405
+
406
+ _destroy: function() {
407
+ this.element.removeClass( "ui-buttonset" );
408
+ this.buttons
409
+ .map(function() {
410
+ return $( this ).button( "widget" )[ 0 ];
411
+ })
412
+ .removeClass( "ui-corner-left ui-corner-right" )
413
+ .end()
414
+ .button( "destroy" );
415
+ }
416
+ });
417
+
418
+ }( jQuery ) );
@@ -0,0 +1,356 @@
1
+ /*!
2
+ * jQuery UI Core 1.9.2
3
+ * http://jqueryui.com
4
+ *
5
+ * Copyright 2012 jQuery Foundation and other contributors
6
+ * Released under the MIT license.
7
+ * http://jquery.org/license
8
+ *
9
+ * http://api.jqueryui.com/category/ui-core/
10
+ */
11
+ (function( $, undefined ) {
12
+
13
+ var uuid = 0,
14
+ runiqueId = /^ui-id-\d+$/;
15
+
16
+ // prevent duplicate loading
17
+ // this is only a problem because we proxy existing functions
18
+ // and we don't want to double proxy them
19
+ $.ui = $.ui || {};
20
+ if ( $.ui.version ) {
21
+ return;
22
+ }
23
+
24
+ $.extend( $.ui, {
25
+ version: "1.9.2",
26
+
27
+ keyCode: {
28
+ BACKSPACE: 8,
29
+ COMMA: 188,
30
+ DELETE: 46,
31
+ DOWN: 40,
32
+ END: 35,
33
+ ENTER: 13,
34
+ ESCAPE: 27,
35
+ HOME: 36,
36
+ LEFT: 37,
37
+ NUMPAD_ADD: 107,
38
+ NUMPAD_DECIMAL: 110,
39
+ NUMPAD_DIVIDE: 111,
40
+ NUMPAD_ENTER: 108,
41
+ NUMPAD_MULTIPLY: 106,
42
+ NUMPAD_SUBTRACT: 109,
43
+ PAGE_DOWN: 34,
44
+ PAGE_UP: 33,
45
+ PERIOD: 190,
46
+ RIGHT: 39,
47
+ SPACE: 32,
48
+ TAB: 9,
49
+ UP: 38
50
+ }
51
+ });
52
+
53
+ // plugins
54
+ $.fn.extend({
55
+ _focus: $.fn.focus,
56
+ focus: function( delay, fn ) {
57
+ return typeof delay === "number" ?
58
+ this.each(function() {
59
+ var elem = this;
60
+ setTimeout(function() {
61
+ $( elem ).focus();
62
+ if ( fn ) {
63
+ fn.call( elem );
64
+ }
65
+ }, delay );
66
+ }) :
67
+ this._focus.apply( this, arguments );
68
+ },
69
+
70
+ scrollParent: function() {
71
+ var scrollParent;
72
+ if (($.ui.ie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
73
+ scrollParent = this.parents().filter(function() {
74
+ return (/(relative|absolute|fixed)/).test($.css(this,'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
75
+ }).eq(0);
76
+ } else {
77
+ scrollParent = this.parents().filter(function() {
78
+ return (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
79
+ }).eq(0);
80
+ }
81
+
82
+ return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
83
+ },
84
+
85
+ zIndex: function( zIndex ) {
86
+ if ( zIndex !== undefined ) {
87
+ return this.css( "zIndex", zIndex );
88
+ }
89
+
90
+ if ( this.length ) {
91
+ var elem = $( this[ 0 ] ), position, value;
92
+ while ( elem.length && elem[ 0 ] !== document ) {
93
+ // Ignore z-index if position is set to a value where z-index is ignored by the browser
94
+ // This makes behavior of this function consistent across browsers
95
+ // WebKit always returns auto if the element is positioned
96
+ position = elem.css( "position" );
97
+ if ( position === "absolute" || position === "relative" || position === "fixed" ) {
98
+ // IE returns 0 when zIndex is not specified
99
+ // other browsers return a string
100
+ // we ignore the case of nested elements with an explicit value of 0
101
+ // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
102
+ value = parseInt( elem.css( "zIndex" ), 10 );
103
+ if ( !isNaN( value ) && value !== 0 ) {
104
+ return value;
105
+ }
106
+ }
107
+ elem = elem.parent();
108
+ }
109
+ }
110
+
111
+ return 0;
112
+ },
113
+
114
+ uniqueId: function() {
115
+ return this.each(function() {
116
+ if ( !this.id ) {
117
+ this.id = "ui-id-" + (++uuid);
118
+ }
119
+ });
120
+ },
121
+
122
+ removeUniqueId: function() {
123
+ return this.each(function() {
124
+ if ( runiqueId.test( this.id ) ) {
125
+ $( this ).removeAttr( "id" );
126
+ }
127
+ });
128
+ }
129
+ });
130
+
131
+ // selectors
132
+ function focusable( element, isTabIndexNotNaN ) {
133
+ var map, mapName, img,
134
+ nodeName = element.nodeName.toLowerCase();
135
+ if ( "area" === nodeName ) {
136
+ map = element.parentNode;
137
+ mapName = map.name;
138
+ if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
139
+ return false;
140
+ }
141
+ img = $( "img[usemap=#" + mapName + "]" )[0];
142
+ return !!img && visible( img );
143
+ }
144
+ return ( /input|select|textarea|button|object/.test( nodeName ) ?
145
+ !element.disabled :
146
+ "a" === nodeName ?
147
+ element.href || isTabIndexNotNaN :
148
+ isTabIndexNotNaN) &&
149
+ // the element and all of its ancestors must be visible
150
+ visible( element );
151
+ }
152
+
153
+ function visible( element ) {
154
+ return $.expr.filters.visible( element ) &&
155
+ !$( element ).parents().andSelf().filter(function() {
156
+ return $.css( this, "visibility" ) === "hidden";
157
+ }).length;
158
+ }
159
+
160
+ $.extend( $.expr[ ":" ], {
161
+ data: $.expr.createPseudo ?
162
+ $.expr.createPseudo(function( dataName ) {
163
+ return function( elem ) {
164
+ return !!$.data( elem, dataName );
165
+ };
166
+ }) :
167
+ // support: jQuery <1.8
168
+ function( elem, i, match ) {
169
+ return !!$.data( elem, match[ 3 ] );
170
+ },
171
+
172
+ focusable: function( element ) {
173
+ return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
174
+ },
175
+
176
+ tabbable: function( element ) {
177
+ var tabIndex = $.attr( element, "tabindex" ),
178
+ isTabIndexNaN = isNaN( tabIndex );
179
+ return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
180
+ }
181
+ });
182
+
183
+ // support
184
+ $(function() {
185
+ var body = document.body,
186
+ div = body.appendChild( div = document.createElement( "div" ) );
187
+
188
+ // access offsetHeight before setting the style to prevent a layout bug
189
+ // in IE 9 which causes the element to continue to take up space even
190
+ // after it is removed from the DOM (#8026)
191
+ div.offsetHeight;
192
+
193
+ $.extend( div.style, {
194
+ minHeight: "100px",
195
+ height: "auto",
196
+ padding: 0,
197
+ borderWidth: 0
198
+ });
199
+
200
+ $.support.minHeight = div.offsetHeight === 100;
201
+ $.support.selectstart = "onselectstart" in div;
202
+
203
+ // set display to none to avoid a layout bug in IE
204
+ // http://dev.jquery.com/ticket/4014
205
+ body.removeChild( div ).style.display = "none";
206
+ });
207
+
208
+ // support: jQuery <1.8
209
+ if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
210
+ $.each( [ "Width", "Height" ], function( i, name ) {
211
+ var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
212
+ type = name.toLowerCase(),
213
+ orig = {
214
+ innerWidth: $.fn.innerWidth,
215
+ innerHeight: $.fn.innerHeight,
216
+ outerWidth: $.fn.outerWidth,
217
+ outerHeight: $.fn.outerHeight
218
+ };
219
+
220
+ function reduce( elem, size, border, margin ) {
221
+ $.each( side, function() {
222
+ size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
223
+ if ( border ) {
224
+ size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
225
+ }
226
+ if ( margin ) {
227
+ size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
228
+ }
229
+ });
230
+ return size;
231
+ }
232
+
233
+ $.fn[ "inner" + name ] = function( size ) {
234
+ if ( size === undefined ) {
235
+ return orig[ "inner" + name ].call( this );
236
+ }
237
+
238
+ return this.each(function() {
239
+ $( this ).css( type, reduce( this, size ) + "px" );
240
+ });
241
+ };
242
+
243
+ $.fn[ "outer" + name] = function( size, margin ) {
244
+ if ( typeof size !== "number" ) {
245
+ return orig[ "outer" + name ].call( this, size );
246
+ }
247
+
248
+ return this.each(function() {
249
+ $( this).css( type, reduce( this, size, true, margin ) + "px" );
250
+ });
251
+ };
252
+ });
253
+ }
254
+
255
+ // support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
256
+ if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
257
+ $.fn.removeData = (function( removeData ) {
258
+ return function( key ) {
259
+ if ( arguments.length ) {
260
+ return removeData.call( this, $.camelCase( key ) );
261
+ } else {
262
+ return removeData.call( this );
263
+ }
264
+ };
265
+ })( $.fn.removeData );
266
+ }
267
+
268
+
269
+
270
+
271
+
272
+ // deprecated
273
+
274
+ (function() {
275
+ var uaMatch = /msie ([\w.]+)/.exec( navigator.userAgent.toLowerCase() ) || [];
276
+ $.ui.ie = uaMatch.length ? true : false;
277
+ $.ui.ie6 = parseFloat( uaMatch[ 1 ], 10 ) === 6;
278
+ })();
279
+
280
+ $.fn.extend({
281
+ disableSelection: function() {
282
+ return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
283
+ ".ui-disableSelection", function( event ) {
284
+ event.preventDefault();
285
+ });
286
+ },
287
+
288
+ enableSelection: function() {
289
+ return this.unbind( ".ui-disableSelection" );
290
+ }
291
+ });
292
+
293
+ $.extend( $.ui, {
294
+ // $.ui.plugin is deprecated. Use the proxy pattern instead.
295
+ plugin: {
296
+ add: function( module, option, set ) {
297
+ var i,
298
+ proto = $.ui[ module ].prototype;
299
+ for ( i in set ) {
300
+ proto.plugins[ i ] = proto.plugins[ i ] || [];
301
+ proto.plugins[ i ].push( [ option, set[ i ] ] );
302
+ }
303
+ },
304
+ call: function( instance, name, args ) {
305
+ var i,
306
+ set = instance.plugins[ name ];
307
+ if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
308
+ return;
309
+ }
310
+
311
+ for ( i = 0; i < set.length; i++ ) {
312
+ if ( instance.options[ set[ i ][ 0 ] ] ) {
313
+ set[ i ][ 1 ].apply( instance.element, args );
314
+ }
315
+ }
316
+ }
317
+ },
318
+
319
+ contains: $.contains,
320
+
321
+ // only used by resizable
322
+ hasScroll: function( el, a ) {
323
+
324
+ //If overflow is hidden, the element might have extra content, but the user wants to hide it
325
+ if ( $( el ).css( "overflow" ) === "hidden") {
326
+ return false;
327
+ }
328
+
329
+ var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
330
+ has = false;
331
+
332
+ if ( el[ scroll ] > 0 ) {
333
+ return true;
334
+ }
335
+
336
+ // TODO: determine which cases actually cause this to happen
337
+ // if the element doesn't have the scroll set, see if it's possible to
338
+ // set the scroll
339
+ el[ scroll ] = 1;
340
+ has = ( el[ scroll ] > 0 );
341
+ el[ scroll ] = 0;
342
+ return has;
343
+ },
344
+
345
+ // these are odd functions, fix the API or move into individual plugins
346
+ isOverAxis: function( x, reference, size ) {
347
+ //Determines when x coordinate is over "b" element axis
348
+ return ( x > reference ) && ( x < ( reference + size ) );
349
+ },
350
+ isOver: function( y, x, top, left, height, width ) {
351
+ //Determines when x, y coordinates is over "b" element
352
+ return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
353
+ }
354
+ });
355
+
356
+ })( jQuery );