couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From benk...@apache.org
Subject fauxton commit: updated refs/heads/master to 7d0d2dc
Date Mon, 13 Apr 2015 18:46:15 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master fb8387ea6 -> 7d0d2dc10


Beautify tooltip bug fix

Fixes a small bug where the tooltip for the Beautify button on the
Edit Index page sometimes doesn't disappear after clicking it.
Also moved the tooltip to the right to prevent overlapping, reduced
the button size a little (it was larger than the main buttons on
the page) and removed a wayward semicolon.


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

Branch: refs/heads/master
Commit: 7d0d2dc10e1e8488f8e69fab00905313cf96b767
Parents: fb8387e
Author: Ben Keen <ben.keen@gmail.com>
Authored: Thu Apr 9 14:41:09 2015 -0700
Committer: Ben Keen <ben.keen@gmail.com>
Committed: Mon Apr 13 11:49:04 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7d0d2dc1/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 c5c56f0..fd4e2f5 100644
--- a/app/addons/components/react-components.react.jsx
+++ b/app/addons/components/react-components.react.jsx
@@ -89,7 +89,7 @@ function (app, FauxtonAPI, React, Components, beautifyHelper) {
             target="_blank"
           >
           <i className="icon-question-sign"></i>
-          </a>;
+          </a>
         </label>
       );
     },
@@ -138,16 +138,12 @@ function (app, FauxtonAPI, React, Components, beautifyHelper) {
     },
 
     canBeautify: function () {
-      if (this.noOfLines() === 1) {
-        return true;
-      }
-
-      return false;
+      return this.noOfLines() === 1;
     },
 
     addTooltip: function () {
       if (this.canBeautify) {
-        $('.beautify-tooltip').tooltip();
+        $('.beautify-tooltip').tooltip({ placement: 'right' });
       }
     },
 
@@ -159,7 +155,7 @@ function (app, FauxtonAPI, React, Components, beautifyHelper) {
       event.preventDefault();
       var beautifiedCode = beautifyHelper(this.props.code);
       this.props.beautifiedCode(beautifiedCode);
-
+      $('.beautify-tooltip').tooltip('hide');
     },
 
     render: function () {
@@ -170,7 +166,7 @@ function (app, FauxtonAPI, React, Components, beautifyHelper) {
       return (
         <button
           onClick={this.beautify}
-          className="beautify beautify_map btn btn-primary btn-large beautify-tooltip"
+          className="beautify beautify_map btn btn-primary beautify-tooltip"
           type="button"
           data-toggle="tooltip"
           title="Reformat your minified code to make edits to it."


Mime
View raw message