@@ -29,12 +29,12 @@ var abp = abp || {};
2929 title : 'Are you sure?' ,
3030 showCancelButton : true ,
3131 reverseButtons : true
32- } ,
33- prompt : {
34- icon : 'question' ,
35- input : 'text' ,
36- showCancelButton : true ,
37- reverseButtons : true
32+ } ,
33+ prompt : {
34+ icon : 'question' ,
35+ input : 'text' ,
36+ showCancelButton : true ,
37+ reverseButtons : true
3838 }
3939 }
4040 } ;
@@ -98,42 +98,42 @@ var abp = abp || {};
9898 ) ;
9999
100100 return $ . Deferred ( function ( $dfd ) {
101- Swal . fire ( opts ) . then ( result => {
101+ Swal . fire ( opts ) . then ( result => {
102102 callback && callback ( result . value ) ;
103103 $dfd . resolve ( result . value ) ;
104104 } )
105105 } ) ;
106106 } ;
107107
108- abp . message . prompt = function ( message , titleOrOptionsOrCallback , callback ) {
109-
110- var userOpts = {
111- html : abp . utils . htmlEscape ( message ) . replace ( / \n / g, '<br>' )
112- } ;
113-
114- if ( $ . isFunction ( titleOrOptionsOrCallback ) ) {
115- callback = titleOrOptionsOrCallback ;
116- } else if ( typeof titleOrOptionsOrCallback === 'string' ) {
117- userOpts . title = titleOrOptionsOrCallback ;
118- } else if ( $ . isPlainObject ( titleOrOptionsOrCallback ) ) {
119- userOpts = $ . extend ( userOpts , titleOrOptionsOrCallback ) ;
120- }
121-
122- var opts = $ . extend (
123- { } ,
124- abp . libs . sweetAlert . config [ 'default' ] ,
125- abp . libs . sweetAlert . config . prompt ,
126- userOpts
127- ) ;
128-
129- return $ . Deferred ( function ( $dfd ) {
130- Swal . fire ( opts ) . then ( function ( result ) {
131- var value = result && result . isConfirmed ? result . value : null ;
132- callback && callback ( value ) ;
133- $dfd . resolve ( value ) ;
134- } ) ;
135- } ) ;
136- } ;
108+ abp . message . prompt = function ( message , titleOrOptionsOrCallback , callback ) {
109+
110+ var userOpts = {
111+ html : abp . utils . htmlEscape ( message ) . replace ( / \n / g, '<br>' )
112+ } ;
113+
114+ if ( $ . isFunction ( titleOrOptionsOrCallback ) ) {
115+ callback = titleOrOptionsOrCallback ;
116+ } else if ( typeof titleOrOptionsOrCallback === 'string' ) {
117+ userOpts . title = titleOrOptionsOrCallback ;
118+ } else if ( $ . isPlainObject ( titleOrOptionsOrCallback ) ) {
119+ userOpts = $ . extend ( userOpts , titleOrOptionsOrCallback ) ;
120+ }
121+
122+ var opts = $ . extend (
123+ { } ,
124+ abp . libs . sweetAlert . config [ 'default' ] ,
125+ abp . libs . sweetAlert . config . prompt ,
126+ userOpts
127+ ) ;
128+
129+ return $ . Deferred ( function ( $dfd ) {
130+ Swal . fire ( opts ) . then ( function ( result ) {
131+ var value = result && result . isConfirmed ? result . value : null ;
132+ callback && callback ( value ) ;
133+ $dfd . resolve ( value ) ;
134+ } ) ;
135+ } ) ;
136+ } ;
137137
138138 abp . event . on ( 'abp.configurationInitialized' , function ( ) {
139139 var l = abp . localization . getResource ( 'AbpUi' ) ;
0 commit comments