File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ common.testWidget( "dialog", {
18
18
draggable : true ,
19
19
height : "auto" ,
20
20
hide : null ,
21
+ icons : {
22
+ title : null
23
+ } ,
21
24
maxHeight : null ,
22
25
maxWidth : null ,
23
26
minHeight : 150 ,
Original file line number Diff line number Diff line change 27
27
overflow : hidden;
28
28
text-overflow : ellipsis;
29
29
}
30
+ .ui-dialog .ui-dialog-title-icon {
31
+ position : absolute;
32
+ left : 0.3em ;
33
+ top : 50% ;
34
+ margin-top : -10px ;
35
+ }
36
+ .ui-dialog-title-icon + .ui-dialog-title {
37
+ padding-left : 10px ;
38
+ }
30
39
.ui-dialog .ui-dialog-titlebar-close {
31
40
position : absolute;
32
41
right : .3em ;
Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ $.widget( "ui.dialog", {
58
58
draggable : true ,
59
59
hide : null ,
60
60
height : "auto" ,
61
+ icons : {
62
+ title : null
63
+ } ,
61
64
maxHeight : null ,
62
65
maxWidth : null ,
63
66
minHeight : 150 ,
@@ -404,7 +407,7 @@ $.widget( "ui.dialog", {
404
407
} ,
405
408
406
409
_createTitlebar : function ( ) {
407
- var uiDialogTitle ;
410
+ var uiDialogTitle , uiDialogTitleIcon ;
408
411
409
412
this . uiDialogTitlebar = $ ( "<div>" ) ;
410
413
this . _addClass ( this . uiDialogTitlebar ,
@@ -446,6 +449,12 @@ $.widget( "ui.dialog", {
446
449
this . _addClass ( uiDialogTitle , "ui-dialog-title" ) ;
447
450
this . _title ( uiDialogTitle ) ;
448
451
452
+ if ( this . options . icons . title ) {
453
+ uiDialogTitleIcon = $ ( "<span>" ) . prependTo ( this . uiDialogTitlebar ) ;
454
+ this . _addClass ( uiDialogTitleIcon , "ui-dialog-title-icon" ,
455
+ "ui-icon " + this . options . icons . title ) ;
456
+ }
457
+
449
458
this . uiDialogTitlebar . prependTo ( this . uiDialog ) ;
450
459
451
460
this . uiDialog . attr ( {
You can’t perform that action at this time.
0 commit comments