From 280564c945580f953576e4c95b8e04fc9644f430 Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Fri, 18 Oct 2013 13:30:56 +0100 Subject: [PATCH] Change 'controls' to 'transport'. --- assets/js/application.js | 14 ++++++++------ views/index.erb | 14 +++++++------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/assets/js/application.js b/assets/js/application.js index 7a070bd..6ef9d3a 100644 --- a/assets/js/application.js +++ b/assets/js/application.js @@ -6,12 +6,14 @@ App.QueueRoute = Ember.Route.extend({ } }); -App.ControlsController = Ember.Controller.extend({ +App.QueueController = Ember.ArrayController.extend(); + +App.TransportController = Ember.Controller.extend({ actions: { - previous: function() { return Ember.$.ajax('/api/control/previous', { type: 'PUT' }); }, - play: function() { return Ember.$.ajax('/api/control/play', { type: 'PUT' }); }, - pause: function() { return Ember.$.ajax('/api/control/pause', { type: 'PUT' }); }, - stop: function() { return Ember.$.ajax('/api/control/stop', { type: 'PUT' }); }, - next: function() { return Ember.$.ajax('/api/control/next', { type: 'PUT' }); } + sendControl: function(control) { + Ember.$.ajax('/api/control/' + control, { type: 'PUT' }); + } } }); + +App.Song = DS.Model.extend(); diff --git a/views/index.erb b/views/index.erb index 96b1db0..ccfe6c9 100644 --- a/views/index.erb +++ b/views/index.erb @@ -10,7 +10,7 @@ -