diff --git a/assets/js/controls/queue.js b/assets/js/controls/queue.js deleted file mode 100644 index 3fcc815..0000000 --- a/assets/js/controls/queue.js +++ /dev/null @@ -1,26 +0,0 @@ -var Queue = can.Control.extend({ - - init: function(element, options) { - element.html( - can.view('views/queue.ejs', { - queueSongs: options.queueSongs, - status: options.status - }, - { formatLength: timeHelpers.formatLength } - )); - }, - - playSong: function(pos) { - can.ajax({ - url: '/api/control/play', - data: { pos: pos }, - type: 'PUT' - }); - }, - - 'li click': function(element, event) { - var pos = $(element).data('pos'); - this.playSong(pos); - } - -}); diff --git a/assets/js/controls/transport.js b/assets/js/controls/transport.js deleted file mode 100644 index e4a1dcf..0000000 --- a/assets/js/controls/transport.js +++ /dev/null @@ -1,30 +0,0 @@ -var Transport = can.Control.extend({ - - init: function(element, options) { - this.status = options.status; - element.html( - can.view( - 'views/transport.ejs', { status: this.status }, - { formatLength: timeHelpers.formatLength } - ) - ); - }, - - updateStatus: function(status) { - this.status.attr(status); - }, - - sendCommand: function(command) { - can.ajax({ - url: '/api/control/' + command, - type: 'PUT' - }); - }, - - 'button click': function(element, event) { - var command = $(element).data('command'); - this.sendCommand(command); - $(element).blur(); - } - -});