]> source.dussan.org Git - jquery-ui.git/commitdiff
Build: Pull in jquery.simulate.js from Bower
authorMike Sherov <mike.sherov@gmail.com>
Fri, 22 Aug 2014 21:01:50 +0000 (17:01 -0400)
committerMike Sherov <mike.sherov@gmail.com>
Fri, 22 Aug 2014 21:01:50 +0000 (17:01 -0400)
Fixes #10563

27 files changed:
Gruntfile.js
bower.json
external/jquery-simulate/LICENSE.txt [new file with mode: 0644]
external/jquery-simulate/jquery.simulate.js [new file with mode: 0644]
tests/jquery.simulate.js [deleted file]
tests/unit/accordion/accordion.html
tests/unit/autocomplete/autocomplete.html
tests/unit/button/button.html
tests/unit/core/core.html
tests/unit/core/core_deprecated.html
tests/unit/datepicker/datepicker.html
tests/unit/dialog/dialog.html
tests/unit/draggable/draggable.html
tests/unit/droppable/droppable.html
tests/unit/effects/effects.html
tests/unit/menu/menu.html
tests/unit/position/position.html
tests/unit/progressbar/progressbar.html
tests/unit/resizable/resizable.html
tests/unit/selectable/selectable.html
tests/unit/selectmenu/selectmenu.html
tests/unit/slider/slider.html
tests/unit/sortable/sortable.html
tests/unit/spinner/spinner.html
tests/unit/tabs/tabs.html
tests/unit/tooltip/tooltip.html
tests/unit/widget/widget.html

