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 5746317BFD for ; Thu, 17 Sep 2015 21:15:15 +0000 (UTC) Received: (qmail 46586 invoked by uid 500); 17 Sep 2015 21:15:12 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 46536 invoked by uid 500); 17 Sep 2015 21:15:12 -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 46525 invoked by uid 99); 17 Sep 2015 21:15:12 -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, 17 Sep 2015 21:15:12 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 828CDE10B1; Thu, 17 Sep 2015 21:15:11 +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: <4f1ae6b661564ba69a6634fb70d032e1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: fauxton commit: updated refs/heads/master to a8d8886 Date: Thu, 17 Sep 2015 21:15:11 +0000 (UTC) Repository: couchdb-fauxton Updated Branches: refs/heads/master a84deac1d -> a8d8886e8 Passes the database info to doc editor buttons This just saves extensions having to wait for the doc to load to get the database name. Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/a8d8886e Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/a8d8886e Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/a8d8886e Branch: refs/heads/master Commit: a8d8886e876f7254cdf7c7cf35d441c86d2d024b Parents: a84deac Author: Ben Keen Authored: Thu Sep 17 13:31:58 2015 -0700 Committer: Ben Keen Committed: Thu Sep 17 13:31:58 2015 -0700 ---------------------------------------------------------------------- app/addons/documents/doc-editor/components.react.jsx | 4 ++-- .../doc-editor/tests/doc-editor.componentsSpec.react.jsx | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a8d8886e/app/addons/documents/doc-editor/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/doc-editor/components.react.jsx b/app/addons/documents/doc-editor/components.react.jsx index e4a4a79..252654c 100644 --- a/app/addons/documents/doc-editor/components.react.jsx +++ b/app/addons/documents/doc-editor/components.react.jsx @@ -25,7 +25,7 @@ define([ cloneDocModalVisible: store.isCloneDocModalVisible(), uploadModalVisible: store.isUploadModalVisible(), deleteDocModalVisible: store.isDeleteDocModalVisible(), - numFilesUploaded: store.getNumFilesUploaded(), + numFilesUploaded: store.getNumFilesUploaded() }; }, @@ -158,7 +158,7 @@ define([ getExtensionIcons: function () { var extensions = FauxtonAPI.getExtensions('DocEditor:icons'); return _.map(extensions, function (Extension, i) { - return (); + return (); }, this); }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a8d8886e/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.react.jsx b/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.react.jsx index 15258e2..c8d3d83 100644 --- a/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.react.jsx +++ b/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.react.jsx @@ -55,6 +55,7 @@ define([ }; var database = { + id: 'id', safeID: function () { return 'id'; } }; @@ -190,7 +191,10 @@ define([ var CustomButton = React.createClass({ render: function () { return ( - +
+ + {this.props.database.id} +
); } }); @@ -199,6 +203,10 @@ define([ var container = document.createElement('div'); var el = TestUtils.renderIntoDocument(, container); assert.isTrue(/Oh\sno\sshe\sdi'n't!/.test(el.getDOMNode().outerHTML)); + + // confirm the database name was also included + assert.equal($(el.getDOMNode()).find("#testDatabaseName").html(), database.id); + React.unmountComponentAtNode(container); }); });