diff options
-rw-r--r-- | share/www/script/futon.browse.js | 9 | ||||
-rw-r--r-- | share/www/script/jquery.editinline.js | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/share/www/script/futon.browse.js b/share/www/script/futon.browse.js index cff08c8c..6f90b5a8 100644 --- a/share/www/script/futon.browse.js +++ b/share/www/script/futon.browse.js @@ -866,6 +866,10 @@ } return $("<input type='text' spellcheck='false'>"); }, + end: function() { + $(this).children().remove(); + $(this).append(_renderValue(doc[row.data("name")])); + }, prepareInput: function(input) { if ($(input).is("textarea")) { $(input).makeResizable({vertical: true}); @@ -873,10 +877,7 @@ }, accept: function(newValue) { doc[row.data("name")] = JSON.parse(newValue); - $(this).children().remove(); page.isDirty = true; - var value = _renderValue(doc[row.data("name")]); - $(this).append(value); }, populate: function(value) { return $.futon.formatJSON(doc[row.data("name")]); @@ -904,7 +905,7 @@ var list = $("<dl></dl>"); for (var i in val) { $("<dt></dt>").text(i).appendTo(list); - $("<dd></dd>").append(_renderValue(val[i])).appendTo(list); + $("<dd></dd>").append(render(val[i])).appendTo(list); } return list; } else { diff --git a/share/www/script/jquery.editinline.js b/share/www/script/jquery.editinline.js index 3f1f85e3..e97abe1d 100644 --- a/share/www/script/jquery.editinline.js +++ b/share/www/script/jquery.editinline.js @@ -57,7 +57,7 @@ input.remove(); tools.remove(); options.accept.apply(elem, [newText, origText]); - editable.removeClass("editinline-container") + editable.removeClass("editinline-container"); options.end.apply(elem, [keyCode]); return true; } |