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
Simon Daron
panikweb
Commits
8190defe
Commit
8190defe
authored
Sep 02, 2013
by
Simon Daron
Browse files
MEP archives
parent
5683d147
Changes
4
Hide whitespace changes
Inline
Side-by-side
panikweb_templates/static/css/specifics.css
View file @
8190defe
...
...
@@ -115,7 +115,7 @@ button.check, a.check {
-moz-border-radius
:
0.2em
;
-webkit-border-radius
:
0.2em
;
}
#Nav
.check
{
background
:
#222
;}
#Nav
.
icon-
check
{
background
:
#222
;}
button
.check
:before
,
a
.check
:before
{
display
:
inline-block
;
width
:
1.5em
;
...
...
panikweb_templates/static/js/specifics.js
View file @
8190defe
...
...
@@ -97,6 +97,65 @@ $(function() {
/****************************************************/
/**** AUDIOPLAYER ****/
/****************************************************/
var
timer
=
null
,
interval
=
5000
;
$
(
'
#WhatsOnAir
'
).
on
(
'
load
'
,
function
(){
var
WhatsOnAir
=
$
(
this
);
$
.
getJSON
(
'
/onair.json
'
,
function
(
onair
)
{
WhatsOnAir
.
fadeOut
();
if
(
onair
.
data
.
episode
||
onair
.
data
.
emission
){
var
onairContainer
=
$
(
'
<span>
'
);
if
(
onair
.
data
.
emission
){
$
(
'
<a>
'
,{
href
:
onair
.
data
.
emission
.
url
,
html
:
onair
.
data
.
emission
.
title
}).
appendTo
(
onairContainer
).
ajaxifyClick
();
}
if
(
onair
.
data
.
episode
){
$
(
'
<a>
'
,{
href
:
onair
.
data
.
episode
.
url
,
html
:
onair
.
data
.
episode
.
title
}).
appendTo
(
onairContainer
).
ajaxifyClick
();
}
WhatsOnAir
.
empty
().
append
(
onairContainer
);
}
else
if
(
onair
.
data
.
nonstop
)
{
result
=
onair
.
data
.
nonstop
.
title
;
WhatsOnAir
.
html
(
'
<span>
'
+
result
+
'
</span>
'
);
}
else
{
WhatsOnAir
.
html
(
'
<span>Unknown (Probably Non-Stop)</span>
'
);}
WhatsOnAir
.
fadeIn
();
});
});
$
(
'
#RefreshWhatsOnAir
'
).
on
(
'
activate
'
,
function
(
e
){
$
(
this
).
addClass
(
'
spinning
'
);
$
(
'
#WhatsOnAir
'
).
addClass
(
'
active
'
);
$
(
'
#WhatsOnAir
'
).
trigger
(
'
load
'
);
timer
=
setInterval
(
"
$('#WhatsOnAir').trigger('load');
"
,
interval
);
}).
on
(
'
deactivate
'
,
function
(
e
){
$
(
this
).
removeClass
(
'
spinning
'
);
$
(
'
#WhatsOnAir
'
).
removeClass
(
'
active
'
);
clearInterval
(
timer
);
}).
on
(
'
click
'
,
function
(
e
){
$
(
this
).
toggleClass
(
'
spinning
'
);
if
(
$
(
this
).
is
(
'
.spinning
'
)){
$
(
this
).
trigger
(
'
activate
'
);
}
else
{
$
(
this
).
trigger
(
'
deactivate
'
);}
return
false
;
}).
trigger
(
'
activate
'
);
$
(
"
#DirectStreamPanikControler
"
).
on
(
'
click
'
,
function
(
e
)
{
e
.
preventDefault
();
var
stream
=
$
(
'
#DirectStreamPanik
'
).
get
(
0
);
if
(
stream
.
paused
==
false
){
stream
.
pause
();
}
else
{
stream
.
play
();
}
return
false
;
});
$
(
'
#DirectStreamPanik
'
).
on
(
'
play
'
,
function
(){
$
(
'
audio:not(#DirectStreamPanik)
'
).
each
(
function
(){
this
.
pause
();});
$
(
'
#streamSymbol
'
).
removeClass
(
'
icon-volume-up
'
).
addClass
(
'
icon-pause
'
);
$
(
'
#RefreshWhatsOnAir
'
).
trigger
(
'
activate
'
);
}).
on
(
'
pause
'
,
function
(){
//$('audio:not(#DirectStreamPanik)').each(function(){this.pause();});
$
(
'
#streamSymbol
'
).
addClass
(
'
icon-volume-up
'
).
removeClass
(
'
icon-pause
'
);
$
(
'
#RefreshWhatsOnAir
'
).
trigger
(
'
deactivate
'
);
});
if
(
$
(
'
#player-container
'
).
offset
()){
var
topPosition
=
0
;
topPosition
=
$
(
'
#player-container
'
).
offset
().
top
;
...
...
panikweb_templates/templates/emissions/episodes.html
View file @
8190defe
...
...
@@ -18,6 +18,15 @@
<div
class=
"big error padded center"
>
Sorry, no result with your query!
</div>
{% endif %}
{% if search_query and episodes or episodes.count
<
=
24
%}
<
ul
class=
"custom columns list"
>
{% for episode in episodes %}
<li
class=
"item {% if episode.emission.categories.all.count = 0 %}nocat{% endif %} {% for category in episode.emission.categories.all %} {{ category|slugify }}{% endfor %}"
>
{% episode_resume model="inline" klass="standalone"%}
</li>
{% endfor %}
</ul>
{% else %}
<div
id=
"Emission-container"
class=
"emission padded"
>
{% if episodes %}
{% with episodes as episodes %}
...
...
@@ -42,5 +51,6 @@
{% endwith %}
{% endif %}
</div>
{% endif %}
</div>
{% endblock %}
panikweb_templates/templates/includes/player.html
View file @
8190defe
...
...
@@ -37,64 +37,5 @@
<div
id=
"playlistLabel"
class=
"label button"
>
Playlist
<span
class=
"icon-list"
title=
"Show/Hide playlist"
></span></div>
</div>
</div>
<script
type=
"text/javascript"
>
$
(
function
()
{
var
timer
=
null
,
interval
=
5000
;
$
(
'
#WhatsOnAir
'
).
on
(
'
load
'
,
function
(){
var
WhatsOnAir
=
$
(
this
);
$
.
getJSON
(
'
/onair.json
'
,
function
(
onair
)
{
WhatsOnAir
.
fadeOut
();
if
(
onair
.
data
.
episode
||
onair
.
data
.
emission
){
var
result
=
''
;
result
=
result
+
(
$
.
type
(
onair
.
data
.
emission
)
==
'
object
'
?
'
<span>
'
+
onair
.
data
.
emission
.
title
+
'
</span>
'
:
''
);
result
=
result
+
(
$
.
type
(
onair
.
data
.
episode
)
==
'
object
'
?
'
| <span>
'
+
onair
.
data
.
episode
.
title
+
'
</span>
'
:
''
);
//var container = $('
<
a
>
'
,{class:"intercepted",href:onair.data.emission.url,html:result});
WhatsOnAir.html(result);
} else if (onair.data.nonstop) {
result = onair.data.nonstop.title;
WhatsOnAir.html(
'
<
span
>
'
+ result +
'
<
/span>'
)
;
}
else
{
WhatsOnAir
.
html
(
'
<span>Unknown (Probably Non-Stop)</span>
'
);}
WhatsOnAir
.
fadeIn
();
});
});
$
(
'
#RefreshWhatsOnAir
'
).
on
(
'
activate
'
,
function
(
e
){
$
(
this
).
addClass
(
'
spinning
'
);
$
(
'
#WhatsOnAir
'
).
addClass
(
'
active
'
);
$
(
'
#WhatsOnAir
'
).
trigger
(
'
load
'
);
timer
=
setInterval
(
"
$('#WhatsOnAir').trigger('load');
"
,
interval
);
}).
on
(
'
deactivate
'
,
function
(
e
){
$
(
this
).
removeClass
(
'
spinning
'
);
$
(
'
#WhatsOnAir
'
).
removeClass
(
'
active
'
);
clearInterval
(
timer
);
}).
on
(
'
click
'
,
function
(
e
){
$
(
this
).
toggleClass
(
'
spinning
'
);
if
(
$
(
this
).
is
(
'
.spinning
'
)){
$
(
this
).
trigger
(
'
activate
'
);
}
else
{
$
(
this
).
trigger
(
'
deactivate
'
);}
return
false
;
}).
trigger
(
'
activate
'
);
$
(
"
#DirectStreamPanikControler
"
).
on
(
'
click
'
,
function
(
e
)
{
e
.
preventDefault
();
var
stream
=
$
(
'
#DirectStreamPanik
'
).
get
(
0
);
if
(
stream
.
paused
==
false
){
stream
.
pause
();
}
else
{
stream
.
play
();
}
return
false
;
});
$
(
'
#DirectStreamPanik
'
).
on
(
'
play
'
,
function
(){
$
(
'
audio:not(#DirectStreamPanik)
'
).
each
(
function
(){
this
.
pause
();});
$
(
'
#streamSymbol
'
).
removeClass
(
'
icon-volume-up
'
).
addClass
(
'
icon-pause
'
);
$
(
'
#RefreshWhatsOnAir
'
).
trigger
(
'
activate
'
);
}).
on
(
'
pause
'
,
function
(){
//$('audio:not(#DirectStreamPanik)').each(function(){this.pause();});
$
(
'
#streamSymbol
'
).
addClass
(
'
icon-volume-up
'
).
removeClass
(
'
icon-pause
'
);
$
(
'
#RefreshWhatsOnAir
'
).
trigger
(
'
deactivate
'
);
});
});
</script>
</div>
</div>
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