FIX: hyperlinks did not work in category boxes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import computed from 'ember-addons/ember-computed-decorators';
|
||||
import DiscourseURL from 'discourse/lib/url';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
tagName: "section",
|
||||
@@ -8,5 +9,14 @@ export default Ember.Component.extend({
|
||||
anyLogos() {
|
||||
return this.get("categories").any((c) => { return !Ember.isEmpty(c.get('uploaded_logo.url')); });
|
||||
return this.get("categories").any(c => !Ember.isEmpty(c.get('uploaded_logo.url')));
|
||||
},
|
||||
|
||||
click(e) {
|
||||
if (!$(e.target).is('a')) {
|
||||
const url = $(e.target).closest('.category-box').data("url");
|
||||
if (url) {
|
||||
DiscourseURL.routeTo(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user