From aa425ab95d6be06337ccb435c1405f6ac38ba8b9 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Fri, 22 Aug 2014 17:01:50 -0400 Subject: [PATCH] Build: Pull in jquery.simulate.js from Bower Fixes #10563 --- Gruntfile.js | 3 ++ bower.json | 1 + external/jquery-simulate/LICENSE.txt | 37 +++++++++++++++++++ .../jquery-simulate}/jquery.simulate.js | 8 ++-- tests/unit/accordion/accordion.html | 2 +- tests/unit/autocomplete/autocomplete.html | 2 +- tests/unit/button/button.html | 2 +- tests/unit/core/core.html | 2 +- tests/unit/core/core_deprecated.html | 2 +- tests/unit/datepicker/datepicker.html | 2 +- tests/unit/dialog/dialog.html | 2 +- tests/unit/draggable/draggable.html | 2 +- tests/unit/droppable/droppable.html | 2 +- tests/unit/effects/effects.html | 2 +- tests/unit/menu/menu.html | 2 +- tests/unit/position/position.html | 2 +- tests/unit/progressbar/progressbar.html | 2 +- tests/unit/resizable/resizable.html | 2 +- tests/unit/selectable/selectable.html | 2 +- tests/unit/selectmenu/selectmenu.html | 2 +- tests/unit/slider/slider.html | 2 +- tests/unit/sortable/sortable.html | 2 +- tests/unit/spinner/spinner.html | 2 +- tests/unit/tabs/tabs.html | 2 +- tests/unit/tooltip/tooltip.html | 2 +- tests/unit/widget/widget.html | 2 +- 26 files changed, 68 insertions(+), 25 deletions(-) create mode 100644 external/jquery-simulate/LICENSE.txt rename {tests => external/jquery-simulate}/jquery.simulate.js (98%) diff --git a/Gruntfile.js b/Gruntfile.js index a3d545ce3..72236561f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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", diff --git a/bower.json b/bower.json index 6cff526ef..6067e9512 100644 --- a/bower.json +++ b/bower.json @@ -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 index 000000000..24cad742e --- /dev/null +++ b/external/jquery-simulate/LICENSE.txt @@ -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/tests/jquery.simulate.js b/external/jquery-simulate/jquery.simulate.js similarity index 98% rename from tests/jquery.simulate.js rename to external/jquery-simulate/jquery.simulate.js index 28e8a103b..4a96cc310 100644 --- a/tests/jquery.simulate.js +++ b/external/jquery-simulate/jquery.simulate.js @@ -1,12 +1,12 @@ /*! - * jQuery Simulate v0.0.1 - simulate browser mouse and keyboard events + * 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: Sun Dec 9 12:15:33 2012 -0500 + * Date: 2014-08-22 */ ;(function( $, undefined ) { @@ -201,7 +201,9 @@ $.extend( $.simulate.prototype, { }, dispatchEvent: function( elem, type, event ) { - if ( elem.dispatchEvent ) { + if ( elem[ type ] ) { + elem[ type ](); + } else if ( elem.dispatchEvent ) { elem.dispatchEvent( event ); } else if ( elem.fireEvent ) { elem.fireEvent( "on" + type, event ); diff --git a/tests/unit/accordion/accordion.html b/tests/unit/accordion/accordion.html index c16b3e6ea..5a76ba566 100644 --- a/tests/unit/accordion/accordion.html +++ b/tests/unit/accordion/accordion.html @@ -7,7 +7,7 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +