You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/07/31 23:43:28 UTC

[38/51] [abbrv] futon commit: updated refs/heads/import-master to 53a86dd

Use $.inArray instead of indexOf for IE8 compatibility.

Signed-off-by: Alexander Shorin <kx...@apache.org>


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

Branch: refs/heads/import-master
Commit: d68d03eee1d203fa26f8e4c4054146ae09c7686c
Parents: f73f7db
Author: Keith Gable <kg...@decisionpt.com>
Authored: Mon Mar 3 14:00:11 2014 -0600
Committer: Alexander Shorin <kx...@apache.org>
Committed: Tue Mar 4 15:10:43 2014 +0400

----------------------------------------------------------------------
 script/futon.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-futon/blob/d68d03ee/script/futon.js
----------------------------------------------------------------------
diff --git a/script/futon.js b/script/futon.js
index e2e0aaf..409becc 100644
--- a/script/futon.js
+++ b/script/futon.js
@@ -240,7 +240,7 @@ function $$(node) {
           if (userCtx.name) {
             $("#userCtx .name").text(userCtx.name).attr({href : $.couch.urlPrefix + "/_utils/document.html?"+encodeURIComponent(r.info.authentication_db)+"/org.couchdb.user%3A"+encodeURIComponent(userCtx.name)});
 
-            if (userCtx.roles.indexOf("_admin") != -1) {
+            if ($.inArray("_admin", userCtx.roles) != -1) {
               $("#userCtx .loggedin").show();
               $("#userCtx .loggedinadmin").show();
               $(".serverAdmin").removeAttr('disabled'); // user is a server admin
@@ -266,7 +266,7 @@ function $$(node) {
                 }); 
               }
             }
-          } else if (userCtx.roles.indexOf("_admin") != -1) {
+          } else if ($.inArray("_admin", userCtx.roles) != -1) {
             $("#userCtx .adminparty").show();
             $(".serverAdmin").removeAttr('disabled');
           } else {