Skip to content

Commit

Permalink
Fix typo in enum editor.
Browse files Browse the repository at this point in the history
Add hide_display option to enum editor.
  • Loading branch information
jdorn committed Aug 29, 2014
1 parent cb154cf commit 786406b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/editors/enum.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ JSONEditor.defaults.editors.enum = JSONEditor.AbstractEditor.extend({
return 4;
},
build: function() {
var container = this.getContainer();
var container = this.container;
this.title = this.header = this.label = this.theme.getFormInputLabel(this.getTitle());
this.container.appendChild(this.title);

Expand Down Expand Up @@ -34,6 +34,8 @@ JSONEditor.defaults.editors.enum = JSONEditor.AbstractEditor.extend({
this.display_area.style.paddingTop = 0;
this.display_area.style.paddingBottom = 0;
this.container.appendChild(this.display_area);

if(this.options.hide_display) this.display_area.style.display = "none";

this.switcher.addEventListener('change',function() {
self.selected = self.select_options.indexOf(this.value);
Expand Down

0 comments on commit 786406b

Please sign in to comment.