mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 21:19:41 -06:00
fix arrow direction in post incoming links
This commit is contained in:
parent
a12a1bcc66
commit
d05547e7f3
@ -8,23 +8,17 @@
|
||||
**/
|
||||
Discourse.PostLinkView = Discourse.View.extend({
|
||||
tagName: 'li',
|
||||
classNameBindings: ['direction'],
|
||||
|
||||
direction: function() {
|
||||
if (this.get('content.reflection')) return 'incoming';
|
||||
return null;
|
||||
}.property('content.reflection'),
|
||||
direction: function() { return this.get('content.reflection') ? "left" : "right"; },
|
||||
|
||||
render: function(buffer) {
|
||||
var clicks;
|
||||
buffer.push("<a href='" + (this.get('content.url')) + "' class='track-link'>\n");
|
||||
buffer.push("<i class='icon icon-arrow-right'></i>");
|
||||
buffer.push("<a href='" + this.get('content.url') + "' class='track-link'>");
|
||||
buffer.push("<i class='icon icon-arrow-'" + this.direction() + "></i>");
|
||||
buffer.push(this.get('content.title'));
|
||||
if (clicks = this.get('content.clicks')) {
|
||||
buffer.push("\n<span class='badge badge-notification clicks'>" + clicks + "</span>");
|
||||
buffer.push("<span class='badge badge-notification clicks'>" + clicks + "</span>");
|
||||
}
|
||||
return buffer.push("</a>");
|
||||
buffer.push("</a>");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user