|
1 |
| -/*! JSON Editor v0.6.15 - JSON Schema -> HTML Editor |
| 1 | +/*! JSON Editor v0.6.16 - JSON Schema -> HTML Editor |
2 | 2 | * By Jeremy Dorn - https://github.com/jdorn/json-editor/
|
3 | 3 | * Released under the MIT license
|
4 | 4 | *
|
5 |
| - * Date: 2014-06-17 |
| 5 | + * Date: 2014-06-18 |
6 | 6 | */
|
7 | 7 |
|
8 | 8 | /**
|
@@ -2125,7 +2125,10 @@ JSONEditor.defaults.editors.string = JSONEditor.AbstractEditor.extend({
|
2125 | 2125 |
|
2126 | 2126 | // Any special formatting that needs to happen after the input is added to the dom
|
2127 | 2127 | requestAnimationFrame(function() {
|
2128 |
| - self.afterInputReady(); |
| 2128 | + // Skip in case the input is only a temporary editor, |
| 2129 | + // otherwise, in the case of an ace_editor creation, |
| 2130 | + // it will generate an error trying to append it to the missing parentNode |
| 2131 | + if(self.input.parentNode) self.afterInputReady(); |
2129 | 2132 | });
|
2130 | 2133 |
|
2131 | 2134 | this.register();
|
@@ -3805,7 +3808,7 @@ JSONEditor.defaults.editors.array = JSONEditor.AbstractEditor.extend({
|
3805 | 3808 | });
|
3806 | 3809 |
|
3807 | 3810 | if(controls_holder) {
|
3808 |
| - controls_holder.appendChild(self.rows[i].moveup_button); |
| 3811 | + controls_holder.appendChild(self.rows[i].movedown_button); |
3809 | 3812 | }
|
3810 | 3813 | }
|
3811 | 3814 |
|
@@ -5166,11 +5169,29 @@ JSONEditor.defaults.editors.multiselect = JSONEditor.AbstractEditor.extend({
|
5166 | 5169 | }
|
5167 | 5170 | },
|
5168 | 5171 | enable: function() {
|
5169 |
| - if(!this.always_disabled) this.input.disabled = false; |
| 5172 | + if(!this.always_disabled) { |
| 5173 | + if(this.input) { |
| 5174 | + this.input.disabled = false; |
| 5175 | + } |
| 5176 | + else if(this.inputs) { |
| 5177 | + for(var i in this.inputs) { |
| 5178 | + if(!this.inputs.hasOwnProperty(i)) continue; |
| 5179 | + this.inputs[i].disabled = false; |
| 5180 | + } |
| 5181 | + } |
| 5182 | + } |
5170 | 5183 | this._super();
|
5171 | 5184 | },
|
5172 | 5185 | disable: function() {
|
5173 |
| - this.input.disabled = true; |
| 5186 | + if(this.input) { |
| 5187 | + this.input.disabled = true; |
| 5188 | + } |
| 5189 | + else if(this.inputs) { |
| 5190 | + for(var i in this.inputs) { |
| 5191 | + if(!this.inputs.hasOwnProperty(i)) continue; |
| 5192 | + this.inputs[i].disabled = true; |
| 5193 | + } |
| 5194 | + } |
5174 | 5195 | this._super();
|
5175 | 5196 | }
|
5176 | 5197 | });
|
|
0 commit comments