Skip to content

Commit

Permalink
admin: add JS initialization for new uploaded files
Browse files Browse the repository at this point in the history
  • Loading branch information
vitek-rostislav committed Sep 2, 2024
1 parent f228cdf commit d87c91a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/js/admin/components/FileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export default class FileUpload {
this.items[id].setLabel(file.name, file.size);
this.items[id].setName(file.name.split('.').slice(0, -1).join('.'));
this.$uploadedFiles.append($uploadedFile);
(new Register()).registerNewContent($uploadedFile);
}

createNewUploadedFile () {
Expand Down
1 change: 1 addition & 0 deletions assets/js/admin/components/MultiplePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default class MultiplePicker {
const _this = this;

_this.items.push($item);
(new Register()).registerNewContent($item);
$item.find('.js-picker-item-button-delete').click(() => {
_this.removeItem($item);
});
Expand Down

0 comments on commit d87c91a

Please sign in to comment.