mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
add enable box styling
This commit is contained in:
parent
88bed79c07
commit
068df68ac0
@ -2151,7 +2151,7 @@ JSONEditor.defaults.editors.string = JSONEditor.AbstractEditor.extend({
|
|||||||
if(this.formname)this.label.setAttribute('for',this.formname);
|
if(this.formname)this.label.setAttribute('for',this.formname);
|
||||||
|
|
||||||
this.control = this.theme.getFormControl(this.label, this.input, this.description, this.append, this.placeholder);
|
this.control = this.theme.getFormControl(this.label, this.input, this.description, this.append, this.placeholder);
|
||||||
this.container.appendChild(this.control);
|
this.container.appendChild(this.control);
|
||||||
|
|
||||||
// Any special formatting that needs to happen after the input is added to the dom
|
// Any special formatting that needs to happen after the input is added to the dom
|
||||||
window.requestAnimationFrame(function() {
|
window.requestAnimationFrame(function() {
|
||||||
@ -6041,6 +6041,8 @@ JSONEditor.defaults.editors.checkbox = JSONEditor.AbstractEditor.extend({
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.container.appendChild(this.control);
|
this.container.appendChild(this.control);
|
||||||
|
if (this.input.id.endsWith('_enable'))
|
||||||
|
this.container.appendChild(document.createElement('hr'));
|
||||||
},
|
},
|
||||||
enable: function() {
|
enable: function() {
|
||||||
if(!this.always_disabled) {
|
if(!this.always_disabled) {
|
||||||
@ -6574,8 +6576,8 @@ JSONEditor.defaults.themes.bootstrap3 = JSONEditor.AbstractTheme.extend({
|
|||||||
subgroup.appendChild(input);
|
subgroup.appendChild(input);
|
||||||
subgroup.appendChild(helplabel);
|
subgroup.appendChild(helplabel);
|
||||||
|
|
||||||
//if (input.name.includes('enable'))
|
if (input.id.endsWith('_enable'))
|
||||||
// subgroup.className += ' checkbox-success';
|
subgroup.className += ' checkbox-success';
|
||||||
}
|
}
|
||||||
else if (append){
|
else if (append){
|
||||||
group.className += ' form-group';
|
group.className += ' form-group';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user