[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Admin dashboard - Look & Feel: changed how the selected option is...

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <690206502e4cb_2ce1d0c5508@gitlab-sidekiq-low-urgency-cpu-bound-v2-77f7884cfd-tvsd8.mail>

Victor Emanouilov pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
bed45012 by Jean-Marc Kadimba at 2025-10-29T12:10:22+00:00
[FIX] Admin dashboard - Look & Feel: changed how the selected option is...
---
* [FIX] Admin dashboard - Look & Feel: changed how the selected option is retrieved to avoid getting a null when the field is disabled.

See merge request tikiwiki/tiki!8898

- - - - -


1 changed file:

- admin/include_look.php


Changes:

=====================================
admin/include_look.php
=====================================
@@ -1076,19 +1076,22 @@ function edit_custom_mode(el,id,name,icon){
     var setupThemeSelects = function (themeDropDown, optionDropDown, showPreview) {
         // pick up theme drop-down change
         themeDropDown.on("change", function() {
-            var ops = theme_options[themeDropDown.val()];
+            var t = themeDropDown.find("option:selected").val();
+            var o = optionDropDown.find("option:selected").val();
+            
+            var ops = theme_options[t];
             var none = true;
-            var current = optionDropDown.val();
+            var current = o;
             optionDropDown.empty().attr('disabled',false)
                     .append(\$('<option/>').attr('value','').text($none));
-            if (themeDropDown.val()) {
+            if (t) {
                 \$.each(ops[1], function(i, val) {
                     optionDropDown.append(\$('<option/>').attr('value',i).text(i));
                     none = false;
                 });
             }
             optionDropDown.val(current);
-            if (!optionDropDown.val()){
+            if (!o){
                 optionDropDown.val('');
             }
 
@@ -1099,8 +1102,8 @@ function edit_custom_mode(el,id,name,icon){
         }).trigger("change");
         optionDropDown.on("change", function() {
             if (showPreview !== undefined) {
-                var t = themeDropDown.val();
-                var o = optionDropDown.val();
+                var t = themeDropDown.find("option:selected").val();
+                var o = optionDropDown.find("option:selected").val();
                 var f = theme_options[t][1][o];
 
                 if ( ! f ) {



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/bed450124544af277c9584429aa066a2bce8495b

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/bed450124544af277c9584429aa066a2bce8495b
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.