Changeset 872


Ignore:
Timestamp:
Sep 6, 2010, 12:07:41 PM (10 years ago)
Author:
duh
Message:

Automated continuous integration commit of minified JS/CSS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web-app/js/jquery.ui.ipad.min.js

    r871 r872  
     1$(function(){$.extend($.support,{touch:typeof Touch=="object"});if($.support.touch){document.addEventListener("touchstart",iPadTouchHandler,false);document.addEventListener("touchmove",iPadTouchHandler,false);document.addEventListener("touchend",iPadTouchHandler,false);document.addEventListener("touchcancel",iPadTouchHandler,false)}});var lastTap=null;var tapValid=false;var tapTimeout=null;function cancelTap(){tapValid=false}var rightClickPending=false;var rightClickEvent=null;var holdTimeout=null;var cancelMouseUp=false;function cancelHold(){if(rightClickPending){window.clearTimeout(holdTimeout);rightClickPending=false;rightClickEvent=null}}function startHold(a){if(rightClickPending){return}rightClickPending=true;rightClickEvent=(a.changedTouches)[0];holdTimeout=window.setTimeout("doRightClick();",800)}function doRightClick(){rightClickPending=false;var b=rightClickEvent,a=document.createEvent("MouseEvent");a.initMouseEvent("mouseup",true,true,window,1,b.screenX,b.screenY,b.clientX,b.clientY,false,false,false,false,0,null);b.target.dispatchEvent(a);a=document.createEvent("MouseEvent");a.initMouseEvent("mousedown",true,true,window,1,b.screenX,b.screenY,b.clientX,b.clientY,false,false,false,false,2,null);b.target.dispatchEvent(a);a=document.createEvent("MouseEvent");a.initMouseEvent("contextmenu",true,true,window,1,b.screenX+50,b.screenY+5,b.clientX+50,b.clientY+5,false,false,false,false,2,null);b.target.dispatchEvent(a);cancelMouseUp=true;rightClickEvent=null}function iPadTouchStart(c){var d=c.changedTouches,e=d[0],a="mouseover",b=document.createEvent("MouseEvent");b.initMouseEvent(a,true,true,window,1,e.screenX,e.screenY,e.clientX,e.clientY,false,false,false,false,0,null);e.target.dispatchEvent(b);a="mousedown";b=document.createEvent("MouseEvent");b.initMouseEvent(a,true,true,window,1,e.screenX,e.screenY,e.clientX,e.clientY,false,false,false,false,0,null);e.target.dispatchEvent(b);if(!tapValid){lastTap=e.target;tapValid=true;tapTimeout=window.setTimeout("cancelTap();",600);startHold(c)}else{window.clearTimeout(tapTimeout);if(e.target==lastTap){lastTap=null;tapValid=false;a="click";b=document.createEvent("MouseEvent");b.initMouseEvent(a,true,true,window,1,e.screenX,e.screenY,e.clientX,e.clientY,false,false,false,false,0,null);e.target.dispatchEvent(b);a="dblclick";b=document.createEvent("MouseEvent");b.initMouseEvent(a,true,true,window,1,e.screenX,e.screenY,e.clientX,e.clientY,false,false,false,false,0,null);e.target.dispatchEvent(b)}else{lastTap=e.target;tapValid=true;tapTimeout=window.setTimeout("cancelTap();",600);startHold(c)}}}function iPadTouchHandler(d){var b="",a=0;if(d.touches.length>1){return}switch(d.type){case"touchstart":if($(d.changedTouches[0].target).is("select")){return}iPadTouchStart(d);d.preventDefault();return false;break;case"touchmove":cancelHold();b="mousemove";d.preventDefault();break;case"touchend":if(cancelMouseUp){cancelMouseUp=false;d.preventDefault();return false}cancelHold();b="mouseup";break;default:return}var e=d.changedTouches,f=e[0],c=document.createEvent("MouseEvent");c.initMouseEvent(b,true,true,window,1,f.screenX,f.screenY,f.clientX,f.clientY,false,false,false,false,a,null);f.target.dispatchEvent(c);if(b=="mouseup"&&tapValid&&f.target==lastTap){c=document.createEvent("MouseEvent");c.initMouseEvent("click",true,true,window,1,f.screenX,f.screenY,f.clientX,f.clientY,false,false,false,false,a,null);f.target.dispatchEvent(c)}};
Note: See TracChangeset for help on using the changeset viewer.