add enable box styling

This commit is contained in:
brindosch 2016-12-21 19:11:21 +01:00
parent 88bed79c07
commit 068df68ac0
1 changed files with 5 additions and 3 deletions

View File

@ -6041,6 +6041,8 @@ JSONEditor.defaults.editors.checkbox = JSONEditor.AbstractEditor.extend({
});
this.container.appendChild(this.control);
if (this.input.id.endsWith('_enable'))
this.container.appendChild(document.createElement('hr'));
},
enable: function() {
if(!this.always_disabled) {
@ -6574,8 +6576,8 @@ JSONEditor.defaults.themes.bootstrap3 = JSONEditor.AbstractTheme.extend({
subgroup.appendChild(input);
subgroup.appendChild(helplabel);
//if (input.name.includes('enable'))
// subgroup.className += ' checkbox-success';
if (input.id.endsWith('_enable'))
subgroup.className += ' checkbox-success';
}
else if (append){
group.className += ' form-group';