summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2013-11-10 11:24:11 -0500
committerTeddy Wing2013-11-10 11:49:28 -0500
commit07a2d8bd152fc1433fa7b5fc81b9fa36e7095e63 (patch)
tree41f3da73972c1b6b2fb0008672d553f38c8db1c8
parent4376526f8bc7e72e3d7cc958a97ade1104dc88d6 (diff)
downloadclip-play-07a2d8bd152fc1433fa7b5fc81b9fa36e7095e63.tar.bz2
Move initialize above onRender method
-rw-r--r--assets/js/views/sample.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/assets/js/views/sample.js b/assets/js/views/sample.js
index aa07acd..de9e967 100644
--- a/assets/js/views/sample.js
+++ b/assets/js/views/sample.js
@@ -5,12 +5,6 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({
'click .js-remove-sample' : 'remove_sample'
},
- onRender: function() {
- this.initialize_player();
- this.initialize_clip_lines();
- this.$('.js-keyboard-key').val(this.model.get('key'));
- },
-
initialize: function(options){
this.collection = options.collection;
@@ -18,6 +12,12 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({
this.key_bind();
},
+ onRender: function() {
+ this.initialize_player();
+ this.initialize_clip_lines();
+ this.$('.js-keyboard-key').val(this.model.get('key'));
+ },
+
initialize_player: function() {
var that = this;
$.embedly.oembed(this.model.get('url')).done(function(results){