Merge lp:~sil/libubuntuone/clickable-when-finished into lp:libubuntuone

Proposed by Stuart Langridge
Status: Merged
Approved by: Alejandro J. Cura
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~sil/libubuntuone/clickable-when-finished
Merge into: lp:libubuntuone
Diff against target: 20 lines (+6/-5)
1 file modified
data/u1-songs-clickable.js (+6/-5)
To merge this branch: bzr merge lp:~sil/libubuntuone/clickable-when-finished
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
Martin Albisetti (community) Approve
Review via email: mp+19708@code.launchpad.net

Commit message

make song clickable is now a function installed by the plugin and called by the library page, not directly run by the plugin

To post a comment you must log in.
Revision history for this message
Stuart Langridge (sil) wrote :

make song clickable is now a function installed by the plugin and called by the library page, not directly run by the plugin

Revision history for this message
Martin Albisetti (beuno) :
review: Approve
Revision history for this message
Alejandro J. Cura (alecu) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/u1-songs-clickable.js'
2--- data/u1-songs-clickable.js 2010-02-17 12:57:19 +0000
3+++ data/u1-songs-clickable.js 2010-02-19 14:18:15 +0000
4@@ -1,10 +1,11 @@
5-(function(){
6- var songs = document.querySelectorAll("#downloads li div.metadata");
7- for (var i=0; i<songs.length; i++) {
8- songs[i].onclick = function(){
9+function makeSongClickable(li) {
10+ var md = li.getElementsByClassName("metadata");
11+ if (md.length == 1) {
12+ md[0].onclick = function(){
13 var dp = this.parentNode.getAttribute("data-path")
14 window.status = "u1playlibrary:::" + dp;
15 return false;
16 }
17 }
18-})()
19+};
20+

Subscribers

People subscribed via source and target branches