Commit e4e8aca0 authored by Simon Daron's avatar Simon Daron
Browse files

Correctif playlist

parent 94ffd034
......@@ -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();
......
$(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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment