提交 2c9454cb 编写于 作者: C Catouse

* refactor code.

上级 34023423
......@@ -67,14 +67,12 @@
Boards.prototype.bind = function(items) {
var $boards = this.$,
setting = this.options;
if(typeof(items) == 'undefined') {
items = $boards.find('.board-item:not(".disable-drop, .board-item-shadow")');
}
items.droppable($.extend({
$boards.droppable($.extend({
before: setting.before,
target: '.board-item:not(".disable-drop, .board-item-shadow")',
flex: true,
selector: '.board-item:not(".disable-drop, .board-item-shadow")',
start: function(e) {
$boards.addClass('dragging').find('.board-item-shadow').height(e.element.outerHeight());
},
......
......@@ -124,7 +124,7 @@
}, 100);
}
$(document).bind('mousemove', mouseMove).bind('mouseup', mouseUp);
$(document).on('mousemove', mouseMove).on('mouseup', mouseUp);
event.preventDefault();
function mouseMove(event) {
......@@ -225,7 +225,7 @@
dashboard.find('.panel-dragging').removeClass('panel-dragging');
row.find('.dragging-in').removeClass('dragging-in');
dashboard.removeClass('dashboard-dragging');
$(document).unbind('mousemove', mouseMove).unbind('mouseup', mouseUp);
$(document).off('mousemove', mouseMove).off('mouseup', mouseUp);
event.preventDefault();
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册