aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default/js
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2014-04-01 13:11:14 +0000
committerplegall <plg@piwigo.org>2014-04-01 13:11:14 +0000
commitad12822489d478829ef0c9e48a21b41c0364e6f3 (patch)
tree451b4f918f7355bc87f962ce2a70f42573a5f168 /admin/themes/default/js
parent0c5ffb41d027674ec9f238a9abd36021250230d8 (diff)
merge r28038 from branch 2.6 to trunk
bug 3068 fixed: on Internet Explorer 8, indexOf function is broken. git-svn-id: http://piwigo.org/svn/trunk@28039 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/themes/default/js')
-rw-r--r--admin/themes/default/js/common.js23
1 files changed, 23 insertions, 0 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) {