jquery-ui-rails 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jquery-ui-rails might be problematic. Click here for more details.

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