--- a/src/pyams_media/zmi/video.py Thu Sep 20 13:47:23 2018 +0200
+++ b/src/pyams_media/zmi/video.py Thu Sep 20 14:33:50 2018 +0200
@@ -26,6 +26,7 @@
from pyams_form.schema import CloseButton
from pyams_media import _
from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.event import get_json_image_refresh_event
from pyams_skin.interfaces.viewlet import IContextActions
from pyams_skin.layer import IPyAMSLayer
from pyams_skin.viewlet.toolbar import ToolbarActionItem
@@ -141,9 +142,14 @@
def get_ajax_output(self, changes):
translate = self.request.localizer.translate
if changes:
+ thumbnails = IThumbnails(self.context)
+ thumbnail = thumbnails.get_thumbnail('128x128')
return {
'status': 'success',
- 'message': translate(_("Thumbnail selected successfully."))
+ 'message': translate(_("Thumbnail selected successfully.")),
+ 'events': [
+ get_json_image_refresh_event(thumbnail, self.request)
+ ]
}
else:
return {