2018-05-09 12:01:36 +05:30
|
|
|
import $ from 'jquery';
|
2017-08-17 22:00:37 +05:30
|
|
|
import Vue from 'vue';
|
2020-06-23 00:09:42 +05:30
|
|
|
import { GlButton, GlTooltipDirective } from '@gitlab/ui';
|
2019-07-31 22:56:46 +05:30
|
|
|
import { __ } from '~/locale';
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
export default Vue.extend({
|
2020-06-23 00:09:42 +05:30
|
|
|
components: {
|
|
|
|
GlButton,
|
|
|
|
},
|
|
|
|
directives: {
|
|
|
|
GlTooltip: GlTooltipDirective,
|
|
|
|
},
|
2017-08-17 22:00:37 +05:30
|
|
|
props: {
|
2018-11-08 19:23:39 +05:30
|
|
|
list: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({}),
|
2020-04-22 19:07:51 +05:30
|
|
|
required: false,
|
2018-11-08 19:23:39 +05:30
|
|
|
},
|
2017-08-17 22:00:37 +05:30
|
|
|
},
|
|
|
|
methods: {
|
2018-12-13 13:39:08 +05:30
|
|
|
deleteBoard() {
|
2017-08-17 22:00:37 +05:30
|
|
|
$(this.$el).tooltip('hide');
|
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
// eslint-disable-next-line no-alert
|
2019-07-31 22:56:46 +05:30
|
|
|
if (window.confirm(__('Are you sure you want to delete this list?'))) {
|
2017-08-17 22:00:37 +05:30
|
|
|
this.list.destroy();
|
|
|
|
}
|
2018-12-13 13:39:08 +05:30
|
|
|
},
|
|
|
|
},
|
2017-08-17 22:00:37 +05:30
|
|
|
});
|