]> git.mxchange.org Git - friendica.git/commitdiff
Account for calendar post edition in editpost()
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 26 Jan 2025 18:34:03 +0000 (13:34 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 26 Jan 2025 22:45:23 +0000 (17:45 -0500)
- Calendar form doesn't have a dropzone nor link preview capability

view/theme/frio/js/modal.js

index c7159018dfc659daf9563f04f1da14e25df1ac20..b62736a86a95e7174303c722d3abc43546d08f4c 100644 (file)
@@ -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();
+                       }
                }
        });
 }