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({
|
Discourse.PostLinkView = Discourse.View.extend({
|
||||||
tagName: 'li',
|
tagName: 'li',
|
||||||
classNameBindings: ['direction'],
|
|
||||||
|
|
||||||
direction: function() {
|
direction: function() { return this.get('content.reflection') ? "left" : "right"; },
|
||||||
if (this.get('content.reflection')) return 'incoming';
|
|
||||||
return null;
|
|
||||||
}.property('content.reflection'),
|
|
||||||
|
|
||||||
render: function(buffer) {
|
render: function(buffer) {
|
||||||
var clicks;
|
var clicks;
|
||||||
buffer.push("<a href='" + (this.get('content.url')) + "' class='track-link'>\n");
|
buffer.push("<a href='" + this.get('content.url') + "' class='track-link'>");
|
||||||
buffer.push("<i class='icon icon-arrow-right'></i>");
|
buffer.push("<i class='icon icon-arrow-'" + this.direction() + "></i>");
|
||||||
buffer.push(this.get('content.title'));
|
buffer.push(this.get('content.title'));
|
||||||
if (clicks = this.get('content.clicks')) {
|
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