File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 define ( [
2222 "jquery" ,
2323 "./data" ,
24- "./version" ] , factory ) ;
24+ "./disable-selection" ,
25+ "./version"
26+ ] , factory ) ;
2527 } else {
2628
2729 // Browser globals
@@ -284,24 +286,6 @@ if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) {
284286// deprecated
285287$ . ui . ie = ! ! / m s i e [ \w . ] + / . exec ( navigator . userAgent . toLowerCase ( ) ) ;
286288
287- $ . fn . extend ( {
288- disableSelection : ( function ( ) {
289- var eventType = "onselectstart" in document . createElement ( "div" ) ?
290- "selectstart" :
291- "mousedown" ;
292-
293- return function ( ) {
294- return this . on ( eventType + ".ui-disableSelection" , function ( event ) {
295- event . preventDefault ( ) ;
296- } ) ;
297- } ;
298- } ) ( ) ,
299-
300- enableSelection : function ( ) {
301- return this . off ( ".ui-disableSelection" ) ;
302- }
303- } ) ;
304-
305289// $.ui.plugin is deprecated. Use $.widget() extensions instead.
306290$ . ui . plugin = {
307291 add : function ( module , option , set ) {
Original file line number Diff line number Diff line change 1+ /*!
2+ * jQuery UI Disable Selection @VERSION
3+ * http://jqueryui.com
4+ *
5+ * Copyright jQuery Foundation and other contributors
6+ * Released under the MIT license.
7+ * http://jquery.org/license
8+ */
9+
10+ //>>label: disableSelection
11+ //>>group: Core
12+ //>>description: Disable selection of text content within the set of matched elements.
13+ //>>docs: http://api.jqueryui.com/disableSelection/
14+
15+ // This file is deprecated
16+ ( function ( factory ) {
17+ if ( typeof define === "function" && define . amd ) {
18+
19+ // AMD. Register as an anonymous module.
20+ define ( [ "jquery" , "./version" ] , factory ) ;
21+ } else {
22+
23+ // Browser globals
24+ factory ( jQuery ) ;
25+ }
26+ } ( function ( $ ) {
27+
28+ return $ . fn . extend ( {
29+ disableSelection : ( function ( ) {
30+ var eventType = "onselectstart" in document . createElement ( "div" ) ?
31+ "selectstart" :
32+ "mousedown" ;
33+
34+ return function ( ) {
35+ return this . on ( eventType + ".ui-disableSelection" , function ( event ) {
36+ event . preventDefault ( ) ;
37+ } ) ;
38+ } ;
39+ } ) ( ) ,
40+
41+ enableSelection : function ( ) {
42+ return this . off ( ".ui-disableSelection" ) ;
43+ }
44+ } ) ;
45+
46+ } ) ) ;
Original file line number Diff line number Diff line change 2323 define ( [
2424 "jquery" ,
2525 "./core" ,
26- "./version " ,
26+ "./disable-selection " ,
2727 "./mouse" ,
28+ "./version" ,
2829 "./widget"
2930 ] , factory ) ;
3031 } else {
You can’t perform that action at this time.
0 commit comments