Change tab notification indicator

This commit is contained in:
Hadi Nategh
2020-07-24 11:32:52 +02:00
parent 8bb9111cd5
commit ae0349487d
6 changed files with 85 additions and 3 deletions

View File

@ -357,7 +357,10 @@ function egw_fw_ui_tab(_parent, _contHeaderDiv, _contDiv, _icon, _callback,
return true;
});
this.notificationDiv = document.createElement("div");
jQuery(this.notificationDiv).addClass('notifyTabDiv')
.hide()
.appendTo(this.headerDiv);
jQuery(this.headerDiv).append(this.closeButton);
//Create the icon and append it to the header div
@ -413,8 +416,7 @@ function egw_fw_ui_tab(_parent, _contHeaderDiv, _contDiv, _icon, _callback,
egw_fw_ui_tab.prototype.setNotification = function(_off)
{
this.notification = _off ? 0 : this.notification+1;
this.setTitle(this.notification > 0 ?
this.tag.displayName+ " (" + this.notification + ")" : this.tag.displayName);
jQuery(this.notificationDiv).text(this.notification).toggle(this.notification > 0);
};
/**