Changeset - 3f7de54de79e
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 11 years ago 2014-06-14 07:27:20
drewp@bigasterisk.com
on songeffects page, show effect labels
Ignore-this: 5a0c30c44ac8faef7482b8a2436de4d0
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
bin/effecteval
Show inline comments
 
@@ -83,13 +83,13 @@ class SongEffectsUpdates(cyclone.websock
 
        # todo: abort if client is gone
 
        playlist = self.graph.value(showconfig.showUri(), L9['playList'])
 
        songs = list(self.graph.items(playlist))
 
        out = []
 
        for s in songs:
 
            out.append({'uri': s, 'label': self.graph.label(s)})
 
            out[-1]['effects'] = [{'uri': uri} for uri in sorted(self.graph.objects(s, L9['effect']))]
 
            out[-1]['effects'] = [{'uri': uri, 'label': self.graph.label(uri)} for uri in sorted(self.graph.objects(s, L9['effect']))]
 
        self.sendMessage({'songs': out})
 
        
 
        
 
class EffectUpdates(cyclone.websocket.WebSocketHandler):
 
    """
 
    stays alive for the life of the effect page
light9/effecteval/index.html
Show inline comments
 
@@ -12,13 +12,13 @@
 
    <ul data-bind="foreach: songs" class="twoColList">
 
      <li>
 
        <a class="song" data-bind="attr: {href: uri}">Song <span data-bind="text: label"></span></a>
 
        <ul>
 
          <!-- ko foreach: effects -->
 
          <li>
 
            <a class="effect" data-bind="attr: {href: 'effect?'+jQuery.param({uri: uri})}, text: uri"></a> <button data-bind="click: deleteEffect">Delete</button>
 
            <a class="effect" data-bind="attr: {href: 'effect?'+jQuery.param({uri: uri})}, text: label"></a> <button data-bind="click: deleteEffect">Delete</button>
 
          </li>
 
          <!-- /ko -->
 
          <li class="dropTarget" data-bind="event: {dragover: $root.dragover, dragenter: $root.dragover, drop: function(data, event) { $root.drop(uri, event); }}">Add another (drop a sub or effect class)</li>
 
        </ul>
 
      </li>
 
    </ul>
0 comments (0 inline, 0 general)