MCPcopy Create free account
hub / github.com/ActiveState/code / redraw_playlist

Function redraw_playlist

recipes/JavaScript/578517_Music_player/recipe-578517.js:390–410  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

388}
389
390function redraw_playlist()
391{
392 var s_html="<table><th colspan=3 class=lnkhovr>Playlist</th>";
393 var i=0;
394 var s_song="";
395 for (i=0;i<a_playlist.length;i++)
396 {
397 s_song=a_songs[a_playlist[i]];
398 s_song=trim_chars_from_right(s_song,4);
399 s_song=convert_to_song_and_artist(s_song);
400 var s_remove="<button onClick=\"remove_playlist_item(" + i + ");\"> - </button>"
401 var s_on_click_cmd="do_link_click("+a_playlist[i]+"," + i + ");";
402 var s_line=s_remove + "</td><td> <span class='lnkhovr' id=\"spnplst" + i + "\" onclick=\"" + s_on_click_cmd + "\" style='background-color:transparent'>" + s_song +"</span>";
403 s_html+="<tr valign=top><td><nobr>"+s_line+"</td></tr>";
404
405 }
406 s_html+="</table>";
407 var e=document.getElementById("txtplay");
408 e.innerHTML=s_html;
409 save_playlist();
410}
411
412function load_playlist()
413{

Callers 3

remove_playlist_itemFunction · 0.85
add_song_to_playlistFunction · 0.85
load_playlistFunction · 0.85

Calls 3

trim_chars_from_rightFunction · 0.85
save_playlistFunction · 0.85

Tested by

no test coverage detected