index a3d545ce3e77711f8673e03a51f2bc10a39a0c04..72236561f59532e9953db4480f19b17b22ab36ee 100644 (file)
@@ -232,6 +232,9 @@ grunt.initConfig({
                                "jquery-mousewheel/jquery.mousewheel.js": "jquery-mousewheel/jquery.mousewheel.js",
                                "jquery-mousewheel/LICENSE.txt": "jquery-mousewheel/LICENSE.txt",
 
+                               "jquery-simulate/jquery.simulate.js": "jquery-simulate/jquery.simulate.js",
+                               "jquery-simulate/LICENSE.txt": "jquery-simulate/LICENSE.txt",
+
                                "jshint/jshint.js": "jshint/dist/jshint.js",
                                "jshint/LICENSE": "jshint/LICENSE",
 
index 6cff526ef85a93bef2e48fdf2aba9b7301686e66..6067e9512f5927157bcf06525d7e44ccb21ec85c 100644 (file)
@@ -12,6 +12,7 @@
        },
        "devDependencies": {
                "jquery-mousewheel": "3.1.12",
+               "jquery-simulate": "1.0.0",
                "jshint": "2.4.4",
                "qunit": "1.14.0",
 
diff --git a/external/jquery-simulate/LICENSE.txt b/external/jquery-simulate/LICENSE.txt
new file mode 100644 (file)
index 0000000..24cad74
--- /dev/null
@@ -0,0 +1,37 @@
+Copyright 2007, 2014 jQuery Foundation and other contributors,
+https://jquery.org/
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/jquery/jquery-simulate
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+All files located in the node_modules and external directories are
+externally maintained libraries used by this software which have their
+own licenses; we recommend you read them, as their terms may differ from
+the terms above.
diff --git a/external/jquery-simulate/jquery.simulate.js b/external/jquery-simulate/jquery.simulate.js
new file mode 100644 (file)
index 0000000..4a96cc3
--- /dev/null
@@ -0,0 +1,330 @@
+ /*!
+ * jQuery Simulate v1.0.0 - simulate browser mouse and keyboard events
+ * https://github.com/jquery/jquery-simulate
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * Date: 2014-08-22
+ */
+
+;(function( $, undefined ) {
+
+var rkeyEvent = /^key/,
+       rmouseEvent = /^(?:mouse|contextmenu)|click/;
+
+$.fn.simulate = function( type, options ) {
+       return this.each(function() {
+               new $.simulate( this, type, options );
+       });
+};
+
+$.simulate = function( elem, type, options ) {
+       var method = $.camelCase( "simulate-" + type );
+
+       this.target = elem;
+       this.options = options;
+
+       if ( this[ method ] ) {
+               this[ method ]();
+       } else {
+               this.simulateEvent( elem, type, options );
+       }
+};
+
+$.extend( $.simulate, {
+
+       keyCode: {
+               BACKSPACE: 8,
+               COMMA: 188,
+               DELETE: 46,
+               DOWN: 40,
+               END: 35,
+               ENTER: 13,
+               ESCAPE: 27,
+               HOME: 36,
+               LEFT: 37,
+               NUMPAD_ADD: 107,
+               NUMPAD_DECIMAL: 110,
+               NUMPAD_DIVIDE: 111,
+               NUMPAD_ENTER: 108,
+               NUMPAD_MULTIPLY: 106,
+               NUMPAD_SUBTRACT: 109,
+               PAGE_DOWN: 34,
+               PAGE_UP: 33,
+               PERIOD: 190,
+               RIGHT: 39,
+               SPACE: 32,
+               TAB: 9,
+               UP: 38
+       },
+
+       buttonCode: {
+               LEFT: 0,
+               MIDDLE: 1,
+               RIGHT: 2
+       }
+});
+
+$.extend( $.simulate.prototype, {
+
+       simulateEvent: function( elem, type, options ) {
+               var event = this.createEvent( type, options );
+               this.dispatchEvent( elem, type, event, options );
+       },
+
+       createEvent: function( type, options ) {
+               if ( rkeyEvent.test( type ) ) {
+                       return this.keyEvent( type, options );
+               }
+
+               if ( rmouseEvent.test( type ) ) {
+                       return this.mouseEvent( type, options );
+               }
+       },
+
+       mouseEvent: function( type, options ) {
+               var event, eventDoc, doc, body;
+               options = $.extend({
+                       bubbles: true,
+                       cancelable: (type !== "mousemove"),
+                       view: window,
+                       detail: 0,
+                       screenX: 0,
+                       screenY: 0,
+                       clientX: 1,
+                       clientY: 1,
+                       ctrlKey: false,
+                       altKey: false,
+                       shiftKey: false,
+                       metaKey: false,
+                       button: 0,
+                       relatedTarget: undefined
+               }, options );
+
+               if ( document.createEvent ) {
+                       event = document.createEvent( "MouseEvents" );
+                       event.initMouseEvent( type, options.bubbles, options.cancelable,
+                               options.view, options.detail,
+                               options.screenX, options.screenY, options.clientX, options.clientY,
+                               options.ctrlKey, options.altKey, options.shiftKey, options.metaKey,
+                               options.button, options.relatedTarget || document.body.parentNode );
+
+                       // IE 9+ creates events with pageX and pageY set to 0.
+                       // Trying to modify the properties throws an error,
+                       // so we define getters to return the correct values.
+                       if ( event.pageX === 0 && event.pageY === 0 && Object.defineProperty ) {
+                               eventDoc = event.relatedTarget.ownerDocument || document;
+                               doc = eventDoc.documentElement;
+                               body = eventDoc.body;
+
+                               Object.defineProperty( event, "pageX", {
+                                       get: function() {
+                                               return options.clientX +
+                                                       ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
+                                                       ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+                                       }
+                               });
+                               Object.defineProperty( event, "pageY", {
+                                       get: function() {
+                                               return options.clientY +
+                                                       ( doc && doc.scrollTop || body && body.scrollTop || 0 ) -
+                                                       ( doc && doc.clientTop || body && body.clientTop || 0 );
+                                       }
+                               });
+                       }
+               } else if ( document.createEventObject ) {
+                       event = document.createEventObject();
+                       $.extend( event, options );
+                       // standards event.button uses constants defined here: http://msdn.microsoft.com/en-us/library/ie/ff974877(v=vs.85).aspx
+                       // old IE event.button uses constants defined here: http://msdn.microsoft.com/en-us/library/ie/ms533544(v=vs.85).aspx
+                       // so we actually need to map the standard back to oldIE
+                       event.button = {
+                               0: 1,
+                               1: 4,
+                               2: 2
+                       }[ event.button ] || ( event.button === -1 ? 0 : event.button );
+               }
+
+               return event;
+       },
+
+       keyEvent: function( type, options ) {
+               var event;
+               options = $.extend({
+                       bubbles: true,
+                       cancelable: true,
+                       view: window,
+                       ctrlKey: false,
+                       altKey: false,
+                       shiftKey: false,
+                       metaKey: false,
+                       keyCode: 0,
+                       charCode: undefined
+               }, options );
+
+               if ( document.createEvent ) {
+                       try {
+                               event = document.createEvent( "KeyEvents" );
+                               event.initKeyEvent( type, options.bubbles, options.cancelable, options.view,
+                                       options.ctrlKey, options.altKey, options.shiftKey, options.metaKey,
+                                       options.keyCode, options.charCode );
+                       // initKeyEvent throws an exception in WebKit
+                       // see: http://stackoverflow.com/questions/6406784/initkeyevent-keypress-only-works-in-firefox-need-a-cross-browser-solution
+                       // and also https://bugs.webkit.org/show_bug.cgi?id=13368
+                       // fall back to a generic event until we decide to implement initKeyboardEvent
+                       } catch( err ) {
+                               event = document.createEvent( "Events" );
+                               event.initEvent( type, options.bubbles, options.cancelable );
+                               $.extend( event, {
+                                       view: options.view,
+                                       ctrlKey: options.ctrlKey,
+                                       altKey: options.altKey,
+                                       shiftKey: options.shiftKey,
+                                       metaKey: options.metaKey,
+                                       keyCode: options.keyCode,
+                                       charCode: options.charCode
+                               });
+                       }
+               } else if ( document.createEventObject ) {
+                       event = document.createEventObject();
+                       $.extend( event, options );
+               }
+
+               if ( !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ) || (({}).toString.call( window.opera ) === "[object Opera]") ) {
+                       event.keyCode = (options.charCode > 0) ? options.charCode : options.keyCode;
+                       event.charCode = undefined;
+               }
+
+               return event;
+       },
+
+       dispatchEvent: function( elem, type, event ) {
+               if ( elem[ type ] ) {
+                       elem[ type ]();
+               } else if ( elem.dispatchEvent ) {
+                       elem.dispatchEvent( event );
+               } else if ( elem.fireEvent ) {
+                       elem.fireEvent( "on" + type, event );
+               }
+       },
+
+       simulateFocus: function() {
+               var focusinEvent,
+                       triggered = false,
+                       element = $( this.target );
+
+               function trigger() {
+                       triggered = true;
+               }
+
+               element.bind( "focus", trigger );
+               element[ 0 ].focus();
+
+               if ( !triggered ) {
+                       focusinEvent = $.Event( "focusin" );
+                       focusinEvent.preventDefault();
+                       element.trigger( focusinEvent );
+                       element.triggerHandler( "focus" );
+               }
+               element.unbind( "focus", trigger );
+       },
+
+       simulateBlur: function() {
+               var focusoutEvent,
+                       triggered = false,
+                       element = $( this.target );
+
+               function trigger() {
+                       triggered = true;
+               }
+
+               element.bind( "blur", trigger );
+               element[ 0 ].blur();
+
+               // blur events are async in IE
+               setTimeout(function() {
+                       // IE won't let the blur occur if the window is inactive
+                       if ( element[ 0 ].ownerDocument.activeElement === element[ 0 ] ) {
+                               element[ 0 ].ownerDocument.body.focus();
+                       }
+
+                       // Firefox won't trigger events if the window is inactive
+                       // IE doesn't trigger events if we had to manually focus the body
+                       if ( !triggered ) {
+                               focusoutEvent = $.Event( "focusout" );
+                               focusoutEvent.preventDefault();
+                               element.trigger( focusoutEvent );
+                               element.triggerHandler( "blur" );
+                       }
+                       element.unbind( "blur", trigger );
+               }, 1 );
+       }
+});
+
+
+
+/** complex events **/
+
+function findCenter( elem ) {
+       var offset,
+               document = $( elem.ownerDocument );
+       elem = $( elem );
+       offset = elem.offset();
+
+       return {
+               x: offset.left + elem.outerWidth() / 2 - document.scrollLeft(),
+               y: offset.top + elem.outerHeight() / 2 - document.scrollTop()
+       };
+}
+
+function findCorner( elem ) {
+       var offset,
+               document = $( elem.ownerDocument );
+       elem = $( elem );
+       offset = elem.offset();
+
+       return {
+               x: offset.left - document.scrollLeft(),
+               y: offset.top - document.scrollTop()
+       };
+}
+
+$.extend( $.simulate.prototype, {
+       simulateDrag: function() {
+               var i = 0,
+                       target = this.target,
+                       options = this.options,
+                       center = options.handle === "corner" ? findCorner( target ) : findCenter( target ),
+                       x = Math.floor( center.x ),
+                       y = Math.floor( center.y ),
+                       coord = { clientX: x, clientY: y },
+                       dx = options.dx || ( options.x !== undefined ? options.x - x : 0 ),
+                       dy = options.dy || ( options.y !== undefined ? options.y - y : 0 ),
+                       moves = options.moves || 3;
+
+               this.simulateEvent( target, "mousedown", coord );
+
+               for ( ; i < moves ; i++ ) {
+                       x += dx / moves;
+                       y += dy / moves;
+
+                       coord = {
+                               clientX: Math.round( x ),
+                               clientY: Math.round( y )
+                       };
+
+                       this.simulateEvent( target.ownerDocument, "mousemove", coord );
+               }
+
+               if ( $.contains( document, target ) ) {
+                       this.simulateEvent( target, "mouseup", coord );
+                       this.simulateEvent( target, "click", coord );
+               } else {
+                       this.simulateEvent( document, "mouseup", coord );
+               }
+       }
+});
+
+})( jQuery );
diff --git a/tests/jquery.simulate.js b/tests/jquery.simulate.js
deleted file mode 100644 (file)
index 28e8a10..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
- /*!
- * jQuery Simulate v0.0.1 - simulate browser mouse and keyboard events
- * https://github.com/jquery/jquery-simulate
- *
- * Copyright 2012 jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * Date: Sun Dec 9 12:15:33 2012 -0500
- */
-
-;(function( $, undefined ) {
-
-var rkeyEvent = /^key/,
-       rmouseEvent = /^(?:mouse|contextmenu)|click/;
-
-$.fn.simulate = function( type, options ) {
-       return this.each(function() {
-               new $.simulate( this, type, options );
-       });
-};
-
-$.simulate = function( elem, type, options ) {
-       var method = $.camelCase( "simulate-" + type );
-
-       this.target = elem;
-       this.options = options;
-
-       if ( this[ method ] ) {
-               this[ method ]();
-       } else {
-               this.simulateEvent( elem, type, options );
-       }
-};
-
-$.extend( $.simulate, {
-
-       keyCode: {
-               BACKSPACE: 8,
-               COMMA: 188,
-               DELETE: 46,
-               DOWN: 40,
-               END: 35,
-               ENTER: 13,
-               ESCAPE: 27,
-               HOME: 36,
-               LEFT: 37,
-               NUMPAD_ADD: 107,
-               NUMPAD_DECIMAL: 110,
-               NUMPAD_DIVIDE: 111,
-               NUMPAD_ENTER: 108,
-               NUMPAD_MULTIPLY: 106,
-               NUMPAD_SUBTRACT: 109,
-               PAGE_DOWN: 34,
-               PAGE_UP: 33,
-               PERIOD: 190,
-               RIGHT: 39,
-               SPACE: 32,
-               TAB: 9,
-               UP: 38
-       },
-
-       buttonCode: {
-               LEFT: 0,
-               MIDDLE: 1,
-               RIGHT: 2
-       }
-});
-
-$.extend( $.simulate.prototype, {
-
-       simulateEvent: function( elem, type, options ) {
-               var event = this.createEvent( type, options );
-               this.dispatchEvent( elem, type, event, options );
-       },
-
-       createEvent: function( type, options ) {
-               if ( rkeyEvent.test( type ) ) {
-                       return this.keyEvent( type, options );
-               }
-
-               if ( rmouseEvent.test( type ) ) {
-                       return this.mouseEvent( type, options );
-               }
-       },
-
-       mouseEvent: function( type, options ) {
-               var event, eventDoc, doc, body;
-               options = $.extend({
-                       bubbles: true,
-                       cancelable: (type !== "mousemove"),
-                       view: window,
-                       detail: 0,
-                       screenX: 0,
-                       screenY: 0,
-                       clientX: 1,
-                       clientY: 1,
-                       ctrlKey: false,
-                       altKey: false,
-                       shiftKey: false,
-                       metaKey: false,
-                       button: 0,
-                       relatedTarget: undefined
-               }, options );
-
-               if ( document.createEvent ) {
-                       event = document.createEvent( "MouseEvents" );
-                       event.initMouseEvent( type, options.bubbles, options.cancelable,
-                               options.view, options.detail,
-                               options.screenX, options.screenY, options.clientX, options.clientY,
-                               options.ctrlKey, options.altKey, options.shiftKey, options.metaKey,
-                               options.button, options.relatedTarget || document.body.parentNode );
-
-                       // IE 9+ creates events with pageX and pageY set to 0.
-                       // Trying to modify the properties throws an error,
-                       // so we define getters to return the correct values.
-                       if ( event.pageX === 0 && event.pageY === 0 && Object.defineProperty ) {
-                               eventDoc = event.relatedTarget.ownerDocument || document;
-                               doc = eventDoc.documentElement;
-                               body = eventDoc.body;
-
-                               Object.defineProperty( event, "pageX", {
-                                       get: function() {
-                                               return options.clientX +
-                                                       ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
-                                                       ( doc && doc.clientLeft || body && body.clientLeft || 0 );
-                                       }
-                               });
-                               Object.defineProperty( event, "pageY", {
-                                       get: function() {
-                                               return options.clientY +
-                                                       ( doc && doc.scrollTop || body && body.scrollTop || 0 ) -
-                                                       ( doc && doc.clientTop || body && body.clientTop || 0 );
-                                       }
-                               });
-                       }
-               } else if ( document.createEventObject ) {
-                       event = document.createEventObject();
-                       $.extend( event, options );
-                       // standards event.button uses constants defined here: http://msdn.microsoft.com/en-us/library/ie/ff974877(v=vs.85).aspx
-                       // old IE event.button uses constants defined here: http://msdn.microsoft.com/en-us/library/ie/ms533544(v=vs.85).aspx
-                       // so we actually need to map the standard back to oldIE
-                       event.button = {
-                               0: 1,
-                               1: 4,
-                               2: 2
-                       }[ event.button ] || ( event.button === -1 ? 0 : event.button );
-               }
-
-               return event;
-       },
-
-       keyEvent: function( type, options ) {
-               var event;
-               options = $.extend({
-                       bubbles: true,
-                       cancelable: true,
-                       view: window,
-                       ctrlKey: false,
-                       altKey: false,
-                       shiftKey: false,
-                       metaKey: false,
-                       keyCode: 0,
-                       charCode: undefined
-               }, options );
-
-               if ( document.createEvent ) {
-                       try {
-                               event = document.createEvent( "KeyEvents" );
-                               event.initKeyEvent( type, options.bubbles, options.cancelable, options.view,
-                                       options.ctrlKey, options.altKey, options.shiftKey, options.metaKey,
-                                       options.keyCode, options.charCode );
-                       // initKeyEvent throws an exception in WebKit
-                       // see: http://stackoverflow.com/questions/6406784/initkeyevent-keypress-only-works-in-firefox-need-a-cross-browser-solution
-                       // and also https://bugs.webkit.org/show_bug.cgi?id=13368
-                       // fall back to a generic event until we decide to implement initKeyboardEvent
-                       } catch( err ) {
-                               event = document.createEvent( "Events" );
-                               event.initEvent( type, options.bubbles, options.cancelable );
-                               $.extend( event, {
-                                       view: options.view,
-                                       ctrlKey: options.ctrlKey,
-                                       altKey: options.altKey,
-                                       shiftKey: options.shiftKey,
-                                       metaKey: options.metaKey,
-                                       keyCode: options.keyCode,
-                                       charCode: options.charCode
-                               });
-                       }
-               } else if ( document.createEventObject ) {
-                       event = document.createEventObject();
-                       $.extend( event, options );
-               }
-
-               if ( !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ) || (({}).toString.call( window.opera ) === "[object Opera]") ) {
-                       event.keyCode = (options.charCode > 0) ? options.charCode : options.keyCode;
-                       event.charCode = undefined;
-               }
-
-               return event;
-       },
-
-       dispatchEvent: function( elem, type, event ) {
-               if ( elem.dispatchEvent ) {
-                       elem.dispatchEvent( event );
-               } else if ( elem.fireEvent ) {
-                       elem.fireEvent( "on" + type, event );
-               }
-       },
-
-       simulateFocus: function() {
-               var focusinEvent,
-                       triggered = false,
-                       element = $( this.target );
-
-               function trigger() {
-                       triggered = true;
-               }
-
-               element.bind( "focus", trigger );
-               element[ 0 ].focus();
-
-               if ( !triggered ) {
-                       focusinEvent = $.Event( "focusin" );
-                       focusinEvent.preventDefault();
-                       element.trigger( focusinEvent );
-                       element.triggerHandler( "focus" );
-               }
-               element.unbind( "focus", trigger );
-       },
-
-       simulateBlur: function() {
-               var focusoutEvent,
-                       triggered = false,
-                       element = $( this.target );
-
-               function trigger() {
-                       triggered = true;
-               }
-
-               element.bind( "blur", trigger );
-               element[ 0 ].blur();
-
-               // blur events are async in IE
-               setTimeout(function() {
-                       // IE won't let the blur occur if the window is inactive
-                       if ( element[ 0 ].ownerDocument.activeElement === element[ 0 ] ) {
-                               element[ 0 ].ownerDocument.body.focus();
-                       }
-
-                       // Firefox won't trigger events if the window is inactive
-                       // IE doesn't trigger events if we had to manually focus the body
-                       if ( !triggered ) {
-                               focusoutEvent = $.Event( "focusout" );
-                               focusoutEvent.preventDefault();
-                               element.trigger( focusoutEvent );
-                               element.triggerHandler( "blur" );
-                       }
-                       element.unbind( "blur", trigger );
-               }, 1 );
-       }
-});
-
-
-
-/** complex events **/
-
-function findCenter( elem ) {
-       var offset,
-               document = $( elem.ownerDocument );
-       elem = $( elem );
-       offset = elem.offset();
-
-       return {
-               x: offset.left + elem.outerWidth() / 2 - document.scrollLeft(),
-               y: offset.top + elem.outerHeight() / 2 - document.scrollTop()
-       };
-}
-
-function findCorner( elem ) {
-       var offset,
-               document = $( elem.ownerDocument );
-       elem = $( elem );
-       offset = elem.offset();
-
-       return {
-               x: offset.left - document.scrollLeft(),
-               y: offset.top - document.scrollTop()
-       };
-}
-
-$.extend( $.simulate.prototype, {
-       simulateDrag: function() {
-               var i = 0,
-                       target = this.target,
-                       options = this.options,
-                       center = options.handle === "corner" ? findCorner( target ) : findCenter( target ),
-                       x = Math.floor( center.x ),
-                       y = Math.floor( center.y ),
-                       coord = { clientX: x, clientY: y },
-                       dx = options.dx || ( options.x !== undefined ? options.x - x : 0 ),
-                       dy = options.dy || ( options.y !== undefined ? options.y - y : 0 ),
-                       moves = options.moves || 3;
-
-               this.simulateEvent( target, "mousedown", coord );
-
-               for ( ; i < moves ; i++ ) {
-                       x += dx / moves;
-                       y += dy / moves;
-
-                       coord = {
-                               clientX: Math.round( x ),
-                               clientY: Math.round( y )
-                       };
-
-                       this.simulateEvent( target.ownerDocument, "mousemove", coord );
-               }
-
-               if ( $.contains( document, target ) ) {
-                       this.simulateEvent( target, "mouseup", coord );
-                       this.simulateEvent( target, "click", coord );
-               } else {
-                       this.simulateEvent( document, "mouseup", coord );
-               }
-       }
-});
-
-})( jQuery );
index c16b3e6ea8ec711551a5d315129102ea35ada7a6..5a76ba566ded2406ece8f8980c2dae5388763c8a 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 6c29c5d495ffd91b1aebedf12c47ae900df74422..e7ce6f6d5a106927fcb33d08337ac118c51932fd 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index ac16532cdccef7d86a894e6cfcef5a0d39b8a7e4..abda5c987f06741d579bef7c95453956093c0063 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 6490a4ae8b74db0f5b929f31e71d823730327579..2b66a9f32b30e570f6c2be569d8a3b8f6e999832 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index e6f2bbb06032ec35e487d1b0754f20af558cd3cc..65b142a5ad951b4ffc882be77dac938678444cff 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 4d2b3fd5b273bc1a053668e5e138e5205b72b916..136bd2f6b9bd88d3ef141fe80e14443a14607e40 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 49d15266ac2fbdef09cb97f6c085df2a029ce591..936316a363206f343139fe9ef0ef64323a9934e9 100644 (file)
@@ -10,7 +10,7 @@
        </script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 50e612206e3edbb6a0510862accb7aab72c8aeaf..8a19fc0463115cca86173b58968fc52e725cc256 100644 (file)
