Skip to content

Commit

Permalink
Changing sync videos button title based on state. Closes #784
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsielicki committed Nov 1, 2017
1 parent 009a7f2 commit 90e1dfc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,17 @@ $.widget("parameter_image.controls",
;

this.video_sync_button = $("\
<button class='btn btn-default btn-xs' data-toggle='button' title='Sync Videos'> \
<button class='btn btn-default btn-xs' data-toggle='button'> \
<span class='fa fa-video-camera' aria-hidden='true'></span> \
</button> \
")
.click(function(){
self.options["video-sync"] = !$(this).hasClass('active');
self._respond_open_images_changed();
self.element.trigger("video-sync", !$(this).hasClass('active'));
this.title = self.options["video-sync"] ? 'Unsync videos' : 'Sync videos';
})
.attr('title', self.options["video-sync"] ? 'Unsync videos' : 'Sync videos')
.appendTo(self.video_sync_button_wrapper)
;

Expand Down

0 comments on commit 90e1dfc

Please sign in to comment.