mirror of
https://github.com/discourse/discourse.git
synced 2025-02-17 00:35:50 +00:00
FIX: Don't mix camelCase into query params.
This commit is contained in:
parent
af90a04bd9
commit
1606ed01f9
@ -17,10 +17,10 @@ export default Ember.Controller.extend({
|
|||||||
bulkSelectEnabled: null,
|
bulkSelectEnabled: null,
|
||||||
|
|
||||||
loading: Em.computed.not("model"),
|
loading: Em.computed.not("model"),
|
||||||
queryParams: ["q", "isExpanded", "context_id", "context", "skip_context"],
|
queryParams: ["q", "expanded", "context_id", "context", "skip_context"],
|
||||||
q: null,
|
q: null,
|
||||||
selected: [],
|
selected: [],
|
||||||
isExpanded: false,
|
expanded: false,
|
||||||
context_id: null,
|
context_id: null,
|
||||||
context: null,
|
context: null,
|
||||||
searching: false,
|
searching: false,
|
||||||
@ -138,9 +138,9 @@ export default Ember.Controller.extend({
|
|||||||
return this.currentUser && this.currentUser.staff && hasResults;
|
return this.currentUser && this.currentUser.staff && hasResults;
|
||||||
},
|
},
|
||||||
|
|
||||||
@computed('isExpanded')
|
@computed('expanded')
|
||||||
canCreateTopic() {
|
canCreateTopic(expanded) {
|
||||||
return this.currentUser && !this.site.mobileView && !this.get('isExpanded');
|
return this.currentUser && !this.site.mobileView && !expanded;
|
||||||
},
|
},
|
||||||
|
|
||||||
_search() {
|
_search() {
|
||||||
|
@ -5,7 +5,7 @@ import PreloadStore from 'preload-store';
|
|||||||
import { getTransient, setTransient } from 'discourse/lib/page-tracker';
|
import { getTransient, setTransient } from 'discourse/lib/page-tracker';
|
||||||
|
|
||||||
export default Discourse.Route.extend({
|
export default Discourse.Route.extend({
|
||||||
queryParams: { q: {}, isExpanded: false, context_id: {}, context: {}, skip_context: {} },
|
queryParams: { q: {}, expanded: false, context_id: {}, context: {}, skip_context: {} },
|
||||||
|
|
||||||
model(params) {
|
model(params) {
|
||||||
const cached = getTransient('lastSearch');
|
const cached = getTransient('lastSearch');
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{{search-text-field value=searchTerm class="full-page-search input-xxlarge search no-blur" action="search" hasAutofocus=hasAutofocus}}
|
{{search-text-field value=searchTerm class="full-page-search input-xxlarge search no-blur" action="search" hasAutofocus=hasAutofocus}}
|
||||||
{{d-button action="search" icon="search" class="btn-primary" disabled=searching}}
|
{{d-button action="search" icon="search" class="btn-primary" disabled=searching}}
|
||||||
|
|
||||||
{{search-advanced-options searchTerm=searchTerm isExpanded=isExpanded}}
|
{{search-advanced-options searchTerm=searchTerm isExpanded=expanded}}
|
||||||
|
|
||||||
{{#if canCreateTopic}}
|
{{#if canCreateTopic}}
|
||||||
<span class="new-topic-btn">{{d-button id="create-topic" class="btn-default" action="createTopic" actionParam=searchTerm icon="plus" label="topic.create"}}</span>
|
<span class="new-topic-btn">{{d-button id="create-topic" class="btn-default" action="createTopic" actionParam=searchTerm icon="plus" label="topic.create"}}</span>
|
||||||
|
@ -44,7 +44,7 @@ createWidget('search-context', {
|
|||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
result.push(this.attach('link', { href: Discourse.getURL('/search?isExpanded=true'),
|
result.push(this.attach('link', { href: Discourse.getURL('/search?expanded=true'),
|
||||||
label: 'show_help',
|
label: 'show_help',
|
||||||
className: 'show-help' }));
|
className: 'show-help' }));
|
||||||
result.push(h('div.clearfix'));
|
result.push(h('div.clearfix'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user