jqueryui-requirejs-rails 0.1.0

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 (114) hide show
  1. data/LICENSE +22 -0
  2. data/README.md +3 -0
  3. data/Rakefile +27 -0
  4. data/app/assets/javascripts/jqueryui/accordion.js +575 -0
  5. data/app/assets/javascripts/jqueryui/autocomplete.js +613 -0
  6. data/app/assets/javascripts/jqueryui/button.js +422 -0
  7. data/app/assets/javascripts/jqueryui/core.js +323 -0
  8. data/app/assets/javascripts/jqueryui/datepicker-af.js +26 -0
  9. data/app/assets/javascripts/jqueryui/datepicker-ar-DZ.js +26 -0
  10. data/app/assets/javascripts/jqueryui/datepicker-ar.js +26 -0
  11. data/app/assets/javascripts/jqueryui/datepicker-az.js +26 -0
  12. data/app/assets/javascripts/jqueryui/datepicker-be.js +26 -0
  13. data/app/assets/javascripts/jqueryui/datepicker-bg.js +27 -0
  14. data/app/assets/javascripts/jqueryui/datepicker-bs.js +26 -0
  15. data/app/assets/javascripts/jqueryui/datepicker-ca.js +26 -0
  16. data/app/assets/javascripts/jqueryui/datepicker-cs.js +26 -0
  17. data/app/assets/javascripts/jqueryui/datepicker-cy-GB.js +26 -0
  18. data/app/assets/javascripts/jqueryui/datepicker-da.js +26 -0
  19. data/app/assets/javascripts/jqueryui/datepicker-de.js +26 -0
  20. data/app/assets/javascripts/jqueryui/datepicker-el.js +26 -0
  21. data/app/assets/javascripts/jqueryui/datepicker-en-AU.js +26 -0
  22. data/app/assets/javascripts/jqueryui/datepicker-en-GB.js +26 -0
  23. data/app/assets/javascripts/jqueryui/datepicker-en-NZ.js +26 -0
  24. data/app/assets/javascripts/jqueryui/datepicker-eo.js +26 -0
  25. data/app/assets/javascripts/jqueryui/datepicker-es.js +26 -0
  26. data/app/assets/javascripts/jqueryui/datepicker-et.js +26 -0
  27. data/app/assets/javascripts/jqueryui/datepicker-eu.js +26 -0
  28. data/app/assets/javascripts/jqueryui/datepicker-fa.js +62 -0
  29. data/app/assets/javascripts/jqueryui/datepicker-fi.js +26 -0
  30. data/app/assets/javascripts/jqueryui/datepicker-fo.js +26 -0
  31. data/app/assets/javascripts/jqueryui/datepicker-fr-CA.js +26 -0
  32. data/app/assets/javascripts/jqueryui/datepicker-fr-CH.js +26 -0
  33. data/app/assets/javascripts/jqueryui/datepicker-fr.js +28 -0
  34. data/app/assets/javascripts/jqueryui/datepicker-gl.js +26 -0
  35. data/app/assets/javascripts/jqueryui/datepicker-he.js +26 -0
  36. data/app/assets/javascripts/jqueryui/datepicker-hi.js +26 -0
  37. data/app/assets/javascripts/jqueryui/datepicker-hr.js +26 -0
  38. data/app/assets/javascripts/jqueryui/datepicker-hu.js +26 -0
  39. data/app/assets/javascripts/jqueryui/datepicker-hy.js +26 -0
  40. data/app/assets/javascripts/jqueryui/datepicker-id.js +26 -0
  41. data/app/assets/javascripts/jqueryui/datepicker-is.js +26 -0
  42. data/app/assets/javascripts/jqueryui/datepicker-it.js +26 -0
  43. data/app/assets/javascripts/jqueryui/datepicker-ja.js +26 -0
  44. data/app/assets/javascripts/jqueryui/datepicker-ka.js +24 -0
  45. data/app/assets/javascripts/jqueryui/datepicker-kk.js +26 -0
  46. data/app/assets/javascripts/jqueryui/datepicker-km.js +26 -0
  47. data/app/assets/javascripts/jqueryui/datepicker-ko.js +26 -0
  48. data/app/assets/javascripts/jqueryui/datepicker-ky.js +27 -0
  49. data/app/assets/javascripts/jqueryui/datepicker-lb.js +26 -0
  50. data/app/assets/javascripts/jqueryui/datepicker-lt.js +26 -0
  51. data/app/assets/javascripts/jqueryui/datepicker-lv.js +26 -0
  52. data/app/assets/javascripts/jqueryui/datepicker-mk.js +26 -0
  53. data/app/assets/javascripts/jqueryui/datepicker-ml.js +26 -0
  54. data/app/assets/javascripts/jqueryui/datepicker-ms.js +26 -0
  55. data/app/assets/javascripts/jqueryui/datepicker-nb.js +25 -0
  56. data/app/assets/javascripts/jqueryui/datepicker-nl-BE.js +26 -0
  57. data/app/assets/javascripts/jqueryui/datepicker-nl.js +26 -0
  58. data/app/assets/javascripts/jqueryui/datepicker-nn.js +25 -0
  59. data/app/assets/javascripts/jqueryui/datepicker-no.js +26 -0
  60. data/app/assets/javascripts/jqueryui/datepicker-pl.js +26 -0
  61. data/app/assets/javascripts/jqueryui/datepicker-pt-BR.js +26 -0
  62. data/app/assets/javascripts/jqueryui/datepicker-pt.js +25 -0
  63. data/app/assets/javascripts/jqueryui/datepicker-rm.js +24 -0
  64. data/app/assets/javascripts/jqueryui/datepicker-ro.js +29 -0
  65. data/app/assets/javascripts/jqueryui/datepicker-ru.js +26 -0
  66. data/app/assets/javascripts/jqueryui/datepicker-sk.js +26 -0
  67. data/app/assets/javascripts/jqueryui/datepicker-sl.js +27 -0
  68. data/app/assets/javascripts/jqueryui/datepicker-sq.js +26 -0
  69. data/app/assets/javascripts/jqueryui/datepicker-sr-SR.js +26 -0
  70. data/app/assets/javascripts/jqueryui/datepicker-sr.js +26 -0
  71. data/app/assets/javascripts/jqueryui/datepicker-sv.js +26 -0
  72. data/app/assets/javascripts/jqueryui/datepicker-ta.js +26 -0
  73. data/app/assets/javascripts/jqueryui/datepicker-th.js +26 -0
  74. data/app/assets/javascripts/jqueryui/datepicker-tj.js +26 -0
  75. data/app/assets/javascripts/jqueryui/datepicker-tr.js +26 -0
  76. data/app/assets/javascripts/jqueryui/datepicker-uk.js +27 -0
  77. data/app/assets/javascripts/jqueryui/datepicker-vi.js +26 -0
  78. data/app/assets/javascripts/jqueryui/datepicker-zh-CN.js +26 -0
  79. data/app/assets/javascripts/jqueryui/datepicker-zh-HK.js +26 -0
  80. data/app/assets/javascripts/jqueryui/datepicker-zh-TW.js +26 -0
  81. data/app/assets/javascripts/jqueryui/datepicker.js +2053 -0
  82. data/app/assets/javascripts/jqueryui/dialog.js +811 -0
  83. data/app/assets/javascripts/jqueryui/draggable.js +936 -0
  84. data/app/assets/javascripts/jqueryui/droppable.js +375 -0
  85. data/app/assets/javascripts/jqueryui/effect-blind.js +85 -0
  86. data/app/assets/javascripts/jqueryui/effect-bounce.js +116 -0
  87. data/app/assets/javascripts/jqueryui/effect-clip.js +70 -0
  88. data/app/assets/javascripts/jqueryui/effect-drop.js +68 -0
  89. data/app/assets/javascripts/jqueryui/effect-explode.js +100 -0
  90. data/app/assets/javascripts/jqueryui/effect-fade.js +33 -0
  91. data/app/assets/javascripts/jqueryui/effect-fold.js +79 -0
  92. data/app/assets/javascripts/jqueryui/effect-highlight.js +53 -0
  93. data/app/assets/javascripts/jqueryui/effect-pulsate.js +66 -0
  94. data/app/assets/javascripts/jqueryui/effect-scale.js +321 -0
  95. data/app/assets/javascripts/jqueryui/effect-shake.js +77 -0
  96. data/app/assets/javascripts/jqueryui/effect-slide.js +67 -0
  97. data/app/assets/javascripts/jqueryui/effect-transfer.js +50 -0
  98. data/app/assets/javascripts/jqueryui/effect.js +1292 -0
  99. data/app/assets/javascripts/jqueryui/menu.js +624 -0
  100. data/app/assets/javascripts/jqueryui/mouse.js +172 -0
  101. data/app/assets/javascripts/jqueryui/position.js +500 -0
  102. data/app/assets/javascripts/jqueryui/progressbar.js +148 -0
  103. data/app/assets/javascripts/jqueryui/resizable.js +971 -0
  104. data/app/assets/javascripts/jqueryui/selectable.js +280 -0
  105. data/app/assets/javascripts/jqueryui/slider.js +675 -0
  106. data/app/assets/javascripts/jqueryui/sortable.js +1285 -0
  107. data/app/assets/javascripts/jqueryui/spinner.js +496 -0
  108. data/app/assets/javascripts/jqueryui/tabs.js +849 -0
  109. data/app/assets/javascripts/jqueryui/tooltip.js +405 -0
  110. data/app/assets/javascripts/jqueryui/widget.js +524 -0
  111. data/lib/jqueryui-requirejs-rails.rb +4 -0
  112. data/lib/jqueryui-requirejs-rails/engine.rb +4 -0
  113. data/lib/jqueryui-requirejs-rails/version.rb +3 -0
  114. metadata +196 -0
