]> source.dussan.org Git - jquery-ui.git/commitdiff
Spinner: Changed casing of option numberformat -> numberFormat.
authorScott González <scott.gonzalez@gmail.com>
Fri, 20 May 2011 20:25:04 +0000 (16:25 -0400)
committerScott González <scott.gonzalez@gmail.com>
Wed, 25 May 2011 19:44:43 +0000 (15:44 -0400)
demos/spinner/currency.html
demos/spinner/decimal.html
tests/unit/spinner/spinner_defaults.js
tests/unit/spinner/spinner_options.js
ui/jquery.ui.spinner.js

index 8288e4c3de521640d357395076c9b71cd35cf521..1e9b37d08e322dc2e1c44381dffb0294e7ddbc73 100644 (file)
@@ -27,7 +27,7 @@
                        max: 2500,\r
                        step: 25,\r
                        start: 1000,\r
-                       numberformat: "C"\r
+                       numberFormat: "C"\r
                });     \r
                \r
        });\r
index 0a38fc51f8f3a9c0bc9159ab74f1672937d52dc6..cdc65929873fe12a78eda7d760b9f5367f8491c5 100644 (file)
@@ -18,7 +18,7 @@
        $(function() {\r
                $("#spinner").spinner({\r
                        step: 0.01,\r
-                       numberformat: "n"\r
+                       numberFormat: "n"\r
                });     \r
                \r
                $("#culture").change(function() {\r
index f6081b1f3fb244e0f1e8b6f698a6e78212941ac3..c9a7d5f626aecceeff8a217f503a3bac6dda7d5d 100644 (file)
@@ -4,7 +4,7 @@ commonWidgetTests( "spinner", {
                incremental: true,\r
                max: null,\r
                min: null,\r
-               numberformat: null,\r
+               numberFormat: null,\r
                page: 10,\r
                step: null,\r
                value: null,\r
index 3db7e5c5541b76b09d69143d34363166bfd41dfd..398780ad2085c27ed88f1b29a413f1295c484f17 100644 (file)
@@ -5,26 +5,26 @@
 \r
 module("spinner: options");\r
 \r
-test("numberformat, number", function() {\r
+test("numberFormat, number", function() {\r
        var el = $("#spin").spinner({\r
                value: "1",\r
-               numberformat: "n"\r
+               numberFormat: "n"\r
        });\r
        equal(el.val(), "1.00");\r
 });\r
 \r
-test("numberformat, number, simple", function() {\r
+test("numberFormat, number, simple", function() {\r
        var el = $("#spin").spinner({\r
                value: "1",\r
-               numberformat: "n0"\r
+               numberFormat: "n0"\r
        });\r
        equal(el.val(), "1");\r
 });\r
 \r
-test("numberformat, currency", function() {\r
+test("numberFormat, currency", function() {\r
        var el = $("#spin").spinner({\r
                value: "1",\r
-               numberformat: "C"\r
+               numberFormat: "C"\r
        });\r
        equal(el.val(), "$1.00");\r
 });\r
@@ -111,7 +111,7 @@ test("step, 2", function() {
 test("step, 0.7", function() {\r
        var el = $("#spin").spinner({\r
                step: 0.7,\r
-               numberformat: "n1"\r
+               numberFormat: "n1"\r
        });\r
        equals(el.val(), "0.0", "value initialized to");\r
 \r
index 2709175b50fd08a36f46bc1da057d7027c2b91cd..0a0ebb37e826116e9a9728be60d83922cffd6487 100644 (file)
@@ -20,7 +20,7 @@ $.widget( "ui.spinner", {
                incremental: true,
                max: null,
                min: null,
-               numberformat: null,
+               numberFormat: null,
                page: 10,
                step: null,
                value: null
@@ -318,13 +318,13 @@ $.widget( "ui.spinner", {
 
        _parse: function( val ) {
                if ( typeof val === "string" ) {
-                       val = $.global && this.options.numberformat ? $.global.parseFloat( val ) : +val;
+                       val = $.global && this.options.numberFormat ? $.global.parseFloat( val ) : +val;
                }
                return isNaN( val ) ? null : val;
        },
 
        _format: function( num ) {
-               this.element.val( $.global && this.options.numberformat ? $.global.format( num, this.options.numberformat ) : num );
+               this.element.val( $.global && this.options.numberFormat ? $.global.format( num, this.options.numberFormat ) : num );
        },
 
        destroy: function() {