Antonio-Maranhao closed pull request #1164: Make only header clickable in the
JSON view
URL: https://github.com/apache/couchdb-fauxton/pull/1164
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/app/addons/components/__tests__/doc.test.js
b/app/addons/components/__tests__/doc.test.js
index b403058df..2f6fb1150 100644
--- a/app/addons/components/__tests__/doc.test.js
+++ b/app/addons/components/__tests__/doc.test.js
@@ -72,7 +72,7 @@ describe('Document', () => {
el = mount(
<ReactComponents.Document docChecked={noop} isDeletable={true}
onClick={spy} docIdentifier="foo" />
);
- el.find('.doc-item').first().simulate('click');
+ el.find('.doc-item header').first().simulate('click');
expect(spy.calledOnce).toBeTruthy();
});
diff --git a/app/addons/components/assets/less/docs.less
b/app/addons/components/assets/less/docs.less
index 44f60f21d..a148d0885 100644
--- a/app/addons/components/assets/less/docs.less
+++ b/app/addons/components/assets/less/docs.less
@@ -21,7 +21,6 @@
div.doc-row {
margin-bottom: 20px;
.doc-item {
- cursor: pointer;
vertical-align: top;
position: relative;
.box-shadow(3px 4px 0 rgba(0, 0, 0, 0.3));
@@ -38,6 +37,7 @@
}
}
header {
+ cursor: pointer;
font-weight: bold;
position: relative;
padding: 5px 10px;
diff --git a/app/addons/components/components/document.js
b/app/addons/components/components/document.js
index 4dd331257..c664ee264 100644
--- a/app/addons/components/components/document.js
+++ b/app/addons/components/components/document.js
@@ -115,8 +115,8 @@ export class Document extends React.Component {
<div className="custom-inputs">
{this.getCheckbox()}
</div>
- <div className="doc-item" onClick={this.onClick}>
- <header>
+ <div className="doc-item">
+ <header onClick={this.onClick}>
<span className="header-keylabel">
{this.props.keylabel}
</span>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services