~directhex/libubuntuone/mono_packaging

« back to all changes in this revision

Viewing changes to data/u1-songs-clickable.js

  • Committer: Sebastien Bacher
  • Date: 2010-02-23 10:01:21 UTC
  • mfrom: (46.1.1 libubuntuone)
  • Revision ID: seb128@ubuntu.com-20100223100121-uuk2u7xm57pp012g
Tags: 0.2.90-0ubuntu1
releasing version 0.2.90-0ubuntu1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
(function(){
2
 
        var songs = document.querySelectorAll("#downloads li div.metadata");
3
 
        for (var i=0; i<songs.length; i++) {
4
 
                songs[i].onclick = function(){
 
1
function makeSongClickable(li) {
 
2
        var md = li.getElementsByClassName("metadata");
 
3
        if (md.length == 1) {
 
4
                md[0].onclick = function(){
5
5
                        var dp = this.parentNode.getAttribute("data-path")
6
6
                        window.status = "u1playlibrary:::" + dp;
7
7
                        return false;
8
8
                }
9
9
        }
10
 
})()
 
10
};
 
11