Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intranet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bertrand Delhomme
intranet
Commits
bc86e746
Commit
bc86e746
authored
Dec 10, 2014
by
Valentin Samir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tv] Affichage d'un message d'erreur si le plugin web vlc n'est pas disponible
parent
d196cfba
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
3 deletions
+41
-3
templates/template.html
templates/template.html
+1
-3
templates/tv/index.html
templates/tv/index.html
+40
-0
No files found.
templates/template.html
View file @
bc86e746
...
@@ -8,15 +8,13 @@
...
@@ -8,15 +8,13 @@
</head>
</head>
<body>
<body>
<div
id=
"mainTitle"
>
{% block h1 %}
<h1>
Crans Intranet
</h1>
{% endblock %}
</div>
<div
id=
"mainTitle"
>
{% block h1 %}
<h1>
Crans Intranet
</h1>
{% endblock %}
</div>
{% if messages %}
<div
class=
"errors"
>
<div
class=
"errors"
>
<ul>
<ul
id=
"errors_list"
>
{% for mess in messages %}
{% for mess in messages %}
<li
class=
"{{mess.tags}}"
>
{{ mess|safe|linebreaksbr }}
</li>
<li
class=
"{{mess.tags}}"
>
{{ mess|safe|linebreaksbr }}
</li>
{% endfor %}
{% endfor %}
</ul>
</ul>
</div>
</div>
{% endif %}
<div
class=
"main_div"
>
<div
class=
"main_div"
>
{% block content %}{% endblock %}
{% block content %}{% endblock %}
</div>
</div>
...
...
templates/tv/index.html
View file @
bc86e746
...
@@ -85,6 +85,9 @@ function add(url, vlc){
...
@@ -85,6 +85,9 @@ function add(url, vlc){
}
catch
(
e
){}
}
catch
(
e
){}
}
}
function
play
(
url
){
function
play
(
url
){
if
(
!
test_vlc_plugin
()){
return
false
;
}
if
(
url
==
playing
){
if
(
url
==
playing
){
return
false
;
return
false
;
}
else
{
}
else
{
...
@@ -100,7 +103,43 @@ function play(url){
...
@@ -100,7 +103,43 @@ function play(url){
return
false
;
return
false
;
}
}
function
test_vlc_plugin
(){
var
vlc
=
document
.
getElementById
(
"
vlc
"
);
if
(
typeof
vlc
.
playlist
!=
'
undefined
'
){
unwarn_vlc_plugin
();
return
true
;
}
else
{
warn_vlc_plugin
();
return
false
;
}
}
function
warn_vlc_plugin
(){
if
(
!
document
.
getElementById
(
"
warning_vlc_plugin
"
)){
var
ul
=
document
.
getElementById
(
"
errors_list
"
);
var
a
=
document
.
createElement
(
"
a
"
);
a
.
setAttribute
(
"
href
"
,
"
http://kiss92.free.fr/applications/Aide-pour-installer-VLC-PLUG-IN-sur-PC-Linux.html
"
);
a
.
appendChild
(
document
.
createTextNode
(
'
plugin vlc
'
));
var
li
=
document
.
createElement
(
"
li
"
);
li
.
appendChild
(
document
.
createTextNode
(
'
Le
'
));
li
.
appendChild
(
a
);
li
.
appendChild
(
document
.
createTextNode
(
'
est nécessaire pour regarder la télévision ou écouter la radio.
'
));
li
.
setAttribute
(
"
class
"
,
"
warning
"
);
li
.
setAttribute
(
"
id
"
,
"
warning_vlc_plugin
"
);
ul
.
appendChild
(
li
);
}
}
function
unwarn_vlc_plugin
(){
if
(
document
.
getElementById
(
"
warning_vlc_plugin
"
)){
document
.
getElementById
(
"
warning_vlc_plugin
"
).
remove
();
}
}
function
play_radio
(
url
){
function
play_radio
(
url
){
if
(
!
test_vlc_plugin
()){
return
false
;
}
document
.
getElementById
(
'
player_div
'
).
style
.
visibility
=
"
hidden
"
;
document
.
getElementById
(
'
player_div
'
).
style
.
visibility
=
"
hidden
"
;
if
(
url
==
playing
){
if
(
url
==
playing
){
return
false
;
return
false
;
...
@@ -131,6 +170,7 @@ function init(){
...
@@ -131,6 +170,7 @@ function init(){
document
.
getElementById
(
"
range
"
).
innerHTML
=
document
.
getElementById
(
"
volume_slide
"
).
value
+
"
%
"
;
document
.
getElementById
(
"
range
"
).
innerHTML
=
document
.
getElementById
(
"
volume_slide
"
).
value
+
"
%
"
;
document
.
getElementById
(
"
range2
"
).
innerHTML
=
document
.
getElementById
(
"
volume_slide
"
).
value
+
"
%
"
;
document
.
getElementById
(
"
range2
"
).
innerHTML
=
document
.
getElementById
(
"
volume_slide
"
).
value
+
"
%
"
;
document
.
getElementById
(
"
volume_slide2
"
).
innerHTML
=
document
.
getElementById
(
"
volume_slide
"
).
value
;
document
.
getElementById
(
"
volume_slide2
"
).
innerHTML
=
document
.
getElementById
(
"
volume_slide
"
).
value
;
test_vlc_plugin
();
}
}
</script>
</script>
{% endblock %}
{% endblock %}
...
...
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