From: jzaefferer Date: Sun, 24 Oct 2010 13:52:26 +0000 (+0200) Subject: Spinner: Some code and test cleanup X-Git-Tag: 1.9m3~1^2~20 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=02d8f914b68f73537dcaca272087b544b366bb2b;p=jquery-ui.git Spinner: Some code and test cleanup --- diff --git a/tests/unit/spinner/spinner.html b/tests/unit/spinner/spinner.html index df91c926e..954e82ea5 100644 --- a/tests/unit/spinner/spinner.html +++ b/tests/unit/spinner/spinner.html @@ -9,6 +9,7 @@ + diff --git a/tests/unit/spinner/spinner_defaults.js b/tests/unit/spinner/spinner_defaults.js index 94d3d67ab..7eb3f0a17 100644 --- a/tests/unit/spinner/spinner_defaults.js +++ b/tests/unit/spinner/spinner_defaults.js @@ -3,24 +3,17 @@ */ var spinner_defaults = { - buttons: 'show', - currency: false, dir: 'ltr', disabled: false, - groupSeparator: '', incremental: true, max: null, min: null, mouseWheel: true, - padding: 0, + numberformat: "n", page: 5, - precision: 0, - radix: 10, - radixPoint: '.', spinnerClass: null, step: null, - value: 0, - width: false + value: 0 }; commonWidgetTests('spinner', { defaults: spinner_defaults }); diff --git a/tests/unit/spinner/spinner_options.js b/tests/unit/spinner/spinner_options.js index b568d3cdd..c3bcac820 100644 --- a/tests/unit/spinner/spinner_options.js +++ b/tests/unit/spinner/spinner_options.js @@ -468,15 +468,4 @@ test("value", function() { equals(el.val(), 1000, "value option changed and set as current value"); }); -test("width", function() { - expect(2); - - el = $('#spin').spinner({ width: 1000 }); - equals(el.width(), 1000, "spinner width initialized"); - - el.spinner('option', 'width', 500); - equals(el.width(), 500, "spinner width changed"); - -}); - })(jQuery); diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js index f4227b8f6..02bb41ac0 100644 --- a/ui/jquery.ui.spinner.js +++ b/ui/jquery.ui.spinner.js @@ -27,7 +27,6 @@ $.widget('ui.spinner', { min: null, mouseWheel: true, numberformat: "n", - padding: 0, page: 5, spinnerClass: null, step: null, @@ -35,7 +34,7 @@ $.widget('ui.spinner', { }, _create: function() { - this.value(this._parse(this.element.val() || this.options.value)); + this.value(this.element.val() || this.options.value); this._draw(); this._mousewheel(); this._aria();