Menu

#4 make adding music easier

Unstable (example)
open
nobody
None
5
2010-12-08
2010-12-08
No

I added a few simple improvements to the default theme: a button to easily (oneclick) add all tracks in a directory or from a search. One which immediately plays all tracks, and one that adds them at the bottom of the playlist. This makes RelaXX a lot simpler to use imho.
I don't know how to use svn,, so I will paste the code here:

---
TEMPLATE.INC
<!-- Buttons Tracklist /-->
<div id="buttonstracklist" class="tracklist">
<a href="#" onclick="playAll();">Play All</a> -

<a href="#" onclick="allToPlaylist();">All to playlist</a> -
<a href="#" onclick="selectAll();">Sel All</a> -
<a href="#" onclick="selectedToPlaylist();">To Playlist</a>
</div>
----
TEMPLATE.JS
(at the bottom)

function stopPause() {
togglePlay();
return false;
}

function playAll() {
current_element = 'playlist';
handleKeys('playlist', 'c');
current_element = 'tracklist';
allToPlaylist();
current_element = 'playlist';
timer = setTimeout("stopPause()", 2000); // 2 secs
}

function allToPlaylist() {
current_element = 'tracklist';
toggleSelected(current_element,false);
addSelected();
}

function selectAll() {
current_element = 'tracklist';
toggleSelected(current_element,false);
}

function selectedToPlaylist() {
addSelected();
}
----

Discussion


Log in to post a comment.