Commit 42ab97d6 authored by Seb's avatar Seb
Browse files

Fix thumbnail updating

parent 8a67f903
function createVideoChooser(id) {
var chooserElement = $('#' + id + '-chooser');
var previewVideo = chooserElement.find('.video-thumb img');
var previewVideo = chooserElement.find('.preview-image img');
var input = $('#' + id);
var editLink = chooserElement.find('.edit-link');
$('.action-choose', chooserElement).click(function() {
$('.action-choose', chooserElement).click(function () {
ModalWorkflow({
url: window.chooserUrls.videoChooser,
onload: VIDEO_CHOOSER_MODAL_ONLOAD_HANDLERS,
responses: {
videoChosen: function(videoData) {
videoChosen: function (videoData) {
input.val(videoData.id);
previewVideo.attr({
src: videoData.preview.url,
......@@ -22,7 +22,7 @@ function createVideoChooser(id) {
});
});
$('.action-clear', chooserElement).click(function() {
$('.action-clear', chooserElement).click(function () {
input.val('');
chooserElement.addClass('blank');
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment