diff --git a/app/scripts/controllers/episode_controller.js b/app/scripts/controllers/episode_controller.js index d864271..008894d 100644 --- a/app/scripts/controllers/episode_controller.js +++ b/app/scripts/controllers/episode_controller.js @@ -1,4 +1,3 @@ HighFidelity.EpisodeController = Ember.ObjectController.extend({ - // Implement your controller here. + // Implement your controller here. }); - diff --git a/app/scripts/controllers/episode_edit_controller.js b/app/scripts/controllers/episode_edit_controller.js index 5750a2a..adfb242 100644 --- a/app/scripts/controllers/episode_edit_controller.js +++ b/app/scripts/controllers/episode_edit_controller.js @@ -1,13 +1,15 @@ HighFidelity.EpisodeEditController = Ember.ObjectController.extend({ - needs: 'episode', - actions: { - save: function(){ - self = this - this.get('buffer').forEach(function(attr){ - self.get('controllers.episode.model').set(attr.key, attr.value); - }); - this.transitionToRoute('episode',this.get('model')); - } - } -}); + needs: 'episode', + actions: { + save: function(){ + var _this = this; + this.get('buffer').forEach(function(attr) { + _this.get('controllers.episode.model') + .set(attr.key, attr.value); + }); + + this.transitionToRoute('episode',this.get('model')); + } + } +}); diff --git a/app/scripts/controllers/podcast_edit_controller.js b/app/scripts/controllers/podcast_edit_controller.js index 93e495d..988ee69 100644 --- a/app/scripts/controllers/podcast_edit_controller.js +++ b/app/scripts/controllers/podcast_edit_controller.js @@ -1,11 +1,15 @@ HighFidelity.PodcastEditController = Ember.ObjectController.extend({ needs: 'podcast', + actions: { - save: function(){ - self = this - this.get('buffer').forEach(function(attr){ - self.get('controllers.podcast.model').set(attr.key, attr.value); + save: function() { + var _this = this; + + this.get('buffer').forEach(function(attr) { + _this.get('controllers.podcast.model') + .set(attr.key, attr.value); }); + this.transitionToRoute('podcast', this.get('model')); } } diff --git a/app/scripts/controllers/podcasts_controller.js b/app/scripts/controllers/podcasts_controller.js index 6736d5a..db4f179 100644 --- a/app/scripts/controllers/podcasts_controller.js +++ b/app/scripts/controllers/podcasts_controller.js @@ -1,15 +1,3 @@ HighFidelity.PodcastsController = Ember.ObjectController.extend({ // Implement your controller here. - // setupController: function() { - // this.store.createRecord('podcast', { - // id: 1, - // rssURL: 'http://atp.fm/episodes?format=rss', - // lastUpdated: (new Date()), - // lastPlayed: (new Date()), - // coverImageURL: 'http://static.squarespace.com/static/513abd71e4b0fe58c655c105/ t/52c45a37e4b0a77a5034aa84/1388599866232/1500w/Artwork.jpg', - // episodes: [] - // }); - // this.store.save(); - // } }); -