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'),
self = this;
this.setProperties({ order: 'default', ascending: false });
// Don't refresh if we're still loading
if (this.get('controllers.discovery.loading')) { return; }

View file

@ -250,7 +250,10 @@ Discourse.URL = Em.Object.createWithMixins({
navigatedToHome: function(oldPath, path) {
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');
return true;
}

View file

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