Commit 071bc070 authored by Dimitris Moraitis's avatar Dimitris Moraitis
Browse files

add indexOf method if not supported (IE compat)

parent 6e3c3c30
......@@ -15,6 +15,27 @@ function ISODateString(d){
pad(d.getUTCSeconds())
}
// indexOf prototype for IE
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 update_confirmations(){
// hide all confirm boxes to begin with
$('div.confirm_single').hide();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment