debian-mirror-gitlab/app/assets/javascripts/boards/components/board_delete.js

22 lines
397 B
JavaScript
Raw Normal View History

2018-05-09 12:01:36 +05:30
import $ from 'jquery';
2017-08-17 22:00:37 +05:30
import Vue from 'vue';
2018-12-13 13:39:08 +05:30
export default Vue.extend({
2017-08-17 22:00:37 +05:30
props: {
2018-11-08 19:23:39 +05:30
list: {
type: Object,
default: () => ({}),
},
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
2018-11-08 19:23:39 +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
});