FIX: refreshTitle error when navigating to a 404 page

This commit is contained in:
Robin Ward 2014-10-15 14:33:22 -04:00
parent 31e9cafe0e
commit 224f503e6f
10 changed files with 10 additions and 9 deletions

View File

@ -1,4 +1,4 @@
export default Ember.Route.extend({
export default Discourse.Route.extend({
model: function(params) {
return Discourse.SiteText.find(params.text_type);
}

View File

@ -1,4 +1,4 @@
export default Ember.Route.extend({
export default Discourse.Route.extend({
model: function() {
return Discourse.SiteTextType.findAll();
}

View File

@ -1,6 +1,6 @@
import UserField from 'admin/models/user-field';
export default Ember.Route.extend({
export default Discourse.Route.extend({
model: function() {
return UserField.findAll();
},

View File

@ -1,4 +1,4 @@
Discourse.AdminGroupRoute = Em.Route.extend({
Discourse.AdminGroupRoute = Discourse.Route.extend({
model: function(params) {
var groups = this.modelFor('adminGroups'),

View File

@ -21,6 +21,7 @@ export default ObjectController.extend(Discourse.SelectedPostsCount, {
// Note normally you don't have to trigger this, but topic titles can be updated
// and are sometimes lazily loaded.
console.log(title);
this.send('refreshTitle');
}
}.observes('title'),

View File

@ -1,4 +1,4 @@
var ApplicationRoute = Em.Route.extend({
var ApplicationRoute = Discourse.Route.extend({
siteTitle: Discourse.computed.setting('title'),

View File

@ -6,7 +6,7 @@
@namespace Discourse
@module Discourse
**/
Discourse.Route = Em.Route.extend({
Discourse.Route = Ember.Route.extend({
/**
NOT called every time we enter a route on Discourse.

View File

@ -1,4 +1,4 @@
export default Ember.Route.extend({
export default Discourse.Route.extend({
model: function(params) {
return Discourse.Topic.idForSlug(params.slug);
},

View File

@ -1,4 +1,4 @@
Discourse.UnknownRoute = Em.Route.extend({
Discourse.UnknownRoute = Discourse.Route.extend({
model: function() {
return Discourse.ajax("/404-body", {dataType: 'html'});
}

View File

@ -1,4 +1,4 @@
export default Em.Route.extend({
export default Discourse.Route.extend({
beforeModel: function() {
return this.replaceWith('userActivity');