diff --git a/core/misc/jquery.ui.touch-punch.js b/core/misc/jquery.ui.touch-punch.js new file mode 100644 index 0000000000000000000000000000000000000000..33d6f97e5e6da98a226d5c223e70b014932fd3de --- /dev/null +++ b/core/misc/jquery.ui.touch-punch.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/core/modules/ckeditor/ckeditor.module b/core/modules/ckeditor/ckeditor.module index bf9ac8dc202a89b64a1a725c305d548f9783c22b..c53fefa12eaca85c5720a263b830ff9b7c5a50d2 100644 --- a/core/modules/ckeditor/ckeditor.module +++ b/core/modules/ckeditor/ckeditor.module @@ -46,6 +46,7 @@ function ckeditor_library_info() { array('system', 'jquery.once'), array('system', 'jquery.ui.sortable'), array('system', 'jquery.ui.draggable'), + array('system', 'jquery.ui.touch-punch'), ), ); $libraries['drupal.ckeditor.stylescombo.admin'] = array( diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 26048bf942c609f8b9ad7491a1073b6ac8e894bf..bcc6bee6360120d82ffc81491f40ba27c7c74ba3 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -2042,6 +2042,19 @@ function system_library_info() { ), ); + // Touch Punch for jQuery UI touch support. + $libraries['jquery.ui.touch-punch'] = array( + 'title' => 'jQuery UI Touch Punch', + 'website' => 'http://jqueryui.com/demos/effect/', + 'version' => '0.2.2', + 'js' => array( + 'core/misc/jquery.ui.touch-punch.js' => array(), + ), + 'dependencies' => array( + array('system', 'jquery.ui.core'), + ), + ); + // Underscore. $libraries['underscore'] = array( 'title' => 'Underscore.js',