Révision b0dc3a2e
Ajouté par Julien Enselme il y a plus de 7 ans
drupal7/misc/tabledrag.js | ||
---|---|---|
106 | 106 |
|
107 | 107 |
// Add mouse bindings to the document. The self variable is passed along |
108 | 108 |
// as event handlers do not have direct access to the tableDrag object. |
109 |
$(document).bind('mousemove', function (event) { return self.dragRow(event, self); }); |
|
110 |
$(document).bind('mouseup', function (event) { return self.dropRow(event, self); }); |
|
109 |
$(document).bind('mousemove pointermove', function (event) { return self.dragRow(event, self); }); |
|
110 |
$(document).bind('mouseup pointerup', function (event) { return self.dropRow(event, self); }); |
|
111 |
$(document).bind('touchmove', function (event) { return self.dragRow(event.originalEvent.touches[0], self); }); |
|
112 |
$(document).bind('touchend', function (event) { return self.dropRow(event.originalEvent.touches[0], self); }); |
|
111 | 113 |
}; |
112 | 114 |
|
113 | 115 |
/** |
... | ... | |
274 | 276 |
}); |
275 | 277 |
|
276 | 278 |
// Add the mousedown action for the handle. |
277 |
handle.mousedown(function (event) { |
|
279 |
handle.bind('mousedown touchstart pointerdown', function (event) { |
|
280 |
if (event.originalEvent.type == "touchstart") { |
|
281 |
event = event.originalEvent.touches[0]; |
|
282 |
} |
|
278 | 283 |
// Create a new dragObject recording the event information. |
279 | 284 |
self.dragObject = {}; |
280 | 285 |
self.dragObject.initMouseOffset = self.getMouseOffset(item, event); |
Formats disponibles : Unified diff
Update to Drupal 7.52