aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2014-04-01 13:09:30 +0000
committerplegall <plg@piwigo.org>2014-04-01 13:09:30 +0000
commit734fef130abb10d63f2c81e4f7ed5728af841ffe (patch)
tree9963db171b2b0306477d8ac8bc89f7b454e31078
parenta6820e70bde7afc3e1b7ea537e4aff530675299b (diff)
bug 3068 fixed: on Internet Explorer 8, indexOf function is broken.
git-svn-id: http://piwigo.org/svn/branches/2.6@28038 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/themes/default/js/common.js23
-rw-r--r--admin/themes/default/template/user_list.tpl4
2 files changed, 25 insertions, 2 deletions
diff --git a/admin/themes/default/js/common.js b/admin/themes/default/js/common.js
index a017115db..0f6435387 100644
--- a/admin/themes/default/js/common.js
+++ b/admin/themes/default/js/common.js
@@ -8,6 +8,29 @@ function str_repeat(i, m) {
return o.join('');
}
+if (!Array.prototype.indexOf)
+{
+ Array.prototype.indexOf = function(elt /*, from*/)
+ {
+ var len = this.length;
+
+ var from = Number(arguments[1]) || 0;
+ from = (from < 0)
+ ? Math.ceil(from)
+ : Math.floor(from);
+ if (from < 0)
+ from += len;
+
+ for (; from < len; from++)
+ {
+ if (from in this &&
+ this[from] === elt)
+ return from;
+ }
+ return -1;
+ };
+}
+
function sprintf() {
var i = 0, a, f = arguments[i++], o = [], m, p, c, x, s = '';
while (f) {
diff --git a/admin/themes/default/template/user_list.tpl b/admin/themes/default/template/user_list.tpl
index 0fb47a0fc..4aba9580a 100644
--- a/admin/themes/default/template/user_list.tpl
+++ b/admin/themes/default/template/user_list.tpl
@@ -30,8 +30,8 @@ var protectedUsers = [{$protected_users}];
var guestUser = {$guest_user};
var truefalse = {
- true:"{'Yes'|translate}",
- false:"{'No'|translate}",
+ 'true':"{'Yes'|translate}",
+ 'false':"{'No'|translate}",
};
{/footer_script}