From 677fdbf7bef71d12998191e0b97c2c5cd34349be Mon Sep 17 00:00:00 2001 From: Alexander Schmitz Date: Wed, 15 Jul 2015 17:08:07 -0400 Subject: [PATCH] Core: Move $.ui.ie into its own module Ref #9647 --- ui/core.js | 4 +--- ui/ie.js | 15 +++++++++++++++ ui/mouse.js | 1 + ui/sortable.js | 1 + 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 ui/ie.js diff --git a/ui/core.js b/ui/core.js index fc91c2742..006011f3c 100644 --- a/ui/core.js +++ b/ui/core.js @@ -25,6 +25,7 @@ "./escape-selector", "./focusable", "./form", + "./ie", "./version" ], factory ); } else { @@ -238,9 +239,6 @@ if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) { }; } -// deprecated -$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); - // $.ui.plugin is deprecated. Use $.widget() extensions instead. $.ui.plugin = { add: function( module, option, set ) { diff --git a/ui/ie.js b/ui/ie.js new file mode 100644 index 000000000..1ce6a8450 --- /dev/null +++ b/ui/ie.js @@ -0,0 +1,15 @@ +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery", "./version" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +} ( function( $ ) { + +// This file is deprecated +return $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); +} ) ); diff --git a/ui/mouse.js b/ui/mouse.js index e197fd60a..a48a799c5 100644 --- a/ui/mouse.js +++ b/ui/mouse.js @@ -18,6 +18,7 @@ // AMD. Register as an anonymous module. define([ "jquery", + "./ie", "./version", "./widget" ], factory ); diff --git a/ui/sortable.js b/ui/sortable.js index 8bd267649..2258e3c62 100644 --- a/ui/sortable.js +++ b/ui/sortable.js @@ -22,6 +22,7 @@ "jquery", "./core", "./data", + "./ie", "./mouse", "./version", "./widget" -- 2.39.5