ES6: Convert search views

This commit is contained in:
Robin Ward 2014-06-25 14:03:25 -04:00
parent 2e378e9980
commit b21496e3fb
3 changed files with 3 additions and 24 deletions

View File

@ -22,7 +22,7 @@
{{/if}}
{{/if}}
</li>
{{view Discourse.SearchResultsTypeView typeBinding="resultType.type" contentBinding="resultType.results"}}
{{view 'search-results-type' type=resultType.type content=resultType.results}}
</ul>
{{/each}}
{{else}}

View File

@ -1,12 +1,4 @@
/**
This view handles the rendering of search results
@class SearchResultsTypeView
@extends Ember.CollectionView
@namespace Discourse
@module Discourse
**/
Discourse.SearchResultsTypeView = Ember.CollectionView.extend({
export default Ember.CollectionView.extend({
tagName: 'ul',
itemViewClass: Discourse.GroupedView.extend({
tagName: 'li',
@ -15,5 +7,3 @@ Discourse.SearchResultsTypeView = Ember.CollectionView.extend({
selected: Discourse.computed.propertyEqual('content.index', 'controller.selectedIndex')
})
});

View File

@ -1,12 +1,4 @@
/**
This view handles search facilities of Discourse
@class SearchView
@extends Discourse.View
@namespace Discourse
@module Discourse
**/
Discourse.SearchView = Discourse.View.extend({
export default Discourse.View.extend({
tagName: 'div',
classNames: ['d-dropdown'],
elementId: 'search-dropdown',
@ -34,7 +26,4 @@ Discourse.SearchView = Discourse.View.extend({
}
});
}
});