summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Gable <kgable@decisionpt.com>2014-03-03 14:00:11 -0600
committerAlexander Shorin <kxepal@apache.org>2014-03-04 15:10:43 +0400
commit77724c94b959ebe4feb124e21dfbad504f50f824 (patch)
tree3a7e4121f7d8c4a4d46dc54b42d8913b7c8ccbb8
parentb22f2a48c48f3cfa9b4c082cfee87b76e8d44c37 (diff)
downloadcouchdb-77724c94b959ebe4feb124e21dfbad504f50f824.tar.gz
Use $.inArray instead of indexOf for IE8 compatibility.
Signed-off-by: Alexander Shorin <kxepal@apache.org>
-rw-r--r--share/www/script/futon.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/www/script/futon.js b/share/www/script/futon.js
index e2e0aaf36..409becc50 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 {