Remove unused directive
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
This commit is contained in:
parent
7342c39fbe
commit
d4fe678fbf
1 changed files with 0 additions and 96 deletions
|
@ -1,96 +0,0 @@
|
|||
<!--
|
||||
Nextcloud - Tasks
|
||||
|
||||
@author Raimund Schlüßler
|
||||
@copyright 2018 Raimund Schlüßler <raimund.schluessler@mailbox.org>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
License as published by the Free Software Foundation; either
|
||||
version 3 of the License, or any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public
|
||||
License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-->
|
||||
|
||||
<template>
|
||||
<li v-click-outside="reset" :class="{confirmed: activated, active: armed}">
|
||||
<a class="confirmation-default" @click="activate($event)">
|
||||
<span class="icon-delete" />
|
||||
<span>{{ $t('tasks', 'Delete') }}</span>
|
||||
</a>
|
||||
<a :title="$t('tasks', 'Cancel')" class="confirmation-abort icon-close" @click="reset">
|
||||
<span />
|
||||
</a>
|
||||
<a v-tooltip="{
|
||||
placement: 'left',
|
||||
show: activated,
|
||||
trigger: 'manual',
|
||||
boundariesElement: 'body',
|
||||
content: message
|
||||
}"
|
||||
class="confirmation-confirm icon-delete-white no-permission"
|
||||
@click="deleteCalendar($event)">
|
||||
<span class="countdown">
|
||||
{{ remaining }}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ClickOutside from 'vue-click-outside'
|
||||
|
||||
export default {
|
||||
directives: {
|
||||
ClickOutside,
|
||||
},
|
||||
props: {
|
||||
message: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
remaining: 3,
|
||||
activated: false,
|
||||
armed: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset: function() {
|
||||
this.activated = false
|
||||
this.armed = false
|
||||
this.remaining = 3
|
||||
},
|
||||
activate: function(e) {
|
||||
this.activated = true
|
||||
this.countdown()
|
||||
e.stopPropagation()
|
||||
},
|
||||
countdown: function() {
|
||||
this.remaining--
|
||||
if (this.remaining > 0) {
|
||||
setTimeout(this.countdown, 1000)
|
||||
} else {
|
||||
this.armed = true
|
||||
}
|
||||
},
|
||||
deleteCalendar: function(e) {
|
||||
if (this.armed) {
|
||||
this.$emit('delete-calendar')
|
||||
this.activated = false
|
||||
} else {
|
||||
e.stopPropagation()
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
Loading…
Reference in a new issue