summaryrefslogtreecommitdiffstats
path: root/views/composer/qml
diff options
context:
space:
mode:
Diffstat (limited to 'views/composer/qml')
-rw-r--r--views/composer/qml/View.qml26
1 files changed, 11 insertions, 15 deletions
diff --git a/views/composer/qml/View.qml b/views/composer/qml/View.qml
index de3a6a5b..9e390156 100644
--- a/views/composer/qml/View.qml
+++ b/views/composer/qml/View.qml
@@ -348,23 +348,19 @@ Kube.View {
348 text: qsTr("Attach file") 348 text: qsTr("Attach file")
349 349
350 onClicked: { 350 onClicked: {
351 fileDialogComponent.createObject(parent) 351 fileDialog.open()
352 } 352 }
353 353
354 Component { 354 Dialogs.FileDialog {
355 id: fileDialogComponent 355 id: fileDialog
356 Dialogs.FileDialog { 356 title: qsTr("Choose a file to attach")
357 id: fileDialog 357 folder: shortcuts.home
358 visible: true 358 selectFolder: false
359 title: qsTr("Choose a file to attach") 359 selectExisting: true
360 folder: shortcuts.home 360 selectMultiple: true
361 selectFolder: false 361 onAccepted: {
362 selectExisting: true 362 for (var i = 0; i < fileDialog.fileUrls.length; ++i) {
363 selectMultiple: true 363 composerController.attachments.add({url: fileDialog.fileUrls[i]})
364 onAccepted: {
365 for (var i = 0; i < fileDialog.fileUrls.length; ++i) {
366 composerController.attachments.add({url: fileDialog.fileUrls[i]})
367 }
368 } 364 }
369 } 365 }
370 } 366 }