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
radiopanik
panikweb
Commits
e4e8aca0
Commit
e4e8aca0
authored
Aug 29, 2013
by
Simon Daron
Browse files
Correctif playlist
parent
94ffd034
Changes
2
Hide whitespace changes
Inline
Side-by-side
panikweb_templates/static/js/audioPlayer.js
View file @
e4e8aca0
...
...
@@ -27,7 +27,8 @@
this
.
element
.
addClass
(
this
.
options
.
classes
);
this
.
element
.
append
(
this
.
playlistContainer
);
this
.
element
.
append
(
this
.
debugContainer
);
this
.
playlist
=
this
.
loadPlaylist
();
this
.
playlist
=
this
.
options
.
playlist
;
this
.
loadPlaylist
();
this
.
_update
();
},
...
...
@@ -71,7 +72,7 @@
},
// Transform JSON sound object to HTML container for playlist.
_htmlifyJsonSound
:
function
(
sound
)
{
var
container
=
$
(
'
<div>
'
,
this
.
options
.
itemClasses
);
var
container
=
$
(
'
<div>
'
,
{
class
:
"
ellipsis
"
}
);
var
audio
=
$
(
'
<audio>
'
,
this
.
options
.
html5audioOptions
);
$
.
each
(
sound
.
source
,
function
(
k
,
v
){
var
source
=
$
(
'
<source>
'
,{
src
:
v
,
type
:
k
});
...
...
@@ -89,6 +90,7 @@
self
.
pauseSounds
();
audio
[
0
].
play
();
}
return
false
;
}});
var
remover
=
$
(
'
<button>
'
,{
class
:
'
icon-remove
'
,
click
:
function
(){
container
.
remove
();
...
...
panikweb_templates/static/js/specifics.js
View file @
e4e8aca0
$
(
function
()
{
var
$main
=
$
(
"
#Changing
"
);
var
$log
=
$
(
"
#userLog
"
);
var
$localList
=
$
(
'
#localList
'
).
playlist
(
{
itemClasses
:
'
ellipsis
'
}
);
var
$localList
=
$
(
'
#localList
'
).
playlist
();
doLog
=
function
(
aTextToLog
,
type
){
var
aLog
=
$
(
'
<div>
'
,{
class
:
"
log
"
,
html
:
'
<div class=
'
+
type
+
'
>
'
+
aTextToLog
+
'
</div>
'
});
aLog
.
hide
().
prependTo
(
$log
).
show
(
'
fast
'
).
delay
(
10000
).
hide
(
'
fast
'
,
function
()
{
...
...
@@ -52,7 +52,11 @@ $(function() {
/* this checks the link points to a local document, be
* it because it's just a path, or because the server
* part points to the same domain */
if
(
href
.
indexOf
(
document
.
domain
)
>
-
1
||
if
(
!
href
)
{
doLog
(
'
No href attributes, unable to load content
'
,
'
error
'
);
$
(
"
#All a, #All area, #All form
"
).
removeClass
(
'
loading
'
);
return
false
;
}
else
if
(
href
.
indexOf
(
document
.
domain
)
>
-
1
||
href
.
indexOf
(
'
:
'
)
===
-
1
||
href
.
indexOf
(
'
:
'
)
>
5
)
{
loadPage
(
href
);
return
false
;
...
...
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