Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 39cba4997 -> c74ea9cc4


support disabled state in confirmbutton

PR: #728
PR-URL: https://github.com/apache/couchdb-fauxton/pull/728
Reviewed-By: garren smith <garren.sm...@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/c74ea9cc
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/c74ea9cc
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/c74ea9cc

Branch: refs/heads/master
Commit: c74ea9cc4b712e1ad103d8ce638ebfede3125c1e
Parents: 6a44295
Author: Robert Kowalski <robertkowal...@apache.org>
Authored: Fri Jun 10 11:59:17 2016 +0200
Committer: Robert Kowalski <robertkowal...@apache.org>
Committed: Mon Jun 13 16:07:06 2016 +0200

----------------------------------------------------------------------
 app/addons/components/react-components.react.jsx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/c74ea9cc/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 34ec668..ee297d2 100644
--- a/app/addons/components/react-components.react.jsx
+++ b/app/addons/components/react-components.react.jsx
@@ -1108,7 +1108,7 @@ var LoadLines = React.createClass({
   }
 });
 
-var ConfirmButton = React.createClass({
+const ConfirmButton = React.createClass({
   propTypes: {
     showIcon: React.PropTypes.bool,
     id: React.PropTypes.string,
@@ -1116,11 +1116,13 @@ var ConfirmButton = React.createClass({
     style: React.PropTypes.object,
     buttonType: React.PropTypes.string,
     'data-id': React.PropTypes.string,
-    onClick: React.PropTypes.func
+    onClick: React.PropTypes.func,
+    disabled: React.PropTypes.bool,
   },
 
   getDefaultProps: function () {
     return {
+      disabled: false,
       showIcon: true,
       customIcon: 'fonticon-ok-circled',
       buttonType: 'btn-success',
@@ -1140,11 +1142,12 @@ var ConfirmButton = React.createClass({
   },
 
   render: function () {
-    const { onClick, buttonType, id, style, text } = this.props;
+    const { onClick, buttonType, id, style, text, disabled } = this.props;
     return (
       <button
         onClick={onClick}
         type="submit"
+        disabled={disabled}
         data-id={this.props['data-id']}
         className={'btn save ' + buttonType}
         id={id}

Reply via email to