File tree 1 file changed +4
-18
lines changed
webcompat/static/js/lib/models
1 file changed +4
-18
lines changed Original file line number Diff line number Diff line change 68
68
}
69
69
} ,
70
70
error : function ( ) {
71
- $ ( '<div></div>' , {
72
- 'class' : 'flash error' ,
73
- 'text' : 'There was an error editing this issues\'s status.'
74
- } ) . appendTo ( 'body' ) ;
75
-
76
- setTimeout ( function ( ) {
77
- var __flashmsg = $ ( '.flash' ) ;
78
- if ( __flashmsg . length ) { __flashmsg . fadeOut ( ) ; }
79
- } , 2000 ) ;
71
+ var msg = 'There was an error editing this issues\'s status.' ;
72
+ wcEvents . trigger ( 'flash:error' , { message : msg , timeout : 2000 } ) ;
80
73
}
81
74
} ) ;
82
75
} ,
102
95
self . set ( 'labels' , response ) ;
103
96
} ,
104
97
error : function ( ) {
105
- $ ( '<div></div>' , {
106
- 'class' : 'flash error' ,
107
- 'text' : 'There was an error setting labels.'
108
- } ) . appendTo ( 'body' ) ;
109
-
110
- setTimeout ( function ( ) {
111
- var __flashmsg = $ ( '.flash' ) ;
112
- if ( __flashmsg . length ) { __flashmsg . fadeOut ( ) ; }
113
- } , 2000 ) ;
98
+ var msg = 'There was an error setting labels.' ;
99
+ wcEvents . trigger ( 'flash:error' , { message : msg , timeout : 2000 } ) ;
114
100
}
115
101
} ) ;
116
102
}
You can’t perform that action at this time.
0 commit comments