From 0d5ea35d347219a9dca47ff68627fb3903072dd6 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Thu, 31 May 2012 17:27:28 +0200 Subject: [PATCH] Add jQuery UI touch punch jQuery UI Touch Punch is a small hack that enables the use of touch events on sites using the jQuery UI user interface library. Author: David Furfero License: MIT / GPL v2 Homepage: https://github.com/furf/jquery-ui-touch-punch --- .../0.2.2/jquery.ui.touch-punch.min.js | 11 +++++++++ ajax/libs/jqueryui-touch-punch/package.json | 24 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ajax/libs/jqueryui-touch-punch/0.2.2/jquery.ui.touch-punch.min.js create mode 100644 ajax/libs/jqueryui-touch-punch/package.json diff --git a/ajax/libs/jqueryui-touch-punch/0.2.2/jquery.ui.touch-punch.min.js b/ajax/libs/jqueryui-touch-punch/0.2.2/jquery.ui.touch-punch.min.js new file mode 100644 index 000000000..33d6f97e5 --- /dev/null +++ b/ajax/libs/jqueryui-touch-punch/0.2.2/jquery.ui.touch-punch.min.js @@ -0,0 +1,11 @@ +/* + * jQuery UI Touch Punch 0.2.2 + * + * Copyright 2011, Dave Furfero + * Dual licensed under the MIT or GPL Version 2 licenses. + * + * Depends: + * jquery.ui.widget.js + * jquery.ui.mouse.js + */ +(function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return;}var c=b.ui.mouse.prototype,e=c._mouseInit,a;function d(g,h){if(g.originalEvent.touches.length>1){return;}g.preventDefault();var i=g.originalEvent.changedTouches[0],f=document.createEvent("MouseEvents");f.initMouseEvent(h,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);g.target.dispatchEvent(f);}c._touchStart=function(g){var f=this;if(a||!f._mouseCapture(g.originalEvent.changedTouches[0])){return;}a=true;f._touchMoved=false;d(g,"mouseover");d(g,"mousemove");d(g,"mousedown");};c._touchMove=function(f){if(!a){return;}this._touchMoved=true;d(f,"mousemove");};c._touchEnd=function(f){if(!a){return;}d(f,"mouseup");d(f,"mouseout");if(!this._touchMoved){d(f,"click");}a=false;};c._mouseInit=function(){var f=this;f.element.bind("touchstart",b.proxy(f,"_touchStart")).bind("touchmove",b.proxy(f,"_touchMove")).bind("touchend",b.proxy(f,"_touchEnd"));e.call(f);};})(jQuery); \ No newline at end of file diff --git a/ajax/libs/jqueryui-touch-punch/package.json b/ajax/libs/jqueryui-touch-punch/package.json new file mode 100644 index 000000000..2719be469 --- /dev/null +++ b/ajax/libs/jqueryui-touch-punch/package.json @@ -0,0 +1,24 @@ +{ + "name": "jqueryui-touch-punch", + "filename": "jquery.ui.touch-punch.min.js", + "version": "0.2.2", + "description": "A small hack that enables the use of touch events on sites using the jQuery UI user interface library.", + "homepage": "http://touchpunch.furf.com/", + "keywords": [ + "touch", + "jquery", + "events" + ], + "maintainers": [ + { + "name": "David Furfero", + "web": "http://furf.com" + } + ], + "repositories": [ + { + "type": "git", + "url": "https://github.com/furf/jquery-ui-touch-punch.git" + } + ] +}