[TYPO3-core] FYI24: #16608: Javascript flashmessage miss named severity

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Nov 29 21:33:50 CET 2010


Hi,

Steffen Kamper schrieb am 29.11.2010 21:24:

> this is a SVN patch request.
> 
> Type: Cleanup
> 
> BT Reference: http://bugs.typo3.org/view.php?id=16608
> 
> Branches: trunk
> 
> Simular to php, the severity is magic number 0-4
> The patch adds an object TYPO3.Severity which allows to write readable
> code:
> 
> TYPO3.Flashmessage.display(
>    TYPO3.Severity.information,
>    TYPO3.lang.header,
>    TYPO3.lang.message,
>    10
> );

Nice to see that!

Unfortunate is that we have added it only now, and the "numbers" are
already being used on the field. This is unfortunate considering that
the numbers don't match the ones we use in PHP based flash messages:

        const NOTICE  = -2;
        const INFO    = -1;
        const OK      = 0;
        const WARNING = 1;
        const ERROR   = 2;

But this is just a side-note on that topic. Is discussed in a huge topic
on the v4 list already ("Harmonizing severity levels").

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list