jquery-ui-middleman 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/.gitmodules +3 -0
  4. data/.travis.yml +2 -0
  5. data/Gemfile +3 -0
  6. data/History.md +115 -0
  7. data/License.txt +2 -0
  8. data/README.md +226 -0
  9. data/Rakefile +221 -0
  10. data/VERSIONS.md +27 -0
  11. data/app/assets/images/jquery-ui/animated-overlay.gif +0 -0
  12. data/app/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  13. data/app/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  14. data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  15. data/app/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  16. data/app/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  17. data/app/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  18. data/app/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  19. data/app/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  20. data/app/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  21. data/app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  22. data/app/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  23. data/app/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
  24. data/app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  25. data/app/assets/javascripts/jquery.ui.accordion.js +575 -0
  26. data/app/assets/javascripts/jquery.ui.all.js +34 -0
  27. data/app/assets/javascripts/jquery.ui.autocomplete.js +615 -0
  28. data/app/assets/javascripts/jquery.ui.button.js +422 -0
  29. data/app/assets/javascripts/jquery.ui.core.js +320 -0
  30. data/app/assets/javascripts/jquery.ui.datepicker-af.js +23 -0
  31. data/app/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +23 -0
  32. data/app/assets/javascripts/jquery.ui.datepicker-ar.js +23 -0
  33. data/app/assets/javascripts/jquery.ui.datepicker-az.js +23 -0
  34. data/app/assets/javascripts/jquery.ui.datepicker-be.js +23 -0
  35. data/app/assets/javascripts/jquery.ui.datepicker-bg.js +24 -0
  36. data/app/assets/javascripts/jquery.ui.datepicker-bs.js +23 -0
  37. data/app/assets/javascripts/jquery.ui.datepicker-ca.js +23 -0
  38. data/app/assets/javascripts/jquery.ui.datepicker-cs.js +23 -0
  39. data/app/assets/javascripts/jquery.ui.datepicker-cy-GB.js +23 -0
  40. data/app/assets/javascripts/jquery.ui.datepicker-da.js +23 -0
  41. data/app/assets/javascripts/jquery.ui.datepicker-de.js +23 -0
  42. data/app/assets/javascripts/jquery.ui.datepicker-el.js +23 -0
  43. data/app/assets/javascripts/jquery.ui.datepicker-en-AU.js +23 -0
  44. data/app/assets/javascripts/jquery.ui.datepicker-en-GB.js +23 -0
  45. data/app/assets/javascripts/jquery.ui.datepicker-en-NZ.js +23 -0
  46. data/app/assets/javascripts/jquery.ui.datepicker-eo.js +23 -0
  47. data/app/assets/javascripts/jquery.ui.datepicker-es.js +23 -0
  48. data/app/assets/javascripts/jquery.ui.datepicker-et.js +23 -0
  49. data/app/assets/javascripts/jquery.ui.datepicker-eu.js +23 -0
  50. data/app/assets/javascripts/jquery.ui.datepicker-fa.js +59 -0
  51. data/app/assets/javascripts/jquery.ui.datepicker-fi.js +23 -0
  52. data/app/assets/javascripts/jquery.ui.datepicker-fo.js +23 -0
  53. data/app/assets/javascripts/jquery.ui.datepicker-fr-CA.js +23 -0
  54. data/app/assets/javascripts/jquery.ui.datepicker-fr-CH.js +23 -0
  55. data/app/assets/javascripts/jquery.ui.datepicker-fr.js +25 -0
  56. data/app/assets/javascripts/jquery.ui.datepicker-gl.js +23 -0
  57. data/app/assets/javascripts/jquery.ui.datepicker-he.js +23 -0
  58. data/app/assets/javascripts/jquery.ui.datepicker-hi.js +23 -0
  59. data/app/assets/javascripts/jquery.ui.datepicker-hr.js +23 -0
  60. data/app/assets/javascripts/jquery.ui.datepicker-hu.js +23 -0
  61. data/app/assets/javascripts/jquery.ui.datepicker-hy.js +23 -0
  62. data/app/assets/javascripts/jquery.ui.datepicker-id.js +23 -0
  63. data/app/assets/javascripts/jquery.ui.datepicker-is.js +23 -0
  64. data/app/assets/javascripts/jquery.ui.datepicker-it.js +23 -0
  65. data/app/assets/javascripts/jquery.ui.datepicker-ja.js +23 -0
  66. data/app/assets/javascripts/jquery.ui.datepicker-ka.js +21 -0
  67. data/app/assets/javascripts/jquery.ui.datepicker-kk.js +23 -0
  68. data/app/assets/javascripts/jquery.ui.datepicker-km.js +23 -0
  69. data/app/assets/javascripts/jquery.ui.datepicker-ko.js +23 -0
  70. data/app/assets/javascripts/jquery.ui.datepicker-ky.js +24 -0
  71. data/app/assets/javascripts/jquery.ui.datepicker-lb.js +23 -0
  72. data/app/assets/javascripts/jquery.ui.datepicker-lt.js +23 -0
  73. data/app/assets/javascripts/jquery.ui.datepicker-lv.js +23 -0
  74. data/app/assets/javascripts/jquery.ui.datepicker-mk.js +23 -0
  75. data/app/assets/javascripts/jquery.ui.datepicker-ml.js +23 -0
  76. data/app/assets/javascripts/jquery.ui.datepicker-ms.js +23 -0
  77. data/app/assets/javascripts/jquery.ui.datepicker-nb.js +22 -0
  78. data/app/assets/javascripts/jquery.ui.datepicker-nl-BE.js +23 -0
  79. data/app/assets/javascripts/jquery.ui.datepicker-nl.js +23 -0
  80. data/app/assets/javascripts/jquery.ui.datepicker-nn.js +22 -0
  81. data/app/assets/javascripts/jquery.ui.datepicker-no.js +23 -0
  82. data/app/assets/javascripts/jquery.ui.datepicker-pl.js +23 -0
  83. data/app/assets/javascripts/jquery.ui.datepicker-pt-BR.js +23 -0
  84. data/app/assets/javascripts/jquery.ui.datepicker-pt.js +22 -0
  85. data/app/assets/javascripts/jquery.ui.datepicker-rm.js +21 -0
  86. data/app/assets/javascripts/jquery.ui.datepicker-ro.js +26 -0
  87. data/app/assets/javascripts/jquery.ui.datepicker-ru.js +23 -0
  88. data/app/assets/javascripts/jquery.ui.datepicker-sk.js +23 -0
  89. data/app/assets/javascripts/jquery.ui.datepicker-sl.js +24 -0
  90. data/app/assets/javascripts/jquery.ui.datepicker-sq.js +23 -0
  91. data/app/assets/javascripts/jquery.ui.datepicker-sr-SR.js +23 -0
  92. data/app/assets/javascripts/jquery.ui.datepicker-sr.js +23 -0
  93. data/app/assets/javascripts/jquery.ui.datepicker-sv.js +23 -0
  94. data/app/assets/javascripts/jquery.ui.datepicker-ta.js +23 -0
  95. data/app/assets/javascripts/jquery.ui.datepicker-th.js +23 -0
  96. data/app/assets/javascripts/jquery.ui.datepicker-tj.js +23 -0
  97. data/app/assets/javascripts/jquery.ui.datepicker-tr.js +23 -0
  98. data/app/assets/javascripts/jquery.ui.datepicker-uk.js +24 -0
  99. data/app/assets/javascripts/jquery.ui.datepicker-vi.js +23 -0
  100. data/app/assets/javascripts/jquery.ui.datepicker-zh-CN.js +23 -0
  101. data/app/assets/javascripts/jquery.ui.datepicker-zh-HK.js +23 -0
  102. data/app/assets/javascripts/jquery.ui.datepicker-zh-TW.js +23 -0
  103. data/app/assets/javascripts/jquery.ui.datepicker.js +2040 -0
  104. data/app/assets/javascripts/jquery.ui.dialog.js +815 -0
  105. data/app/assets/javascripts/jquery.ui.draggable.js +962 -0
  106. data/app/assets/javascripts/jquery.ui.droppable.js +377 -0
  107. data/app/assets/javascripts/jquery.ui.effect-blind.js +84 -0
  108. data/app/assets/javascripts/jquery.ui.effect-bounce.js +115 -0
  109. data/app/assets/javascripts/jquery.ui.effect-clip.js +69 -0
  110. data/app/assets/javascripts/jquery.ui.effect-drop.js +67 -0
  111. data/app/assets/javascripts/jquery.ui.effect-explode.js +99 -0
  112. data/app/assets/javascripts/jquery.ui.effect-fade.js +32 -0
  113. data/app/assets/javascripts/jquery.ui.effect-fold.js +78 -0
  114. data/app/assets/javascripts/jquery.ui.effect-highlight.js +52 -0
  115. data/app/assets/javascripts/jquery.ui.effect-pulsate.js +65 -0
  116. data/app/assets/javascripts/jquery.ui.effect-scale.js +320 -0
  117. data/app/assets/javascripts/jquery.ui.effect-shake.js +76 -0
  118. data/app/assets/javascripts/jquery.ui.effect-slide.js +66 -0
  119. data/app/assets/javascripts/jquery.ui.effect-transfer.js +49 -0
  120. data/app/assets/javascripts/jquery.ui.effect.all.js +14 -0
  121. data/app/assets/javascripts/jquery.ui.effect.js +1289 -0
  122. data/app/assets/javascripts/jquery.ui.menu.js +625 -0
  123. data/app/assets/javascripts/jquery.ui.mouse.js +172 -0
  124. data/app/assets/javascripts/jquery.ui.position.js +497 -0
  125. data/app/assets/javascripts/jquery.ui.progressbar.js +148 -0
  126. data/app/assets/javascripts/jquery.ui.resizable.js +972 -0
  127. data/app/assets/javascripts/jquery.ui.selectable.js +281 -0
  128. data/app/assets/javascripts/jquery.ui.slider.js +676 -0
  129. data/app/assets/javascripts/jquery.ui.sortable.js +1289 -0
  130. data/app/assets/javascripts/jquery.ui.spinner.js +497 -0
  131. data/app/assets/javascripts/jquery.ui.tabs.js +849 -0
  132. data/app/assets/javascripts/jquery.ui.tooltip.js +406 -0
  133. data/app/assets/javascripts/jquery.ui.widget.js +521 -0
  134. data/app/assets/stylesheets/jquery.ui.accordion.css.erb +42 -0
  135. data/app/assets/stylesheets/jquery.ui.all.css.erb +14 -0
  136. data/app/assets/stylesheets/jquery.ui.autocomplete.css.erb +21 -0
  137. data/app/assets/stylesheets/jquery.ui.base.css.erb +27 -0
  138. data/app/assets/stylesheets/jquery.ui.button.css.erb +118 -0
  139. data/app/assets/stylesheets/jquery.ui.core.css.erb +93 -0
  140. data/app/assets/stylesheets/jquery.ui.datepicker.css.erb +182 -0
  141. data/app/assets/stylesheets/jquery.ui.dialog.css.erb +75 -0
  142. data/app/assets/stylesheets/jquery.ui.menu.css.erb +83 -0
  143. data/app/assets/stylesheets/jquery.ui.progressbar.css.erb +32 -0
  144. data/app/assets/stylesheets/jquery.ui.resizable.css.erb +82 -0
  145. data/app/assets/stylesheets/jquery.ui.selectable.css.erb +19 -0
  146. data/app/assets/stylesheets/jquery.ui.slider.css.erb +77 -0
  147. data/app/assets/stylesheets/jquery.ui.spinner.css.erb +70 -0
  148. data/app/assets/stylesheets/jquery.ui.tabs.css.erb +56 -0
  149. data/app/assets/stylesheets/jquery.ui.theme.css.erb +409 -0
  150. data/app/assets/stylesheets/jquery.ui.tooltip.css.erb +23 -0
  151. data/lib/jquery-ui-middleman.rb +1 -0
  152. data/lib/jquery/ui/version.rb +6 -0
  153. metadata +209 -0
