diff -urN dojo-0.4.1-kitchen_sink/src/widget/templates/Textbox.html dojo/src/widget/templates/Textbox.html
|
old
|
new
|
|
| 1 | 1 | <span style='float:${this.htmlfloat};'> |
| 2 | 2 | <input dojoAttachPoint='textbox' dojoAttachEvent='onblur;onfocus' |
| 3 | 3 | id='${this.widgetId}' name='${this.name}' |
| 4 | | class='${this.className}' type='${this.type}' > |
| | 4 | class='${this.className}' type='${this.type}' tabindex='${this.tabindex}'> |
| 5 | 5 | </span> |
diff -urN dojo-0.4.1-kitchen_sink/src/widget/templates/ValidationTextbox.html dojo/src/widget/templates/ValidationTextbox.html
|
old
|
new
|
|
| 1 | 1 | <span style='float:${this.htmlfloat};'> |
| 2 | 2 | <input dojoAttachPoint='textbox' type='${this.type}' dojoAttachEvent='onblur;onfocus;onkeyup' |
| 3 | 3 | id='${this.widgetId}' name='${this.name}' size='${this.size}' maxlength='${this.maxlength}' |
| 4 | | class='${this.className}' style=''> |
| | 4 | class='${this.className}' style='' tabindex='${this.tabindex}'> |
| 5 | 5 | <span dojoAttachPoint='invalidSpan' class='${this.invalidClass}'>${this.messages.invalidMessage}</span> |
| 6 | 6 | <span dojoAttachPoint='missingSpan' class='${this.missingClass}'>${this.messages.missingMessage}</span> |
| 7 | 7 | <span dojoAttachPoint='rangeSpan' class='${this.rangeClass}'>${this.messages.rangeMessage}</span> |
diff -urN dojo-0.4.1-kitchen_sink/src/widget/Textbox.js dojo/src/widget/Textbox.js
|
old
|
new
|
|
| 45 | 45 | // Basic input tag type declaration. |
| 46 | 46 | type: "", |
| 47 | 47 | |
| | 48 | // tabindex: Integer |
| | 49 | // Tab order. |
| | 50 | tabindex: "", |
| | 51 | |
| 48 | 52 | // trim: Boolean |
| 49 | 53 | // Removes leading and trailing whitespace if true. Default is false. |
| 50 | 54 | trim: false, |
diff -urN dojo-0.4.1-kitchen_sink/src/widget/ValidationTextbox.js dojo/src/widget/ValidationTextbox.js
|
old
|
new
|
|
| 40 | 40 | // size: String |
| 41 | 41 | // Basic input tag size declaration. |
| 42 | 42 | size: "", |
| | 43 | // tabindex: Integer |
| | 44 | // Tab order. |
| | 45 | tabindex: "", |
| 43 | 46 | // maxlength: String |
| 44 | 47 | // Basic input tag maxlength declaration. |
| 45 | 48 | maxlength: "", |
diff -urN dojo-0.4.1-kitchen_sink/tests/widget/test_validate.html dojo/tests/widget/test_validate.html
|
old
|
new
|
|
| 97 | 97 | <span class="noticeMessage"> Textbox class, Attributes: {trim: true, ucFirst: true, class: 'medium'}, First letter of each word is upper case.</span> |
| 98 | 98 | </div> |
| 99 | 99 | <div class="formAnswer"> |
| 100 | | <input id="q1" type="text" name="firstname" value="testing testing" class="medium" |
| | 100 | <input id="q1" type="text" name="firstname" value="testing testing" class="medium" tabindex="1" |
| 101 | 101 | dojoType="Textbox" |
| 102 | 102 | trim="true" |
| 103 | 103 | ucfirst="true" /> |
| … |
… |
|
| 108 | 108 | <span class="noticeMessage"> Textbox class, Attributes: {trim: true, uppercase: true, class: 'medium'}, all letters converted to upper case. </span> |
| 109 | 109 | </div> |
| 110 | 110 | <div class="formAnswer"> |
| 111 | | <input type="text" name="lastname" value="testing testing" class="medium" |
| | 111 | <input type="text" name="lastname" value="testing testing" class="medium" tabindex="2" |
| 112 | 112 | dojoType="Textbox" |
| 113 | 113 | trim="true" |
| 114 | 114 | uppercase="true" /> |
| … |
… |
|
| 119 | 119 | <span class="noticeMessage"> Textbox class, Attributes: {trim: true, digit: true, class: 'small'}, all but digits extracted. </span> |
| 120 | 120 | </div> |
| 121 | 121 | <div class="formAnswer"> |
| 122 | | <input type="text" name="age" value="38" class="small" |
| | 122 | <input type="text" name="age" value="38" class="small" tabindex="3" |
| 123 | 123 | dojoType="Textbox" |
| 124 | 124 | trim="true" |
| 125 | 125 | digit="true" /> |
| … |
… |
|
| 131 | 131 | Attributes: {lowercase: true, required: true}. Displays message if field is missing. </span> |
| 132 | 132 | </div> |
| 133 | 133 | <div class="formAnswer"> |
| 134 | | <input type="text" name="occupation" class="medium" |
| | 134 | <input type="text" name="occupation" class="medium" tabindex="4" |
| 135 | 135 | dojoType="ValidationTextbox" |
| 136 | 136 | lowercase="true" |
| 137 | 137 | required="true" |
| … |
… |
|
| 144 | 144 | Attributes: {trim: true, required: true, signed: true classPrefix: "myValidateColor"}, Enter feet above sea level with a sign. (note: these colors are drastically different due to demonstrating the effects of classPrefix.)</span> |
| 145 | 145 | </div> |
| 146 | 146 | <div class="formAnswer"> |
| 147 | | <input type="text" name="elevation" class="medium" value="300" |
| | 147 | <input type="text" name="elevation" class="medium" value="300" tabindex="5" |
| 148 | 148 | dojoType="IntegerTextbox" |
| 149 | 149 | trim="true" |
| 150 | 150 | classPrefix="myValidateColor" |
| … |
… |
|
| 173 | 173 | required: "true", |
| 174 | 174 | signed: "false", |
| 175 | 175 | separator: ",", |
| | 176 | tabindex: "6", |
| 176 | 177 | invalidMessage: "Invalid population. Be sure to use commas." |
| 177 | 178 | }; |
| 178 | 179 | var refNode = document.getElementById("attach-here"); |
| … |
… |
|
| 187 | 188 | Attributes: {trim: true, required: true}. Enter any sort of real number.</span> |
| 188 | 189 | </div> |
| 189 | 190 | <div class="formAnswer"> |
| 190 | | <input type="text" name="real1" class="medium" value="+0.1234" |
| | 191 | <input type="text" name="real1" class="medium" value="+0.1234" tabindex="7" |
| 191 | 192 | dojoType="RealNumberTextbox" |
| 192 | 193 | trim="true" |
| 193 | 194 | required="true" |
| … |
… |
|
| 200 | 201 | Attributes: {exponent: true}. Enter a real number in exponential notation.</span> |
| 201 | 202 | </div> |
| 202 | 203 | <div class="formAnswer"> |
| 203 | | <input type="text" name="real2" class="medium" value="+0.12" |
| | 204 | <input type="text" name="real2" class="medium" value="+0.12" tabindex="8" |
| 204 | 205 | dojoType="RealNumberTextbox" |
| 205 | 206 | trim="true" |
| 206 | 207 | required="true" |
| … |
… |
|
| 214 | 215 | Attributes: {fractional: true}. Enter dollars and cents.</span> |
| 215 | 216 | </div> |
| 216 | 217 | <div class="formAnswer"> |
| 217 | | <input type="text" name="income" class="medium" value="$54,775.53" |
| | 218 | <input type="text" name="income" class="medium" value="$54,775.53" tabindex="9" |
| 218 | 219 | dojoType="CurrencyTextbox" |
| 219 | 220 | trim="true" |
| 220 | 221 | required="true" |
| … |
… |
|
| 228 | 229 | Attributes: {allowIPv6: false, allowHybrid: false}. Also Dotted Hex works, 0x18.0x11.0x9b.0x28</span> |
| 229 | 230 | </div> |
| 230 | 231 | <div class="formAnswer"> |
| 231 | | <input type="text" name="ipv4" class="medium" value="24.17.155.40" |
| | 232 | <input type="text" name="ipv4" class="medium" value="24.17.155.40" tabindex="10" |
| 232 | 233 | dojoType="IpAddressTextbox" |
| 233 | 234 | trim="true" |
| 234 | 235 | required="true" |
| … |
… |
|
| 244 | 245 | Also hybrid works, x:x:x:x:x:x:d.d.d.d</span> |
| 245 | 246 | </div> |
| 246 | 247 | <div class="formAnswer"> |
| 247 | | <input type="text" name="ipv6" class="long" value="0000:0000:0000:0000:0000:0000:0000:0000" |
| | 248 | <input type="text" name="ipv6" class="long" value="0000:0000:0000:0000:0000:0000:0000:0000" tabindex="11" |
| 248 | 249 | dojoType="IpAddressTextbox" |
| 249 | 250 | trim="true" |
| 250 | 251 | uppercase = "true" |
| … |
… |
|
| 261 | 262 | Attributes: {required: true, trim: true, scheme: true}. </span> |
| 262 | 263 | </div> |
| 263 | 264 | <div class="formAnswer"> |
| 264 | | <input type="text" name="url" class="long" value="http://www.xyz.com/a/b/c?x=2#p3" |
| | 265 | <input type="text" name="url" class="long" value="http://www.xyz.com/a/b/c?x=2#p3" tabindex="12" |
| 265 | 266 | dojoType="UrlTextbox" |
| 266 | 267 | trim="true" |
| 267 | 268 | required="true" |
| … |
… |
|
| 275 | 276 | Attributes: {required: true, trim: true}. </span> |
| 276 | 277 | </div> |
| 277 | 278 | <div class="formAnswer"> |
| 278 | | <input type="text" name="email" class="long" value="fred&barney@stonehenge.com" |
| | 279 | <input type="text" name="email" class="long" value="fred&barney@stonehenge.com" tabindex="13" |
| 279 | 280 | dojoType="EmailTextbox" |
| 280 | 281 | trim="true" |
| 281 | 282 | required="true" |
| … |
… |
|
| 288 | 289 | Attributes: {required: true, trim: true}. </span> |
| 289 | 290 | </div> |
| 290 | 291 | <div class="formAnswer"> |
| 291 | | <input type="text" name="email" class="long" value="a@xyz.com; b@xyz.com; c@xyz.com; " |
| | 292 | <input type="text" name="email" class="long" value="a@xyz.com; b@xyz.com; c@xyz.com; " tabindex="14" |
| 292 | 293 | dojoType="EmailListTextbox" |
| 293 | 294 | trim="true" |
| 294 | 295 | required="true" |
| … |
… |
|
| 301 | 302 | Attributes: {lang: "en-us", required: true, trim: true}. Works for leap years</span> |
| 302 | 303 | </div> |
| 303 | 304 | <div class="formAnswer"> |
| 304 | | <input type="text" name="date1" class="medium" value="12/30/05" lang="en-us" |
| | 305 | <input type="text" name="date1" class="medium" value="12/30/05" lang="en-us" tabindex="15" |
| 305 | 306 | dojoType="DateTextbox" |
| 306 | 307 | trim="true" |
| 307 | 308 | required="true" |
| … |
… |
|
| 314 | 315 | Attributes: {formatLength:"medium", lang: "de-de", required: true, trim: true}. Works for leap years</span> |
| 315 | 316 | </div> |
| 316 | 317 | <div class="formAnswer"> |
| 317 | | <input type="text" name="date2" class="medium" value="30.12.2005" lang="de-de" formatLength="medium" |
| | 318 | <input type="text" name="date2" class="medium" value="30.12.2005" lang="de-de" formatLength="medium" tabindex="16" |
| 318 | 319 | dojoType="DateTextbox" |
| 319 | 320 | trim="true" |
| 320 | 321 | required="true" |
| … |
… |
|
| 328 | 329 | Attributes: {format:"YYYY.MM.DD", required: true, trim: true}. Works for leap years</span> |
| 329 | 330 | </div> |
| 330 | 331 | <div class="formAnswer"> |
| 331 | | <input type="text" name="date2" class="medium" value="2005.12.30" |
| | 332 | <input type="text" name="date2" class="medium" value="2005.12.30" tabindex="17" |
| 332 | 333 | dojoType="DateTextbox" |
| 333 | 334 | trim="true" |
| 334 | 335 | required="true" |
| … |
… |
|
| 342 | 343 | Attributes: {formatLength: "medium", required: true, trim: true}</span> |
| 343 | 344 | </div> |
| 344 | 345 | <div class="formAnswer"> |
| 345 | | <input type="text" name="time1" class="medium" value="5:45:00 pm" formatLength="medium" |
| | 346 | <input type="text" name="time1" class="medium" value="5:45:00 pm" formatLength="medium" tabindex="18" |
| 346 | 347 | dojoType="TimeTextbox" |
| 347 | 348 | trim="true" |
| 348 | 349 | required="true" |
| … |
… |
|
| 355 | 356 | Attributes: {displayFormat:"HH:mm:ss", required: true, trim: true}</span> |
| 356 | 357 | </div> |
| 357 | 358 | <div class="formAnswer"> |
| 358 | | <input type="text" name="time2" class="medium" value="17:45:00" |
| | 359 | <input type="text" name="time2" class="medium" value="17:45:00" tabindex="19" |
| 359 | 360 | dojoType="TimeTextbox" |
| 360 | 361 | trim="true" |
| 361 | 362 | required="true" |
| … |
… |
|
| 369 | 370 | Attributes: {format:"HH:mm:ss", required: true, trim: true}</span> |
| 370 | 371 | </div> |
| 371 | 372 | <div class="formAnswer"> |
| 372 | | <input type="text" name="time2" class="medium" value="17:45:00" |
| | 373 | <input type="text" name="time2" class="medium" value="17:45:00" tabindex="20" |
| 373 | 374 | dojoType="TimeTextbox" |
| 374 | 375 | trim="true" |
| 375 | 376 | required="true" |
| … |
… |
|
| 383 | 384 | Attributes: {required: true, trim: true, uppercase: true}</span> |
| 384 | 385 | </div> |
| 385 | 386 | <div class="formAnswer"> |
| 386 | | <input type="text" name="state" class="small" value="CA" |
| | 387 | <input type="text" name="state" class="small" value="CA" tabindex="21" |
| 387 | 388 | dojoType="UsStateTextbox" |
| 388 | 389 | allowTerritories = "false" |
| 389 | 390 | trim="true" |
| … |
… |
|
| 398 | 399 | Attributes: {required: true, trim: true} Five digit Zip code or 5 + 4.</span> |
| 399 | 400 | </div> |
| 400 | 401 | <div class="formAnswer"> |
| 401 | | <input type="text" name="zip" class="medium" value="98225-1649" |
| | 402 | <input type="text" name="zip" class="medium" value="98225-1649" tabindex="22" |
| 402 | 403 | dojoType="UsZipTextbox" |
| 403 | 404 | trim="true" |
| 404 | 405 | required="true" |
| … |
… |
|
| 411 | 412 | Attributes: {required: true, trim: true} </span> |
| 412 | 413 | </div> |
| 413 | 414 | <div class="formAnswer"> |
| 414 | | <input type="text" name="ssn" class="medium" value="123-45-6789" |
| | 415 | <input type="text" name="ssn" class="medium" value="123-45-6789" tabindex="23" |
| 415 | 416 | dojoType="UsSocialSecurityNumberTextbox" |
| 416 | 417 | trim="true" |
| 417 | 418 | required="true" |
| … |
… |
|
| 424 | 425 | Attributes: {required: true, trim: true} </span> |
| 425 | 426 | </div> |
| 426 | 427 | <div class="formAnswer"> |
| 427 | | <input type="text" name="phone" class="medium" value="(123) 456-7890" |
| | 428 | <input type="text" name="phone" class="medium" value="(123) 456-7890" tabindex="24" |
| 428 | 429 | dojoType="UsPhoneNumberTextbox" |
| 429 | 430 | trim="true" |
| 430 | 431 | required="true" |
| … |
… |
|
| 437 | 438 | Attributes: {required: true, trim: true} </span> |
| 438 | 439 | </div> |
| 439 | 440 | <div class="formAnswer"> |
| 440 | | <input type="text" name="phone" class="medium" value="someTestString" |
| | 441 | <input type="text" name="phone" class="medium" value="someTestString" tabindex="25" |
| 441 | 442 | dojoType="RegexpTextbox" |
| 442 | 443 | regexp="^[\w]+$" |
| 443 | 444 | required="true" |
| … |
… |
|
| 449 | 450 | <span class="noticeMessage">(just a test that type attribute is obeyed) </span> |
| 450 | 451 | </div> |
| 451 | 452 | <div class="formAnswer"> |
| 452 | | <input type="password" name="password" class="medium" |
| | 453 | <input type="password" name="password" class="medium" tabindex="26" |
| 453 | 454 | dojoType="Textbox" /> |
| 454 | 455 | </div> |
| 455 | 456 | <script> |
| … |
… |
|
| 465 | 466 | } |
| 466 | 467 | </script> |
| 467 | 468 | |
| 468 | | <div><button name="button" onclick="displayData(); return false;">view data</button></div> |
| | 469 | <div><button name="button" onclick="displayData(); return false;" tabindex="27">view data</button></div> |
| 469 | 470 | |
| 470 | 471 | </form> |
| 471 | 472 | </body> |