summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2009-01-26 20:52:43 +0000
committerChristopher Lenz <cmlenz@apache.org>2009-01-26 20:52:43 +0000
commit36e519fc8d2a406071173d4eda8bf0a64ce2968d (patch)
treeefc5bb048a99696a13c0af640eec262620cda665 /share/www
parente86159c4907c045ce72782e3ac37628242395137 (diff)
Fix expanding/collapsing nested structures in Futon, as well as expanding/collapsing after cancelling an in-place edit.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@737834 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/futon.browse.js9
-rw-r--r--share/www/script/jquery.editinline.js2
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;
}