mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 01:22:36 +08:00
FIX: refreshTitle
error when navigating to a 404 page
This commit is contained in:
parent
31e9cafe0e
commit
224f503e6f
|
@ -1,4 +1,4 @@
|
|||
export default Ember.Route.extend({
|
||||
export default Discourse.Route.extend({
|
||||
model: function(params) {
|
||||
return Discourse.SiteText.find(params.text_type);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default Ember.Route.extend({
|
||||
export default Discourse.Route.extend({
|
||||
model: function() {
|
||||
return Discourse.SiteTextType.findAll();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Discourse.AdminGroupRoute = Em.Route.extend({
|
||||
Discourse.AdminGroupRoute = Discourse.Route.extend({
|
||||
|
||||
model: function(params) {
|
||||
var groups = this.modelFor('adminGroups'),
|
||||
|
|
|
@ -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'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var ApplicationRoute = Em.Route.extend({
|
||||
var ApplicationRoute = Discourse.Route.extend({
|
||||
|
||||
siteTitle: Discourse.computed.setting('title'),
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default Ember.Route.extend({
|
||||
export default Discourse.Route.extend({
|
||||
model: function(params) {
|
||||
return Discourse.Topic.idForSlug(params.slug);
|
||||
},
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Discourse.UnknownRoute = Em.Route.extend({
|
||||
Discourse.UnknownRoute = Discourse.Route.extend({
|
||||
model: function() {
|
||||
return Discourse.ajax("/404-body", {dataType: 'html'});
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default Em.Route.extend({
|
||||
export default Discourse.Route.extend({
|
||||
|
||||
beforeModel: function() {
|
||||
return this.replaceWith('userActivity');
|
||||
|
|
Loading…
Reference in New Issue
Block a user