+++ /dev/null
-/*\r
- * jquery.simulate - simulate browser mouse and keyboard events\r
- *\r
- * Copyright (c) 2009 Eduardo Lundgren (eduardolundgren@gmail.com)\r
- * and Richard D. Worth (rdworth@gmail.com)\r
- *\r
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) \r
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.\r
- *\r
- */\r
-\r
-;(function($) {\r
-\r
-$.fn.extend({\r
- simulate: function(type, options) {\r
- return this.each(function() {\r
- var opt = $.extend({}, $.simulate.defaults, options || {});\r
- new $.simulate(this, type, opt);\r
- });\r
- }\r
-});\r
-\r
-$.simulate = function(el, type, options) {\r
- this.target = el;\r
- this.options = options;\r
-\r
- if (/^drag$/.test(type)) {\r
- this[type].apply(this, [this.target, options]);\r
- } else {\r
- this.simulateEvent(el, type, options);\r
- }\r
-}\r
-\r
-$.extend($.simulate.prototype, {\r
- simulateEvent: function(el, type, options) {\r
- var evt = this.createEvent(type, options);\r
- this.dispatchEvent(el, type, evt, options);\r
- return evt;\r
- },\r
- createEvent: function(type, options) {\r
- if (/^mouse(over|out|down|up|move)|(dbl)?click$/.test(type)) {\r
- return this.mouseEvent(type, options);\r
- } else if (/^key(up|down|press)$/.test(type)) {\r
- return this.keyboardEvent(type, options);\r
- }\r
- },\r
- mouseEvent: function(type, options) {\r
- var evt;\r
- var e = $.extend({\r
- bubbles: true, cancelable: (type != "mousemove"), view: window, detail: 0,\r
- screenX: 0, screenY: 0, clientX: 0, clientY: 0,\r
- ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,\r
- button: 0, relatedTarget: undefined\r
- }, options);\r
-\r
- var relatedTarget = $(e.relatedTarget)[0];\r
-\r
- if ($.isFunction(document.createEvent)) {\r
- evt = document.createEvent("MouseEvents");\r
- evt.initMouseEvent(type, e.bubbles, e.cancelable, e.view, e.detail,\r
- e.screenX, e.screenY, e.clientX, e.clientY,\r
- e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,\r
- e.button, e.relatedTarget || document.body.parentNode);\r
- } else if (document.createEventObject) {\r
- evt = document.createEventObject();\r
- $.extend(evt, e);\r
- evt.button = { 0:1, 1:4, 2:2 }[evt.button] || evt.button;\r
- }\r
- return evt;\r
- },\r
- keyboardEvent: function(type, options) {\r
- var evt;\r
-\r
- var e = $.extend({ bubbles: true, cancelable: true, view: window,\r
- ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,\r
- keyCode: 0, charCode: 0\r
- }, options);\r
-\r
- if ($.isFunction(document.createEvent)) {\r
- try {\r
- evt = document.createEvent("KeyEvents");\r
- evt.initKeyEvent(type, e.bubbles, e.cancelable, e.view,\r
- e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,\r
- e.keyCode, e.charCode);\r
- } catch(err) {\r
- evt = document.createEvent("Events");\r
- evt.initEvent(type, e.bubbles, e.cancelable);\r
- $.extend(evt, { view: e.view,\r
- ctrlKey: e.ctrlKey, altKey: e.altKey, shiftKey: e.shiftKey, metaKey: e.metaKey,\r
- keyCode: e.keyCode, charCode: e.charCode\r
- });\r
- }\r
- } else if (document.createEventObject) {\r
- evt = document.createEventObject();\r
- $.extend(evt, e);\r
- }\r
- if ($.browser.msie || $.browser.opera) {\r
- evt.keyCode = (e.charCode > 0) ? e.charCode : e.keyCode;\r
- evt.charCode = undefined;\r
- }\r
- return evt;\r
- },\r
-\r
- dispatchEvent: function(el, type, evt) {\r
- if (el.dispatchEvent) {\r
- el.dispatchEvent(evt);\r
- } else if (el.fireEvent) {\r
- el.fireEvent('on' + type, evt);\r
- }\r
- return evt;\r
- },\r
-\r
- drag: function(el) {\r
- var self = this, center = this.findCenter(this.target), \r
- options = this.options, x = Math.floor(center.x), y = Math.floor(center.y), \r
- dx = options.dx || 0, dy = options.dy || 0, target = this.target;\r
- var coord = { clientX: x, clientY: y };\r
- this.simulateEvent(target, "mousedown", coord);\r
- coord = { clientX: x + 1, clientY: y + 1 };\r
- this.simulateEvent(document, "mousemove", coord);\r
- coord = { clientX: x + dx, clientY: y + dy };\r
- this.simulateEvent(document, "mousemove", coord);\r
- this.simulateEvent(document, "mousemove", coord);\r
- this.simulateEvent(target, "mouseup", coord);\r
- },\r
- findCenter: function(el) {\r
- var el = $(this.target), o = el.offset();\r
- return {\r
- x: o.left + el.outerWidth() / 2,\r
- y: o.top + el.outerHeight() / 2\r
- };\r
- }\r
-});\r
-\r
-$.extend($.simulate, {\r
- defaults: {\r
- speed: 'sync'\r
- },\r
- VK_TAB: 9,\r
- VK_ENTER: 13,\r
- VK_ESC: 27,\r
- VK_PGUP: 33,\r
- VK_PGDN: 34,\r
- VK_END: 35,\r
- VK_HOME: 36,\r
- VK_LEFT: 37,\r
- VK_UP: 38,\r
- VK_RIGHT: 39,\r
- VK_DOWN: 40\r
-});\r
-\r
-})(jQuery);\r
--- /dev/null
+/*\r
+ * jquery.simulate - simulate browser mouse and keyboard events\r
+ *\r
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)\r
+ * Dual licensed under the MIT (MIT-LICENSE.txt)\r
+ * and GPL (GPL-LICENSE.txt) licenses.\r
+ *\r
+ */\r
+\r
+;(function($) {\r
+\r
+$.fn.extend({\r
+ simulate: function(type, options) {\r
+ return this.each(function() {\r
+ var opt = $.extend({}, $.simulate.defaults, options || {});\r
+ new $.simulate(this, type, opt);\r
+ });\r
+ }\r
+});\r
+\r
+$.simulate = function(el, type, options) {\r
+ this.target = el;\r
+ this.options = options;\r
+\r
+ if (/^drag$/.test(type)) {\r
+ this[type].apply(this, [this.target, options]);\r
+ } else {\r
+ this.simulateEvent(el, type, options);\r
+ }\r
+}\r
+\r
+$.extend($.simulate.prototype, {\r
+ simulateEvent: function(el, type, options) {\r
+ var evt = this.createEvent(type, options);\r
+ this.dispatchEvent(el, type, evt, options);\r
+ return evt;\r
+ },\r
+ createEvent: function(type, options) {\r
+ if (/^mouse(over|out|down|up|move)|(dbl)?click$/.test(type)) {\r
+ return this.mouseEvent(type, options);\r
+ } else if (/^key(up|down|press)$/.test(type)) {\r
+ return this.keyboardEvent(type, options);\r
+ }\r
+ },\r
+ mouseEvent: function(type, options) {\r
+ var evt;\r
+ var e = $.extend({\r
+ bubbles: true, cancelable: (type != "mousemove"), view: window, detail: 0,\r
+ screenX: 0, screenY: 0, clientX: 0, clientY: 0,\r
+ ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,\r
+ button: 0, relatedTarget: undefined\r
+ }, options);\r
+\r
+ var relatedTarget = $(e.relatedTarget)[0];\r
+\r
+ if ($.isFunction(document.createEvent)) {\r
+ evt = document.createEvent("MouseEvents");\r
+ evt.initMouseEvent(type, e.bubbles, e.cancelable, e.view, e.detail,\r
+ e.screenX, e.screenY, e.clientX, e.clientY,\r
+ e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,\r
+ e.button, e.relatedTarget || document.body.parentNode);\r
+ } else if (document.createEventObject) {\r
+ evt = document.createEventObject();\r
+ $.extend(evt, e);\r
+ evt.button = { 0:1, 1:4, 2:2 }[evt.button] || evt.button;\r
+ }\r
+ return evt;\r
+ },\r
+ keyboardEvent: function(type, options) {\r
+ var evt;\r
+\r
+ var e = $.extend({ bubbles: true, cancelable: true, view: window,\r
+ ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,\r
+ keyCode: 0, charCode: 0\r
+ }, options);\r
+\r
+ if ($.isFunction(document.createEvent)) {\r
+ try {\r
+ evt = document.createEvent("KeyEvents");\r
+ evt.initKeyEvent(type, e.bubbles, e.cancelable, e.view,\r
+ e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,\r
+ e.keyCode, e.charCode);\r
+ } catch(err) {\r
+ evt = document.createEvent("Events");\r
+ evt.initEvent(type, e.bubbles, e.cancelable);\r
+ $.extend(evt, { view: e.view,\r
+ ctrlKey: e.ctrlKey, altKey: e.altKey, shiftKey: e.shiftKey, metaKey: e.metaKey,\r
+ keyCode: e.keyCode, charCode: e.charCode\r
+ });\r
+ }\r
+ } else if (document.createEventObject) {\r
+ evt = document.createEventObject();\r
+ $.extend(evt, e);\r
+ }\r
+ if ($.browser.msie || $.browser.opera) {\r
+ evt.keyCode = (e.charCode > 0) ? e.charCode : e.keyCode;\r
+ evt.charCode = undefined;\r
+ }\r
+ return evt;\r
+ },\r
+\r
+ dispatchEvent: function(el, type, evt) {\r
+ if (el.dispatchEvent) {\r
+ el.dispatchEvent(evt);\r
+ } else if (el.fireEvent) {\r
+ el.fireEvent('on' + type, evt);\r
+ }\r
+ return evt;\r
+ },\r
+\r
+ drag: function(el) {\r
+ var self = this, center = this.findCenter(this.target), \r
+ options = this.options, x = Math.floor(center.x), y = Math.floor(center.y), \r
+ dx = options.dx || 0, dy = options.dy || 0, target = this.target;\r
+ var coord = { clientX: x, clientY: y };\r
+ this.simulateEvent(target, "mousedown", coord);\r
+ coord = { clientX: x + 1, clientY: y + 1 };\r
+ this.simulateEvent(document, "mousemove", coord);\r
+ coord = { clientX: x + dx, clientY: y + dy };\r
+ this.simulateEvent(document, "mousemove", coord);\r
+ this.simulateEvent(document, "mousemove", coord);\r
+ this.simulateEvent(target, "mouseup", coord);\r
+ },\r
+ findCenter: function(el) {\r
+ var el = $(this.target), o = el.offset();\r
+ return {\r
+ x: o.left + el.outerWidth() / 2,\r
+ y: o.top + el.outerHeight() / 2\r
+ };\r
+ }\r
+});\r
+\r
+$.extend($.simulate, {\r
+ defaults: {\r
+ speed: 'sync'\r
+ },\r
+ VK_TAB: 9,\r
+ VK_ENTER: 13,\r
+ VK_ESC: 27,\r
+ VK_PGUP: 33,\r
+ VK_PGDN: 34,\r
+ VK_END: 35,\r
+ VK_HOME: 36,\r
+ VK_LEFT: 37,\r
+ VK_UP: 38,\r
+ VK_RIGHT: 39,\r
+ VK_DOWN: 40\r
+});\r
+\r
+})(jQuery);\r
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="accordion_core.js"></script>
<script type="text/javascript" src="accordion_defaults.js"></script>
<script type="text/javascript" src="../../../ui/ui.tabs.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="../../../external/jquery.cookie-r6165.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="../core/core.js"></script>
<script type="text/javascript" src="../core/selector.js"></script>
<script type="text/javascript" src="../../../ui/ui.tabs.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="../../../external/jquery.cookie-r6165.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<style type="text/css">
@import "../../../themes/base/ui.datepicker.css";
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="core.js"></script>
<script type="text/javascript" src="selector.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="datepicker_core.js"></script>
<script type="text/javascript" src="datepicker_defaults.js"></script>
<link type="text/css" href="testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="testsuite.js"></script>
<script type="text/javascript" src="../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="../../external/jquery.cookie-r6165.js"></script>
+ <script type="text/javascript" src="../jquery.simulate.js"></script>
<script type="text/javascript" src="draggable/draggable_defaults.js"></script>
<script type="text/javascript" src="droppable/droppable_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="dialog_core.js"></script>
<script type="text/javascript" src="dialog_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="draggable_core.js"></script>
<script type="text/javascript" src="draggable_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="droppable_core.js"></script>
<script type="text/javascript" src="droppable_defaults.js"></script>
<script type="text/javascript" src="../../ui/ui.sortable.js"></script>
<script type="text/javascript" src="../../ui/ui.tabs.js"></script>
- <script type="text/javascript" src="../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="../../external/jquery.cookie-r6165.js"></script>
+ <script type="text/javascript" src="../jquery.simulate.js"></script>
</head>
<body>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="progressbar_core.js"></script>
<script type="text/javascript" src="progressbar_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="resizable_core.js"></script>
<script type="text/javascript" src="resizable_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="selectable_core.js"></script>
<script type="text/javascript" src="selectable_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="slider_core.js"></script>
<script type="text/javascript" src="slider_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="sortable_core.js"></script>
<script type="text/javascript" src="sortable_defaults.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
<script type="text/javascript" src="../testsuite.js"></script>
<script type="text/javascript" src="../../../external/testrunner-r6343.js"></script>
- <script type="text/javascript" src="../../../external/jquery.simulate-r6163.js"></script>
<script type="text/javascript" src="../../../external/jquery.cookie-r6165.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
<script type="text/javascript" src="tabs_core.js"></script>
<script type="text/javascript" src="tabs_defaults.js"></script>