Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
610ac485
Commit
610ac485
authored
Mar 21, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more IE (crap) fixes
parent
32dc8391
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
48 deletions
+40
-48
share/http/js/functions.js
share/http/js/functions.js
+18
-12
share/http/js/mosaic.js
share/http/js/mosaic.js
+3
-9
share/http/js/vlm.js
share/http/js/vlm.js
+19
-27
No files found.
share/http/js/functions.js
View file @
610ac485
...
...
@@ -205,6 +205,12 @@ function checked( id ){ return document.getElementById( id ).checked; }
function
value
(
id
){
return
document
.
getElementById
(
id
).
value
;
}
function
setclass
(
obj
,
value
)
{
obj
.
setAttribute
(
'
class
'
,
value
);
/* Firefox */
obj
.
setAttribute
(
'
className
'
,
value
);
/* IE */
}
function
radio_value
(
name
)
{
var
radio
=
document
.
getElementsByName
(
name
);
...
...
@@ -220,7 +226,7 @@ function radio_value( name )
function
check_and_replace_int
(
id
,
val
)
{
var
objRegExp
=
/^
\d
\d
*
$/
;
var
objRegExp
=
/^
\d
+
$/
;
if
(
value
(
id
)
!=
''
&&
(
!
objRegExp
.
test
(
value
(
id
)
)
||
parseInt
(
value
(
id
)
)
<
1
)
)
...
...
@@ -461,21 +467,21 @@ function parse_status()
var
randomtag
=
status
.
getElementsByTagName
(
'
random
'
);
if
(
randomtag
.
length
>
0
?
randomtag
[
0
].
firstChild
.
data
==
"
1
"
:
0
)
document
.
getElementById
(
'
btn_shuffle
'
).
setAttribute
(
'
class
'
,
'
on
'
);
setclass
(
document
.
getElementById
(
'
btn_shuffle
'
)
,
'
on
'
);
else
document
.
getElementById
(
'
btn_shuffle
'
).
setAttribute
(
'
class
'
,
'
off
'
);
setclass
(
document
.
getElementById
(
'
btn_shuffle
'
)
,
'
off
'
);
var
looptag
=
status
.
getElementsByTagName
(
'
loop
'
);
if
(
looptag
.
length
>
0
?
looptag
[
0
].
firstChild
.
data
==
"
1
"
:
0
)
document
.
getElementById
(
'
btn_loop
'
).
setAttribute
(
'
class
'
,
'
on
'
);
setclass
(
document
.
getElementById
(
'
btn_loop
'
)
,
'
on
'
);
else
document
.
getElementById
(
'
btn_loop
'
).
setAttribute
(
'
class
'
,
'
off
'
);
setclass
(
document
.
getElementById
(
'
btn_loop
'
)
,
'
off
'
);
var
repeattag
=
status
.
getElementsByTagName
(
'
repeat
'
);
if
(
repeattag
.
length
>
0
?
repeattag
[
0
].
firstChild
.
data
==
"
1
"
:
0
)
document
.
getElementById
(
'
btn_repeat
'
).
setAttribute
(
'
class
'
,
'
on
'
);
setclass
(
document
.
getElementById
(
'
btn_repeat
'
)
,
'
on
'
);
else
document
.
getElementById
(
'
btn_repeat
'
).
setAttribute
(
'
class
'
,
'
off
'
);
setclass
(
document
.
getElementById
(
'
btn_repeat
'
)
,
'
off
'
);
var
tree
=
document
.
createElement
(
"
ul
"
);
var
categories
=
status
.
getElementsByTagName
(
'
category
'
);
...
...
@@ -558,7 +564,7 @@ function parse_playlist()
}
var
nd
=
document
.
createElement
(
"
div
"
);
nd
.
setAttribute
(
'
class
'
,
'
pl_node
'
);
setclass
(
nd
,
'
pl_node
'
);
nd
.
setAttribute
(
'
id
'
,
'
pl_
'
+
elt
.
getAttribute
(
'
id
'
)
);
pos
.
appendChild
(
nd
);
}
...
...
@@ -567,12 +573,12 @@ function parse_playlist()
if
(
pos
.
hasChildNodes
()
)
pos
.
appendChild
(
document
.
createElement
(
"
br
"
)
);
var
pl
=
document
.
createElement
(
"
a
"
);
pl
.
setAttribute
(
'
class
'
,
'
pl_leaf
'
);
setclass
(
pl
,
'
pl_leaf
'
);
pl
.
setAttribute
(
'
href
'
,
'
javascript:pl_play(
'
+
elt
.
getAttribute
(
'
id
'
)
+
'
);
'
);
pl
.
setAttribute
(
'
id
'
,
'
pl_
'
+
elt
.
getAttribute
(
'
id
'
)
);
if
(
elt
.
getAttribute
(
'
current
'
)
==
'
current
'
)
{
pl
.
s
etAttribute
(
'
style
'
,
'
font-weight: bold;
'
)
;
pl
.
s
tyle
.
fontWeight
=
'
bold
'
;
var
nowplaying
=
document
.
getElementById
(
'
nowplaying
'
);
clear_children
(
nowplaying
);
nowplaying
.
appendChild
(
document
.
createTextNode
(
elt
.
getAttribute
(
'
name
'
)
)
);
...
...
@@ -647,7 +653,7 @@ function parse_browse_dir( )
if
(
elt
.
nodeName
==
"
element
"
)
{
var
item
=
document
.
createElement
(
"
a
"
);
item
.
setAttribute
(
'
class
'
,
'
browser
'
);
setclass
(
item
,
'
browser
'
);
if
(
elt
.
getAttribute
(
'
type
'
)
==
'
directory
'
)
{
item
.
setAttribute
(
'
href
'
,
'
javascript:browse_dir(
\'
'
+
escapebackslashes
(
addslashes
(
elt
.
getAttribute
(
'
path
'
)))
+
'
\'
);
'
);
...
...
@@ -662,7 +668,7 @@ function parse_browse_dir( )
{
pos
.
appendChild
(
document
.
createTextNode
(
'
'
)
);
var
item
=
document
.
createElement
(
"
a
"
);
item
.
setAttribute
(
'
class
'
,
'
browser
'
);
setclass
(
item
,
'
browser
'
);
item
.
setAttribute
(
'
href
'
,
'
javascript:browse_path(
\'
'
+
escapebackslashes
(
addslashes
(
elt
.
getAttribute
(
'
path
'
)))
+
'
\'
);
'
);
item
.
appendChild
(
document
.
createTextNode
(
'
(select)
'
)
);
pos
.
appendChild
(
item
);
...
...
share/http/js/mosaic.js
View file @
610ac485
...
...
@@ -86,7 +86,7 @@ function mosaic_size_change()
{
var
mdt
=
document
.
createElement
(
'
div
'
);
mdt
.
setAttribute
(
'
id
'
,
'
mosaic_dt
'
);
mdt
.
setAttribute
(
'
class
'
,
'
mosaic_tbl
'
);
setclass
(
mdt
,
'
mosaic_tbl
'
);
mdt
.
style
.
width
=
mosaic_width
+
"
px
"
;
mdt
.
style
.
height
=
mosaic_height
+
"
px
"
;
...
...
@@ -108,19 +108,13 @@ function mosaic_size_change()
for
(
x
=
0
;
x
<
mosaic_cols
;
x
++
)
{
var
mcell
=
document
.
createElement
(
'
td
'
);
mcell
.
setAttribute
(
'
class
'
,
'
mosaic_itm
'
);
setclass
(
mcell
,
'
mosaic_itm
'
);
mcell
.
style
.
width
=
cell_width
+
"
px
"
;
mcell
.
style
.
height
=
cell_height
+
"
px
"
;
var
melt
=
document
.
createElement
(
'
input
'
);
melt
.
setAttribute
(
'
type
'
,
'
button
'
);
var
id
=
x
+
'
_
'
+
y
;
var
melt
=
create_button
(
cells
[
id
]
?
cells
[
id
]
:
'
?
'
,
'
mosaic_elt_choose(
\
"
'
+
id
+
'
\
");
'
);
melt
.
setAttribute
(
'
id
'
,
id
);
melt
.
setAttribute
(
'
onclick
'
,
'
mosaic_elt_choose(
\'
'
+
id
+
'
\'
);
'
);
if
(
cells
[
id
]
)
melt
.
setAttribute
(
'
value
'
,
cells
[
id
]
);
else
melt
.
setAttribute
(
'
value
'
,
'
?
'
);
melt
.
setAttribute
(
'
title
'
,
'
Click to choose stream
'
);
mcell
.
appendChild
(
melt
);
...
...
share/http/js/vlm.js
View file @
610ac485
...
...
@@ -262,10 +262,17 @@ function clear_vlm_add()
function
create_button
(
caption
,
action
)
{
var
link
=
document
.
createElement
(
"
input
"
);
link
.
setAttribute
(
'
type
'
,
'
button
'
);
link
.
setAttribute
(
'
onclick
'
,
action
);
link
.
setAttribute
(
'
value
'
,
caption
);
/* var link = document.createElement( "input" );
link.setAttribute( 'type', 'button' );*/
/* link.setAttribute( 'onclick', action ); */
/* Above doesn't work on ie. You need to use something like
* link.onclick = function() { alert( 'pouet' ); };
* instead ... conclusion: IE is crap */
/* link.setAttribute( 'value', caption );*/
var
d
=
document
.
createElement
(
'
div
'
);
d
.
innerHTML
=
"
<input type='button' onclick='
"
+
action
+
"
' value='
"
+
caption
+
"
' />
"
;
/* other IE work around ... still crap. Use double quotes only in action */
var
link
=
d
.
firstChild
;
return
link
;
}
function
create_option
(
caption
,
value
)
...
...
@@ -327,7 +334,7 @@ function parse_vlm_elements()
if
(
elt
.
nodeName
==
"
broadcast
"
||
elt
.
nodeName
==
"
vod
"
)
{
var
nb
=
document
.
createElement
(
'
div
'
);
nb
.
setAttribute
(
'
class
'
,
'
list_element
'
);
setclass
(
nb
,
'
list_element
'
);
if
(
elt
.
nodeName
==
"
broadcast
"
)
{
vlmb
.
appendChild
(
nb
);
...
...
@@ -340,41 +347,31 @@ function parse_vlm_elements()
nbname
.
appendChild
(
document
.
createTextNode
(
elt
.
getAttribute
(
'
name
'
)
)
);
nb
.
appendChild
(
nbname
);
var
link
=
document
.
createElement
(
'
input
'
);
link
.
setAttribute
(
'
type
'
,
'
button
'
);
if
(
elt
.
getAttribute
(
'
enabled
'
)
==
'
yes
'
)
{
nb
.
appendChild
(
document
.
createTextNode
(
"
enabled
"
)
);
link
.
setAttribute
(
'
onclick
'
,
'
vlm_disable("
'
+
elt
.
getAttribute
(
'
name
'
)
+
'
");
'
);
link
.
setAttribute
(
'
value
'
,
"
Disable
"
);
nb
.
appendChild
(
create_button
(
"
Disable
"
,
'
vlm_disable("
'
+
elt
.
getAttribute
(
'
name
'
)
+
'
");
'
)
);
}
else
{
nb
.
appendChild
(
document
.
createTextNode
(
"
disabled
"
)
);
link
.
setAttribute
(
'
onclick
'
,
'
vlm_enable("
'
+
elt
.
getAttribute
(
'
name
'
)
+
'
");
'
);
link
.
setAttribute
(
'
value
'
,
"
Enable
"
);
nb
.
appendChild
(
create_button
(
"
Enable
"
,
'
vlm_enable("
'
+
elt
.
getAttribute
(
'
name
'
)
+
'
");
'
)
);
}
nb
.
appendChild
(
link
);
if
(
elt
.
nodeName
==
"
broadcast
"
)
{
link
=
document
.
createElement
(
'
input
'
);
link
.
setAttribute
(
'
type
'
,
'
button
'
);
if
(
elt
.
getAttribute
(
'
loop
'
)
==
'
yes
'
)
{
nb
.
appendChild
(
document
.
createTextNode
(
"
loop
"
)
);
link
.
setAttribute
(
'
onclick
'
,
'
vlm_unloop("
'
+
elt
.
getAttribute
(
'
name
'
)
+
'
");
'
);
link
.
setAttribute
(
'
value
'
,
"
Un-loop
"
);
nb
.
appendChild
(
create_button
(
'
Un-loop
'
,
'
vlm_unloop("
'
+
elt
.
getAttribute
(
'
name
'
)
+
'
");
'
)
);
}
else
{
nb
.
appendChild
(
document
.
createTextNode
(
"
play once
"
)
);
nb
.
appendChild
(
create_button
(
'
Loop
'
,
'
vlm_loop("
'
+
elt
.
getAttribute
(
'
name
'
)
+
'
");
'
)
);
link
.
setAttribute
(
'
onclick
'
,
'
vlm_loop("
'
+
elt
.
getAttribute
(
'
name
'
)
+
'
");
'
);
link
.
setAttribute
(
'
value
'
,
"
Loop
"
);
}
nb
.
appendChild
(
link
);
if
(
elt
.
getAttribute
(
'
enabled
'
)
==
'
yes
'
)
{
...
...
@@ -515,28 +512,23 @@ function parse_vlm_elements()
else
if
(
elt
.
nodeName
==
"
schedule
"
)
{
var
nb
=
document
.
createElement
(
'
div
'
);
nb
.
setAttribute
(
'
class
'
,
'
list_element
'
);
setclass
(
nb
,
'
list_element
'
);
vlms
.
appendChild
(
nb
);
var
nbname
=
document
.
createElement
(
'
b
'
);
nbname
.
appendChild
(
document
.
createTextNode
(
elt
.
getAttribute
(
'
name
'
)
)
);
nb
.
appendChild
(
nbname
);
var
link
=
document
.
createElement
(
'
input
'
);
link
.
setAttribute
(
'
type
'
,
'
button
'
);
if
(
elt
.
getAttribute
(
'
enabled
'
)
==
'
yes
'
)
{
nb
.
appendChild
(
document
.
createTextNode
(
"
enabled
"
)
);
link
.
setAttribute
(
'
onclick
'
,
'
vlm_disable("
'
+
elt
.
getAttribute
(
'
name
'
)
+
'
");
'
);
link
.
setAttribute
(
'
value
'
,
"
Disable
"
);
nb
.
appendChild
(
create_button
(
"
Disable
"
,
'
vlm_disable("
'
+
elt
.
getAttribute
(
'
name
'
)
+
'
");
'
)
);
}
else
{
nb
.
appendChild
(
document
.
createTextNode
(
"
disabled
"
)
);
link
.
setAttribute
(
'
onclick
'
,
'
vlm_enable("
'
+
elt
.
getAttribute
(
'
name
'
)
+
'
");
'
);
link
.
setAttribute
(
'
value
'
,
"
Enable
"
);
nb
.
appendChild
(
create_button
(
"
Enable
"
,
'
vlm_enable("
'
+
elt
.
getAttribute
(
'
name
'
)
+
'
");
'
)
);
}
nb
.
appendChild
(
link
);
nb
.
appendChild
(
document
.
createTextNode
(
"
"
)
);
nb
.
appendChild
(
create_button
(
"
Delete
"
,
'
vlm_delete("
'
+
elt
.
getAttribute
(
'
name
'
)
+
'
");
'
)
);
...
...
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