mirror of https://gitee.com/y_project/RuoYi.git
优化表格行拖拽事件处理
parent
47075cb6f5
commit
f63590c116
|
@ -152,11 +152,16 @@ jQuery.tableDnD = {
|
||||||
config.dragHandle
|
config.dragHandle
|
||||||
// We only need to add the event to the specified cells
|
// We only need to add the event to the specified cells
|
||||||
&& $(config.dragHandle, table).each(function() {
|
&& $(config.dragHandle, table).each(function() {
|
||||||
// The cell is bound to "this"
|
if (! $(this).hasClass("nodrag")) {
|
||||||
$(this).bind(startEvent, function(e) {
|
// The cell is bound to "this"
|
||||||
$.tableDnD.initialiseDrag($(this).parents('tr')[0], table, this, e, config);
|
$(this).bind(startEvent, function(e) {
|
||||||
return false;
|
if (e.target.tagName === "TD" && event.target.className !== "nodrag") {
|
||||||
});
|
$.tableDnD.initialiseDrag($(this).parents('tr')[0], table, this, e, config);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// For backwards compatibility, we add the event to the whole row
|
// For backwards compatibility, we add the event to the whole row
|
||||||
// get all the rows as a wrapped set
|
// get all the rows as a wrapped set
|
||||||
|
|
Loading…
Reference in New Issue