couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [2/2] fauxton commit: updated refs/heads/master to 0c07ddc
Date Wed, 09 Mar 2016 13:01:58 GMT
apply style tweaks

apply style tweaks by Justin McDavid @justin-mcdavid-ibm

PR: #657
PR-URL: https://github.com/apache/couchdb-fauxton/pull/657
Reviewed-By: Benjamin Keen <ben.keen@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/0c07ddc4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/0c07ddc4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/0c07ddc4

Branch: refs/heads/master
Commit: 0c07ddc432c12895310592b0c46729feaac958db
Parents: 98a5462
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Tue Mar 1 13:31:07 2016 +0000
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Wed Mar 9 13:01:40 2016 +0000

----------------------------------------------------------------------
 .../components/react-components.react.jsx       | 22 +++++++++++++-------
 .../tests/nightwatch/deleteDatabaseModal.js     |  8 +++----
 2 files changed, 19 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c07ddc4/app/addons/components/react-components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/components/react-components.react.jsx b/app/addons/components/react-components.react.jsx
index a39ed7b..6ff8c97 100644
--- a/app/addons/components/react-components.react.jsx
+++ b/app/addons/components/react-components.react.jsx
@@ -1448,6 +1448,10 @@ function (app, FauxtonAPI, React, ReactDOM, Actions, Stores, FauxtonComponents,
       this.props.showHide({showModal: true});
     },
 
+    getDatabaseName: function () {
+      return this.props.modalProps.dbId.trim();
+    },
+
     onInputChange: function (e) {
       var val = encodeURIComponent(e.target.value.trim());
 
@@ -1456,19 +1460,19 @@ function (app, FauxtonAPI, React, ReactDOM, Actions, Stores, FauxtonComponents,
       });
 
       this.setState({
-        disableSubmit: val !== this.props.modalProps.dbId.trim()
+        disableSubmit: val !== this.getDatabaseName()
       });
     },
 
     onDeleteClick: function (e) {
       e.preventDefault();
 
-      Actions.deleteDatabase(this.props.modalProps.dbId.trim());
+      Actions.deleteDatabase(this.getDatabaseName());
     },
 
     onInputKeypress: function (e) {
       if (e.keyCode === 13 && this.state.disableSubmit !== true) {
-        Actions.deleteDatabase(this.props.modalProps.dbId.trim());
+        Actions.deleteDatabase(this.getDatabaseName());
       }
     },
 
@@ -1504,15 +1508,19 @@ function (app, FauxtonAPI, React, ReactDOM, Actions, Stores, FauxtonComponents,
 
           </Modal.Body>
           <Modal.Footer>
-            <button onClick={this.close} className="btn cancel-button">
-              <i className="icon fonticon-cancel-circled"></i> Cancel
-            </button>
+            <a
+              style={{marginRight: '10px', cursor: 'pointer'}}
+              onClick={this.close}
+              data-bypass="true"
+            >
+              Cancel
+            </a>
             <button
               disabled={this.state.disableSubmit}
               onClick={this.onDeleteClick}
               className="btn btn-danger delete"
             >
-              <i className="icon fonticon-ok-circled"></i> Delete
+              <i className="icon fonticon-cancel-circled"></i> Delete
             </button>
           </Modal.Footer>
         </Modal>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c07ddc4/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js b/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js
index 5a78d92..77b3a1c 100644
--- a/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js
+++ b/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js
@@ -37,8 +37,8 @@ module.exports = {
       .clickWhenVisible("#header-dropdown-menu a.dropdown-toggle.icon.fonticon-vertical-ellipsis",
waitTime, false)
       .waitForElementPresent("#header-dropdown-menu .fonticon-trash", waitTime, false)
       .clickWhenVisible('#header-dropdown-menu .fonticon-trash', waitTime, false)
-      .waitForElementPresent('#delete-db-modal', waitTime, false)
-      .waitForElementVisible('input#db-name', waitTime, false)
+      .waitForElementVisible('.delete-db-modal', waitTime, false)
+      .waitForElementVisible('.delete-db-modal input[type="text"]', waitTime, false)
       .assert.elementPresent('.warning')
     .end();
   },
@@ -54,8 +54,8 @@ module.exports = {
       .clickWhenVisible('#header-dropdown-menu a.dropdown-toggle.icon.fonticon-vertical-ellipsis',
waitTime, false)
       .waitForElementPresent("#header-dropdown-menu .fonticon-trash", waitTime, false)
       .clickWhenVisible('#header-dropdown-menu .fonticon-trash', waitTime, false)
-      .waitForElementPresent('#delete-db-modal', waitTime, false)
-      .waitForElementVisible('input#db-name', waitTime, false)
+      .waitForElementVisible('.delete-db-modal', waitTime, false)
+      .waitForElementVisible('.delete-db-modal input[type="text"]', waitTime, false)
       .assert.elementNotPresent('.warning')
     .end();
   }


Mime
View raw message