From 03ee738beeb4eaa6a73714ec90db712e3f1a267f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 19 Oct 2018 14:31:51 +0200 Subject: [PATCH] listen on collection events to allow usage of field on collection --- CHANGELOG.md | 4 ++++ Resources/public/module/async_upload/uploader.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4136b5f0a..bbc51c230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,3 +13,7 @@ Version 1.5.2 You must add `"dropzone": "^5.5.1"` to your dependencies in `packages.json` at the root project. +Master branch +============= + +- the javascript for uploading a file now works within collections, listening to collection events. diff --git a/Resources/public/module/async_upload/uploader.js b/Resources/public/module/async_upload/uploader.js index 7362a26ec..2f2b6f74e 100644 --- a/Resources/public/module/async_upload/uploader.js +++ b/Resources/public/module/async_upload/uploader.js @@ -227,3 +227,7 @@ var insertDownloadButton = (zone) => { window.addEventListener('load', function(e) { searchForZones(document); }); + +window.addEventListener('collection-add-entry', function(e) { + searchForZones(e.detail.entry); +});