plugin_count - do not count hidden notices
This commit is contained in:
parent
330fdd2430
commit
cecbea8148
@ -150,9 +150,9 @@ var NoticeManager = (function ($, document) {
|
|||||||
getNotices: () => notices,
|
getNotices: () => notices,
|
||||||
|
|
||||||
getNoticesTopPriority: () => {
|
getNoticesTopPriority: () => {
|
||||||
if ( notices.filter( selectors_error.join(", ") ).length )
|
if (notices.filter(":visible").filter(selectors_error.join(", ")).length)
|
||||||
return 'error';
|
return 'error';
|
||||||
if ( notices.filter( selectors_warning.join(", ") ).length )
|
if (notices.filter(":visible").filter(selectors_warning.join(", ")).length)
|
||||||
return 'warning';
|
return 'warning';
|
||||||
return 'notice';
|
return 'notice';
|
||||||
},
|
},
|
||||||
@ -186,7 +186,7 @@ var NoticeManager = (function ($, document) {
|
|||||||
addCounter: () => {
|
addCounter: () => {
|
||||||
if (!button.children('.plugin-count').length){
|
if (!button.children('.plugin-count').length){
|
||||||
button.append(
|
button.append(
|
||||||
$("<span/>").text(notices.length).attr({
|
$("<span/>").text(notices.filter(":visible").length).attr({
|
||||||
class: "plugin-count",
|
class: "plugin-count",
|
||||||
}).addClass(NoticeManager.getNoticesTopPriority())
|
}).addClass(NoticeManager.getNoticesTopPriority())
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user