Skip to content

Commit

Permalink
Fix duplicate variable, bump version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Dorn committed Aug 15, 2014
1 parent e5449ea commit afc9112
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "json-editor",
"version": "0.7.5",
"version": "0.7.6",
"authors": [
"Jeremy Dorn <[email protected]>"
],
Expand Down
20 changes: 11 additions & 9 deletions dist/jsoneditor.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*! JSON Editor v0.7.5 - JSON Schema -> HTML Editor
/*! JSON Editor v0.7.6 - JSON Schema -> HTML Editor
* By Jeremy Dorn - https://github.com/jdorn/json-editor/
* Released under the MIT license
*
* Date: 2014-08-10
* Date: 2014-08-15
*/

/**
Expand Down Expand Up @@ -2383,7 +2383,8 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({

if(this.format === 'grid') {
var rows = [];
$each(this.editors, function(key,editor) {
$each(this.property_order, function(j,key) {
var editor = self.editors[key];
if(editor.property_removed) return;
var found = false;
var width = editor.options.hidden? 0 : editor.getNumColumns();
Expand Down Expand Up @@ -2465,7 +2466,8 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({
// Normal layout
else {
container = document.createElement('div');
$each(this.editors, function(key,editor) {
$each(this.property_order, function(i,key) {
var editor = self.editors[key];
if(editor.property_removed) return;
var row = self.theme.getGridRow();
container.appendChild(row);
Expand Down Expand Up @@ -2995,7 +2997,7 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({
if(!this.addproperty_checkboxes[i].checked) show_modal = true;
}
else if(!(i in this.editors)) {
if(!can_add) {
if(!can_add && !this.schema.properties.hasOwnProperty(i)) {
this.addproperty_checkboxes[i].disabled = true;
}
else {
Expand Down Expand Up @@ -4853,16 +4855,16 @@ JSONEditor.defaults.editors.select = JSONEditor.AbstractEditor.extend({
this.container.appendChild(this.control);

this.value = this.enum_values[0];
},
postBuild: function() {
this._super();
this.theme.afterInputReady(this.input);

// If the Select2 library is loaded use it when we have lots of items
if(window.jQuery && window.jQuery.fn && window.jQuery.fn.select2 && this.enum_options.length > 2) {
window.jQuery(this.input).select2();
}
},
postBuild: function() {
this._super();
this.theme.afterInputReady(this.input);
},
enable: function() {
if(!this.always_disabled) this.input.disabled = false;
this._super();
Expand Down
8 changes: 4 additions & 4 deletions dist/jsoneditor.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/editors/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({

if(this.format === 'grid') {
var rows = [];
$each(this.property_order, function(i,key) {
$each(this.property_order, function(j,key) {
var editor = self.editors[key];
if(editor.property_removed) return;
var found = false;
Expand Down
4 changes: 2 additions & 2 deletions src/intro.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*! JSON Editor v0.7.5 - JSON Schema -> HTML Editor
/*! JSON Editor v0.7.6 - JSON Schema -> HTML Editor
* By Jeremy Dorn - https://github.com/jdorn/json-editor/
* Released under the MIT license
*
* Date: 2014-08-10
* Date: 2014-08-15
*/

/**
Expand Down

0 comments on commit afc9112

Please sign in to comment.