source: Dev/branches/rest-dojo-ui/client/dijit/tests/i18n/textbox.html @ 256

Last change on this file since 256 was 256, checked in by hendrikvanantwerpen, 13 years ago

Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).

File size: 4.8 KB
Line 
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 TextBox</title>
7
8                <script type="text/javascript" src="../../../dojo/dojo.js"
9                        djConfig="isDebug: true"></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.dijit"); // optimize: load dijit layer
14                        dojo.require("dijit.form.NumberTextBox");
15                        dojo.require("dijit.form.CurrencyTextBox");
16                        dojo.require("dijit.form.DateTextBox");
17                        dojo.require("dijit.form.ValidationTextBox");
18                        dojo.require("dojo.date.locale");
19                        dojo.require("dojo.date.stamp");
20                        dojo.require("dojo.parser");    // scan page for widgets and instantiate them
21                        dojo.require("doh.runner");
22                </script>
23                <script src="test_i18n.js"></script>
24                <script type="text/javascript">
25                        dojo.ready(function(){
26                                doh.register("t", getAllTestCases());
27                                doh.run();
28                        });
29                </script>
30
31                <style type="text/css">
32                        @import "../../themes/claro/document.css";
33                        @import "../../themes/claro/claro.css";
34                        @import "../css/dijitTests.css";
35
36                        .title {
37                                background-color:#ddd;
38                        }
39
40                        .hint {
41                                background-color:#eee;
42                        }
43
44                        .testExample {
45                                background-color:#fbfbfb;
46                                padding:1em;
47                                margin-bottom:1em;
48                                border:1px solid #bfbfbf;
49                        }
50
51                        .dojoTitlePaneLabel label {
52                                font-weight:bold;
53                        }
54
55                        td {white-space:nowrap}
56                </style>
57        </head>
58
59        <body class="claro">
60                <h1 class="testTitle">Dijit TextBox Globalization Test</h1>
61
62<!--            <h2 class="testTitle">Press the following button to start all test after this page is loaded.</h2>
63                <button id="startButton" onclick="startTest()">Start Test</button>-->
64
65                <script>
66                (function(){
67                        genFormatTestCases("Natural Language Casing Mapping", "dijit.form.TextBox", [
68
69                                { attrs: {uppercase: "true"},
70                                  desc: "Upper casing: Basic Latin",
71                                  value: "abcdefghijklmnopqrstuvwxyz",
72                                  expValue: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
73                                  comment: ""
74                                },
75
76                                { attrs: {uppercase: "true"},
77                                  desc: "Upper casing: Latin with accents",
78                                  value: "àáâãÀåÊçÚéêëìíîïðñòóÎõö",
79                                  expValue: "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ",
80                                  comment: ""
81                                },
82
83                                { attrs: {uppercase: "true"},
84                                  desc: "Upper casing: Turkish",
85                                  value: "ıi",
86                                  expValue: "Iİ",
87                                  comment: "<a href='#cmt_1'>See #1.</a>"
88                                },
89
90                                { attrs: {uppercase: "true"},
91                                  desc: "Upper casing: Russian",
92                                  value: "абвгЎежз",
93                                  expValue: "АБВГДЕЖЗ",
94                                  comment: ""
95                                },
96
97                                { attrs: {uppercase: "true"},
98                                  desc: "Upper casing: German",
99                                  value: "ß",
100                                  expValue: "SS",
101                                  comment: "<a href='#cmt_1'>See #1.</a>"
102                                },
103
104                                { attrs: {lowercase: "true"},
105                                  desc: "Lower casing: Turkish",
106                                  value: "Iİ",
107                                  expValue: "ıi",
108                                  comment: "<a href='#cmt_1'>See #1.</a>"
109                                },
110
111                                { attrs: {propercase: "true"},
112                                  desc: "Title/Proper casing: Latin",
113                                  value: "\u01F1abc",
114                                  expValue: "\u01F2abc",
115                                  comment: "<a href='#cmt_1'>See #1.</a>"
116                                }
117                        ]);
118
119                        genFormatTestCases("White-space Detecting", "dijit.form.TextBox", [
120
121                                { attrs: {trim: "true"},
122                                  desc: "Normal space & tab",
123                                  value: "   abc\t\t\t",
124                                  expValue: "abc",
125                                  comment: ""
126                                },
127
128                                { attrs: {trim: "true"},
129                                  desc: "NO-BREAK SPACE",
130                                  value: "\u00A0abc\u00A0",
131                                  expValue: "abc",
132                                  comment: "Failed in IE. <a href='#cmt_2'>See #2.</a>"
133                                },
134
135                                { attrs: {trim: "true"},
136                                  desc: "EN QUAD",
137                                  value: "\u2000abc\u2000",
138                                  expValue: "abc",
139                                  comment: "Failed in IE. <a href='#cmt_2'>See #2.</a>"
140                                },
141
142                                { attrs: {trim: "true"},
143                                  desc: "IDEOGRAPHIC SPACE",
144                                  value: "\u3000abc\u3000",
145                                  expValue: "abc",
146                                  comment: "Failed in IE. <a href='#cmt_2'>See #2.</a>"
147                                }
148
149
150                        ]);
151
152                        dojo.parser.parse();
153
154                })();
155                </script>
156
157                <h2 class="testTitle">Issues &amp; Comments </h2>
158                <a name="cmt_1"><h3 class="testTitle">Issue #1 <sup style="color:red">Not fixed. Avoid using this function of TextBox.</sup></h3></a>
159                <p>
160                        Strictly speaking, all casing manipulation must use ICU case mapping rules (routine). However, the default JavaScript routines used by Dojo
161                        do not support ICU case mapping rules in all browsers.
162                </p>
163
164                <a name="cmt_2"><h3 class="testTitle">Issue #2 <sup style="color:red">Not fixed. Avoid using this function of TextBox.</sup></h3></a>
165                <p>
166                        Trimming must get rid of all Unicode characters with the white space property. However, the default JavaScript routines used by Dojo
167                        do not support get character properties in some browsers like IE. Other browsers like Firefox might support trimming more white space
168                        characters.
169                </p>
170
171        </body>
172</html>
173
174
Note: See TracBrowser for help on using the repository browser.