Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
071bc070
Commit
071bc070
authored
Apr 01, 2011
by
Dimitris Moraitis
Browse files
add indexOf method if not supported (IE compat)
parent
6e3c3c30
Changes
1
Hide whitespace changes
Inline
Side-by-side
ui/static/synnefo.js
View file @
071bc070
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment