contao/core — Issue #3846: [2.11] Improve contao.js (+fix a tiny error)
Author: SunBlack
Created: 2012-01-25 11:03:49+00:00
State: open

The code of contao.js could need small improvements (check the code with http://www.javascriptlint.com/online_lint.php for more details)

This includes e.g.:
- Add missing semicolon
- Fix some redeclaration (this will remove some duplicate code, e.g. in makeParentViewSortable where just the pid is different, so the if-statement can be reduced)
- Suggestion: "missing default case in switch statement" -> add default case, which adds an error to console (console.error) -> could be nice for developers

And maybe add "use strict" at beginning of file to prevent some small compatibility errors on future development ;)