From 72c646444087e7bd1360ca1e510180bcd77476cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Sun, 9 Sep 2018 14:44:36 +0200 Subject: [PATCH] Add confirmation directive --- src/components/Confirmation.vue | 90 +++++++++++++++++++++++++++++++++ src/components/TheList.vue | 10 +++- 2 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 src/components/Confirmation.vue diff --git a/src/components/Confirmation.vue b/src/components/Confirmation.vue new file mode 100644 index 00000000..f7dfc923 --- /dev/null +++ b/src/components/Confirmation.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/src/components/TheList.vue b/src/components/TheList.vue index b68b2d78..ed92d108 100644 --- a/src/components/TheList.vue +++ b/src/components/TheList.vue @@ -84,7 +84,7 @@ License along with this library. If not, see . {{ t('tasks', 'Download') }} -
  • + @@ -159,6 +159,7 @@ License along with this library. If not, see . import { mapState, mapGetters } from 'vuex' import Colorpicker from './Colorpicker' import PopoverMenu from './PopoverMenu' +import Confirmation from './Confirmation' import clickOutside from 'vue-click-outside' @@ -166,6 +167,7 @@ export default { components: { 'colorpicker': Colorpicker, 'popover': PopoverMenu, + 'confirmation': Confirmation, clickOutside }, directives: { @@ -302,6 +304,12 @@ export default { check.allowed = true } return check + }, + deleteMessage: function(name) { + return t('tasks', 'This will delete the Calendar "%s" and all of its entries.').replace('%s', name) + }, + deleteCalendar: function(calendar) { + console.log('Delete calendar ' + calendar.uri) } } }