Merge pull request #4531 from oldium/add-widget-changed
authorJo-Philipp Wich <jo@mein.io>
Fri, 30 Oct 2020 20:29:38 +0000 (21:29 +0100)
committerGitHub <noreply@github.com>
Fri, 30 Oct 2020 20:29:38 +0000 (21:29 +0100)
luci-base: Fix using isActive in widget-change notification.

1  2 
modules/luci-base/htdocs/luci-static/resources/form.js

index 612c8ff94423ab5ce92ff9e22ee54fff21e69829,1d705e3bf20b2a220f0072847122937c6630fca3..70f156c721c991763e272ccfd15346718cfee825
@@@ -2219,7 -2219,7 +2219,7 @@@ var CBITypedSection = CBIAbstractSectio
                        });
  
                if (this.title != null && this.title != '')
 -                      sectionEl.appendChild(E('legend', {}, this.title));
 +                      sectionEl.appendChild(E('h3', {}, this.title));
  
                if (this.description != null && this.description != '')
                        sectionEl.appendChild(E('div', { 'class': 'cbi-section-descr' }, this.description));
@@@ -3138,7 -3138,7 +3138,7 @@@ var CBINamedSection = CBIAbstractSectio
                        });
  
                if (typeof(this.title) === 'string' && this.title !== '')
 -                      sectionEl.appendChild(E('legend', {}, this.title));
 +                      sectionEl.appendChild(E('h3', {}, this.title));
  
                if (typeof(this.description) === 'string' && this.description !== '')
                        sectionEl.appendChild(E('div', { 'class': 'cbi-section-descr' }, this.description));
@@@ -3351,10 -3351,10 +3351,10 @@@ var CBIValue = CBIAbstractValue.extend(
                        optionEl.classList.add('hidden');
  
                optionEl.addEventListener('widget-change',
-                       L.bind(this.handleValueChange, this, section_id, {}));
+                       L.bind(this.map.checkDepends, this.map));
  
                optionEl.addEventListener('widget-change',
-                       L.bind(this.map.checkDepends, this.map));
+                       L.bind(this.handleValueChange, this, section_id, {}));
  
                dom.bindClassInstance(optionEl, this);