@@ -0,0 +1,496 @@
1
+ define(['jquery','./core','./widget','./button'], function (jQuery) {
2
+ /*!
3
+ * jQuery UI Spinner 1.10.2
4
+ * http://jqueryui.com
5
+ *
6
+ * Copyright 2013 jQuery Foundation and other contributors
7
+ * Released under the MIT license.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://api.jqueryui.com/spinner/
11
+ *
12
+ * Depends:
13
+ * jquery.ui.core.js
14
+ * jquery.ui.widget.js
15
+ * jquery.ui.button.js
16
+ */
17
+ (function( $ ) {
18
+
19
+ function modifier( fn ) {
20
+ return function() {
21
+ var previous = this.element.val();
22
+ fn.apply( this, arguments );
23
+ this._refresh();
24
+ if ( previous !== this.element.val() ) {
25
+ this._trigger( "change" );
26
+ }
27
+ };
28
+ }
29
+
30
+ $.widget( "ui.spinner", {
31
+ version: "1.10.2",
32
+ defaultElement: "<input>",
33
+ widgetEventPrefix: "spin",
34
+ options: {
35
+ culture: null,
36
+ icons: {
37
+ down: "ui-icon-triangle-1-s",
38
+ up: "ui-icon-triangle-1-n"
39
+ },
40
+ incremental: true,
41
+ max: null,
42
+ min: null,
43
+ numberFormat: null,
44
+ page: 10,
45
+ step: 1,
46
+
47
+ change: null,
48
+ spin: null,
49
+ start: null,
50
+ stop: null
51
+ },
52
+
53
+ _create: function() {
54
+ // handle string values that need to be parsed
55
+ this._setOption( "max", this.options.max );
56
+ this._setOption( "min", this.options.min );
57
+ this._setOption( "step", this.options.step );
58
+
59
+ // format the value, but don't constrain
60
+ this._value( this.element.val(), true );
61
+
62
+ this._draw();
63
+ this._on( this._events );
64
+ this._refresh();
65
+
66
+ // turning off autocomplete prevents the browser from remembering the
67
+ // value when navigating through history, so we re-enable autocomplete
68
+ // if the page is unloaded before the widget is destroyed. #7790
69
+ this._on( this.window, {
70
+ beforeunload: function() {
71
+ this.element.removeAttr( "autocomplete" );
72
+ }
73
+ });
74
+ },
75
+
76
+ _getCreateOptions: function() {
77
+ var options = {},
78
+ element = this.element;
79
+
80
+ $.each( [ "min", "max", "step" ], function( i, option ) {
81
+ var value = element.attr( option );
82
+ if ( value !== undefined && value.length ) {
83
+ options[ option ] = value;
84
+ }
85
+ });
86
+
87
+ return options;
88
+ },
89
+
90
+ _events: {
91
+ keydown: function( event ) {
92
+ if ( this._start( event ) && this._keydown( event ) ) {
93
+ event.preventDefault();
94
+ }
95
+ },
96
+ keyup: "_stop",
97
+ focus: function() {
98
+ this.previous = this.element.val();
99
+ },
100
+ blur: function( event ) {
101
+ if ( this.cancelBlur ) {
102
+ delete this.cancelBlur;
103
+ return;
104
+ }
105
+
106
+ this._stop();
107
+ this._refresh();
108
+ if ( this.previous !== this.element.val() ) {
109
+ this._trigger( "change", event );
110
+ }
111
+ },
112
+ mousewheel: function( event, delta ) {
113
+ if ( !delta ) {
114
+ return;
115
+ }
116
+ if ( !this.spinning && !this._start( event ) ) {
117
+ return false;
118
+ }
119
+
120
+ this._spin( (delta > 0 ? 1 : -1) * this.options.step, event );
121
+ clearTimeout( this.mousewheelTimer );
122
+ this.mousewheelTimer = this._delay(function() {
123
+ if ( this.spinning ) {
124
+ this._stop( event );
125
+ }
126
+ }, 100 );
127
+ event.preventDefault();
128
+ },
129
+ "mousedown .ui-spinner-button": function( event ) {
130
+ var previous;
131
+
132
+ // We never want the buttons to have focus; whenever the user is
133
+ // interacting with the spinner, the focus should be on the input.
134
+ // If the input is focused then this.previous is properly set from
135
+ // when the input first received focus. If the input is not focused
136
+ // then we need to set this.previous based on the value before spinning.
137
+ previous = this.element[0] === this.document[0].activeElement ?
138
+ this.previous : this.element.val();
139
+ function checkFocus() {
140
+ var isActive = this.element[0] === this.document[0].activeElement;
141
+ if ( !isActive ) {
142
+ this.element.focus();
143
+ this.previous = previous;
144
+ // support: IE
145
+ // IE sets focus asynchronously, so we need to check if focus
146
+ // moved off of the input because the user clicked on the button.
147
+ this._delay(function() {
148
+ this.previous = previous;
149
+ });
150
+ }
151
+ }
152
+
153
+ // ensure focus is on (or stays on) the text field
154
+ event.preventDefault();
155
+ checkFocus.call( this );
156
+
157
+ // support: IE
158
+ // IE doesn't prevent moving focus even with event.preventDefault()
159
+ // so we set a flag to know when we should ignore the blur event
160
+ // and check (again) if focus moved off of the input.
161
+ this.cancelBlur = true;
162
+ this._delay(function() {
163
+ delete this.cancelBlur;
164
+ checkFocus.call( this );
165
+ });
166
+
167
+ if ( this._start( event ) === false ) {
168
+ return;
169
+ }
170
+
171
+ this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
172
+ },
173
+ "mouseup .ui-spinner-button": "_stop",
174
+ "mouseenter .ui-spinner-button": function( event ) {
175
+ // button will add ui-state-active if mouse was down while mouseleave and kept down
176
+ if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
177
+ return;
178
+ }
179
+
180
+ if ( this._start( event ) === false ) {
181
+ return false;
182
+ }
183
+ this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
184
+ },
185
+ // TODO: do we really want to consider this a stop?
186
+ // shouldn't we just stop the repeater and wait until mouseup before
187
+ // we trigger the stop event?
188
+ "mouseleave .ui-spinner-button": "_stop"
189
+ },
190
+
191
+ _draw: function() {
192
+ var uiSpinner = this.uiSpinner = this.element
193
+ .addClass( "ui-spinner-input" )
194
+ .attr( "autocomplete", "off" )
195
+ .wrap( this._uiSpinnerHtml() )
196
+ .parent()
197
+ // add buttons
198
+ .append( this._buttonHtml() );
199
+
200
+ this.element.attr( "role", "spinbutton" );
201
+
202
+ // button bindings
203
+ this.buttons = uiSpinner.find( ".ui-spinner-button" )
204
+ .attr( "tabIndex", -1 )
205
+ .button()
206
+ .removeClass( "ui-corner-all" );
207
+
208
+ // IE 6 doesn't understand height: 50% for the buttons
209
+ // unless the wrapper has an explicit height
210
+ if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&
211
+ uiSpinner.height() > 0 ) {
212
+ uiSpinner.height( uiSpinner.height() );
213
+ }
214
+
215
+ // disable spinner if element was already disabled
216
+ if ( this.options.disabled ) {
217
+ this.disable();
218
+ }
219
+ },
220
+
221
+ _keydown: function( event ) {
222
+ var options = this.options,
223
+ keyCode = $.ui.keyCode;
224
+
225
+ switch ( event.keyCode ) {
226
+ case keyCode.UP:
227
+ this._repeat( null, 1, event );
228
+ return true;
229
+ case keyCode.DOWN:
230
+ this._repeat( null, -1, event );
231
+ return true;
232
+ case keyCode.PAGE_UP:
233
+ this._repeat( null, options.page, event );
234
+ return true;
235
+ case keyCode.PAGE_DOWN:
236
+ this._repeat( null, -options.page, event );
237
+ return true;
238
+ }
239
+
240
+ return false;
241
+ },
242
+
243
+ _uiSpinnerHtml: function() {
244
+ return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>";
245
+ },
246
+
247
+ _buttonHtml: function() {
248
+ return "" +
249
+ "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
250
+ "<span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" +
251
+ "</a>" +
252
+ "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
253
+ "<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" +
254
+ "</a>";
255
+ },
256
+
257
+ _start: function( event ) {
258
+ if ( !this.spinning && this._trigger( "start", event ) === false ) {
259
+ return false;
260
+ }
261
+
262
+ if ( !this.counter ) {
263
+ this.counter = 1;
264
+ }
265
+ this.spinning = true;
266
+ return true;
267
+ },
268
+
269
+ _repeat: function( i, steps, event ) {
270
+ i = i || 500;
271
+
272
+ clearTimeout( this.timer );
273
+ this.timer = this._delay(function() {
274
+ this._repeat( 40, steps, event );
275
+ }, i );
276
+
277
+ this._spin( steps * this.options.step, event );
278
+ },
279
+
280
+ _spin: function( step, event ) {
281
+ var value = this.value() || 0;
282
+
283
+ if ( !this.counter ) {
284
+ this.counter = 1;
285
+ }
286
+
287
+ value = this._adjustValue( value + step * this._increment( this.counter ) );
288
+
289
+ if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) {
290
+ this._value( value );
291
+ this.counter++;
292
+ }
293
+ },
294
+
295
+ _increment: function( i ) {
296
+ var incremental = this.options.incremental;
297
+
298
+ if ( incremental ) {
299
+ return $.isFunction( incremental ) ?
300
+ incremental( i ) :
301
+ Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );
302
+ }
303
+
304
+ return 1;
305
+ },
306
+
307
+ _precision: function() {
308
+ var precision = this._precisionOf( this.options.step );
309
+ if ( this.options.min !== null ) {
310
+ precision = Math.max( precision, this._precisionOf( this.options.min ) );
311
+ }
312
+ return precision;
313
+ },
314
+
315
+ _precisionOf: function( num ) {
316
+ var str = num.toString(),
317
+ decimal = str.indexOf( "." );
318
+ return decimal === -1 ? 0 : str.length - decimal - 1;
319
+ },
320
+
321
+ _adjustValue: function( value ) {
322
+ var base, aboveMin,
323
+ options = this.options;
324
+
325
+ // make sure we're at a valid step
326
+ // - find out where we are relative to the base (min or 0)
327
+ base = options.min !== null ? options.min : 0;
328
+ aboveMin = value - base;
329
+ // - round to the nearest step
330
+ aboveMin = Math.round(aboveMin / options.step) * options.step;
331
+ // - rounding is based on 0, so adjust back to our base
332
+ value = base + aboveMin;
333
+
334
+ // fix precision from bad JS floating point math
335
+ value = parseFloat( value.toFixed( this._precision() ) );
336
+
337
+ // clamp the value
338
+ if ( options.max !== null && value > options.max) {
339
+ return options.max;
340
+ }
341
+ if ( options.min !== null && value < options.min ) {
342
+ return options.min;
343
+ }
344
+
345
+ return value;
346
+ },
347
+
348
+ _stop: function( event ) {
349
+ if ( !this.spinning ) {
350
+ return;
351
+ }
352
+
353
+ clearTimeout( this.timer );
354
+ clearTimeout( this.mousewheelTimer );
355
+ this.counter = 0;
356
+ this.spinning = false;
357
+ this._trigger( "stop", event );
358
+ },
359
+
360
+ _setOption: function( key, value ) {
361
+ if ( key === "culture" || key === "numberFormat" ) {
362
+ var prevValue = this._parse( this.element.val() );
363
+ this.options[ key ] = value;
364
+ this.element.val( this._format( prevValue ) );
365
+ return;
366
+ }
367
+
368
+ if ( key === "max" || key === "min" || key === "step" ) {
369
+ if ( typeof value === "string" ) {
370
+ value = this._parse( value );
371
+ }
372
+ }
373
+ if ( key === "icons" ) {
374
+ this.buttons.first().find( ".ui-icon" )
375
+ .removeClass( this.options.icons.up )
376
+ .addClass( value.up );
377
+ this.buttons.last().find( ".ui-icon" )
378
+ .removeClass( this.options.icons.down )
379
+ .addClass( value.down );
380
+ }
381
+
382
+ this._super( key, value );
383
+
384
+ if ( key === "disabled" ) {
385
+ if ( value ) {
386
+ this.element.prop( "disabled", true );
387
+ this.buttons.button( "disable" );
388
+ } else {
389
+ this.element.prop( "disabled", false );
390
+ this.buttons.button( "enable" );
391
+ }
392
+ }
393
+ },
394
+
395
+ _setOptions: modifier(function( options ) {
396
+ this._super( options );
397
+ this._value( this.element.val() );
398
+ }),
399
+
400
+ _parse: function( val ) {
401
+ if ( typeof val === "string" && val !== "" ) {
402
+ val = window.Globalize && this.options.numberFormat ?
403
+ Globalize.parseFloat( val, 10, this.options.culture ) : +val;
404
+ }
405
+ return val === "" || isNaN( val ) ? null : val;
406
+ },
407
+
408
+ _format: function( value ) {
409
+ if ( value === "" ) {
410
+ return "";
411
+ }
412
+ return window.Globalize && this.options.numberFormat ?
413
+ Globalize.format( value, this.options.numberFormat, this.options.culture ) :
414
+ value;
415
+ },
416
+
417
+ _refresh: function() {
418
+ this.element.attr({
419
+ "aria-valuemin": this.options.min,
420
+ "aria-valuemax": this.options.max,
421
+ // TODO: what should we do with values that can't be parsed?
422
+ "aria-valuenow": this._parse( this.element.val() )
423
+ });
424
+ },
425
+
426
+ // update the value without triggering change
427
+ _value: function( value, allowAny ) {
428
+ var parsed;
429
+ if ( value !== "" ) {
430
+ parsed = this._parse( value );
431
+ if ( parsed !== null ) {
432
+ if ( !allowAny ) {
433
+ parsed = this._adjustValue( parsed );
434
+ }
435
+ value = this._format( parsed );
436
+ }
437
+ }
438
+ this.element.val( value );
439
+ this._refresh();
440
+ },
441
+
442
+ _destroy: function() {
443
+ this.element
444
+ .removeClass( "ui-spinner-input" )
445
+ .prop( "disabled", false )
446
+ .removeAttr( "autocomplete" )
447
+ .removeAttr( "role" )
448
+ .removeAttr( "aria-valuemin" )
449
+ .removeAttr( "aria-valuemax" )
450
+ .removeAttr( "aria-valuenow" );
451
+ this.uiSpinner.replaceWith( this.element );
452
+ },
453
+
454
+ stepUp: modifier(function( steps ) {
455
+ this._stepUp( steps );
456
+ }),
457
+ _stepUp: function( steps ) {
458
+ if ( this._start() ) {
459
+ this._spin( (steps || 1) * this.options.step );
460
+ this._stop();
461
+ }
462
+ },
463
+
464
+ stepDown: modifier(function( steps ) {
465
+ this._stepDown( steps );
466
+ }),
467
+ _stepDown: function( steps ) {
468
+ if ( this._start() ) {
469
+ this._spin( (steps || 1) * -this.options.step );
470
+ this._stop();
471
+ }
472
+ },
473
+
474
+ pageUp: modifier(function( pages ) {
475
+ this._stepUp( (pages || 1) * this.options.page );
476
+ }),
477
+
478
+ pageDown: modifier(function( pages ) {
479
+ this._stepDown( (pages || 1) * this.options.page );
480
+ }),
481
+
482
+ value: function( newVal ) {
483
+ if ( !arguments.length ) {
484
+ return this._parse( this.element.val() );
485
+ }
486
+ modifier( this._value ).call( this, newVal );
487
+ },
488
+
489
+ widget: function() {
490
+ return this.uiSpinner;
491
+ }
492
+ });
493
+
494
+ }( jQuery ) );
495
+
496
+ });