Changeset - 487f0877b7c6
[Not reviewed]
default
0 3 0
drewp@bigasterisk.com - 11 years ago 2014-06-15 00:33:51
drewp@bigasterisk.com
EE can now limit to showing just one song
Ignore-this: 3cad996b470fd9fc2e56524eaf13f87d
3 files changed with 17 insertions and 5 deletions:
0 comments (0 inline, 0 general)
light9/effecteval/index.coffee
Show inline comments
 
@@ -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)
 

	
light9/effecteval/index.html
Show inline comments
 
@@ -7,11 +7,12 @@
 
  </head>
 
  <body>
 
    <div><a href="stats">/stats</a></div>
 
    <h1>All effect instances</h1>
 
    <h1>Effect instances</h1>
 
    <div><a href=".">View all songs</a></div>
 
    <!-- subscribe to a query of all effects and their songs -->
 
    <ul data-bind="foreach: songs" class="twoColList">
 
    <ul data-bind="foreach: songs">
 
      <li>
 
        <a class="song" data-bind="attr: {href: uri}">Song <span data-bind="text: label"></span></a>
 
        <a class="song" data-bind="attr: {href: uri}, click: $root.focusSong">Song <span data-bind="text: label"></span></a>
 
        <ul>
 
          <!-- ko foreach: effects -->
 
          <li>
static/style.css
Show inline comments
 
@@ -61,11 +61,14 @@ button a {
 
}
 

	
 
.dropTarget {
 
    padding: 5px;
 
    padding: 10px 5px;
 
    border: 2px dashed gray;
 
    font-style: italic;
 
    color: rgb(78, 90, 107);
 
}
 
.dropTarget:hover {
 
    background: #1F1F0D;
 
}
 
.twoColList {
 
    -webkit-column-width: 24em;
 
}
0 comments (0 inline, 0 general)