diff --git a/settings/js/personal.js b/settings/js/personal.js index 271de1599d93bb62355f257138735161af176cfc..db18b2861ab90c539cc7b5c5d2fdd68ada40f16a 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -86,12 +86,11 @@ $(document).ready(function(){ }); $("#languageinput").chosen(); + // Show only the not selectable optgroup + // Choosen only shows optgroup-labels if there are options in the optgroup + $(".languagedivider").remove(); $("#languageinput").change( function(){ - // the divider is no language - if ($("#languageinput option").hasClass('divider')) { - return false; - } // Serialize the data var post = $( "#languageinput" ).serialize(); // Ajax foo diff --git a/settings/templates/personal.php b/settings/templates/personal.php index c0fcf5c1bd655074be242b32bd31cbea48166465..6730787205867d5c21c6667ca656051a1a8d3eb0 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -82,7 +82,7 @@ if($_['displayNameChangeSupported']) { <?php foreach($_['commonlanguages'] as $language):?> <option value="<?php p($language['code']);?>"><?php p($language['name']);?></option> <?php endforeach;?> - <option class="divider">––––––––––</option> + <optgroup label="––––––––––"><option class="languagedivider">-</option></optgroup> <?php foreach($_['languages'] as $language):?> <option value="<?php p($language['code']);?>"><?php p($language['name']);?></option> <?php endforeach;?>