ES6: Convert search views
This commit is contained in:
parent
2e378e9980
commit
b21496e3fb
|
@ -22,7 +22,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
{{view Discourse.SearchResultsTypeView typeBinding="resultType.type" contentBinding="resultType.results"}}
|
{{view 'search-results-type' type=resultType.type content=resultType.results}}
|
||||||
</ul>
|
</ul>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
/**
|
export default Ember.CollectionView.extend({
|
||||||
This view handles the rendering of search results
|
|
||||||
|
|
||||||
@class SearchResultsTypeView
|
|
||||||
@extends Ember.CollectionView
|
|
||||||
@namespace Discourse
|
|
||||||
@module Discourse
|
|
||||||
**/
|
|
||||||
Discourse.SearchResultsTypeView = Ember.CollectionView.extend({
|
|
||||||
tagName: 'ul',
|
tagName: 'ul',
|
||||||
itemViewClass: Discourse.GroupedView.extend({
|
itemViewClass: Discourse.GroupedView.extend({
|
||||||
tagName: 'li',
|
tagName: 'li',
|
||||||
|
@ -15,5 +7,3 @@ Discourse.SearchResultsTypeView = Ember.CollectionView.extend({
|
||||||
selected: Discourse.computed.propertyEqual('content.index', 'controller.selectedIndex')
|
selected: Discourse.computed.propertyEqual('content.index', 'controller.selectedIndex')
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
/**
|
export default Discourse.View.extend({
|
||||||
This view handles search facilities of Discourse
|
|
||||||
|
|
||||||
@class SearchView
|
|
||||||
@extends Discourse.View
|
|
||||||
@namespace Discourse
|
|
||||||
@module Discourse
|
|
||||||
**/
|
|
||||||
Discourse.SearchView = Discourse.View.extend({
|
|
||||||
tagName: 'div',
|
tagName: 'div',
|
||||||
classNames: ['d-dropdown'],
|
classNames: ['d-dropdown'],
|
||||||
elementId: 'search-dropdown',
|
elementId: 'search-dropdown',
|
||||||
|
@ -34,7 +26,4 @@ Discourse.SearchView = Discourse.View.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue