jquery-ui-rails 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. data/.gitmodules +3 -0
  2. data/Gemfile +3 -0
  3. data/README.md +1 -0
  4. data/Rakefile +77 -0
  5. data/dependencies.js +1 -0
  6. data/jquery-ui-rails.gemspec +23 -0
  7. data/lib/jquery-ui-rails.rb +1 -0
  8. data/lib/jquery/ui/rails.rb +2 -0
  9. data/lib/jquery/ui/rails/engine.rb +8 -0
  10. data/lib/jquery/ui/rails/version.rb +7 -0
  11. data/vendor/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  12. data/vendor/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  13. data/vendor/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  14. data/vendor/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  15. data/vendor/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  16. data/vendor/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  17. data/vendor/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  18. data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  19. data/vendor/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  20. data/vendor/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  21. data/vendor/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  22. data/vendor/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
  23. data/vendor/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  24. data/vendor/assets/javascripts/jquery-ui.js +31 -0
  25. data/vendor/assets/javascripts/jquery-uix.js +31 -0
  26. data/vendor/assets/javascripts/jquery.effects.blind.js +52 -0
  27. data/vendor/assets/javascripts/jquery.effects.bounce.js +81 -0
  28. data/vendor/assets/javascripts/jquery.effects.clip.js +57 -0
  29. data/vendor/assets/javascripts/jquery.effects.core.js +764 -0
  30. data/vendor/assets/javascripts/jquery.effects.drop.js +53 -0
  31. data/vendor/assets/javascripts/jquery.effects.explode.js +82 -0
  32. data/vendor/assets/javascripts/jquery.effects.fade.js +35 -0
  33. data/vendor/assets/javascripts/jquery.effects.fold.js +59 -0
  34. data/vendor/assets/javascripts/jquery.effects.highlight.js +53 -0
  35. data/vendor/assets/javascripts/jquery.effects.pulsate.js +54 -0
  36. data/vendor/assets/javascripts/jquery.effects.scale.js +181 -0
  37. data/vendor/assets/javascripts/jquery.effects.shake.js +60 -0
  38. data/vendor/assets/javascripts/jquery.effects.slide.js +53 -0
  39. data/vendor/assets/javascripts/jquery.effects.transfer.js +48 -0
  40. data/vendor/assets/javascripts/jquery.ui.accordion.js +615 -0
  41. data/vendor/assets/javascripts/jquery.ui.autocomplete.js +627 -0
  42. data/vendor/assets/javascripts/jquery.ui.button.js +420 -0
  43. data/vendor/assets/javascripts/jquery.ui.core.js +315 -0
  44. data/vendor/assets/javascripts/jquery.ui.datepicker-af.js +26 -0
  45. data/vendor/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +26 -0
  46. data/vendor/assets/javascripts/jquery.ui.datepicker-ar.js +26 -0
  47. data/vendor/assets/javascripts/jquery.ui.datepicker-az.js +26 -0
  48. data/vendor/assets/javascripts/jquery.ui.datepicker-bg.js +27 -0
  49. data/vendor/assets/javascripts/jquery.ui.datepicker-bs.js +26 -0
  50. data/vendor/assets/javascripts/jquery.ui.datepicker-ca.js +26 -0
  51. data/vendor/assets/javascripts/jquery.ui.datepicker-cs.js +26 -0
  52. data/vendor/assets/javascripts/jquery.ui.datepicker-cy-GB.js +26 -0
  53. data/vendor/assets/javascripts/jquery.ui.datepicker-da.js +26 -0
  54. data/vendor/assets/javascripts/jquery.ui.datepicker-de.js +26 -0
  55. data/vendor/assets/javascripts/jquery.ui.datepicker-el.js +26 -0
  56. data/vendor/assets/javascripts/jquery.ui.datepicker-en-AU.js +26 -0
  57. data/vendor/assets/javascripts/jquery.ui.datepicker-en-GB.js +26 -0
  58. data/vendor/assets/javascripts/jquery.ui.datepicker-en-NZ.js +26 -0
  59. data/vendor/assets/javascripts/jquery.ui.datepicker-eo.js +26 -0
  60. data/vendor/assets/javascripts/jquery.ui.datepicker-es.js +26 -0
  61. data/vendor/assets/javascripts/jquery.ui.datepicker-et.js +26 -0
  62. data/vendor/assets/javascripts/jquery.ui.datepicker-eu.js +26 -0
  63. data/vendor/assets/javascripts/jquery.ui.datepicker-fa.js +26 -0
  64. data/vendor/assets/javascripts/jquery.ui.datepicker-fi.js +26 -0
  65. data/vendor/assets/javascripts/jquery.ui.datepicker-fo.js +26 -0
  66. data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +26 -0
  67. data/vendor/assets/javascripts/jquery.ui.datepicker-fr.js +28 -0
  68. data/vendor/assets/javascripts/jquery.ui.datepicker-gl.js +26 -0
  69. data/vendor/assets/javascripts/jquery.ui.datepicker-he.js +26 -0
  70. data/vendor/assets/javascripts/jquery.ui.datepicker-hr.js +26 -0
  71. data/vendor/assets/javascripts/jquery.ui.datepicker-hu.js +26 -0
  72. data/vendor/assets/javascripts/jquery.ui.datepicker-hy.js +26 -0
  73. data/vendor/assets/javascripts/jquery.ui.datepicker-id.js +26 -0
  74. data/vendor/assets/javascripts/jquery.ui.datepicker-is.js +26 -0
  75. data/vendor/assets/javascripts/jquery.ui.datepicker-it.js +26 -0
  76. data/vendor/assets/javascripts/jquery.ui.datepicker-ja.js +26 -0
  77. data/vendor/assets/javascripts/jquery.ui.datepicker-kk.js +26 -0
  78. data/vendor/assets/javascripts/jquery.ui.datepicker-ko.js +26 -0
  79. data/vendor/assets/javascripts/jquery.ui.datepicker-lb.js +26 -0
  80. data/vendor/assets/javascripts/jquery.ui.datepicker-lt.js +26 -0
  81. data/vendor/assets/javascripts/jquery.ui.datepicker-lv.js +26 -0
  82. data/vendor/assets/javascripts/jquery.ui.datepicker-mk.js +26 -0
  83. data/vendor/assets/javascripts/jquery.ui.datepicker-ml.js +26 -0
  84. data/vendor/assets/javascripts/jquery.ui.datepicker-ms.js +26 -0
  85. data/vendor/assets/javascripts/jquery.ui.datepicker-nl-BE.js +26 -0
  86. data/vendor/assets/javascripts/jquery.ui.datepicker-nl.js +26 -0
  87. data/vendor/assets/javascripts/jquery.ui.datepicker-no.js +26 -0
  88. data/vendor/assets/javascripts/jquery.ui.datepicker-pl.js +26 -0
  89. data/vendor/assets/javascripts/jquery.ui.datepicker-pt-BR.js +26 -0
  90. data/vendor/assets/javascripts/jquery.ui.datepicker-pt.js +25 -0
  91. data/vendor/assets/javascripts/jquery.ui.datepicker-rm.js +24 -0
  92. data/vendor/assets/javascripts/jquery.ui.datepicker-ro.js +29 -0
  93. data/vendor/assets/javascripts/jquery.ui.datepicker-ru.js +26 -0
  94. data/vendor/assets/javascripts/jquery.ui.datepicker-sk.js +26 -0
  95. data/vendor/assets/javascripts/jquery.ui.datepicker-sl.js +27 -0
  96. data/vendor/assets/javascripts/jquery.ui.datepicker-sq.js +26 -0
  97. data/vendor/assets/javascripts/jquery.ui.datepicker-sr-SR.js +26 -0
  98. data/vendor/assets/javascripts/jquery.ui.datepicker-sr.js +26 -0
  99. data/vendor/assets/javascripts/jquery.ui.datepicker-sv.js +26 -0
  100. data/vendor/assets/javascripts/jquery.ui.datepicker-ta.js +26 -0
  101. data/vendor/assets/javascripts/jquery.ui.datepicker-th.js +26 -0
  102. data/vendor/assets/javascripts/jquery.ui.datepicker-tj.js +26 -0
  103. data/vendor/assets/javascripts/jquery.ui.datepicker-tr.js +26 -0
  104. data/vendor/assets/javascripts/jquery.ui.datepicker-uk.js +27 -0
  105. data/vendor/assets/javascripts/jquery.ui.datepicker-vi.js +26 -0
  106. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-CN.js +26 -0
  107. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-HK.js +26 -0
  108. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-TW.js +26 -0
  109. data/vendor/assets/javascripts/jquery.ui.datepicker.js +1826 -0
  110. data/vendor/assets/javascripts/jquery.ui.dialog.js +883 -0
  111. data/vendor/assets/javascripts/jquery.ui.draggable.js +830 -0
  112. data/vendor/assets/javascripts/jquery.ui.droppable.js +302 -0
  113. data/vendor/assets/javascripts/jquery.ui.mouse.js +166 -0
  114. data/vendor/assets/javascripts/jquery.ui.position.js +299 -0
  115. data/vendor/assets/javascripts/jquery.ui.progressbar.js +113 -0
  116. data/vendor/assets/javascripts/jquery.ui.resizable.js +847 -0
  117. data/vendor/assets/javascripts/jquery.ui.selectable.js +272 -0
  118. data/vendor/assets/javascripts/jquery.ui.slider.js +671 -0
  119. data/vendor/assets/javascripts/jquery.ui.sortable.js +1081 -0
  120. data/vendor/assets/javascripts/jquery.ui.tabs.js +762 -0
  121. data/vendor/assets/javascripts/jquery.ui.widget.js +273 -0
  122. data/vendor/assets/stylesheets/jquery-ui.js +1 -0
  123. data/vendor/assets/stylesheets/jquery.ui.accordion.css +19 -0
  124. data/vendor/assets/stylesheets/jquery.ui.all.css +13 -0
  125. data/vendor/assets/stylesheets/jquery.ui.autocomplete.css +53 -0
  126. data/vendor/assets/stylesheets/jquery.ui.base.css +23 -0
  127. data/vendor/assets/stylesheets/jquery.ui.button.css +38 -0
  128. data/vendor/assets/stylesheets/jquery.ui.core.css +38 -0
  129. data/vendor/assets/stylesheets/jquery.ui.datepicker.css +68 -0
  130. data/vendor/assets/stylesheets/jquery.ui.dialog.css +21 -0
  131. data/vendor/assets/stylesheets/jquery.ui.progressbar.css +11 -0
  132. data/vendor/assets/stylesheets/jquery.ui.resizable.css +20 -0
  133. data/vendor/assets/stylesheets/jquery.ui.selectable.css +10 -0
  134. data/vendor/assets/stylesheets/jquery.ui.slider.css +24 -0
  135. data/vendor/assets/stylesheets/jquery.ui.tabs.css +18 -0
  136. data/vendor/assets/stylesheets/jquery.ui.theme.css +247 -0
  137. metadata +216 -0
@@ -0,0 +1,420 @@
1
+ //= require jquery
2
+ //= require jquery.ui.core
3
+ //= require jquery.ui.widget
4
+
5
+ /*
6
+ * jQuery UI Button 1.8.17
7
+ *
8
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
9
+ * Dual licensed under the MIT or GPL Version 2 licenses.
10
+ * http://jquery.org/license
11
+ *
12
+ * http://docs.jquery.com/UI/Button
13
+ *
14
+ * Depends:
15
+ * jquery.ui.core.js
16
+ * jquery.ui.widget.js
17
+ */
18
+ (function( $, undefined ) {
19
+
20
+ var lastActive, startXPos, startYPos, clickDragged,
21
+ baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
22
+ stateClasses = "ui-state-hover ui-state-active ",
23
+ 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",
24
+ formResetHandler = function() {
25
+ var buttons = $( this ).find( ":ui-button" );
26
+ setTimeout(function() {
27
+ buttons.button( "refresh" );
28
+ }, 1 );
29
+ },
30
+ radioGroup = function( radio ) {
31
+ var name = radio.name,
32
+ form = radio.form,
33
+ radios = $( [] );
34
+ if ( name ) {
35
+ if ( form ) {
36
+ radios = $( form ).find( "[name='" + name + "']" );
37
+ } else {
38
+ radios = $( "[name='" + name + "']", radio.ownerDocument )
39
+ .filter(function() {
40
+ return !this.form;
41
+ });
42
+ }
43
+ }
44
+ return radios;
45
+ };
46
+
47
+ $.widget( "ui.button", {
48
+ options: {
49
+ disabled: null,
50
+ text: true,
51
+ label: null,
52
+ icons: {
53
+ primary: null,
54
+ secondary: null
55
+ }
56
+ },
57
+ _create: function() {
58
+ this.element.closest( "form" )
59
+ .unbind( "reset.button" )
60
+ .bind( "reset.button", formResetHandler );
61
+
62
+ if ( typeof this.options.disabled !== "boolean" ) {
63
+ this.options.disabled = this.element.propAttr( "disabled" );
64
+ }
65
+
66
+ this._determineButtonType();
67
+ this.hasTitle = !!this.buttonElement.attr( "title" );
68
+
69
+ var self = this,
70
+ options = this.options,
71
+ toggleButton = this.type === "checkbox" || this.type === "radio",
72
+ hoverClass = "ui-state-hover" + ( !toggleButton ? " ui-state-active" : "" ),
73
+ focusClass = "ui-state-focus";
74
+
75
+ if ( options.label === null ) {
76
+ options.label = this.buttonElement.html();
77
+ }
78
+
79
+ if ( this.element.is( ":disabled" ) ) {
80
+ options.disabled = true;
81
+ }
82
+
83
+ this.buttonElement
84
+ .addClass( baseClasses )
85
+ .attr( "role", "button" )
86
+ .bind( "mouseenter.button", function() {
87
+ if ( options.disabled ) {
88
+ return;
89
+ }
90
+ $( this ).addClass( "ui-state-hover" );
91
+ if ( this === lastActive ) {
92
+ $( this ).addClass( "ui-state-active" );
93
+ }
94
+ })
95
+ .bind( "mouseleave.button", function() {
96
+ if ( options.disabled ) {
97
+ return;
98
+ }
99
+ $( this ).removeClass( hoverClass );
100
+ })
101
+ .bind( "click.button", function( event ) {
102
+ if ( options.disabled ) {
103
+ event.preventDefault();
104
+ event.stopImmediatePropagation();
105
+ }
106
+ });
107
+
108
+ this.element
109
+ .bind( "focus.button", function() {
110
+ // no need to check disabled, focus won't be triggered anyway
111
+ self.buttonElement.addClass( focusClass );
112
+ })
113
+ .bind( "blur.button", function() {
114
+ self.buttonElement.removeClass( focusClass );
115
+ });
116
+
117
+ if ( toggleButton ) {
118
+ this.element.bind( "change.button", function() {
119
+ if ( clickDragged ) {
120
+ return;
121
+ }
122
+ self.refresh();
123
+ });
124
+ // if mouse moves between mousedown and mouseup (drag) set clickDragged flag
125
+ // prevents issue where button state changes but checkbox/radio checked state
126
+ // does not in Firefox (see ticket #6970)
127
+ this.buttonElement
128
+ .bind( "mousedown.button", function( event ) {
129
+ if ( options.disabled ) {
130
+ return;
131
+ }
132
+ clickDragged = false;
133
+ startXPos = event.pageX;
134
+ startYPos = event.pageY;
135
+ })
136
+ .bind( "mouseup.button", function( event ) {
137
+ if ( options.disabled ) {
138
+ return;
139
+ }
140
+ if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
141
+ clickDragged = true;
142
+ }
143
+ });
144
+ }
145
+
146
+ if ( this.type === "checkbox" ) {
147
+ this.buttonElement.bind( "click.button", function() {
148
+ if ( options.disabled || clickDragged ) {
149
+ return false;
150
+ }
151
+ $( this ).toggleClass( "ui-state-active" );
152
+ self.buttonElement.attr( "aria-pressed", self.element[0].checked );
153
+ });
154
+ } else if ( this.type === "radio" ) {
155
+ this.buttonElement.bind( "click.button", function() {
156
+ if ( options.disabled || clickDragged ) {
157
+ return false;
158
+ }
159
+ $( this ).addClass( "ui-state-active" );
160
+ self.buttonElement.attr( "aria-pressed", "true" );
161
+
162
+ var radio = self.element[ 0 ];
163
+ radioGroup( radio )
164
+ .not( radio )
165
+ .map(function() {
166
+ return $( this ).button( "widget" )[ 0 ];
167
+ })
168
+ .removeClass( "ui-state-active" )
169
+ .attr( "aria-pressed", "false" );
170
+ });
171
+ } else {
172
+ this.buttonElement
173
+ .bind( "mousedown.button", function() {
174
+ if ( options.disabled ) {
175
+ return false;
176
+ }
177
+ $( this ).addClass( "ui-state-active" );
178
+ lastActive = this;
179
+ $( document ).one( "mouseup", function() {
180
+ lastActive = null;
181
+ });
182
+ })
183
+ .bind( "mouseup.button", function() {
184
+ if ( options.disabled ) {
185
+ return false;
186
+ }
187
+ $( this ).removeClass( "ui-state-active" );
188
+ })
189
+ .bind( "keydown.button", function(event) {
190
+ if ( options.disabled ) {
191
+ return false;
192
+ }
193
+ if ( event.keyCode == $.ui.keyCode.SPACE || event.keyCode == $.ui.keyCode.ENTER ) {
194
+ $( this ).addClass( "ui-state-active" );
195
+ }
196
+ })
197
+ .bind( "keyup.button", function() {
198
+ $( this ).removeClass( "ui-state-active" );
199
+ });
200
+
201
+ if ( this.buttonElement.is("a") ) {
202
+ this.buttonElement.keyup(function(event) {
203
+ if ( event.keyCode === $.ui.keyCode.SPACE ) {
204
+ // TODO pass through original event correctly (just as 2nd argument doesn't work)
205
+ $( this ).click();
206
+ }
207
+ });
208
+ }
209
+ }
210
+
211
+ // TODO: pull out $.Widget's handling for the disabled option into
212
+ // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
213
+ // be overridden by individual plugins
214
+ this._setOption( "disabled", options.disabled );
215
+ this._resetButton();
216
+ },
217
+
218
+ _determineButtonType: function() {
219
+
220
+ if ( this.element.is(":checkbox") ) {
221
+ this.type = "checkbox";
222
+ } else if ( this.element.is(":radio") ) {
223
+ this.type = "radio";
224
+ } else if ( this.element.is("input") ) {
225
+ this.type = "input";
226
+ } else {
227
+ this.type = "button";
228
+ }
229
+
230
+ if ( this.type === "checkbox" || this.type === "radio" ) {
231
+ // we don't search against the document in case the element
232
+ // is disconnected from the DOM
233
+ var ancestor = this.element.parents().filter(":last"),
234
+ labelSelector = "label[for='" + this.element.attr("id") + "']";
235
+ this.buttonElement = ancestor.find( labelSelector );
236
+ if ( !this.buttonElement.length ) {
237
+ ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
238
+ this.buttonElement = ancestor.filter( labelSelector );
239
+ if ( !this.buttonElement.length ) {
240
+ this.buttonElement = ancestor.find( labelSelector );
241
+ }
242
+ }
243
+ this.element.addClass( "ui-helper-hidden-accessible" );
244
+
245
+ var checked = this.element.is( ":checked" );
246
+ if ( checked ) {
247
+ this.buttonElement.addClass( "ui-state-active" );
248
+ }
249
+ this.buttonElement.attr( "aria-pressed", checked );
250
+ } else {
251
+ this.buttonElement = this.element;
252
+ }
253
+ },
254
+
255
+ widget: function() {
256
+ return this.buttonElement;
257
+ },
258
+
259
+ destroy: function() {
260
+ this.element
261
+ .removeClass( "ui-helper-hidden-accessible" );
262
+ this.buttonElement
263
+ .removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
264
+ .removeAttr( "role" )
265
+ .removeAttr( "aria-pressed" )
266
+ .html( this.buttonElement.find(".ui-button-text").html() );
267
+
268
+ if ( !this.hasTitle ) {
269
+ this.buttonElement.removeAttr( "title" );
270
+ }
271
+
272
+ $.Widget.prototype.destroy.call( this );
273
+ },
274
+
275
+ _setOption: function( key, value ) {
276
+ $.Widget.prototype._setOption.apply( this, arguments );
277
+ if ( key === "disabled" ) {
278
+ if ( value ) {
279
+ this.element.propAttr( "disabled", true );
280
+ } else {
281
+ this.element.propAttr( "disabled", false );
282
+ }
283
+ return;
284
+ }
285
+ this._resetButton();
286
+ },
287
+
288
+ refresh: function() {
289
+ var isDisabled = this.element.is( ":disabled" );
290
+ if ( isDisabled !== this.options.disabled ) {
291
+ this._setOption( "disabled", isDisabled );
292
+ }
293
+ if ( this.type === "radio" ) {
294
+ radioGroup( this.element[0] ).each(function() {
295
+ if ( $( this ).is( ":checked" ) ) {
296
+ $( this ).button( "widget" )
297
+ .addClass( "ui-state-active" )
298
+ .attr( "aria-pressed", "true" );
299
+ } else {
300
+ $( this ).button( "widget" )
301
+ .removeClass( "ui-state-active" )
302
+ .attr( "aria-pressed", "false" );
303
+ }
304
+ });
305
+ } else if ( this.type === "checkbox" ) {
306
+ if ( this.element.is( ":checked" ) ) {
307
+ this.buttonElement
308
+ .addClass( "ui-state-active" )
309
+ .attr( "aria-pressed", "true" );
310
+ } else {
311
+ this.buttonElement
312
+ .removeClass( "ui-state-active" )
313
+ .attr( "aria-pressed", "false" );
314
+ }
315
+ }
316
+ },
317
+
318
+ _resetButton: function() {
319
+ if ( this.type === "input" ) {
320
+ if ( this.options.label ) {
321
+ this.element.val( this.options.label );
322
+ }
323
+ return;
324
+ }
325
+ var buttonElement = this.buttonElement.removeClass( typeClasses ),
326
+ buttonText = $( "<span></span>", this.element[0].ownerDocument )
327
+ .addClass( "ui-button-text" )
328
+ .html( this.options.label )
329
+ .appendTo( buttonElement.empty() )
330
+ .text(),
331
+ icons = this.options.icons,
332
+ multipleIcons = icons.primary && icons.secondary,
333
+ buttonClasses = [];
334
+
335
+ if ( icons.primary || icons.secondary ) {
336
+ if ( this.options.text ) {
337
+ buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
338
+ }
339
+
340
+ if ( icons.primary ) {
341
+ buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
342
+ }
343
+
344
+ if ( icons.secondary ) {
345
+ buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
346
+ }
347
+
348
+ if ( !this.options.text ) {
349
+ buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
350
+
351
+ if ( !this.hasTitle ) {
352
+ buttonElement.attr( "title", buttonText );
353
+ }
354
+ }
355
+ } else {
356
+ buttonClasses.push( "ui-button-text-only" );
357
+ }
358
+ buttonElement.addClass( buttonClasses.join( " " ) );
359
+ }
360
+ });
361
+
362
+ $.widget( "ui.buttonset", {
363
+ options: {
364
+ items: ":button, :submit, :reset, :checkbox, :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
+ $.Widget.prototype._setOption.apply( this, arguments );
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
+ $.Widget.prototype.destroy.call( this );
417
+ }
418
+ });
419
+
420
+ }( jQuery ) );
@@ -0,0 +1,315 @@
1
+ //= require jquery
2
+ /*!
3
+ * jQuery UI 1.8.17
4
+ *
5
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
6
+ * Dual licensed under the MIT or GPL Version 2 licenses.
7
+ * http://jquery.org/license
8
+ *
9
+ * http://docs.jquery.com/UI
10
+ */
11
+ (function( $, undefined ) {
12
+
13
+ // prevent duplicate loading
14
+ // this is only a problem because we proxy existing functions
15
+ // and we don't want to double proxy them
16
+ $.ui = $.ui || {};
17
+ if ( $.ui.version ) {
18
+ return;
19
+ }
20
+
21
+ $.extend( $.ui, {
22
+ version: "1.8.17",
23
+
24
+ keyCode: {
25
+ ALT: 18,
26
+ BACKSPACE: 8,
27
+ CAPS_LOCK: 20,
28
+ COMMA: 188,
29
+ COMMAND: 91,
30
+ COMMAND_LEFT: 91, // COMMAND
31
+ COMMAND_RIGHT: 93,
32
+ CONTROL: 17,
33
+ DELETE: 46,
34
+ DOWN: 40,
35
+ END: 35,
36
+ ENTER: 13,
37
+ ESCAPE: 27,
38
+ HOME: 36,
39
+ INSERT: 45,
40
+ LEFT: 37,
41
+ MENU: 93, // COMMAND_RIGHT
42
+ NUMPAD_ADD: 107,
43
+ NUMPAD_DECIMAL: 110,
44
+ NUMPAD_DIVIDE: 111,
45
+ NUMPAD_ENTER: 108,
46
+ NUMPAD_MULTIPLY: 106,
47
+ NUMPAD_SUBTRACT: 109,
48
+ PAGE_DOWN: 34,
49
+ PAGE_UP: 33,
50
+ PERIOD: 190,
51
+ RIGHT: 39,
52
+ SHIFT: 16,
53
+ SPACE: 32,
54
+ TAB: 9,
55
+ UP: 38,
56
+ WINDOWS: 91 // COMMAND
57
+ }
58
+ });
59
+
60
+ // plugins
61
+ $.fn.extend({
62
+ propAttr: $.fn.prop || $.fn.attr,
63
+
64
+ _focus: $.fn.focus,
65
+ focus: function( delay, fn ) {
66
+ return typeof delay === "number" ?
67
+ this.each(function() {
68
+ var elem = this;
69
+ setTimeout(function() {
70
+ $( elem ).focus();
71
+ if ( fn ) {
72
+ fn.call( elem );
73
+ }
74
+ }, delay );
75
+ }) :
76
+ this._focus.apply( this, arguments );
77
+ },
78
+
79
+ scrollParent: function() {
80
+ var scrollParent;
81
+ if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
82
+ scrollParent = this.parents().filter(function() {
83
+ return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
84
+ }).eq(0);
85
+ } else {
86
+ scrollParent = this.parents().filter(function() {
87
+ return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
88
+ }).eq(0);
89
+ }
90
+
91
+ return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
92
+ },
93
+
94
+ zIndex: function( zIndex ) {
95
+ if ( zIndex !== undefined ) {
96
+ return this.css( "zIndex", zIndex );
97
+ }
98
+
99
+ if ( this.length ) {
100
+ var elem = $( this[ 0 ] ), position, value;
101
+ while ( elem.length && elem[ 0 ] !== document ) {
102
+ // Ignore z-index if position is set to a value where z-index is ignored by the browser
103
+ // This makes behavior of this function consistent across browsers
104
+ // WebKit always returns auto if the element is positioned
105
+ position = elem.css( "position" );
106
+ if ( position === "absolute" || position === "relative" || position === "fixed" ) {
107
+ // IE returns 0 when zIndex is not specified
108
+ // other browsers return a string
109
+ // we ignore the case of nested elements with an explicit value of 0
110
+ // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
111
+ value = parseInt( elem.css( "zIndex" ), 10 );
112
+ if ( !isNaN( value ) && value !== 0 ) {
113
+ return value;
114
+ }
115
+ }
116
+ elem = elem.parent();
117
+ }
118
+ }
119
+
120
+ return 0;
121
+ },
122
+
123
+ disableSelection: function() {
124
+ return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
125
+ ".ui-disableSelection", function( event ) {
126
+ event.preventDefault();
127
+ });
128
+ },
129
+
130
+ enableSelection: function() {
131
+ return this.unbind( ".ui-disableSelection" );
132
+ }
133
+ });
134
+
135
+ $.each( [ "Width", "Height" ], function( i, name ) {
136
+ var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
137
+ type = name.toLowerCase(),
138
+ orig = {
139
+ innerWidth: $.fn.innerWidth,
140
+ innerHeight: $.fn.innerHeight,
141
+ outerWidth: $.fn.outerWidth,
142
+ outerHeight: $.fn.outerHeight
143
+ };
144
+
145
+ function reduce( elem, size, border, margin ) {
146
+ $.each( side, function() {
147
+ size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
148
+ if ( border ) {
149
+ size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
150
+ }
151
+ if ( margin ) {
152
+ size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
153
+ }
154
+ });
155
+ return size;
156
+ }
157
+
158
+ $.fn[ "inner" + name ] = function( size ) {
159
+ if ( size === undefined ) {
160
+ return orig[ "inner" + name ].call( this );
161
+ }
162
+
163
+ return this.each(function() {
164
+ $( this ).css( type, reduce( this, size ) + "px" );
165
+ });
166
+ };
167
+
168
+ $.fn[ "outer" + name] = function( size, margin ) {
169
+ if ( typeof size !== "number" ) {
170
+ return orig[ "outer" + name ].call( this, size );
171
+ }
172
+
173
+ return this.each(function() {
174
+ $( this).css( type, reduce( this, size, true, margin ) + "px" );
175
+ });
176
+ };
177
+ });
178
+
179
+ // selectors
180
+ function focusable( element, isTabIndexNotNaN ) {
181
+ var nodeName = element.nodeName.toLowerCase();
182
+ if ( "area" === nodeName ) {
183
+ var map = element.parentNode,
184
+ mapName = map.name,
185
+ img;
186
+ if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
187
+ return false;
188
+ }
189
+ img = $( "img[usemap=#" + mapName + "]" )[0];
190
+ return !!img && visible( img );
191
+ }
192
+ return ( /input|select|textarea|button|object/.test( nodeName )
193
+ ? !element.disabled
194
+ : "a" == nodeName
195
+ ? element.href || isTabIndexNotNaN
196
+ : isTabIndexNotNaN)
197
+ // the element and all of its ancestors must be visible
198
+ && visible( element );
199
+ }
200
+
201
+ function visible( element ) {
202
+ return !$( element ).parents().andSelf().filter(function() {
203
+ return $.curCSS( this, "visibility" ) === "hidden" ||
204
+ $.expr.filters.hidden( this );
205
+ }).length;
206
+ }
207
+
208
+ $.extend( $.expr[ ":" ], {
209
+ data: function( elem, i, match ) {
210
+ return !!$.data( elem, match[ 3 ] );
211
+ },
212
+
213
+ focusable: function( element ) {
214
+ return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
215
+ },
216
+
217
+ tabbable: function( element ) {
218
+ var tabIndex = $.attr( element, "tabindex" ),
219
+ isTabIndexNaN = isNaN( tabIndex );
220
+ return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
221
+ }
222
+ });
223
+
224
+ // support
225
+ $(function() {
226
+ var body = document.body,
227
+ div = body.appendChild( div = document.createElement( "div" ) );
228
+
229
+ $.extend( div.style, {
230
+ minHeight: "100px",
231
+ height: "auto",
232
+ padding: 0,
233
+ borderWidth: 0
234
+ });
235
+
236
+ $.support.minHeight = div.offsetHeight === 100;
237
+ $.support.selectstart = "onselectstart" in div;
238
+
239
+ // set display to none to avoid a layout bug in IE
240
+ // http://dev.jquery.com/ticket/4014
241
+ body.removeChild( div ).style.display = "none";
242
+ });
243
+
244
+
245
+
246
+
247
+
248
+ // deprecated
249
+ $.extend( $.ui, {
250
+ // $.ui.plugin is deprecated. Use the proxy pattern instead.
251
+ plugin: {
252
+ add: function( module, option, set ) {
253
+ var proto = $.ui[ module ].prototype;
254
+ for ( var i in set ) {
255
+ proto.plugins[ i ] = proto.plugins[ i ] || [];
256
+ proto.plugins[ i ].push( [ option, set[ i ] ] );
257
+ }
258
+ },
259
+ call: function( instance, name, args ) {
260
+ var set = instance.plugins[ name ];
261
+ if ( !set || !instance.element[ 0 ].parentNode ) {
262
+ return;
263
+ }
264
+
265
+ for ( var i = 0; i < set.length; i++ ) {
266
+ if ( instance.options[ set[ i ][ 0 ] ] ) {
267
+ set[ i ][ 1 ].apply( instance.element, args );
268
+ }
269
+ }
270
+ }
271
+ },
272
+
273
+ // will be deprecated when we switch to jQuery 1.4 - use jQuery.contains()
274
+ contains: function( a, b ) {
275
+ return document.compareDocumentPosition ?
276
+ a.compareDocumentPosition( b ) & 16 :
277
+ a !== b && a.contains( b );
278
+ },
279
+
280
+ // only used by resizable
281
+ hasScroll: function( el, a ) {
282
+
283
+ //If overflow is hidden, the element might have extra content, but the user wants to hide it
284
+ if ( $( el ).css( "overflow" ) === "hidden") {
285
+ return false;
286
+ }
287
+
288
+ var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
289
+ has = false;
290
+
291
+ if ( el[ scroll ] > 0 ) {
292
+ return true;
293
+ }
294
+
295
+ // TODO: determine which cases actually cause this to happen
296
+ // if the element doesn't have the scroll set, see if it's possible to
297
+ // set the scroll
298
+ el[ scroll ] = 1;
299
+ has = ( el[ scroll ] > 0 );
300
+ el[ scroll ] = 0;
301
+ return has;
302
+ },
303
+
304
+ // these are odd functions, fix the API or move into individual plugins
305
+ isOverAxis: function( x, reference, size ) {
306
+ //Determines when x coordinate is over "b" element axis
307
+ return ( x > reference ) && ( x < ( reference + size ) );
308
+ },
309
+ isOver: function( y, x, top, left, height, width ) {
310
+ //Determines when x, y coordinates is over "b" element
311
+ return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
312
+ }
313
+ });
314
+
315
+ })( jQuery );