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