feat: add upload button to quickreply

This commit is contained in:
Barış Soner Uşaklı
2025-02-18 17:04:54 -05:00
parent 6245e33d6e
commit f67a0a124a
3 changed files with 5 additions and 3 deletions

View File

@@ -108,10 +108,10 @@
"nodebb-plugin-spam-be-gone": "2.3.1",
"nodebb-plugin-web-push": "0.7.2",
"nodebb-rewards-essentials": "1.0.1",
"nodebb-theme-harmony": "2.0.25",
"nodebb-theme-harmony": "2.0.26",
"nodebb-theme-lavender": "7.1.17",
"nodebb-theme-peace": "2.2.38",
"nodebb-theme-persona": "14.0.14",
"nodebb-theme-peace": "2.2.39",
"nodebb-theme-persona": "14.0.15",
"nodebb-widget-essentials": "7.0.32",
"nodemailer": "6.9.16",
"nprogress": "0.2.0",

View File

@@ -38,6 +38,7 @@ define('quickreply', [
});
uploadHelpers.init({
uploadBtnEl: $('[component="topic/quickreply/upload/button"]'),
dragDropAreaEl: $('[component="topic/quickreply/container"] .quickreply-message'),
pasteEl: element,
uploadFormEl: $('[component="topic/quickreply/upload"]'),

View File

@@ -41,6 +41,7 @@ define('uploadHelpers', ['alerts'], function (alerts) {
const fileInput = formEl.find('input[name="files[]"]');
options.uploadBtnEl.on('click', function () {
fileInput.trigger('click');
return false;
});
fileInput.on('change', function (e) {
const files = (e.target || {}).files ||