Skip to content

Commit

Permalink
Account for calendar post edition in editpost()
Browse files Browse the repository at this point in the history
- Calendar form doesn't have a dropzone nor link preview capability
  • Loading branch information
MrPetovan committed Jan 26, 2025
1 parent ea09ba1 commit 2786319
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions view/theme/frio/js/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,15 @@ function editpost(url) {

// To make dropzone fileupload work on editing a comment, we need to
// attach a new dropzone to modal
dzFactory.setupDropzone('#jot-text-wrap', 'profile-jot-text');
if ($('#jot-text-wrap').length > 0) {
dzFactory.setupDropzone('#jot-text-wrap', 'profile-jot-text');
}

modal.show();
$("#jot-popup").show();
linkPreview = $("#profile-jot-text").linkPreview();
if ($("#profile-jot-text").length > 0) {
linkPreview = $("#profile-jot-text").linkPreview();
}
}
});
}
Expand Down

0 comments on commit 2786319

Please sign in to comment.