diff --git a/src/sao.less b/src/sao.less index 6c425d8a7b..473fe04d2b 100644 --- a/src/sao.less +++ b/src/sao.less @@ -44,13 +44,10 @@ & .navbar-btn { .badge { - max-width: 3em; - min-width: 3em; - overflow: hidden; - text-overflow: ellipsis; - /* remove padding to not increase size of navbar-btn */ - margin-top: -3px; - margin-bottom: -3px; + position: absolute; + top: -5px; + right: -5px; + z-index: 1000; } } diff --git a/src/tab.js b/src/tab.js index 2f563ece78..a865e47cb5 100644 --- a/src/tab.js +++ b/src/tab.js @@ -861,7 +861,11 @@ 'class': 'badge' }).appendTo(this.buttons.attach); } - badge.text(count); + var text = count || ''; + if (count > 99) { + text = '99+'; + } + badge.text(text); this.buttons.attach.attr( 'title', Sao.i18n.gettext("Attachement(%1)", count)); var record_id = this.screen.get_id(); @@ -893,7 +897,11 @@ 'class': 'badge' }).appendTo(this.buttons.note); } - badge.text(unread); + var text = unread || ''; + if (unread > 99) { + text = '99+'; + } + badge.text(text); this.buttons.note.attr( 'title', Sao.i18n.gettext("Note(%1)", unread)); var record_id = this.screen.get_id();