Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 86412 invoked from network); 26 Jan 2009 20:53:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Jan 2009 20:53:04 -0000 Received: (qmail 96299 invoked by uid 500); 26 Jan 2009 20:53:04 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 96275 invoked by uid 500); 26 Jan 2009 20:53:04 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 96265 invoked by uid 99); 26 Jan 2009 20:53:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jan 2009 12:53:04 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jan 2009 20:53:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9ADB72388896; Mon, 26 Jan 2009 20:52:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r737834 - in /couchdb/trunk/share/www/script: futon.browse.js jquery.editinline.js Date: Mon, 26 Jan 2009 20:52:43 -0000 To: commits@couchdb.apache.org From: cmlenz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090126205243.9ADB72388896@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cmlenz Date: Mon Jan 26 20:52:43 2009 New Revision: 737834 URL: http://svn.apache.org/viewvc?rev=737834&view=rev Log: Fix expanding/collapsing nested structures in Futon, as well as expanding/collapsing after cancelling an in-place edit. Modified: couchdb/trunk/share/www/script/futon.browse.js couchdb/trunk/share/www/script/jquery.editinline.js Modified: couchdb/trunk/share/www/script/futon.browse.js URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/futon.browse.js?rev=737834&r1=737833&r2=737834&view=diff ============================================================================== --- couchdb/trunk/share/www/script/futon.browse.js [utf-8] (original) +++ couchdb/trunk/share/www/script/futon.browse.js [utf-8] Mon Jan 26 20:52:43 2009 @@ -866,6 +866,10 @@ } return $(""); }, + 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 = $("
"); for (var i in val) { $("
").text(i).appendTo(list); - $("
").append(_renderValue(val[i])).appendTo(list); + $("
").append(render(val[i])).appendTo(list); } return list; } else { Modified: couchdb/trunk/share/www/script/jquery.editinline.js URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/jquery.editinline.js?rev=737834&r1=737833&r2=737834&view=diff ============================================================================== --- couchdb/trunk/share/www/script/jquery.editinline.js (original) +++ couchdb/trunk/share/www/script/jquery.editinline.js Mon Jan 26 20:52:43 2009 @@ -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; }