Commit 522d53da authored by Phil Hughes's avatar Phil Hughes

Added some JS improvements

parent 1cb9de1b
(() => { (function () {
const Board = Vue.extend({ const Board = Vue.extend({
props: { props: {
list: Object, list: Object,
......
(() => { (function () {
const BoardBlankState = Vue.extend({ const BoardBlankState = Vue.extend({
methods: { methods: {
addDefaultLists: function () { addDefaultLists: function () {
......
(() => { (function () {
const BoardCard = Vue.extend({ const BoardCard = Vue.extend({
props: { props: {
issue: Object, issue: Object,
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
}, },
methods: { methods: {
deleteBoard: function () { deleteBoard: function () {
$(this.$el).tooltip('destroy'); $(this.$el).tooltip('hide');
if (confirm('Are you sure you want to delete this list?')) { if (confirm('Are you sure you want to delete this list?')) {
this.list.destroy(); this.list.destroy();
......
(() => { (function () {
const BoardList = Vue.extend({ const BoardList = Vue.extend({
props: { props: {
disabled: Boolean, disabled: Boolean,
...@@ -50,12 +50,13 @@ ...@@ -50,12 +50,13 @@
group: 'issues', group: 'issues',
disabled: this.disabled, disabled: this.disabled,
onAdd: (e) => { onAdd: (e) => {
const fromListId = parseInt(e.from.getAttribute('data-board')), const card = e.item,
fromListId = parseInt(e.from.getAttribute('data-board')),
toListId = parseInt(e.to.getAttribute('data-board')), toListId = parseInt(e.to.getAttribute('data-board')),
issueId = parseInt(e.item.getAttribute('data-issue')); issueId = parseInt(card.getAttribute('data-issue'));
// Remove the new dom element & let vue add the element // Remove the new dom element & let vue add the element
e.item.parentNode.removeChild(e.item); card.parentNode.removeChild(card);
BoardsStore.moveCardToList(fromListId, toListId, issueId); BoardsStore.moveCardToList(fromListId, toListId, issueId);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment