Added helper function for inline error messages
authorAlexander Ebert <ebert@woltlab.com>
Thu, 23 Nov 2017 09:55:36 +0000 (10:55 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 23 Nov 2017 09:55:36 +0000 (10:55 +0100)
commitc9e9e44860d6be84d1545ed1ae38d0f38023b0b8
tree77da1afc3e75ed4aec4718b7cb1d48f37873883c
parenteda548732b204a3e45d7ee1b35e83a682742cafc
Added helper function for inline error messages

The previous code fragments were mostly out-of-sync and were slightly
differing from each other. The new helper function `elInnerError()`
provides a consistent and predictable behavior:

elInnerError(el, 'Hello World') -> Shows the inline error message "Hello
World" right after the element `el`.

Removing the inline error can be achieved through one of these calls:
elInnerError(el, '')
elInnerError(el, false)

For the sake of code simplicity, these two calls will also the inline
error, but it is strongly recommended to use the above constructs to
keep the intention clear.
elInnerError(el, null)
elInnerError(el)
20 files changed:
wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Article/InlineEditor.js
wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Devtools/Project/QuickSetup.js
wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Option/EmailSmtpTest.js
wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Style/Favicon/Upload.js
wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Style/Image/Upload.js
wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Trophy/Upload.js
wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Map/Route/Planner.js
wcfsetup/install/files/js/WoltLabSuite/Core/Media/Upload.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Comment/Add.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Comment/Edit.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Comment/Response/Add.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Filter.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/InlineEditor.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Search.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Search/Handler.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Link.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Quote.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Editor.js
wcfsetup/install/files/js/wcf.globalHelper.js