FIX: Allow closing the category dropdown when clicking on the same

category
This commit is contained in:
Robin Ward 2014-02-19 14:17:38 -05:00
parent 634b769cda
commit 0c45cf1ee7
2 changed files with 1 additions and 5 deletions

View File

@ -69,10 +69,6 @@ Discourse.CategoryDropComponent = Ember.Component.extend({
}
},
categoryChanged: function() {
this.close();
}.observes('category', 'parentCategory'),
close: function() {
$('html').off('click.category-drop');
this.$('a[data-drop-close]').off('click.category-drop');

View File

@ -50,7 +50,7 @@ Discourse.HTML = {
restricted = Em.get(category, 'read_restricted'),
html = "<a href=\"" + Discourse.getURL("/category/") + Discourse.Category.slugFor(category) + "\" ";
html += "class=\"badge-category" + (restricted ? ' restricted' : '' ) + "\" ";
html += "data-drop-close=\"true\" class=\"badge-category" + (restricted ? ' restricted' : '' ) + "\" ";
// Add description if we have it
if (description) html += "title=\"" + Handlebars.Utils.escapeExpression(description) + "\" ";