]> git.pond.sub.org Git - eow/blob - static/dojo-release-1.1.1/dijit/tests/i18n/number.html
Comment class stub
[eow] / static / dojo-release-1.1.1 / dijit / tests / i18n / number.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2         "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4         <head>
5                 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6                 <title>Test NumberTextBox</title>
7
8                 <script type="text/javascript" src="../../../dojo/dojo.js"
9                         djConfig="isDebug: true, extraLocale: ['zh-cn','fr-fr']"></script>
10                 <script type="text/javascript" src="../../../dojo/currency.js"></script>
11                 <script type="text/javascript" src="../../../dojo/number.js"></script>
12                 <script type="text/javascript">
13                         dojo.require("dijit.form.NumberTextBox");
14                         dojo.require("dijit.form.CurrencyTextBox");
15                         dojo.require("dijit.form.DateTextBox");
16                         dojo.require("dijit.form.ValidationTextBox");
17                         dojo.require("dojo.date.locale");
18                         dojo.require("dojo.date.stamp");
19                         dojo.require("dojo.parser");    // scan page for widgets and instantiate them
20                         dojo.require("doh.runner");
21                 </script>
22                 <script src="test_i18n.js"></script>
23                 <script type="text/javascript">
24                         dojo.addOnLoad(function(){
25                                 doh.register("t", getAllTestCases());
26                                 doh.run();
27                         });
28                 </script>
29
30                 <style type="text/css">
31                         @import "../../../dojo/resources/dojo.css";
32                         @import "../../themes/tundra/tundra.css";
33                         @import "../css/dijitTests.css";
34
35                         .title {
36                                 background-color:#ddd;
37                         }
38
39                         .hint {
40                                 background-color:#eee;
41                         }
42
43                         .testExample {
44                                 background-color:#fbfbfb;
45                                 padding:1em;
46                                 margin-bottom:1em;
47                                 border:1px solid #bfbfbf;
48                         }
49
50                         .dojoTitlePaneLabel label {
51                                 font-weight:bold;
52                         }
53
54                         td {white-space:nowrap}
55                 </style>
56         </head>
57
58         <body class="tundra">
59                 <h1 class="testTitle">Dijit TextBox Globalization Test for Number</h1>
60
61 <!--            <h2 class="testTitle">Press the following button to start all test after this page is loaded.</h2>
62                 <button id="startButton" onclick="startTest()">Start Test</button>-->
63                 <p>
64                         Before start this test, make sure the <b>dojo/cldr/nls</b> contains the data for "zh-cn", "fr-fr". If not, convert these CLDR data and put them there.
65                 </p>
66
67                 <script>
68                 (function() {
69
70                         genFormatTestCases("Number Format", "dijit.form.NumberTextBox", [
71
72                                 { attrs: {lang: "zh-cn"},
73                                   desc: "Locale: zh_CN",
74                                   value: "12345.067",
75                                   expValue: "12,345.067",
76                                   comment: ""
77                                 },
78                                 { attrs: {lang: "zh-cn"},
79                                   desc: "Locale: zh_CN",
80                                   value: "-12345.067",
81                                   expValue: "-12,345.067",
82                                   comment: ""
83                                 },
84
85                                 { attrs: {lang: "fr-fr"},
86                                   desc: "Locale: fr_FR",
87                                   value: "12345.067",
88                                   expValue: "12&nbsp;345,067",
89                                   comment: ""
90                                 },
91                                 { attrs: {lang: "fr-fr"},
92                                   desc: "Locale: zh_CN",
93                                   value: "-12345.067",
94                                   expValue: "-12&nbsp;345,067",
95                                   comment: ""
96                                 }
97                         ]);
98
99                         genValidateTestCases("Number Validate", "dijit.form.NumberTextBox", [
100
101                                 { attrs: {lang: "zh-cn"},
102                                   desc: "Locale: zh_CN",
103                                   value: 12345.067,
104                                   expValue: "12,345.067",
105                                   comment: ""
106                                 },
107                                 { attrs: {lang: "zh-cn"},
108                                   desc: "Locale: zh_CN",
109                                   value: -12345.067,
110                                   expValue: "-12,345.067",
111                                   comment: ""
112                                 },
113
114                                 { attrs: {lang: "fr-fr"},
115                                   desc: "Locale: fr_FR",
116                                   value: 12345.067,
117                                   expValue: "12&nbsp;345,067",
118                                   comment: ""
119                                 },
120                                 { attrs: {lang: "fr-fr"},
121                                   desc: "Locale: zh_CN",
122                                   value: -12345.067,
123                                   expValue: "-12&nbsp;345,067",
124                                   comment: ""
125                                 }
126                         ]);
127
128                         dojo.parser.parse();
129
130                 })();
131
132                 </script>
133         </body>
134 </html>
135
136