@@ -0,0 +1,406 @@
1
+ //= require jquery.ui.core
2
+ //= require jquery.ui.widget
3
+ //= require jquery.ui.position
4
+
5
+ /*!
6
+ * jQuery UI Tooltip 1.10.3
7
+ * http://jqueryui.com
8
+ *
9
+ * Copyright 2013 jQuery Foundation and other contributors
10
+ * Released under the MIT license.
11
+ * http://jquery.org/license
12
+ *
13
+ * http://api.jqueryui.com/tooltip/
14
+ *
15
+ * Depends:
16
+ * jquery.ui.core.js
17
+ * jquery.ui.widget.js
18
+ * jquery.ui.position.js
19
+ */
20
+ (function( $ ) {
21
+
22
+ var increments = 0;
23
+
24
+ function addDescribedBy( elem, id ) {
25
+ var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ );
26
+ describedby.push( id );
27
+ elem
28
+ .data( "ui-tooltip-id", id )
29
+ .attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
30
+ }
31
+
32
+ function removeDescribedBy( elem ) {
33
+ var id = elem.data( "ui-tooltip-id" ),
34
+ describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ),
35
+ index = $.inArray( id, describedby );
36
+ if ( index !== -1 ) {
37
+ describedby.splice( index, 1 );
38
+ }
39
+
40
+ elem.removeData( "ui-tooltip-id" );
41
+ describedby = $.trim( describedby.join( " " ) );
42
+ if ( describedby ) {
43
+ elem.attr( "aria-describedby", describedby );
44
+ } else {
45
+ elem.removeAttr( "aria-describedby" );
46
+ }
47
+ }
48
+
49
+ $.widget( "ui.tooltip", {
50
+ version: "1.10.3",
51
+ options: {
52
+ content: function() {
53
+ // support: IE<9, Opera in jQuery <1.7
54
+ // .text() can't accept undefined, so coerce to a string
55
+ var title = $( this ).attr( "title" ) || "";
56
+ // Escape title, since we're going from an attribute to raw HTML
57
+ return $( "<a>" ).text( title ).html();
58
+ },
59
+ hide: true,
60
+ // Disabled elements have inconsistent behavior across browsers (#8661)
61
+ items: "[title]:not([disabled])",
62
+ position: {
63
+ my: "left top+15",
64
+ at: "left bottom",
65
+ collision: "flipfit flip"
66
+ },
67
+ show: true,
68
+ tooltipClass: null,
69
+ track: false,
70
+
71
+ // callbacks
72
+ close: null,
73
+ open: null
74
+ },
75
+
76
+ _create: function() {
77
+ this._on({
78
+ mouseover: "open",
79
+ focusin: "open"
80
+ });
81
+
82
+ // IDs of generated tooltips, needed for destroy
83
+ this.tooltips = {};
84
+ // IDs of parent tooltips where we removed the title attribute
85
+ this.parents = {};
86
+
87
+ if ( this.options.disabled ) {
88
+ this._disable();
89
+ }
90
+ },
91
+
92
+ _setOption: function( key, value ) {
93
+ var that = this;
94
+
95
+ if ( key === "disabled" ) {
96
+ this[ value ? "_disable" : "_enable" ]();
97
+ this.options[ key ] = value;
98
+ // disable element style changes
99
+ return;
100
+ }
101
+
102
+ this._super( key, value );
103
+
104
+ if ( key === "content" ) {
105
+ $.each( this.tooltips, function( id, element ) {
106
+ that._updateContent( element );
107
+ });
108
+ }
109
+ },
110
+
111
+ _disable: function() {
112
+ var that = this;
113
+
114
+ // close open tooltips
115
+ $.each( this.tooltips, function( id, element ) {
116
+ var event = $.Event( "blur" );
117
+ event.target = event.currentTarget = element[0];
118
+ that.close( event, true );
119
+ });
120
+
121
+ // remove title attributes to prevent native tooltips
122
+ this.element.find( this.options.items ).addBack().each(function() {
123
+ var element = $( this );
124
+ if ( element.is( "[title]" ) ) {
125
+ element
126
+ .data( "ui-tooltip-title", element.attr( "title" ) )
127
+ .attr( "title", "" );
128
+ }
129
+ });
130
+ },
131
+
132
+ _enable: function() {
133
+ // restore title attributes
134
+ this.element.find( this.options.items ).addBack().each(function() {
135
+ var element = $( this );
136
+ if ( element.data( "ui-tooltip-title" ) ) {
137
+ element.attr( "title", element.data( "ui-tooltip-title" ) );
138
+ }
139
+ });
140
+ },
141
+
142
+ open: function( event ) {
143
+ var that = this,
144
+ target = $( event ? event.target : this.element )
145
+ // we need closest here due to mouseover bubbling,
146
+ // but always pointing at the same event target
147
+ .closest( this.options.items );
148
+
149
+ // No element to show a tooltip for or the tooltip is already open
150
+ if ( !target.length || target.data( "ui-tooltip-id" ) ) {
151
+ return;
152
+ }
153
+
154
+ if ( target.attr( "title" ) ) {
155
+ target.data( "ui-tooltip-title", target.attr( "title" ) );
156
+ }
157
+
158
+ target.data( "ui-tooltip-open", true );
159
+
160
+ // kill parent tooltips, custom or native, for hover
161
+ if ( event && event.type === "mouseover" ) {
162
+ target.parents().each(function() {
163
+ var parent = $( this ),
164
+ blurEvent;
165
+ if ( parent.data( "ui-tooltip-open" ) ) {
166
+ blurEvent = $.Event( "blur" );
167
+ blurEvent.target = blurEvent.currentTarget = this;
168
+ that.close( blurEvent, true );
169
+ }
170
+ if ( parent.attr( "title" ) ) {
171
+ parent.uniqueId();
172
+ that.parents[ this.id ] = {
173
+ element: this,
174
+ title: parent.attr( "title" )
175
+ };
176
+ parent.attr( "title", "" );
177
+ }
178
+ });
179
+ }
180
+
181
+ this._updateContent( target, event );
182
+ },
183
+
184
+ _updateContent: function( target, event ) {
185
+ var content,
186
+ contentOption = this.options.content,
187
+ that = this,
188
+ eventType = event ? event.type : null;
189
+
190
+ if ( typeof contentOption === "string" ) {
191
+ return this._open( event, target, contentOption );
192
+ }
193
+
194
+ content = contentOption.call( target[0], function( response ) {
195
+ // ignore async response if tooltip was closed already
196
+ if ( !target.data( "ui-tooltip-open" ) ) {
197
+ return;
198
+ }
199
+ // IE may instantly serve a cached response for ajax requests
200
+ // delay this call to _open so the other call to _open runs first
201
+ that._delay(function() {
202
+ // jQuery creates a special event for focusin when it doesn't
203
+ // exist natively. To improve performance, the native event
204
+ // object is reused and the type is changed. Therefore, we can't
205
+ // rely on the type being correct after the event finished
206
+ // bubbling, so we set it back to the previous value. (#8740)
207
+ if ( event ) {
208
+ event.type = eventType;
209
+ }
210
+ this._open( event, target, response );
211
+ });
212
+ });
213
+ if ( content ) {
214
+ this._open( event, target, content );
215
+ }
216
+ },
217
+
218
+ _open: function( event, target, content ) {
219
+ var tooltip, events, delayedShow,
220
+ positionOption = $.extend( {}, this.options.position );
221
+
222
+ if ( !content ) {
223
+ return;
224
+ }
225
+
226
+ // Content can be updated multiple times. If the tooltip already
227
+ // exists, then just update the content and bail.
228
+ tooltip = this._find( target );
229
+ if ( tooltip.length ) {
230
+ tooltip.find( ".ui-tooltip-content" ).html( content );
231
+ return;
232
+ }
233
+
234
+ // if we have a title, clear it to prevent the native tooltip
235
+ // we have to check first to avoid defining a title if none exists
236
+ // (we don't want to cause an element to start matching [title])
237
+ //
238
+ // We use removeAttr only for key events, to allow IE to export the correct
239
+ // accessible attributes. For mouse events, set to empty string to avoid
240
+ // native tooltip showing up (happens only when removing inside mouseover).
241
+ if ( target.is( "[title]" ) ) {
242
+ if ( event && event.type === "mouseover" ) {
243
+ target.attr( "title", "" );
244
+ } else {
245
+ target.removeAttr( "title" );
246
+ }
247
+ }
248
+
249
+ tooltip = this._tooltip( target );
250
+ addDescribedBy( target, tooltip.attr( "id" ) );
251
+ tooltip.find( ".ui-tooltip-content" ).html( content );
252
+
253
+ function position( event ) {
254
+ positionOption.of = event;
255
+ if ( tooltip.is( ":hidden" ) ) {
256
+ return;
257
+ }
258
+ tooltip.position( positionOption );
259
+ }
260
+ if ( this.options.track && event && /^mouse/.test( event.type ) ) {
261
+ this._on( this.document, {
262
+ mousemove: position
263
+ });
264
+ // trigger once to override element-relative positioning
265
+ position( event );
266
+ } else {
267
+ tooltip.position( $.extend({
268
+ of: target
269
+ }, this.options.position ) );
270
+ }
271
+
272
+ tooltip.hide();
273
+
274
+ this._show( tooltip, this.options.show );
275
+ // Handle tracking tooltips that are shown with a delay (#8644). As soon
276
+ // as the tooltip is visible, position the tooltip using the most recent
277
+ // event.
278
+ if ( this.options.show && this.options.show.delay ) {
279
+ delayedShow = this.delayedShow = setInterval(function() {
280
+ if ( tooltip.is( ":visible" ) ) {
281
+ position( positionOption.of );
282
+ clearInterval( delayedShow );
283
+ }
284
+ }, $.fx.interval );
285
+ }
286
+
287
+ this._trigger( "open", event, { tooltip: tooltip } );
288
+
289
+ events = {
290
+ keyup: function( event ) {
291
+ if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
292
+ var fakeEvent = $.Event(event);
293
+ fakeEvent.currentTarget = target[0];
294
+ this.close( fakeEvent, true );
295
+ }
296
+ },
297
+ remove: function() {
298
+ this._removeTooltip( tooltip );
299
+ }
300
+ };
301
+ if ( !event || event.type === "mouseover" ) {
302
+ events.mouseleave = "close";
303
+ }
304
+ if ( !event || event.type === "focusin" ) {
305
+ events.focusout = "close";
306
+ }
307
+ this._on( true, target, events );
308
+ },
309
+
310
+ close: function( event ) {
311
+ var that = this,
312
+ target = $( event ? event.currentTarget : this.element ),
313
+ tooltip = this._find( target );
314
+
315
+ // disabling closes the tooltip, so we need to track when we're closing
316
+ // to avoid an infinite loop in case the tooltip becomes disabled on close
317
+ if ( this.closing ) {
318
+ return;
319
+ }
320
+
321
+ // Clear the interval for delayed tracking tooltips
322
+ clearInterval( this.delayedShow );
323
+
324
+ // only set title if we had one before (see comment in _open())
325
+ if ( target.data( "ui-tooltip-title" ) ) {
326
+ target.attr( "title", target.data( "ui-tooltip-title" ) );
327
+ }
328
+
329
+ removeDescribedBy( target );
330
+
331
+ tooltip.stop( true );
332
+ this._hide( tooltip, this.options.hide, function() {
333
+ that._removeTooltip( $( this ) );
334
+ });
335
+
336
+ target.removeData( "ui-tooltip-open" );
337
+ this._off( target, "mouseleave focusout keyup" );
338
+ // Remove 'remove' binding only on delegated targets
339
+ if ( target[0] !== this.element[0] ) {
340
+ this._off( target, "remove" );
341
+ }
342
+ this._off( this.document, "mousemove" );
343
+
344
+ if ( event && event.type === "mouseleave" ) {
345
+ $.each( this.parents, function( id, parent ) {
346
+ $( parent.element ).attr( "title", parent.title );
347
+ delete that.parents[ id ];
348
+ });
349
+ }
350
+
351
+ this.closing = true;
352
+ this._trigger( "close", event, { tooltip: tooltip } );
353
+ this.closing = false;
354
+ },
355
+
356
+ _tooltip: function( element ) {
357
+ var id = "ui-tooltip-" + increments++,
358
+ tooltip = $( "<div>" )
359
+ .attr({
360
+ id: id,
361
+ role: "tooltip"
362
+ })
363
+ .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
364
+ ( this.options.tooltipClass || "" ) );
365
+ $( "<div>" )
366
+ .addClass( "ui-tooltip-content" )
367
+ .appendTo( tooltip );
368
+ tooltip.appendTo( this.document[0].body );
369
+ this.tooltips[ id ] = element;
370
+ return tooltip;
371
+ },
372
+
373
+ _find: function( target ) {
374
+ var id = target.data( "ui-tooltip-id" );
375
+ return id ? $( "#" + id ) : $();
376
+ },
377
+
378
+ _removeTooltip: function( tooltip ) {
379
+ tooltip.remove();
380
+ delete this.tooltips[ tooltip.attr( "id" ) ];
381
+ },
382
+
383
+ _destroy: function() {
384
+ var that = this;
385
+
386
+ // close open tooltips
387
+ $.each( this.tooltips, function( id, element ) {
388
+ // Delegate to close method to handle common cleanup
389
+ var event = $.Event( "blur" );
390
+ event.target = event.currentTarget = element[0];
391
+ that.close( event, true );
392
+
393
+ // Remove immediately; destroying an open tooltip doesn't use the
394
+ // hide animation
395
+ $( "#" + id ).remove();
396
+
397
+ // Restore the title
398
+ if ( element.data( "ui-tooltip-title" ) ) {
399
+ element.attr( "title", element.data( "ui-tooltip-title" ) );
400
+ element.removeData( "ui-tooltip-title" );
401
+ }
402
+ });
403
+ }
404
+ });
405
+
406
+ }( jQuery ) );
@@ -0,0 +1,521 @@
1
+ /*!
2
+ * jQuery UI Widget 1.10.3
3
+ * http://jqueryui.com
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 );