summaryrefslogtreecommitdiff
path: root/assets/js/src
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-08-22 22:09:27 -0400
committerFrederic Guillot <fred@kanboard.net>2015-08-22 22:09:27 -0400
commit312dfbb89e287432ba108b448fbc036e7fda4e27 (patch)
tree80e56c9045bba363813f5d9a766c031808342587 /assets/js/src
parent1cc99dcf2a0e3a3397bfd4c644122f493a73d31b (diff)
Adjust automatically the height of the placeholder during drag and drop
Diffstat (limited to 'assets/js/src')
-rw-r--r--assets/js/src/Board.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/assets/js/src/Board.js b/assets/js/src/Board.js
index ad1903d4..83d2e6c3 100644
--- a/assets/js/src/Board.js
+++ b/assets/js/src/Board.js
@@ -99,8 +99,8 @@ Board.prototype.resizeColumnHeight = function() {
if ($(this).height() > 500) {
$(this).height(500);
}
- else if ($(this).height() == 0) {
- $(this).height(75);
+ else {
+ $(this).css("min-height", 100);
}
});
}
@@ -112,6 +112,7 @@ Board.prototype.resizeColumnHeight = function() {
Board.prototype.dragAndDrop = function() {
var self = this;
$(".board-task-list").sortable({
+ forcePlaceholderSize: true,
delay: 300,
distance: 5,
connectWith: ".board-task-list",
@@ -124,6 +125,9 @@ Board.prototype.dragAndDrop = function() {
ui.item.index() + 1,
ui.item.parent().attr('data-swimlane-id')
);
+ },
+ start: function(event, ui) {
+ ui.placeholder.height(ui.item.height());
}
});
};