The `quote-other-topic` class has been removed

This commit is contained in:
Robin Ward 2017-10-06 15:14:08 -04:00
parent 127c13314a
commit f4decf9193
6 changed files with 10 additions and 47 deletions

View File

@ -84,7 +84,7 @@ export default {
e.preventDefault();
// We don't track clicks on quote back buttons
if ($link.hasClass('back') || $link.hasClass('quote-other-topic')) { return true; }
if ($link.hasClass('back')) { return true; }
// Remove the href, put it as a data attribute
if (!$link.data('href')) {

View File

@ -161,21 +161,11 @@ export default class PostCooked {
const quoteTitle = I18n.t("post.follow_quote");
const postNumber = $aside.data('post');
// If we have a post reference
if (postNumber) {
// If we have a topic reference
const asideTopicId = parseInt($aside.data('topic'));
if (asideTopicId) {
// If it's the same topic as ours, build the URL from the topic object
if (this.attrs.topicId === asideTopicId) {
navLink = `<a href='${this._urlForPostNumber(postNumber)}' title='${quoteTitle}' class='back'></a>`;
}
} else {
// assume the same topic
navLink = `<a href='${this._urlForPostNumber(postNumber)}' title='${quoteTitle}' class='back'></a>`;
}
navLink = `<a href='${this._urlForPostNumber(postNumber)}' title='${quoteTitle}' class='back'></a>`;
}
// Only add the expand/contract control if it's not a full post
let expandContract = "";
if (!$aside.data('full')) {

View File

@ -87,7 +87,7 @@ aside.quote {
}
}
.quote-controls, .quote-controls .back:before, .quote-controls .quote-other-topic:before {
.quote-controls {
color: dark-light-choose(scale-color($primary, $lightness: 70%), scale-color($secondary, $lightness: 30%));
}
@ -117,21 +117,6 @@ aside.quote {
a {
margin: 0;
}
.back:before, .quote-other-topic:before
{
display: inline-block;
margin-left: 8px;
font-family: "FontAwesome";
position: relative;
z-index: 20;
content: "\f062";
}
.quote-other-topic:before
{
content: "\f061";
}
}
.quote-button {

View File

@ -21,7 +21,7 @@ QUnit.module("lib:click-track-edit-history", {
<div class="row">
<div class="span8">
<a href="http://www.google.com">google.com</a>
<a class="lightbox back quote-other-topic" href="http://www.google.com">google.com</a>
<a class="lightbox back" href="http://www.google.com">google.com</a>
<div class="onebox-result">
<a id="inside-onebox" href="http://www.google.com">google.com<span class="badge">1</span></a>
<a id="inside-onebox-forced" class="track-link" href="http://www.google.com">google.com<span class="badge">1</span></a>
@ -33,7 +33,7 @@ QUnit.module("lib:click-track-edit-history", {
</div>
<div class="span8 offset1">
<a href="http://www.google.com">google.com</a>
<a class="lightbox back quote-other-topic" href="http://www.google.com">google.com</a>
<a class="lightbox back" href="http://www.google.com">google.com</a>
<div class="onebox-result">
<a id="inside-onebox" href="http://www.google.com">google.com<span class="badge">1</span></a>
<a id="inside-onebox-forced" class="track-link" href="http://www.google.com">google.com<span class="badge">1</span></a>
@ -78,10 +78,6 @@ QUnit.test("does not track clicks on back buttons", assert => {
assert.ok(track(generateClickEventOn('.back')));
});
QUnit.test("does not track clicks on quote buttons", assert => {
assert.ok(track(generateClickEventOn('.quote-other-topic')));
});
QUnit.test("does not track clicks on category badges", assert => {
assert.ok(track(generateClickEventOn('.hashtag')));
});

View File

@ -17,7 +17,7 @@ QUnit.module("lib:click-track-profile-page", {
fixture().html(
`<p class="excerpt first" data-post-id="42" data-topic-id="1337" data-user-id="3141">
<a href="http://www.google.com">google.com</a>
<a class="lightbox back quote-other-topic" href="http://www.google.com">google.com</a>
<a class="lightbox back" href="http://www.google.com">google.com</a>
<div class="onebox-result">
<a id="inside-onebox" href="http://www.google.com">google.com<span class="badge">1</span></a>
<a id="inside-onebox-forced" class="track-link" href="http://www.google.com">google.com<span class="badge">1</span></a>
@ -29,7 +29,7 @@ QUnit.module("lib:click-track-profile-page", {
</p>
<p class="excerpt second" data-post-id="24" data-topic-id="7331" data-user-id="1413">
<a href="http://www.google.com">google.com</a>
<a class="lightbox back quote-other-topic" href="http://www.google.com">google.com</a>
<a class="lightbox back" href="http://www.google.com">google.com</a>
<div class="onebox-result">
<a id="inside-onebox" href="http://www.google.com">google.com<span class="badge">1</span></a>
<a id="inside-onebox-forced" class="track-link" href="http://www.google.com">google.com<span class="badge">1</span></a>
@ -72,10 +72,6 @@ QUnit.test("does not track clicks on back buttons", assert => {
assert.ok(track(generateClickEventOn('.back')));
});
QUnit.test("does not track clicks on quote buttons", assert => {
assert.ok(track(generateClickEventOn('.quote-other-topic')));
});
QUnit.test("does not track clicks on category badges", assert => {
assert.ok(track(generateClickEventOn('.hashtag')));
});

View File

@ -19,7 +19,7 @@ QUnit.module("lib:click-track", {
`<div id="topic" data-topic-id="1337">
<article data-post-id="42" data-user-id="3141">
<a href="http://www.google.com">google.com</a>
<a class="lightbox back quote-other-topic" href="http://www.google.fr">google.fr</a>
<a class="lightbox back" href="http://www.google.fr">google.fr</a>
<a id="with-badge" data-user-id="314" href="http://www.google.de">google.de<span class="badge">1</span></a>
<a id="with-badge-but-not-mine" href="http://www.google.es">google.es<span class="badge">1</span></a>
<div class="onebox-result">
@ -73,10 +73,6 @@ QUnit.test("does not track clicks in quotes", function(assert) {
assert.ok(track(generateClickEventOn('.inside-quote')));
});
QUnit.test("does not track clicks on quote buttons", function(assert) {
assert.ok(track(generateClickEventOn('.quote-other-topic')));
});
QUnit.test("does not track clicks on category badges", assert => {
assert.ok(track(generateClickEventOn('.hashtag')));
});