couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject fauxton commit: updated refs/heads/master to 05e16ce
Date Tue, 26 Aug 2014 16:40:06 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 49b0ca430 -> 05e16ce04


Hide api bar correctly when api-url-btn clicked


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

Branch: refs/heads/master
Commit: 05e16ce047494e563a8215767ceebed6d599f994
Parents: 49b0ca4
Author: Garren Smith <garren.smith@gmail.com>
Authored: Tue Aug 26 18:39:53 2014 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Tue Aug 26 18:39:53 2014 +0200

----------------------------------------------------------------------
 app/addons/fauxton/base.js | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/05e16ce0/app/addons/fauxton/base.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/base.js b/app/addons/fauxton/base.js
index 207a0f6..8f27d1c 100644
--- a/app/addons/fauxton/base.js
+++ b/app/addons/fauxton/base.js
@@ -268,7 +268,7 @@ function(app, FauxtonAPI, resizeColumns, Components, ZeroClipboard, velocity)
{
     documentation: 'docs',
 
     events:  {
-      "click .api-url-btn" : "toggleAPIbar"
+      "click .api-url-btn" : "showAPIbar"
     },
     
     initialize: function () {
@@ -302,10 +302,11 @@ function(app, FauxtonAPI, resizeColumns, Components, ZeroClipboard,
velocity) {
       });
     },
 
-    toggleAPIbar: function(event){
-      if (this.navbarVisible()) {
-        this.$('.api-navbar').velocity("reverse", 250);
-      } else {
+    //we only need to show the api-bar here. The `click.apibar` event 
+    //in the initialize will close the api bar if a user clicks the api button
+    //and the api bar is visible.
+    showAPIbar: function(event){
+      if (!this.navbarVisible()) {
         this.$('.api-navbar').velocity("transition.slideDownIn", 250);
       }
     },


Mime
View raw message