File tree 1 file changed +16
-7
lines changed
lib/web/jquery/ui-modules 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change 12
12
define ( [
13
13
'jquery' ,
14
14
'jquery-ui-modules/button' ,
15
- 'jquery-ui-modules/draggable' ,
16
- 'jquery-ui-modules/position' ,
17
- 'jquery-ui-modules/resizable'
15
+ 'jquery-ui-modules/position'
18
16
] , function ( $ , undefined ) {
19
17
20
18
var sizeRelatedOptions = {
@@ -107,11 +105,22 @@ define([
107
105
this . _createTitlebar ( ) ;
108
106
this . _createButtonPane ( ) ;
109
107
110
- if ( this . options . draggable && $ . fn . draggable ) {
111
- this . _makeDraggable ( ) ;
108
+ var widget = this ;
109
+
110
+ if ( this . options . draggable ) {
111
+ require ( [ 'jquery-ui-modules/draggable' ] , function ( ) {
112
+ if ( $ . fn . draggable ) {
113
+ widget . _makeDraggable ( ) ;
114
+ }
115
+ } ) ;
112
116
}
113
- if ( this . options . resizable && $ . fn . resizable ) {
114
- this . _makeResizable ( ) ;
117
+
118
+ if ( this . options . resizable ) {
119
+ require ( [ 'jquery-ui-modules/resizable' ] , function ( ) {
120
+ if ( $ . fn . resizable ) {
121
+ widget . _makeResizable ( ) ;
122
+ }
123
+ } ) ;
115
124
}
116
125
117
126
this . _isOpen = false ;
You can’t perform that action at this time.
0 commit comments