You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2014/08/26 18:24:15 UTC

[6/7] fauxton commit: updated refs/heads/master to 6c9a5a6

API URL style updates, added Velocity.js (http://julian.com/research/velocity/) for use on animated transitions


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

Branch: refs/heads/master
Commit: 3e6ab2e4f09da7609ebe9dc5acae0e6421057e26
Parents: ab8004d
Author: sean barclay <fu...@hotmail.com>
Authored: Fri Aug 22 23:36:31 2014 -0700
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Aug 26 18:23:44 2014 +0200

----------------------------------------------------------------------
 app/addons/fauxton/base.js           |   17 +-
 app/app.js                           |    6 +-
 app/config.js                        |   10 +-
 assets/js/plugins/jquery.velocity.js | 3430 +++++++++++++++++++++++++++++
 assets/js/plugins/velocity.ui.js     |  664 ++++++
 assets/less/fauxton.less             |   54 +-
 assets/less/variables.less           |    2 +
 7 files changed, 4154 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3e6ab2e4/app/addons/fauxton/base.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/base.js b/app/addons/fauxton/base.js
index a961b8b..e890c1a 100644
--- a/app/addons/fauxton/base.js
+++ b/app/addons/fauxton/base.js
@@ -15,10 +15,12 @@ define([
   "api",
   "addons/fauxton/resizeColumns",
   "addons/fauxton/components",
-  "plugins/zeroclipboard/ZeroClipboard"
+  "plugins/zeroclipboard/ZeroClipboard",
+  "velocity",
+  "velocity.ui"
 ],
 
-function(app, FauxtonAPI, resizeColumns, Components, ZeroClipboard) {
+function(app, FauxtonAPI, resizeColumns, Components, ZeroClipboard, velocity) {
 
   var Fauxton = FauxtonAPI.addon();
   FauxtonAPI.addNotification = function (options) {
@@ -288,7 +290,8 @@ function(app, FauxtonAPI, resizeColumns, Components, ZeroClipboard) {
     },
 
     hideAPIbar: function () {
-      this.$('.api-navbar').hide();
+      this.$('.api-navbar').velocity("reverse", 250);
+
       this.apiBarVisible = false;
     },
 
@@ -298,11 +301,15 @@ function(app, FauxtonAPI, resizeColumns, Components, ZeroClipboard) {
 
       if (this.apiBarVisible) {
         this.apiBarVisible = false;
+        
+        this.$('.api-navbar')
+        .velocity("reverse", 250);
       } else {
         this.apiBarVisible = true;
+        
+        this.$('.api-navbar')
+        .velocity("transition.slideUpIn", 250);
       }
-      this.$('.api-navbar').toggle();
-      console.log('ap', this.apiBarVisible);
     },
 
     serialize: function() {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3e6ab2e4/app/app.js
----------------------------------------------------------------------
diff --git a/app/app.js b/app/app.js
index 3ec2c99..8635eac 100644
--- a/app/app.js
+++ b/app/app.js
@@ -27,11 +27,11 @@ define([
   "core/couchdbSession",
   // Plugins.
   "plugins/backbone.layoutmanager",
-  "plugins/jquery.form"
-
+  "plugins/jquery.form",
+  "velocity"
 ],
 
-function(app, $, _, Backbone, Bootstrap, Helpers, Utils, FauxtonAPI, Couchdb) {
+function(app, $, _, Backbone, Bootstrap, Helpers, Utils, FauxtonAPI, Couchdb, velocity) {
   // Make sure we have a console.log
   if (typeof console == "undefined") {
     console = {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3e6ab2e4/app/config.js
----------------------------------------------------------------------
diff --git a/app/config.js b/app/config.js
index edcd9a2..1a8a190 100644
--- a/app/config.js
+++ b/app/config.js
@@ -31,7 +31,9 @@ require.config({
     d3: "../assets/js/libs/d3",
     "nv.d3": "../assets/js/libs/nv.d3",
     "ace":"../assets/js/libs/ace",
-    "cloudant.pagingcollection": "../assets/js/plugins/cloudant.pagingcollection"
+    "cloudant.pagingcollection": "../assets/js/plugins/cloudant.pagingcollection",
+    "velocity": "../assets/js/plugins/jquery.velocity",
+    "velocity.ui": "../assets/js/plugins/velocity.ui",
   },
 
   baseUrl: '/',
@@ -58,7 +60,11 @@ require.config({
     "plugins/prettify": [],
     "plugins/beautify": [],
 
-    "plugins/jquery.form": ["jquery"]
+    "plugins/jquery.form": ["jquery"],
+
+    "velocity": ["jquery"],
+
+    "velocity.ui": ["jquery"]
   }
 });