@@ -39,16 +39,15 @@ instance.edi.EdiImport = instance.web.Widget.extend({
39
39
} ) ;
40
40
}
41
41
else {
42
- $ ( '<div>' ) . dialog ( {
43
- modal : true ,
44
- title : 'Import Successful!' ,
45
- buttons : {
46
- Ok : function ( ) {
47
- $ ( this ) . dialog ( "close" ) ;
48
- window . location = "/" ;
42
+ new instance . web . Dialog ( this , {
43
+ title : 'Import Successful!' ,
44
+ buttons : {
45
+ Ok : function ( ) {
46
+ this . parents ( '.modal' ) . modal ( 'hide' ) ;
47
+ window . location = "/" ;
48
+ }
49
49
}
50
- }
51
- } ) . html ( _t ( 'The document has been successfully imported!' ) ) ;
50
+ } , $ ( '<div>' ) . html ( _t ( 'The document has been successfully imported!' ) ) ) . open ( ) ;
52
51
}
53
52
} ,
54
53
on_imported_error : function ( response ) {
@@ -58,13 +57,12 @@ instance.edi.EdiImport = instance.web.Widget.extend({
58
57
msg += "\n " + _t ( "Reason:" ) + response . data . message ;
59
58
}
60
59
var params = { error : response , message : msg } ;
61
- $ ( instance . web . qweb . render ( "CrashManager.warning" , params ) ) . dialog ( {
62
- title : _t ( "Document Import Notification" ) ,
63
- modal : true ,
64
- buttons : {
65
- Ok : function ( ) { $ ( this ) . dialog ( "close" ) ; }
66
- }
67
- } ) ;
60
+ new instance . web . Dialog ( this , {
61
+ title : _t ( "Document Import Notification" ) ,
62
+ buttons : {
63
+ Ok : function ( ) { this . parents ( '.modal' ) . modal ( 'hide' ) ; }
64
+ }
65
+ } , $ ( instance . web . qweb . render ( "CrashManager.warning" , params ) ) ) . open ( ) ;
68
66
}
69
67
} ) ;
70
68
0 commit comments