Added fallback for empty language selections
authorAlexander Ebert <ebert@woltlab.com>
Sat, 16 Aug 2014 18:27:19 +0000 (20:27 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 16 Aug 2014 18:27:19 +0000 (20:27 +0200)
wcfsetup/install/files/js/WCF.js

index 9ff9062acaf47ea8e3f730afb693a81185ed2847..51843602612aa4f75d6485748e3c95489c50a404 100755 (executable)
@@ -10102,6 +10102,10 @@ WCF.Language.Chooser = Class.extend({
                                this._dropdown.children('.dropdownToggle').empty().append($item.html());
                        }
                }
+               else if (languageID === 0) {
+                       var $dropdownToggle = $('<div><span class="icon icon24 fa-question" /></div> <div><h3>' + WCF.Language.get('wcf.global.language.noSelection') + '</h3></div>');
+                       this._dropdown.children('.dropdownToggle').empty().append($dropdownToggle);
+               }
                
                WCF.Dropdown.init();
        },