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

"Jean-Marc Kadimba \(@jmkadimba\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69020dcc13c2d_2ce1c4450915@gitlab-sidekiq-low-urgency-cpu-bound-v2-77f7884cfd-9fcq5.mail>

Jean-Marc Kadimba pushed to branch 28.x at Tiki Wiki CMS Groupware / Tiki


Commits:
2826894d by Jean-Marc Kadimba at 2025-10-29T14:44:34+02:00
[BP][FIX] Admin dashboard - Look & Feel: changed how the selected option is...
---
* [FIX] Admin dashboard - Look & Feel: changed how the selected option is...
---
* [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


(cherry picked from commit bed450124544af277c9584429aa066a2bce8495b)

3e2fbd30 [FIX] Admin dashboard - Look & Feel: changed how the selected option is...

Co-authored-by: Jean-Marc Kadimba <[email protected]>

See merge request tikiwiki/tiki!8899


(cherry picked from commit 898960510a25c60e2e4c1b949347de634402dadf)

0a177db2 [FIX] Admin dashboard - Look & Feel: changed how the selected option is...

Co-authored-by: Jean-Marc Kadimba <[email protected]>

See merge request tikiwiki/tiki!8900

- - - - -


1 changed file:

- admin/include_look.php


Changes:

=====================================
admin/include_look.php
=====================================
@@ -1074,19 +1074,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('');
             }
 
@@ -1100,8 +1103,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/2826894dec89df7db19885aec46b7d123bac4d96

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/2826894dec89df7db19885aec46b7d123bac4d96
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.