Merge branch 'master' of github.com:discourse/discourse

This commit is contained in:
Neil Lalonde 2014-10-07 15:53:11 -04:00
commit 0ab9a0867a
3 changed files with 8 additions and 7 deletions

View file

@ -37,6 +37,8 @@ var controllerOpts = {
var filter = this.get('model.filter'), var filter = this.get('model.filter'),
self = this; self = this;
this.setProperties({ order: 'default', ascending: false });
// Don't refresh if we're still loading // Don't refresh if we're still loading
if (this.get('controllers.discovery.loading')) { return; } if (this.get('controllers.discovery.loading')) { return; }

View file

@ -250,7 +250,10 @@ Discourse.URL = Em.Object.createWithMixins({
navigatedToHome: function(oldPath, path) { navigatedToHome: function(oldPath, path) {
var homepage = Discourse.Utilities.defaultHomepage(); var homepage = Discourse.Utilities.defaultHomepage();
if (window.history && window.history.pushState && path === "/" && (oldPath === "/" || oldPath === "/" + homepage)) { if (window.history &&
window.history.pushState &&
(path === "/" || path === "/" + homepage) &&
(oldPath === "/" || oldPath === "/" + homepage)) {
this.appEvents.trigger('url:refresh'); this.appEvents.trigger('url:refresh');
return true; return true;
} }

View file

@ -37,17 +37,13 @@
{{/if}} {{/if}}
</th> </th>
{{/if}} {{/if}}
{{#sortable-heading sortBy="default" action="changeSort" order=order ascending=ascending}} {{#sortable-heading}} {{i18n topic.title}} {{/sortable-heading}}
{{i18n topic.title}}
{{/sortable-heading}}
{{#unless controller.hideCategory}} {{#unless controller.hideCategory}}
{{#sortable-heading sortBy="category" action="changeSort" order=order ascending=ascending}} {{#sortable-heading sortBy="category" action="changeSort" order=order ascending=ascending}}
{{i18n category_title}} {{i18n category_title}}
{{/sortable-heading}} {{/sortable-heading}}
{{/unless}} {{/unless}}
{{#sortable-heading sortBy="posters" action="changeSort" order=order ascending=ascending}} {{#sortable-heading}} {{i18n users}} {{/sortable-heading}}
{{i18n users}}
{{/sortable-heading}}
{{#sortable-heading sortBy="posts" number=true action="changeSort" order=order ascending=ascending}} {{#sortable-heading sortBy="posts" number=true action="changeSort" order=order ascending=ascending}}
{{i18n posts}} {{i18n posts}}
{{/sortable-heading}} {{/sortable-heading}}