You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by am...@apache.org on 2019/01/08 19:53:25 UTC

[couchdb-fauxton] branch master updated: Make only header clickable in the JSON view (#1164)

This is an automated email from the ASF dual-hosted git repository.

amaranhao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-fauxton.git


The following commit(s) were added to refs/heads/master by this push:
     new a8bc299  Make only header clickable in the JSON view (#1164)
a8bc299 is described below

commit a8bc299aaa1bf0b56b06cd55c8451227ca6a3ccd
Author: Antonio Maranhao <30...@users.noreply.github.com>
AuthorDate: Tue Jan 8 14:53:21 2019 -0500

    Make only header clickable in the JSON view (#1164)
    
    * Make only header clickable in the JSON view
    
    * Updated test
---
 app/addons/components/__tests__/doc.test.js  | 2 +-
 app/addons/components/assets/less/docs.less  | 2 +-
 app/addons/components/components/document.js | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/addons/components/__tests__/doc.test.js b/app/addons/components/__tests__/doc.test.js
index b403058..2f6fb11 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 44f60f2..a148d08 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 4dd3312..c664ee2 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>