File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change 31
31
32
32
$ . widget ( "ui.dialog" , {
33
33
version : "@VERSION" ,
34
+ _elementsFromClassKey : function ( classKey ) {
35
+ switch ( classKey ) {
36
+ case "ui-dialog" :
37
+ return this . widget ( ) ;
38
+ case "ui-dialog-content" :
39
+ return this . element ;
40
+ case "ui-dialog-titlebar" :
41
+ return this . uiDialogTitlebar ;
42
+ case "ui-dialog-titlebar-close" :
43
+ if ( this . uiDialogTitlebar . hasClass ( classKey ) ) {
44
+ return this . uiDialogTitlebar ;
45
+ }
46
+ default :
47
+ return this . _superApply ( arguments ) ;
48
+ }
49
+ } ,
34
50
options : {
35
51
appendTo : "body" ,
36
52
autoOpen : true ,
@@ -395,8 +411,6 @@ $.widget( "ui.dialog", {
395
411
} ,
396
412
397
413
_createTitlebar : function ( ) {
398
- var uiDialogTitle ;
399
-
400
414
this . uiDialogTitlebar = $ ( "<div>" )
401
415
. addClass ( this . _classes ( "ui-dialog-titlebar" ) + " ui-widget-header ui-helper-clearfix" )
402
416
. prependTo ( this . uiDialog ) ;
@@ -432,14 +446,14 @@ $.widget( "ui.dialog", {
432
446
}
433
447
} ) ;
434
448
435
- uiDialogTitle = $ ( "<span>" )
449
+ this . uiDialogTitle = $ ( "<span>" )
436
450
. uniqueId ( )
437
451
. addClass ( this . _classes ( "ui-dialog-title" ) )
438
452
. prependTo ( this . uiDialogTitlebar ) ;
439
- this . _title ( uiDialogTitle ) ;
453
+ this . _title ( this . uiDialogTitle ) ;
440
454
441
455
this . uiDialog . attr ( {
442
- "aria-labelledby" : uiDialogTitle . attr ( "id" )
456
+ "aria-labelledby" : this . uiDialogTitle . attr ( "id" )
443
457
} ) ;
444
458
} ,
445
459
You can’t perform that action at this time.
0 commit comments