FEATURE: add op-bookmark class for op-bookmarks
This commit is contained in:
parent
b4f666630e
commit
8e372f3616
|
@ -3,7 +3,7 @@
|
|||
{{/if ~}}
|
||||
{{~#each status in view.statuses ~}}
|
||||
{{~#if status.href ~}}
|
||||
<a href='{{status.href}}' title='{{status.title}}' class='topic-status'><i class='fa fa-{{status.icon}}'></i></a>
|
||||
<a href='{{status.href}}' title='{{status.title}}' class='topic-status {{status.extraClasses}}'><i class='fa fa-{{status.icon}}'></i></a>
|
||||
{{~else ~}}
|
||||
<{{status.openTag}} title='{{status.title}}' class='topic-status'><i class='fa fa-{{status.icon}}'></i></{{status.closeTag}}>
|
||||
{{~/if ~}}
|
||||
|
|
|
@ -16,10 +16,14 @@ export default Ember.Object.extend({
|
|||
if(topic.get('bookmarked')){
|
||||
var url = topic.get('url');
|
||||
var postNumbers = topic.get('bookmarked_post_numbers');
|
||||
var extraClasses = "";
|
||||
if(postNumbers && postNumbers[0] > 1) {
|
||||
url += '/' + postNumbers[0];
|
||||
} else {
|
||||
extraClasses = "op-bookmark";
|
||||
}
|
||||
results.push({icon: 'bookmark', key: 'bookmarked', href: url});
|
||||
|
||||
results.push({extraClasses: extraClasses, icon: 'bookmark', key: 'bookmarked', href: url});
|
||||
}
|
||||
|
||||
if(topic.get('closed')){
|
||||
|
|
Loading…
Reference in New Issue