couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From benk...@apache.org
Subject [2/2] fauxton commit: updated refs/heads/master to b2195ac
Date Fri, 27 Nov 2015 18:50:26 GMT
whitespace, single quotes


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

Branch: refs/heads/master
Commit: b2195ac7de0954e0095e6cd957db58a1f1f7e8e7
Parents: 8311d62
Author: Ben Keen <ben.keen@gmail.com>
Authored: Fri Nov 27 10:13:26 2015 -0800
Committer: Ben Keen <ben.keen@gmail.com>
Committed: Fri Nov 27 10:13:26 2015 -0800

----------------------------------------------------------------------
 app/addons/auth/base.js | 54 +++++++++++++++++++++-----------------------
 1 file changed, 26 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b2195ac7/app/addons/auth/base.js
----------------------------------------------------------------------
diff --git a/app/addons/auth/base.js b/app/addons/auth/base.js
index a0af863..b8ab540 100644
--- a/app/addons/auth/base.js
+++ b/app/addons/auth/base.js
@@ -11,9 +11,9 @@
 // the License.
 
 define([
-  "app",
-  "api",
-  "addons/auth/routes"
+  'app',
+  'api',
+  'addons/auth/routes'
 ],
 
 function (app, FauxtonAPI, Auth) {
@@ -25,10 +25,10 @@ function (app, FauxtonAPI, Auth) {
   Auth.initialize = function () {
 
     FauxtonAPI.addHeaderLink({
-      id: "auth",
-      title: "Login",
-      href: "#login",
-      icon: "fonticon-user",
+      id: 'auth',
+      title: 'Login',
+      href: '#login',
+      icon: 'fonticon-user',
       bottomNav: true
     });
 
@@ -38,44 +38,42 @@ function (app, FauxtonAPI, Auth) {
 
       if (session.isAdminParty()) {
         link = {
-          id: "auth",
-          title: "Admin Party!",
-          href: "#createAdmin",
-          icon: "fonticon-user",
+          id: 'auth',
+          title: 'Admin Party!',
+          href: '#createAdmin',
+          icon: 'fonticon-user',
           bottomNav: true
         };
       } else if (session.isLoggedIn()) {
         link = {
-          id: "auth",
+          id: 'auth',
           title: session.user().name,
-          href: "#changePassword",
-          icon: "fonticon-user",
+          href: '#changePassword',
+          icon: 'fonticon-user',
           bottomNav: true
         };
 
         // ensure the footer link is removed before adding it
-        FauxtonAPI.removeHeaderLink({id: "logout", footerNav: true});
-
+        FauxtonAPI.removeHeaderLink({ id: 'logout', footerNav: true });
         FauxtonAPI.addHeaderLink({
           id: 'logout',
           footerNav: true,
-          href: "#logout",
-          title: "Logout",
-          icon: "",
+          href: '#logout',
+          title: 'Logout',
+          icon: '',
           className: 'logout'
         });
       } else {
         link = {
-          id: "auth",
+          id: 'auth',
           title: 'Login',
-          href: "#login",
-          icon: "fonticon-user",
-          bottomNav: true,
+          href: '#login',
+          icon: 'fonticon-user',
+          bottomNav: true
         };
-        FauxtonAPI.removeHeaderLink({id: "logout", footerNav: true});
+        FauxtonAPI.removeHeaderLink({ id: 'logout', footerNav: true });
       }
       FauxtonAPI.updateHeaderLink(link);
-
     });
 
     Auth.session.fetchUser().then(function () {
@@ -86,10 +84,10 @@ function (app, FauxtonAPI, Auth) {
       var deferred = $.Deferred();
 
       if (session.isAdminParty()) {
-        session.trigger("authenticated");
+        session.trigger('authenticated');
         deferred.resolve();
       } else if (session.matchesRoles(roles)) {
-        session.trigger("authenticated");
+        session.trigger('authenticated');
         deferred.resolve();
       } else {
         deferred.reject();
@@ -105,7 +103,7 @@ function (app, FauxtonAPI, Auth) {
       if (pattern.test(url)) {
         url = url.replace('login?urlback=', '');
       }
-      FauxtonAPI.navigate('/login?urlback=' + url, {replace: true});
+      FauxtonAPI.navigate('/login?urlback=' + url, { replace: true });
     };
 
     FauxtonAPI.auth.registerAuth(auth);


Mime
View raw message