Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BE32017BD9 for ; Thu, 9 Apr 2015 22:43:29 +0000 (UTC) Received: (qmail 16630 invoked by uid 500); 9 Apr 2015 22:43:29 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 16580 invoked by uid 500); 9 Apr 2015 22:43:29 -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 16571 invoked by uid 99); 9 Apr 2015 22:43:29 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Apr 2015 22:43:29 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 71651DFF97; Thu, 9 Apr 2015 22:43:29 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: benkeen@apache.org To: commits@couchdb.apache.org Message-Id: <39e816bd7c824f65a6e1e7f1d06297f8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: fauxton commit: updated refs/heads/master to f95b7a0 Date: Thu, 9 Apr 2015 22:43:29 +0000 (UTC) Repository: couchdb-fauxton Updated Branches: refs/heads/master b5e634338 -> f95b7a07f Docs now fully collapse to single line This reduces selected documents to a single line containing only the ID, rather than show a subset of the doc with an ID and rev. Closes COUCHDB-2548 Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/f95b7a07 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/f95b7a07 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/f95b7a07 Branch: refs/heads/master Commit: f95b7a07f0eb4f13c59e1812a13517fe8ee4c6b7 Parents: b5e6343 Author: Ben Keen Authored: Thu Apr 9 10:51:35 2015 -0700 Committer: Ben Keen Committed: Thu Apr 9 15:44:38 2015 -0700 ---------------------------------------------------------------------- app/addons/components/react-components.react.jsx | 14 +++++++++++--- app/addons/components/tests/docSpec.react.jsx | 16 ++++++++++++++++ .../index-results.components.react.jsx | 1 - app/addons/documents/index-results/stores.js | 12 ++---------- .../index-results/tests/index-results.storesSpec.js | 4 ++-- 5 files changed, 31 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f95b7a07/app/addons/components/react-components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/react-components.react.jsx b/app/addons/components/react-components.react.jsx index 5209f0f..c5c56f0 100644 --- a/app/addons/components/react-components.react.jsx +++ b/app/addons/components/react-components.react.jsx @@ -249,6 +249,16 @@ function (app, FauxtonAPI, React, Components, beautifyHelper) { this.props.onDoubleClick(this.props.docIdentifier, this.props.doc, e); }, + getDocContent: function () { + if (!_.isEmpty(this.props.docContent)) { + return ( +
+
{this.props.docContent}
+
+ ); + } + }, + render: function () { return (
@@ -266,9 +276,7 @@ function (app, FauxtonAPI, React, Components, beautifyHelper) { {this.getUrlFragment()}
{this.getExtensionIcons()}
-
-
{this.props.docContent}
-
+ {this.getDocContent()}
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f95b7a07/app/addons/components/tests/docSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/docSpec.react.jsx b/app/addons/components/tests/docSpec.react.jsx index be1f7ce..3cf82a2 100644 --- a/app/addons/components/tests/docSpec.react.jsx +++ b/app/addons/components/tests/docSpec.react.jsx @@ -98,6 +98,22 @@ define([ assert.notOk($(el.getDOMNode()).find('input[type="checkbox"]').length); assert.ok($(el.getDOMNode()).find('.checkbox-dummy').length); }); + + it('contains a doc-data element when there\'s doc content', function () { + el = TestUtils.renderIntoDocument( + , + container + ); + assert.equal(1, $(el.getDOMNode()).find('.doc-data').length); + }); + + it('doesn\'t contain a doc-data element when there\'s no doc content', function () { + el = TestUtils.renderIntoDocument( + , + container + ); + assert.equal(0, $(el.getDOMNode()).find('.doc-data').length); + }); }); }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f95b7a07/app/addons/documents/index-results/index-results.components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/index-results/index-results.components.react.jsx b/app/addons/documents/index-results/index-results.components.react.jsx index 49dd643..f930f61 100644 --- a/app/addons/documents/index-results/index-results.components.react.jsx +++ b/app/addons/documents/index-results/index-results.components.react.jsx @@ -150,7 +150,6 @@ function (app, FauxtonAPI, React, Stores, Actions, Components, Documents) { if (this.state.hasResults) { view =