# HG changeset patch # User drewp@bigasterisk.com # Date 2014-06-15 00:33:51 # Node ID 487f0877b7c6b4aab0050f71d86f2efa553c5e18 # Parent c99096504c79ce24f6fbd3ae02c6f2bc8a6cf742 EE can now limit to showing just one song Ignore-this: 3cad996b470fd9fc2e56524eaf13f87d diff --git a/light9/effecteval/index.coffee b/light9/effecteval/index.coffee --- a/light9/effecteval/index.coffee +++ b/light9/effecteval/index.coffee @@ -9,6 +9,9 @@ model.drop = (uri, event) -> event.preventDefault() dropped(uri, event.originalEvent.dataTransfer.getData('text/uri-list')) +model.focusSong = (song) -> + window.location.search = '?song=' + song.uri + dropped = (songTargetUri, dropUri) -> $.post('songEffects', {uri: songTargetUri, drop: dropUri}) @@ -24,7 +27,12 @@ reconnectingWebSocket "ws://localhost:80 do (e) -> e.deleteEffect = -> deleteEffect(e.uri) - model.songs(msg.songs) + + m = window.location.search.match(/song=(http[^&]+)/) + if m + model.songs((s for s in msg.songs when s.uri == m[1])) + else + model.songs(msg.songs) ko.applyBindings(model) diff --git a/light9/effecteval/index.html b/light9/effecteval/index.html --- a/light9/effecteval/index.html +++ b/light9/effecteval/index.html @@ -7,11 +7,12 @@
/stats
-

All effect instances

+

Effect instances

+
View all songs
-