Use notice close button from WP
Notice close button looked different than the WP-native one. This reuses the WP button. [MAILPOET-1448]
This commit is contained in:
@ -1,10 +1,3 @@
|
|||||||
.mailpoet_notice
|
.mailpoet_notice
|
||||||
position: relative
|
position: relative
|
||||||
clear: both
|
clear: both
|
||||||
|
|
||||||
.mailpoet_notice_close
|
|
||||||
position: absolute
|
|
||||||
right: 0.5em
|
|
||||||
top: 0.5em
|
|
||||||
color: #999
|
|
||||||
text-decoration: none !important
|
|
||||||
|
@ -172,8 +172,8 @@ define('notice', ['mailpoet', 'jquery'], function (mp, jQuery) { // eslint-disab
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.options.hideClose === false) {
|
if (this.options.hideClose === false) {
|
||||||
this.element.append('<a href="javascript:;" class="mailpoet_notice_close"><span class="dashicons dashicons-dismiss"></span></a>');
|
this.element.append('<button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>');
|
||||||
this.element.find('.mailpoet_notice_close').on('click', function () { // eslint-disable-line func-names
|
this.element.find('.notice-dismiss').on('click', function () { // eslint-disable-line func-names
|
||||||
jQuery(this).trigger('close');
|
jQuery(this).trigger('close');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user