File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ define([
62
62
63
63
if ( jqXHR . readyState === 4 ) {
64
64
try {
65
- $ ( 'body' ) . notification ( 'clear ' ) ;
65
+ $ ( 'body' ) . notification ( 'clearCallbackError ' ) ;
66
66
jsonObject = JSON . parse ( jqXHR . responseText ) ;
67
67
if ( jsonObject . ajaxExpired && jsonObject . ajaxRedirect ) { //eslint-disable-line max-depth
68
68
window . location . replace ( jsonObject . ajaxRedirect ) ;
@@ -87,7 +87,7 @@ define([
87
87
* @param {String } message
88
88
*/
89
89
insertMethod : function ( message ) {
90
- var $wrapper = $ ( '<div></div>' ) . html ( message ) ;
90
+ var $wrapper = $ ( '<div class="callback" ></div>' ) . html ( message ) ;
91
91
92
92
$ ( '.page-main-actions' ) . after ( $wrapper ) ;
93
93
}
Original file line number Diff line number Diff line change @@ -77,6 +77,13 @@ define([
77
77
*/
78
78
clear : function ( ) {
79
79
$ ( this . placeholder ) . html ( '' ) ;
80
+ } ,
81
+
82
+ /**
83
+ * Remove generic callback error message
84
+ */
85
+ clearCallbackError : function ( ) {
86
+ $ ( 'body' ) . find ( '.callback .messages .message-error' ) . parent ( ) . html ( '' ) ;
80
87
}
81
88
} ) ;
82
89
You can’t perform that action at this time.
0 commit comments