File tree Expand file tree Collapse file tree 3 files changed +51
-20
lines changed Expand file tree Collapse file tree 3 files changed +51
-20
lines changed Original file line number Diff line number Diff line change 21
21
define ( [
22
22
"jquery" ,
23
23
"./data" ,
24
- "./version" ] , factory ) ;
24
+ "./disable-selection" ,
25
+ "./version"
26
+ ] , factory ) ;
25
27
} else {
26
28
27
29
// Browser globals
@@ -284,24 +286,6 @@ if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) {
284
286
// deprecated
285
287
$ . ui . ie = ! ! / m s i e [ \w . ] + / . exec ( navigator . userAgent . toLowerCase ( ) ) ;
286
288
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
-
305
289
// $.ui.plugin is deprecated. Use $.widget() extensions instead.
306
290
$ . ui . plugin = {
307
291
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 23
23
define ( [
24
24
"jquery" ,
25
25
"./core" ,
26
- "./version " ,
26
+ "./disable-selection " ,
27
27
"./mouse" ,
28
+ "./version" ,
28
29
"./widget"
29
30
] , factory ) ;
30
31
} else {
You can’t perform that action at this time.
0 commit comments