X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/e6c778f6e92e584815a14d3e6a31a03a5e2ab7e1..fbb8f42993d02108b506028dc85466a0541be359:/src/redakcja/static/js/wiki/view_properties.js
diff --git a/src/redakcja/static/js/wiki/view_properties.js b/src/redakcja/static/js/wiki/view_properties.js
index 3d30fd32..51f26d50 100644
--- a/src/redakcja/static/js/wiki/view_properties.js
+++ b/src/redakcja/static/js/wiki/view_properties.js
@@ -162,12 +162,17 @@
modal.data('target-input', input);
var imglist = modal.find('.modal-body');
imglist.html('');
- $.each(self.doc.galleryImages, (i, imgItem) => {
- let img = $("").attr("src", imgItem.thumb).attr('title', imgItem.url).data('url', imgItem.url).on('click', function() {
- imglist.find('img').removeClass('active');
- $(this).addClass('active');
- });
- imglist.append(img);
+
+ self.doc.refreshImageGallery({
+ success: function(galleryImages) {
+ $.each(self.doc.galleryImages, (i, imgItem) => {
+ let img = $("").attr("src", imgItem.thumb).attr('title', imgItem.url).data('url', imgItem.url).on('click', function() {
+ imglist.find('img').removeClass('active');
+ $(this).addClass('active');
+ });
+ imglist.append(img);
+ });
+ }
});
})
$('#media-chooser .ctrl-ok').on('click', function (event) {