@@ -49,7 +49,7 @@
        </style>
 
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 8e4ee6f4c47942f01c85e02792b8c470133e9f14..03ff888e87b3098db41d8e954c3cc62398017bf5 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index d0190b9a52e7b518a5187bed3928c3e71fc2e805..d6cfdb7973be63516aa37bafd0e4a56b68aa8d8f 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 8e0ae61126829dc29bde0f44a741819fbc1f678a..05fdcee11412fe623c9efa7f055f4d20186b65be 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 81f67bc8e6eac7840fbfa2c151830dfeed7d3cf1..0cad7d322a7cf9889321f605b5ae97d1fb7b019b 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 280a77f3dd734d507d90acb270808c56d0d74b93..56a02bcd4d6e5d00f4816a7603e50c7b1223b94c 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index df7ad21932c8b70338a22bb6f0abb900f3ece865..5668c909a226ec3ef1e2c6d4ef2563794ad39414 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 7e56718d51e83a5d5988264790e439144ee8d961..cc4edf90969eac377c946dae92d45a27e8d74e59 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 9be5d719506ba1619dfa4c4e128e81120c8ee22d..618eea3d00a072849a8a0e93c81467ad5049240b 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 70658674b86f87f03c72aeb3f6247f5bd569146e..0142b5e6bdd9f375a00894008de6abf799c01085 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 8fe07ede12204e5c85dcfa9311f97fd702d285e5..d84a8c1e9e07d6e136375aa1c3263d722883bda9 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index dff2a36cdb652ffda02862b607a6d1c5f3ded466..58988d742350a9245096b3e79d35e397056f0570 100644 (file)
@@ -9,7 +9,7 @@
        <script src="../../../external/globalize/globalize.culture.ja-JP.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 06fd36f87eb98a1183a97b27c6f8197b8ad764eb..778639eb3479fb9f50f615dae6516cccf5b7996c 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 3e13977fd9d4ee9e3be0df859ed5842939fa0fed..18bd88c2c98e8adce53ff78d4f78c5d5d7121708 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({
index 1afc4a3f93e18766f5767089c06e682ef5d729b5..2b764abab9e41a3fe8f004e77350308f41e40e07 100644 (file)
@@ -7,7 +7,7 @@
        <script src="../../jquery.js"></script>
        <link rel="stylesheet" href="../../../external/qunit/qunit.css">
        <script src="../../../external/qunit/qunit.js"></script>
-       <script src="../../jquery.simulate.js"></script>
+       <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
        <script src="../testsuite.js"></script>
        <script>
        TestHelpers.loadResources({