提交 6c3caa00 编写于 作者: P Phil Hughes

Fixed error when trying to drag list several times

上级 11497095
......@@ -36,7 +36,6 @@
},
ready: function () {
const options = _.extend({
// sort: false,
group: 'issues',
disabled: this.disabled,
onAdd: function (e) {
......
......@@ -79,7 +79,9 @@
listTo = this.findList('position', newIndex);
listFrom.position = newIndex;
if (newIndex > listTo.position) {
if (newIndex === listTo.position) {
listTo.position = oldIndex;
} else if (newIndex > listTo.position) {
listTo.position--;
} else {
listTo.position++;
......@@ -97,8 +99,6 @@
return issue.label;
});
listFrom.removeIssue(issue);
// Add to new lists issues if it doesn't already exist
if (!issueTo) {
listTo.addIssue(issue, listFrom);
......@@ -109,6 +109,8 @@
list.removeIssue(issue);
});
issue.removeLabels(listLabels);
} else {
listFrom.removeIssue(issue);
}
},
findList: function (key, val) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册