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([
6262
6363 if ( jqXHR . readyState === 4 ) {
6464 try {
65- $ ( 'body' ) . notification ( 'clear ' ) ;
65+ $ ( 'body' ) . notification ( 'clearCallbackError ' ) ;
6666 jsonObject = JSON . parse ( jqXHR . responseText ) ;
6767 if ( jsonObject . ajaxExpired && jsonObject . ajaxRedirect ) { //eslint-disable-line max-depth
6868 window . location . replace ( jsonObject . ajaxRedirect ) ;
@@ -87,7 +87,7 @@ define([
8787 * @param {String } message
8888 */
8989 insertMethod : function ( message ) {
90- var $wrapper = $ ( '<div></div>' ) . html ( message ) ;
90+ var $wrapper = $ ( '<div class="callback" ></div>' ) . html ( message ) ;
9191
9292 $ ( '.page-main-actions' ) . after ( $wrapper ) ;
9393 }
Original file line number Diff line number Diff line change @@ -77,6 +77,13 @@ define([
7777 */
7878 clear : function ( ) {
7979 $ ( 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 ( '' ) ;
8087 }
8188 } ) ;
8289
You can’t perform that action at this time.
0 commit comments