From: Alexander Ebert Date: Sun, 5 Jun 2016 11:01:35 +0000 (+0200) Subject: Added preselection of tab containg an error X-Git-Tag: 3.0.0_Beta_1~1529 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=04ac2a94a50a0a5bacfdaf8778324169f6b40155;p=GitHub%2FWoltLab%2FWCF.git Added preselection of tab containg an error --- diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index aea6dce9f1..933b2a161c 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -2569,6 +2569,15 @@ $.widget('wcf.messageTabMenu', { this._span = $('').appendTo($nav); var $preselect = this.element.data('preselect'); + + // check for tabs containing '.innerError' and select the first matching one instead + $tabContainers.each(function(index, container) { + if (elBySel('.innerError', container) !== null) { + $preselect = $($tabs[index]).data('name'); + return false; + } + }); + this._tabs = [ ]; this._tabsByName = { }; for (var $i = 0; $i < $tabs.length; $i++) {