couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject [03/12] couchdb commit: updated refs/heads/2128-autocomplete-section-name to 6e93561
Date Thu, 06 Mar 2014 21:32:10 GMT
Use $.inArray instead of indexOf for IE8 compatibility.

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


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

Branch: refs/heads/2128-autocomplete-section-name
Commit: 77724c94b959ebe4feb124e21dfbad504f50f824
Parents: b22f2a4
Author: Keith Gable <kgable@decisionpt.com>
Authored: Mon Mar 3 14:00:11 2014 -0600
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Tue Mar 4 15:10:43 2014 +0400

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


http://git-wip-us.apache.org/repos/asf/couchdb/blob/77724c94/share/www/script/futon.js
----------------------------------------------------------------------
diff --git a/share/www/script/futon.js b/share/www/script/futon.js
index e2e0aaf..409becc 100644
--- a/share/www/script/futon.js
+++ b/share/www/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 {


Mime
View raw message