').addClass('play-pause')
+ .on('click', this.togglePlayPause.bind(this))
+ .appendTo(this.$controls);
+ this.$next = $('
').addClass('next')
+ .on('click', this.next.bind(this))
+ .appendTo(this.$controls);
+ this.$controls.addClass('ready');
+ }
this.refresh();
},
refresh(){
diff --git a/sites/all/themes/custom/edlptheme/assets/scripts/main.js b/sites/all/themes/custom/edlptheme/assets/scripts/main.js
index d97417d42..7eef23a27 100644
--- a/sites/all/themes/custom/edlptheme/assets/scripts/main.js
+++ b/sites/all/themes/custom/edlptheme/assets/scripts/main.js
@@ -663,17 +663,18 @@
this.$composer = $('.composition_ui .composer');
this.$compo = $('.composition_ui .composer .composition');
this.$controls = $('.composition_ui .composer .compo-player-controls');
- this.$previous = $('
').addClass('previous')
- .on('click', this.prev.bind(this))
- .appendTo(this.$controls);
- this.$playpause = $('
').addClass('play-pause')
- .on('click', this.togglePlayPause.bind(this))
- .appendTo(this.$controls);
- this.$next = $('
').addClass('next')
- .on('click', this.next.bind(this))
- .appendTo(this.$controls);
- // this.$playpause = $('.compo-player-controls', this.$composer)
- // .on('click', this.togglePlayPause.bind(this));
+ if(!this.$controls.is('.ready')){
+ this.$previous = $('
').addClass('previous')
+ .on('click', this.prev.bind(this))
+ .appendTo(this.$controls);
+ this.$playpause = $('
').addClass('play-pause')
+ .on('click', this.togglePlayPause.bind(this))
+ .appendTo(this.$controls);
+ this.$next = $('
').addClass('next')
+ .on('click', this.next.bind(this))
+ .appendTo(this.$controls);
+ this.$controls.addClass('ready');
+ }
this.refresh();
},
refresh(){