changeset 963:56218ce0fd37

asco song buttons now have links in them, for dragging Ignore-this: 902059aa1051fa139cc943ea0211fd39
author drewp@bigasterisk.com
date Sat, 15 Jun 2013 08:21:16 +0000
parents 0f7441b74b68
children ced2c5e5fb31
files light9/ascoltami/index.html static/style.css
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/light9/ascoltami/index.html	Sat Jun 15 07:41:57 2013 +0000
+++ b/light9/ascoltami/index.html	Sat Jun 15 08:21:16 2013 +0000
@@ -93,7 +93,10 @@
     $.getJSON("songs", {}, function (data, status) {
 	$.each(data.songs, function (i, song) {
 	    var button = $("<button>");
-	    button.text(song.label);
+            // link is just for dragging, not clicking
+            var link = $("<a>").text(song.label).attr("href", song.uri);
+            link.click(function () { button.click(); return false; }); 
+            button.append(link);
 	    button.data(song);
 	    button.click(function () {
 		$.post("song", button.data("uri"), 
--- a/static/style.css	Sat Jun 15 07:41:57 2013 +0000
+++ b/static/style.css	Sat Jun 15 08:21:16 2013 +0000
@@ -17,6 +17,9 @@
     margin: 2px;
 font-size: 115%;
 }
+button a {
+ color: white;
+}
 .songs button:hover {
     color: black;
     background: yellow;