Mercurial > p > roundup > code
comparison doc/upgrading.txt @ 8286:6445e63bb423
feat(web) - Use native number type input for Number() and Integer().
When editing hyperdb.Number() or hyperdb.Integer() properties, use a
native number input.
For Number you can enter digits, +/-, . and e/E for exponent (1E2 =
100).
For integer we have the same keys as number, but also add step=1 to
the input. This stops submitting 23.5 suggesting 23 or 24. It does
allow 2E4 to be submitted that is rejected with an error from the
backend. However if the spinner is used with 2E4 it is turned into
20000, a pure integer and incremented/decremented by the spinner.
The upgrade happens automatically. Directions on going back to text
input provided. User guide updated to describe addition of spinner.
Tests added.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 18 Jan 2025 14:54:31 -0500 |
| parents | 2bf0c4e7795e |
| children | b99e76e76496 |
comparison
equal
deleted
inserted
replaced
| 8285:2bf0c4e7795e | 8286:6445e63bb423 |
|---|---|
| 222 If you have enabled the xmlrpc endpoint, you should install | 222 If you have enabled the xmlrpc endpoint, you should install |
| 223 defusedxml. | 223 defusedxml. |
| 224 | 224 |
| 225 .. _defusedxml: https://pypi.org/project/defusedxml/ | 225 .. _defusedxml: https://pypi.org/project/defusedxml/ |
| 226 | 226 |
| 227 Use native date inputs (optional) | 227 Enable use of native date inputs (optional) |
| 228 --------------------------------- | 228 ------------------------------------------- |
| 229 | 229 |
| 230 Roundup now uses native date or datetime-local inputs for Date() | 230 Roundup now uses native date or datetime-local inputs for Date() |
| 231 properties. These inputs take the place of the text input and | 231 properties. These inputs take the place of the text input and |
| 232 calendar popup from earlier Roundup versions. Modern browsers | 232 calendar popup from earlier Roundup versions. Modern browsers |
| 233 come with a built-in calendar for date selection, so the | 233 come with a built-in calendar for date selection, so the |
| 306 popcal=False)" | 306 popcal=False)" |
| 307 | 307 |
| 308 will generate the input as in Roundup 2.4 or earlier without a | 308 will generate the input as in Roundup 2.4 or earlier without a |
| 309 popcal link. | 309 popcal link. |
| 310 | 310 |
| 311 .. _revert_input_to_text: | |
| 312 | |
| 311 If you are using a path expression like:: | 313 If you are using a path expression like:: |
| 312 | 314 |
| 313 tal:content="context/duedate/field" | 315 tal:content="context/duedate/field" |
| 314 | 316 |
| 315 change it to:: | 317 change it to:: |
| 363 ``issue.item.html``. | 365 ``issue.item.html``. |
| 364 | 366 |
| 365 There is no support for activating text mode using the | 367 There is no support for activating text mode using the |
| 366 keyboard. Tablet/touch support is mixed. Chrome supports | 368 keyboard. Tablet/touch support is mixed. Chrome supports |
| 367 double-tap to activate text mode input. Firefox does not. | 369 double-tap to activate text mode input. Firefox does not. |
| 370 | |
| 371 Revert native number inputs for Number() and Integer() (optional) | |
| 372 ----------------------------------------------------------------- | |
| 373 | |
| 374 Roundup's field() method for properties of type Number() or | |
| 375 Integer() now use a native browser number input. | |
| 376 | |
| 377 You can use the old style text inputs by calling the field | |
| 378 method with ``type="text"``. You can :ref:`follow the example | |
| 379 for setting the text argument on a Date() | |
| 380 property. <revert_input_to_text>` for details. | |
| 381 | |
| 382 Note that the Integer() type also uses ``step="1"`` by default to | |
| 383 add a stepper control and try to constrain the input to | |
| 384 integers. This can be overridden by passing a new step | |
| 385 (e.g. ``step="50"``) to the field() method. | |
| 368 | 386 |
| 369 Change in REST response for invalid CORS requests (info) | 387 Change in REST response for invalid CORS requests (info) |
| 370 -------------------------------------------------------- | 388 -------------------------------------------------------- |
| 371 | 389 |
| 372 CORS_ preflight requests that are missing required headers can | 390 CORS_ preflight requests that are missing required headers can |
