This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/views/search.js.es6
2015-08-14 16:22:06 +08:00

13 lines
370 B
JavaScript

export default Ember.View.extend({
tagName: 'div',
classNames: ['d-dropdown'],
elementId: 'search-dropdown',
templateName: 'search',
keyDown: function(e){
var term = this.get('controller.term');
if (e.which === 13 && term && term.length >= Discourse.SiteSettings.min_search_term_length) {
this.get('controller').send('fullSearch');
}
}
});