Skip to content

Commit

Permalink
Index editor fixes
Browse files Browse the repository at this point in the history
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
  • Loading branch information
benkeen committed May 21, 2015
1 parent 5149d52 commit ef6b8f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/addons/documents/index-editor/components.react.jsx
Expand Up @@ -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">
Expand All @@ -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}>
Expand Down
6 changes: 5 additions & 1 deletion app/addons/documents/mango/mango.components.react.jsx
Expand Up @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit ef6b8f0

Please sign in to comment.