summaryrefslogtreecommitdiff
path: root/assets/js/src
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-08-29 15:13:14 -0400
committerFrederic Guillot <fred@kanboard.net>2015-08-29 15:13:14 -0400
commitef087f5e22df1a0d97babef26aaf9b8960ee6d5d (patch)
tree2c9b31f8deb852968866b84358cb77ec033d6bc2 /assets/js/src
parent913d891a408251338ee4a8ff48b71a67a3a8f3c9 (diff)
Add handle to move tasks on touch devices
Diffstat (limited to 'assets/js/src')
-rw-r--r--assets/js/src/Board.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/assets/js/src/Board.js b/assets/js/src/Board.js
index 9aa58a07..8d732c53 100644
--- a/assets/js/src/Board.js
+++ b/assets/js/src/Board.js
@@ -111,7 +111,7 @@ Board.prototype.resizeColumnHeight = function() {
Board.prototype.dragAndDrop = function() {
var self = this;
- $(".board-task-list").sortable({
+ var params = {
forcePlaceholderSize: true,
delay: 300,
distance: 5,
@@ -131,7 +131,14 @@ Board.prototype.dragAndDrop = function() {
ui.item.addClass("draggable-item-selected");
ui.placeholder.height(ui.item.height());
}
- });
+ };
+
+ if ($.support.touch) {
+ $(".task-board-sort-handle").css("display", "inline");
+ params["handle"] = ".task-board-sort-handle";
+ }
+
+ $(".board-task-list").sortable(params);
};
Board.prototype.listen = function() {