/usr/share/python-djangocms-admin-style-common/static/djangocms_admin_style/js/drag-touch-support.js is in python-djangocms-admin-style-common 1.2.2+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | if (window.jQuery || (window.django && window.django.jQuery)) {
(function ($) {
$.fn.touchSupport = function () {
function touchHandler(event) {
var touch = event.originalEvent.changedTouches[0];
var simulatedEvent = document.createEvent('MouseEvent');
simulatedEvent.initMouseEvent({
touchstart: 'mousedown',
touchmove: 'mousemove',
touchend: 'mouseup'
}[event.type], true, true, window, 1,
touch.screenX, touch.screenY,
touch.clientX, touch.clientY, false,
false, false, false, 0, null);
touch.target.dispatchEvent(simulatedEvent);
event.stopPropagation();
}
function init(elements) {
elements.on({
touchstart: touchHandler,
touchmove: touchHandler,
touchend: touchHandler,
touchcancel: touchHandler
});
}
init(this);
};
})(window.jQuery || window.django.jQuery);
}
|