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", {
1818 draggable : true ,
1919 height : "auto" ,
2020 hide : null ,
21+ icons : {
22+ title : null
23+ } ,
2124 maxHeight : null ,
2225 maxWidth : null ,
2326 minHeight : 150 ,
Original file line number Diff line number Diff line change 2727 overflow : hidden;
2828 text-overflow : ellipsis;
2929}
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+ }
3039.ui-dialog .ui-dialog-titlebar-close {
3140 position : absolute;
3241 right : .3em ;
Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ $.widget( "ui.dialog", {
5858 draggable : true ,
5959 hide : null ,
6060 height : "auto" ,
61+ icons : {
62+ title : null
63+ } ,
6164 maxHeight : null ,
6265 maxWidth : null ,
6366 minHeight : 150 ,
@@ -404,7 +407,7 @@ $.widget( "ui.dialog", {
404407 } ,
405408
406409 _createTitlebar : function ( ) {
407- var uiDialogTitle ;
410+ var uiDialogTitle , uiDialogTitleIcon ;
408411
409412 this . uiDialogTitlebar = $ ( "<div>" ) ;
410413 this . _addClass ( this . uiDialogTitlebar ,
@@ -446,6 +449,12 @@ $.widget( "ui.dialog", {
446449 this . _addClass ( uiDialogTitle , "ui-dialog-title" ) ;
447450 this . _title ( uiDialogTitle ) ;
448451
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+
449458 this . uiDialogTitlebar . prependTo ( this . uiDialog ) ;
450459
451460 this . uiDialog . attr ( {
You can’t perform that action at this time.
0 commit comments