Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
420b5200
Commit
420b5200
authored
Jan 23, 2007
by
Martyn Smith
Committed by
Martyn Smith
Jan 23, 2007
Browse files
Sync with upstream
parent
72e55192
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/js/MochiKit/DOM.js
View file @
420b5200
...
...
@@ -301,6 +301,13 @@ MochiKit.Base.update(MochiKit.DOM, {
if
(
typeof
(
node
)
==
'
undefined
'
||
node
===
null
)
{
return
null
;
}
// this is a safari childNodes object, avoiding crashes w/ attr
// lookup
if
(
typeof
(
node
)
==
"
function
"
&&
typeof
(
node
.
length
)
==
"
number
"
&&
!
(
node
instanceof
Function
))
{
node
=
im
.
list
(
node
);
}
if
(
typeof
(
node
.
nodeType
)
!=
'
undefined
'
&&
node
.
nodeType
>
0
)
{
return
node
;
}
...
...
htdocs/js/MochiKit/Iter.js
View file @
420b5200
...
...
@@ -415,11 +415,19 @@ MochiKit.Base.update(MochiKit.Iter, {
/** @id MochiKit.Iter.list */
list
:
function
(
iterable
)
{
// Fast-path for Array and Array-like
var
m
=
MochiKit
.
Base
;
if
(
typeof
(
iterable
.
slice
)
==
'
function
'
)
{
var
rval
;
if
(
iterable
instanceof
Array
)
{
return
iterable
.
slice
();
}
else
if
(
m
.
isArrayLike
(
iterable
))
{
return
m
.
concat
(
iterable
);
}
// this is necessary to avoid a Safari crash
if
(
typeof
(
iterable
)
==
"
function
"
&&
!
(
iterable
instanceof
Function
)
&&
typeof
(
iterable
.
length
)
==
'
number
'
)
{
rval
=
[];
for
(
var
i
=
0
;
i
<
iterable
.
length
;
i
++
)
{
rval
.
push
(
iterable
[
i
]);
}
return
rval
;
}
var
self
=
MochiKit
.
Iter
;
...
...
htdocs/js/MochiKit/Position.js
View file @
420b5200
...
...
@@ -244,3 +244,15 @@ MochiKit.Base.update(MochiKit.Position, {
return
new
MochiKit
.
Style
.
Coordinates
(
valueL
,
valueT
);
}
});
MochiKit
.
Position
.
__new__
=
function
(
win
)
{
var
m
=
MochiKit
.
Base
;
this
.
EXPORT_TAGS
=
{
'
:common
'
:
this
.
EXPORT
,
'
:all
'
:
m
.
concat
(
this
.
EXPORT
,
this
.
EXPORT_OK
)
};
m
.
nameFunctions
(
this
);
};
MochiKit
.
Position
.
__new__
(
this
);
\ No newline at end of file
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