dont show play and add-to-playlist at the same time
This commit is contained in:
parent
77b558885a
commit
0b44db954f
|
@ -24,6 +24,7 @@ $(document).ready(function(){
|
||||||
data[itemParts[0]]=decodeURIComponent(itemParts[1]).replace(/\+/g,' ');
|
data[itemParts[0]]=decodeURIComponent(itemParts[1]).replace(/\+/g,' ');
|
||||||
}
|
}
|
||||||
var media=Collection.find(data.artist,data.album,data.song);
|
var media=Collection.find(data.artist,data.album,data.song);
|
||||||
|
if(!PlayList.playing()){
|
||||||
var button=$('<input type="button" class="play"></input>');
|
var button=$('<input type="button" class="play"></input>');
|
||||||
button.css('background-image','url('+OC.imagePath('core','actions/play')+')')
|
button.css('background-image','url('+OC.imagePath('core','actions/play')+')')
|
||||||
button.click(function(){
|
button.click(function(){
|
||||||
|
@ -33,6 +34,7 @@ $(document).ready(function(){
|
||||||
PlayList.render();
|
PlayList.render();
|
||||||
});
|
});
|
||||||
row.find('div.name').append(button);
|
row.find('div.name').append(button);
|
||||||
|
}else{
|
||||||
var button=$('<input type="button" class="add"></input>');
|
var button=$('<input type="button" class="add"></input>');
|
||||||
button.css('background-image','url('+OC.imagePath('core','actions/play-add')+')')
|
button.css('background-image','url('+OC.imagePath('core','actions/play-add')+')')
|
||||||
button.click(function(){
|
button.click(function(){
|
||||||
|
@ -41,6 +43,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
row.find('div.name').append(button);
|
row.find('div.name').append(button);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -104,5 +104,12 @@ var PlayList={
|
||||||
PlayList.items.splice(index,1);
|
PlayList.items.splice(index,1);
|
||||||
PlayList.render();
|
PlayList.render();
|
||||||
},
|
},
|
||||||
render:function(){}
|
render:function(){},
|
||||||
|
playing:function(){
|
||||||
|
if(!PlayList.player){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
return !PlayList.player.data("jPlayer").status.paused;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue