summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-03-06 12:53:25 +0000
committerPhil Hughes <me@iamphill.com>2017-03-06 12:53:25 +0000
commit91e46dd4a27ddf06b9787a95f64f1dd9ea84bad6 (patch)
treea5af6a5997cdbe43307a401c44cedb4654ab629a
parent5bf2ab73ba1a812b90ec50be676378eb0ae58fa8 (diff)
downloadgitlab-ce-91e46dd4a27ddf06b9787a95f64f1dd9ea84bad6.tar.gz
Fixed issue when dragging a issue to the bottom when count element is visible
-rw-r--r--app/assets/javascripts/boards/components/board_list.js.es66
-rw-r--r--app/views/projects/boards/components/_board_list.html.haml3
2 files changed, 7 insertions, 2 deletions
diff --git a/app/assets/javascripts/boards/components/board_list.js.es6 b/app/assets/javascripts/boards/components/board_list.js.es6
index b6d367c0ac8..1330d4ae840 100644
--- a/app/assets/javascripts/boards/components/board_list.js.es6
+++ b/app/assets/javascripts/boards/components/board_list.js.es6
@@ -107,8 +107,12 @@ import boardCard from './board_card';
});
},
onUpdate: (e) => {
- gl.issueBoards.BoardsStore.moveIssueInList(this.list, Store.moving.issue, e.oldIndex, e.newIndex, this.sortable.toArray());
+ const sortedArray = this.sortable.toArray().filter(id => id !== '-1');
+ gl.issueBoards.BoardsStore.moveIssueInList(this.list, Store.moving.issue, e.oldIndex, e.newIndex, sortedArray);
},
+ onMove(e) {
+ return !e.related.classList.contains('board-list-count');
+ }
});
this.sortable = Sortable.create(this.$refs.list, options);
diff --git a/app/views/projects/boards/components/_board_list.html.haml b/app/views/projects/boards/components/_board_list.html.haml
index ee4bd05fffa..4a4dd84d5d2 100644
--- a/app/views/projects/boards/components/_board_list.html.haml
+++ b/app/views/projects/boards/components/_board_list.html.haml
@@ -17,7 +17,8 @@
":root-path" => "rootPath",
":disabled" => "disabled",
":key" => "issue.id" }
- %li.board-list-count.text-center{ "v-if" => "showCount" }
+ %li.board-list-count.text-center{ "v-if" => "showCount",
+ "data-issue-id" => "-1" }
= icon("spinner spin", "v-show" => "list.loadingMore" )
%span{ "v-if" => "list.issues.length === list.issuesSize" }
Showing all issues