Repository: couchdb-fauxton Updated Branches: refs/heads/master 5149d5279 -> ef6b8f070
Index editor fixes This makes two small fixes to the index-editor component. - the database name now shows up in the page - the database name now links to the database and doesn't throw a JS error in the page Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/ef6b8f07 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/ef6b8f07 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/ef6b8f07 Branch: refs/heads/master Commit: ef6b8f070fc604fba594e78b8c90dd2dc56a309e Parents: 5149d52 Author: Ben Keen <[email protected]> Authored: Wed May 20 15:27:16 2015 -0700 Committer: Ben Keen <[email protected]> Committed: Thu May 21 08:27:16 2015 -0700 ---------------------------------------------------------------------- app/addons/documents/index-editor/components.react.jsx | 4 ++-- app/addons/documents/mango/mango.components.react.jsx | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ef6b8f07/app/addons/documents/index-editor/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/index-editor/components.react.jsx b/app/addons/documents/index-editor/components.react.jsx index ed99757..2450f62 100644 --- a/app/addons/documents/index-editor/components.react.jsx +++ b/app/addons/documents/index-editor/components.react.jsx @@ -386,7 +386,7 @@ function (app, FauxtonAPI, React, Stores, Actions, Components, ReactComponents) ); } - var url = FauxtonAPI.urls('allDocs', this.state.database.id, ''); + var url = FauxtonAPI.urls('allDocs', 'app', this.state.database.id, ''); return ( <div className="define-view"> @@ -396,7 +396,7 @@ function (app, FauxtonAPI, React, Stores, Actions, Components, ReactComponents) <PaddedBorderedBox> <strong>Database</strong> <div className="db-title"> - <a href={url}>this.state.database.id</a> + <a href={url}>{this.state.database.id}</a> </div> </PaddedBorderedBox> <form className="form-horizontal view-query-save" onSubmit={this.saveView}> http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ef6b8f07/app/addons/documents/mango/mango.components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/mango/mango.components.react.jsx b/app/addons/documents/mango/mango.components.react.jsx index 468c189..b13874a 100644 --- a/app/addons/documents/mango/mango.components.react.jsx +++ b/app/addons/documents/mango/mango.components.react.jsx @@ -126,6 +126,8 @@ function (app, FauxtonAPI, React, Stores, Actions, }, render: function () { + var url = FauxtonAPI.urls('allDocs', 'app', this.props.dbName, ''); + return ( <div className="editor-wrapper span5 scrollable"> <PaddedBorderedBox> @@ -136,7 +138,9 @@ function (app, FauxtonAPI, React, Stores, Actions, </PaddedBorderedBox> <PaddedBorderedBox> <strong>Database</strong> - <div className="db-title">{this.props.dbName}</div> + <div className="db-title"> + <a href={url}>{this.props.dbName}</a> + </div> </PaddedBorderedBox> <form className="form-horizontal" onSubmit={this.props.onSubmit}> <PaddedBorderedBox>
