mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:48:26 -06:00
do not show the clic count in category tag
This commit is contained in:
parent
e70526d851
commit
53a430be9d
@ -53,9 +53,12 @@ Discourse.ClickTrack = {
|
||||
if (!ownLink) {
|
||||
var $badge = $('span.badge', $link);
|
||||
if ($badge.length === 1) {
|
||||
// don't update counts in oneboxes (except when we force it)
|
||||
if ($link.closest(".onebox-result").length === 0 || $link.hasClass("track-link")) {
|
||||
$badge.html(parseInt($badge.html(), 10) + 1);
|
||||
// don't update counts in category badge
|
||||
if ($link.closest('.badge-category').length === 0) {
|
||||
// nor in oneboxes (except when we force it)
|
||||
if ($link.closest(".onebox-result").length === 0 || $link.hasClass("track-link")) {
|
||||
$badge.html(parseInt($badge.html(), 10) + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -171,9 +171,12 @@ Discourse.PostView = Discourse.View.extend({
|
||||
postView.$(".cooked a[href]").each(function() {
|
||||
var link = $(this);
|
||||
if (link.attr('href') === lc.url) {
|
||||
// don't display badge counts in oneboxes (except when we force it)
|
||||
if (link.closest(".onebox-result").length === 0 || link.hasClass("track-link")) {
|
||||
link.append("<span class='badge badge-notification clicks' title='" + Em.String.i18n("topic_summary.clicks") + "'>" + lc.clicks + "</span>");
|
||||
// don't display badge counts on category badge
|
||||
if (link.closest('.badge-category').length === 0) {
|
||||
// nor in oneboxes (except when we force it)
|
||||
if (link.closest(".onebox-result").length === 0 || link.hasClass("track-link")) {
|
||||
link.append("<span class='badge badge-notification clicks' title='" + Em.String.i18n("topic_summary.clicks") + "'>" + lc.clicks + "</span>");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user