mirror of
https://github.com/discourse/discourse.git
synced 2025-05-20 04:53:03 +08:00
es6 migration and fixes
This commit is contained in:
parent
ddd4500d7a
commit
fbffe28772
@ -1,4 +1,5 @@
|
|||||||
import StringBuffer from 'discourse/mixins/string-buffer';
|
import StringBuffer from 'discourse/mixins/string-buffer';
|
||||||
|
import UserAction from "discourse/models/user-action";
|
||||||
|
|
||||||
export default Ember.Component.extend(StringBuffer, {
|
export default Ember.Component.extend(StringBuffer, {
|
||||||
tagName: 'li',
|
tagName: 'li',
|
||||||
@ -27,9 +28,9 @@ export default Ember.Component.extend(StringBuffer, {
|
|||||||
|
|
||||||
typeKey: function() {
|
typeKey: function() {
|
||||||
const actionType = this.get('content.action_type');
|
const actionType = this.get('content.action_type');
|
||||||
if (actionType === Discourse.UserAction.TYPES.messages_received) { return ""; }
|
if (actionType === UserAction.TYPES.messages_received) { return ""; }
|
||||||
|
|
||||||
const result = Discourse.UserAction.TYPES_INVERTED[actionType];
|
const result = UserAction.TYPES_INVERTED[actionType];
|
||||||
if (!result) { return ""; }
|
if (!result) { return ""; }
|
||||||
|
|
||||||
// We like our URLS to have hyphens, not underscores
|
// We like our URLS to have hyphens, not underscores
|
||||||
@ -55,11 +56,11 @@ export default Ember.Component.extend(StringBuffer, {
|
|||||||
|
|
||||||
icon: function() {
|
icon: function() {
|
||||||
switch(parseInt(this.get('content.action_type'), 10)) {
|
switch(parseInt(this.get('content.action_type'), 10)) {
|
||||||
case Discourse.UserAction.TYPES.likes_received: return "heart";
|
case UserAction.TYPES.likes_received: return "heart";
|
||||||
case Discourse.UserAction.TYPES.bookmarks: return "bookmark";
|
case UserAction.TYPES.bookmarks: return "bookmark";
|
||||||
case Discourse.UserAction.TYPES.edits: return "pencil";
|
case UserAction.TYPES.edits: return "pencil";
|
||||||
case Discourse.UserAction.TYPES.replies: return "reply";
|
case UserAction.TYPES.replies: return "reply";
|
||||||
case Discourse.UserAction.TYPES.mentions: return "at";
|
case UserAction.TYPES.mentions: return "at";
|
||||||
}
|
}
|
||||||
}.property("content.action_type")
|
}.property("content.action_type")
|
||||||
});
|
});
|
||||||
|
@ -2,6 +2,7 @@ import ComboboxView from 'discourse/components/combo-box';
|
|||||||
import { categoryBadgeHTML } from 'discourse/helpers/category-link';
|
import { categoryBadgeHTML } from 'discourse/helpers/category-link';
|
||||||
import computed from 'ember-addons/ember-computed-decorators';
|
import computed from 'ember-addons/ember-computed-decorators';
|
||||||
import { observes, on } from 'ember-addons/ember-computed-decorators';
|
import { observes, on } from 'ember-addons/ember-computed-decorators';
|
||||||
|
import PermissionType from 'discourse/models/permission-type';
|
||||||
|
|
||||||
export default ComboboxView.extend({
|
export default ComboboxView.extend({
|
||||||
classNames: ['combobox category-combobox'],
|
classNames: ['combobox category-combobox'],
|
||||||
@ -22,7 +23,7 @@ export default ComboboxView.extend({
|
|||||||
if (scopedCategoryId && c.get('id') !== scopedCategoryId && c.get('parent_category_id') !== scopedCategoryId) { return false; }
|
if (scopedCategoryId && c.get('id') !== scopedCategoryId && c.get('parent_category_id') !== scopedCategoryId) { return false; }
|
||||||
if (c.get('isUncategorizedCategory')) { return false; }
|
if (c.get('isUncategorizedCategory')) { return false; }
|
||||||
if (c.get('contains_messages')) { return false; }
|
if (c.get('contains_messages')) { return false; }
|
||||||
return c.get('permission') === Discourse.PermissionType.FULL;
|
return c.get('permission') === PermissionType.FULL;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { buildCategoryPanel } from 'discourse/components/edit-category-panel';
|
import { buildCategoryPanel } from 'discourse/components/edit-category-panel';
|
||||||
|
import PermissionType from 'discourse/models/permission-type';
|
||||||
|
|
||||||
export default buildCategoryPanel('security', {
|
export default buildCategoryPanel('security', {
|
||||||
editingPermissions: false,
|
editingPermissions: false,
|
||||||
@ -16,7 +17,7 @@ export default buildCategoryPanel('security', {
|
|||||||
if (!this.get('category.is_special')) {
|
if (!this.get('category.is_special')) {
|
||||||
this.get('category').addPermission({
|
this.get('category').addPermission({
|
||||||
group_name: group + "",
|
group_name: group + "",
|
||||||
permission: Discourse.PermissionType.create({id})
|
permission: PermissionType.create({id})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { exportUserArchive } from 'discourse/lib/export-csv';
|
import { exportUserArchive } from 'discourse/lib/export-csv';
|
||||||
import CanCheckEmails from 'discourse/mixins/can-check-emails';
|
import CanCheckEmails from 'discourse/mixins/can-check-emails';
|
||||||
import computed from 'ember-addons/ember-computed-decorators';
|
import computed from 'ember-addons/ember-computed-decorators';
|
||||||
|
import UserAction from 'discourse/models/user-action';
|
||||||
|
import User from 'discourse/models/user';
|
||||||
|
|
||||||
export default Ember.Controller.extend(CanCheckEmails, {
|
export default Ember.Controller.extend(CanCheckEmails, {
|
||||||
indexStream: false,
|
indexStream: false,
|
||||||
@ -10,7 +12,7 @@ export default Ember.Controller.extend(CanCheckEmails, {
|
|||||||
|
|
||||||
@computed("content.username")
|
@computed("content.username")
|
||||||
viewingSelf(username) {
|
viewingSelf(username) {
|
||||||
return username === Discourse.User.currentProp('username');
|
return username === User.currentProp('username');
|
||||||
},
|
},
|
||||||
|
|
||||||
@computed('indexStream', 'viewingSelf', 'forceExpand')
|
@computed('indexStream', 'viewingSelf', 'forceExpand')
|
||||||
@ -39,13 +41,13 @@ export default Ember.Controller.extend(CanCheckEmails, {
|
|||||||
|
|
||||||
@computed("userActionType")
|
@computed("userActionType")
|
||||||
privateMessageView(userActionType) {
|
privateMessageView(userActionType) {
|
||||||
return (userActionType === Discourse.UserAction.TYPES.messages_sent) ||
|
return (userActionType === UserAction.TYPES.messages_sent) ||
|
||||||
(userActionType === Discourse.UserAction.TYPES.messages_received);
|
(userActionType === UserAction.TYPES.messages_received);
|
||||||
},
|
},
|
||||||
|
|
||||||
@computed()
|
@computed()
|
||||||
canInviteToForum() {
|
canInviteToForum() {
|
||||||
return Discourse.User.currentProp('can_invite_to_forum');
|
return User.currentProp('can_invite_to_forum');
|
||||||
},
|
},
|
||||||
|
|
||||||
canDeleteUser: Ember.computed.and("model.can_be_deleted", "model.can_delete_all_posts"),
|
canDeleteUser: Ember.computed.and("model.can_be_deleted", "model.can_delete_all_posts"),
|
||||||
@ -72,7 +74,9 @@ export default Ember.Controller.extend(CanCheckEmails, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
adminDelete() {
|
adminDelete() {
|
||||||
Discourse.AdminUser.find(this.get('model.username').toLowerCase())
|
// I really want this deferred, don't want to bring in all this code till used
|
||||||
|
const AdminUser = require('admin/models/admin-user').default;
|
||||||
|
AdminUser.find(this.get('model.username').toLowerCase())
|
||||||
.then(user => user.destroy({deletePosts: true}));
|
.then(user => user.destroy({deletePosts: true}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import RestModel from 'discourse/models/rest';
|
import RestModel from 'discourse/models/rest';
|
||||||
import { on } from 'ember-addons/ember-computed-decorators';
|
import { on } from 'ember-addons/ember-computed-decorators';
|
||||||
|
import PermissionType from 'discourse/models/permission-type';
|
||||||
|
|
||||||
const Category = RestModel.extend({
|
const Category = RestModel.extend({
|
||||||
|
|
||||||
@ -15,16 +16,16 @@ const Category = RestModel.extend({
|
|||||||
availableGroups.removeObject(elem.group_name);
|
availableGroups.removeObject(elem.group_name);
|
||||||
return {
|
return {
|
||||||
group_name: elem.group_name,
|
group_name: elem.group_name,
|
||||||
permission: Discourse.PermissionType.create({id: elem.permission_type})
|
permission: PermissionType.create({id: elem.permission_type})
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
availablePermissions: function(){
|
availablePermissions: function(){
|
||||||
return [ Discourse.PermissionType.create({id: Discourse.PermissionType.FULL}),
|
return [ PermissionType.create({id: PermissionType.FULL}),
|
||||||
Discourse.PermissionType.create({id: Discourse.PermissionType.CREATE_POST}),
|
PermissionType.create({id: PermissionType.CREATE_POST}),
|
||||||
Discourse.PermissionType.create({id: Discourse.PermissionType.READONLY})
|
PermissionType.create({id: PermissionType.READONLY})
|
||||||
];
|
];
|
||||||
}.property(),
|
}.property(),
|
||||||
|
|
||||||
@ -117,9 +118,9 @@ const Category = RestModel.extend({
|
|||||||
|
|
||||||
permissions: function(){
|
permissions: function(){
|
||||||
return Em.A([
|
return Em.A([
|
||||||
{group_name: "everyone", permission: Discourse.PermissionType.create({id: 1})},
|
{group_name: "everyone", permission: PermissionType.create({id: 1})},
|
||||||
{group_name: "admins", permission: Discourse.PermissionType.create({id: 2}) },
|
{group_name: "admins", permission: PermissionType.create({id: 2}) },
|
||||||
{group_name: "crap", permission: Discourse.PermissionType.create({id: 3}) }
|
{group_name: "crap", permission: PermissionType.create({id: 3}) }
|
||||||
]);
|
]);
|
||||||
}.property(),
|
}.property(),
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
|
const PermissionType = Discourse.Model.extend({
|
||||||
Discourse.PermissionType = Discourse.Model.extend({
|
|
||||||
description: function(){
|
description: function(){
|
||||||
var key = "";
|
var key = "";
|
||||||
|
|
||||||
@ -18,6 +17,8 @@ Discourse.PermissionType = Discourse.Model.extend({
|
|||||||
}.property("id")
|
}.property("id")
|
||||||
});
|
});
|
||||||
|
|
||||||
Discourse.PermissionType.FULL = 1;
|
PermissionType.FULL = 1;
|
||||||
Discourse.PermissionType.CREATE_POST = 2;
|
PermissionType.CREATE_POST = 2;
|
||||||
Discourse.PermissionType.READONLY = 3;
|
PermissionType.READONLY = 3;
|
||||||
|
|
||||||
|
export default PermissionType;
|
@ -1,12 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
A data model representing a group of UserActions
|
A data model representing a group of UserActions
|
||||||
|
|
||||||
@class UserActionGroup
|
|
||||||
@extends Discourse.Model
|
|
||||||
@namespace Discourse
|
|
||||||
@module Discourse
|
|
||||||
**/
|
**/
|
||||||
Discourse.UserActionGroup = Discourse.Model.extend({
|
export default Discourse.Model.extend({
|
||||||
push: function(item) {
|
push: function(item) {
|
||||||
if (!this.items) {
|
if (!this.items) {
|
||||||
this.items = [];
|
this.items = [];
|
@ -2,6 +2,7 @@ import RestModel from 'discourse/models/rest';
|
|||||||
import { url } from 'discourse/lib/computed';
|
import { url } from 'discourse/lib/computed';
|
||||||
import { on } from 'ember-addons/ember-computed-decorators';
|
import { on } from 'ember-addons/ember-computed-decorators';
|
||||||
import computed from 'ember-addons/ember-computed-decorators';
|
import computed from 'ember-addons/ember-computed-decorators';
|
||||||
|
import UserActionGroup from 'discourse/models/user-action-group';
|
||||||
|
|
||||||
const UserActionTypes = {
|
const UserActionTypes = {
|
||||||
likes_given: 1,
|
likes_given: 1,
|
||||||
@ -35,7 +36,7 @@ const UserAction = RestModel.extend({
|
|||||||
|
|
||||||
@computed("action_type")
|
@computed("action_type")
|
||||||
descriptionKey(action) {
|
descriptionKey(action) {
|
||||||
if (action === null || Discourse.UserAction.TO_SHOW.indexOf(action) >= 0) {
|
if (action === null || UserAction.TO_SHOW.indexOf(action) >= 0) {
|
||||||
if (this.get('isPM')) {
|
if (this.get('isPM')) {
|
||||||
return this.get('sameUser') ? 'sent_by_you' : 'sent_by_user';
|
return this.get('sameUser') ? 'sent_by_you' : 'sent_by_user';
|
||||||
} else {
|
} else {
|
||||||
@ -111,10 +112,10 @@ const UserAction = RestModel.extend({
|
|||||||
let groups = this.get("childGroups");
|
let groups = this.get("childGroups");
|
||||||
if (!groups) {
|
if (!groups) {
|
||||||
groups = {
|
groups = {
|
||||||
likes: Discourse.UserActionGroup.create({ icon: "fa fa-heart" }),
|
likes: UserActionGroup.create({ icon: "fa fa-heart" }),
|
||||||
stars: Discourse.UserActionGroup.create({ icon: "fa fa-star" }),
|
stars: UserActionGroup.create({ icon: "fa fa-star" }),
|
||||||
edits: Discourse.UserActionGroup.create({ icon: "fa fa-pencil" }),
|
edits: UserActionGroup.create({ icon: "fa fa-pencil" }),
|
||||||
bookmarks: Discourse.UserActionGroup.create({ icon: "fa fa-bookmark" })
|
bookmarks: UserActionGroup.create({ icon: "fa fa-bookmark" })
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
this.set("childGroups", groups);
|
this.set("childGroups", groups);
|
||||||
@ -171,7 +172,7 @@ UserAction.reopenClass({
|
|||||||
if (found === void 0) {
|
if (found === void 0) {
|
||||||
|
|
||||||
let current;
|
let current;
|
||||||
if (Discourse.UserAction.TO_COLLAPSE.indexOf(item.action_type) >= 0) {
|
if (UserAction.TO_COLLAPSE.indexOf(item.action_type) >= 0) {
|
||||||
current = UserAction.create(item);
|
current = UserAction.create(item);
|
||||||
item.switchToActing();
|
item.switchToActing();
|
||||||
current.addChild(item);
|
current.addChild(item);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { url } from 'discourse/lib/computed';
|
import { url } from 'discourse/lib/computed';
|
||||||
import RestModel from 'discourse/models/rest';
|
import RestModel from 'discourse/models/rest';
|
||||||
|
import UserAction from 'discourse/models/user-action';
|
||||||
|
|
||||||
export default RestModel.extend({
|
export default RestModel.extend({
|
||||||
loaded: false,
|
loaded: false,
|
||||||
@ -11,13 +12,13 @@ export default RestModel.extend({
|
|||||||
filterParam: function() {
|
filterParam: function() {
|
||||||
const filter = this.get('filter');
|
const filter = this.get('filter');
|
||||||
if (filter === Discourse.UserAction.TYPES.replies) {
|
if (filter === Discourse.UserAction.TYPES.replies) {
|
||||||
return [Discourse.UserAction.TYPES.replies,
|
return [UserAction.TYPES.replies,
|
||||||
Discourse.UserAction.TYPES.quotes].join(",");
|
UserAction.TYPES.quotes].join(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!filter) {
|
if(!filter) {
|
||||||
return [Discourse.UserAction.TYPES.topics,
|
return [UserAction.TYPES.topics,
|
||||||
Discourse.UserAction.TYPES.posts].join(",");
|
UserAction.TYPES.posts].join(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
return filter;
|
return filter;
|
||||||
@ -70,10 +71,10 @@ export default RestModel.extend({
|
|||||||
const copy = Em.A();
|
const copy = Em.A();
|
||||||
result.user_actions.forEach(function(action) {
|
result.user_actions.forEach(function(action) {
|
||||||
action.title = Discourse.Emoji.unescape(Handlebars.Utils.escapeExpression(action.title));
|
action.title = Discourse.Emoji.unescape(Handlebars.Utils.escapeExpression(action.title));
|
||||||
copy.pushObject(Discourse.UserAction.create(action));
|
copy.pushObject(UserAction.create(action));
|
||||||
});
|
});
|
||||||
|
|
||||||
self.get('content').pushObjects(Discourse.UserAction.collapseStream(copy));
|
self.get('content').pushObjects(UserAction.collapseStream(copy));
|
||||||
self.setProperties({
|
self.setProperties({
|
||||||
loaded: true,
|
loaded: true,
|
||||||
itemsLoaded: self.get('itemsLoaded') + result.user_actions.length
|
itemsLoaded: self.get('itemsLoaded') + result.user_actions.length
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { filterQueryParams, findTopicList } from 'discourse/routes/build-topic-route';
|
import { filterQueryParams, findTopicList } from 'discourse/routes/build-topic-route';
|
||||||
import { queryParams } from 'discourse/controllers/discovery-sortable';
|
import { queryParams } from 'discourse/controllers/discovery-sortable';
|
||||||
import TopicList from 'discourse/models/topic-list';
|
import TopicList from 'discourse/models/topic-list';
|
||||||
|
import PermissionType from 'discourse/models/permission-type';
|
||||||
|
|
||||||
// A helper function to create a category route with parameters
|
// A helper function to create a category route with parameters
|
||||||
export default (filter, params) => {
|
export default (filter, params) => {
|
||||||
@ -68,7 +69,7 @@ export default (filter, params) => {
|
|||||||
const topics = this.get('topics'),
|
const topics = this.get('topics'),
|
||||||
category = model.category,
|
category = model.category,
|
||||||
canCreateTopic = topics.get('can_create_topic'),
|
canCreateTopic = topics.get('can_create_topic'),
|
||||||
canCreateTopicOnCategory = category.get('permission') === Discourse.PermissionType.FULL;
|
canCreateTopicOnCategory = category.get('permission') === PermissionType.FULL;
|
||||||
|
|
||||||
this.controllerFor('navigation/category').setProperties({
|
this.controllerFor('navigation/category').setProperties({
|
||||||
canCreateTopicOnCategory: canCreateTopicOnCategory,
|
canCreateTopicOnCategory: canCreateTopicOnCategory,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
||||||
|
import UserAction from "discourse/models/user-action";
|
||||||
|
|
||||||
export default UserActivityStreamRoute.extend({
|
export default UserActivityStreamRoute.extend({
|
||||||
userActionType: Discourse.UserAction.TYPES["bookmarks"]
|
userActionType: UserAction.TYPES["bookmarks"]
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
||||||
|
import UserAction from "discourse/models/user-action";
|
||||||
|
|
||||||
export default UserActivityStreamRoute.extend({
|
export default UserActivityStreamRoute.extend({
|
||||||
userActionType: Discourse.UserAction.TYPES["edits"]
|
userActionType: UserAction.TYPES["edits"]
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
||||||
|
import UserAction from "discourse/models/user-action";
|
||||||
|
|
||||||
export default UserActivityStreamRoute.extend({
|
export default UserActivityStreamRoute.extend({
|
||||||
userActionType: Discourse.UserAction.TYPES["likes_given"]
|
userActionType: UserAction.TYPES["likes_given"]
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
||||||
|
import UserAction from "discourse/models/user-action";
|
||||||
|
|
||||||
export default UserActivityStreamRoute.extend({
|
export default UserActivityStreamRoute.extend({
|
||||||
userActionType: Discourse.UserAction.TYPES["likes_received"]
|
userActionType: UserAction.TYPES["likes_received"]
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
||||||
|
import UserAction from "discourse/models/user-action";
|
||||||
|
|
||||||
export default UserActivityStreamRoute.extend({
|
export default UserActivityStreamRoute.extend({
|
||||||
userActionType: Discourse.UserAction.TYPES["mentions"]
|
userActionType: UserAction.TYPES["mentions"]
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
||||||
|
import UserAction from "discourse/models/user-action";
|
||||||
|
|
||||||
export default UserActivityStreamRoute.extend({
|
export default UserActivityStreamRoute.extend({
|
||||||
userActionType: Discourse.UserAction.TYPES.pending
|
userActionType: UserAction.TYPES.pending
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
||||||
|
import UserAction from "discourse/models/user-action";
|
||||||
|
|
||||||
export default UserActivityStreamRoute.extend({
|
export default UserActivityStreamRoute.extend({
|
||||||
userActionType: Discourse.UserAction.TYPES["posts"]
|
userActionType: UserAction.TYPES["posts"]
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
||||||
|
import UserAction from "discourse/models/user-action";
|
||||||
|
|
||||||
export default UserActivityStreamRoute.extend({
|
export default UserActivityStreamRoute.extend({
|
||||||
userActionType: Discourse.UserAction.TYPES["replies"]
|
userActionType: UserAction.TYPES["replies"]
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import UserTopicListRoute from "discourse/routes/user-topic-list";
|
import UserTopicListRoute from "discourse/routes/user-topic-list";
|
||||||
|
import UserAction from "discourse/models/user-action";
|
||||||
|
|
||||||
export default UserTopicListRoute.extend({
|
export default UserTopicListRoute.extend({
|
||||||
userActionType: Discourse.UserAction.TYPES.topics,
|
userActionType: UserAction.TYPES.topics,
|
||||||
|
|
||||||
model: function() {
|
model: function() {
|
||||||
return this.store.findFiltered('topicList', {filter: 'topics/created-by/' + this.modelFor('user').get('username_lower') });
|
return this.store.findFiltered('topicList', {filter: 'topics/created-by/' + this.modelFor('user').get('username_lower') });
|
||||||
|
@ -24,9 +24,12 @@
|
|||||||
//= require ./discourse/lib/eyeline
|
//= require ./discourse/lib/eyeline
|
||||||
//= require ./discourse/helpers/register-unbound
|
//= require ./discourse/helpers/register-unbound
|
||||||
//= require ./discourse/mixins/scrolling
|
//= require ./discourse/mixins/scrolling
|
||||||
|
//= require ./discourse/models/model
|
||||||
//= require ./discourse/models/rest
|
//= require ./discourse/models/rest
|
||||||
//= require ./discourse/models/badge-grouping
|
//= require ./discourse/models/badge-grouping
|
||||||
//= require ./discourse/models/badge
|
//= require ./discourse/models/badge
|
||||||
|
//= require ./discourse/models/permission-type
|
||||||
|
//= require ./discourse/models/user-action-group
|
||||||
//= require ./discourse/models/category
|
//= require ./discourse/models/category
|
||||||
//= require ./discourse/lib/ajax-error
|
//= require ./discourse/lib/ajax-error
|
||||||
//= require ./discourse/lib/markdown
|
//= require ./discourse/lib/markdown
|
||||||
@ -38,8 +41,6 @@
|
|||||||
//= require ./discourse/lib/debounce
|
//= require ./discourse/lib/debounce
|
||||||
//= require ./discourse/lib/safari-hacks
|
//= require ./discourse/lib/safari-hacks
|
||||||
//= require_tree ./discourse/adapters
|
//= require_tree ./discourse/adapters
|
||||||
//= require ./discourse/models/rest
|
|
||||||
//= require ./discourse/models/model
|
|
||||||
//= require ./discourse/models/result-set
|
//= require ./discourse/models/result-set
|
||||||
//= require ./discourse/models/store
|
//= require ./discourse/models/store
|
||||||
//= require ./discourse/models/post-action-type
|
//= require ./discourse/models/post-action-type
|
||||||
|
Loading…
x
Reference in New Issue
Block a user