Hide badge when zero and use absolute position

issue7181
review39201002
This commit is contained in:
Cédric Krier committed 2018-03-25 23:52:51 +02:00
1 parent ad414f0a23
commit 1ed3b1f90b
2 files changed
+14 -9

No files matched your search

+10 -2
View File
@@ -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();