DEV: s/Em/Ember (#6874)

This commit is contained in:
Joffrey JAFFEUX 2019-01-11 17:54:23 +01:00 committed by GitHub
parent dbe42068a2
commit 1a3655b787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
125 changed files with 315 additions and 306 deletions

View File

@ -28,7 +28,6 @@
"currentURL": true,
"define": true,
"Discourse": true,
"Em": true,
"Ember": true,
"exists": true,
"expandSelectKit": true,

View File

@ -34,7 +34,7 @@ export default Ember.Component.extend({
didInsertElement() {
loadScript("/javascripts/spectrum.js").then(() => {
loadCSS("/javascripts/spectrum.css").then(() => {
Em.run.schedule("afterRender", () => {
Ember.run.schedule("afterRender", () => {
this.$(".picker")
.spectrum({ color: "#" + this.get("hexValue") })
.on("change.spectrum", (me, color) => {
@ -44,7 +44,7 @@ export default Ember.Component.extend({
});
});
});
Em.run.schedule("afterRender", () => {
Ember.run.schedule("afterRender", () => {
this.hexValueChanged();
});
}

View File

@ -21,7 +21,7 @@ export default Ember.Component.extend({
ajax("/admin/users/ip-info", {
data: { ip: this.get("ip") }
}).then(function(location) {
self.set("location", Em.Object.create(location));
self.set("location", Ember.Object.create(location));
});
}

View File

@ -34,7 +34,7 @@ export default Ember.Component.extend({
self.set("permalink_type_value", "");
self.set("formSubmitted", false);
self.action(Permalink.create(result.permalink));
Em.run.schedule("afterRender", function() {
Ember.run.schedule("afterRender", function() {
self.$(".permalink-url").focus();
});
},
@ -60,7 +60,7 @@ export default Ember.Component.extend({
didInsertElement: function() {
var self = this;
self._super();
Em.run.schedule("afterRender", function() {
Ember.run.schedule("afterRender", function() {
self.$(".external-url").keydown(function(e) {
if (e.keyCode === 13) {
// enter key

View File

@ -55,7 +55,7 @@ export default Ember.Component.extend(
if (this.get("isUploading")) {
this.resumable.cancel();
var self = this;
Em.run.later(function() {
Ember.run.later(function() {
self._reset();
});
return false;
@ -83,20 +83,20 @@ export default Ember.Component.extend(
// automatically upload the selected file
self.resumable.upload();
// mark as uploading
Em.run.later(function() {
Ember.run.later(function() {
self.set("isUploading", true);
});
});
this.resumable.on("fileProgress", function(file) {
// update progress
Em.run.later(function() {
Ember.run.later(function() {
self.set("progress", parseInt(file.progress() * 100, 10));
});
});
this.resumable.on("fileSuccess", function(file) {
Em.run.later(function() {
Ember.run.later(function() {
// mark as not uploading anymore
self._reset();
// fire an event to allow the parent route to reload its model
@ -105,7 +105,7 @@ export default Ember.Component.extend(
});
this.resumable.on("fileError", function(file, message) {
Em.run.later(function() {
Ember.run.later(function() {
// mark as not uploading anymore
self._reset();
// fire an event to allow the parent route to display the error message
@ -116,7 +116,7 @@ export default Ember.Component.extend(
_assignBrowse: function() {
var self = this;
Em.run.schedule("afterRender", function() {
Ember.run.schedule("afterRender", function() {
self.resumable.assignBrowse(self.$());
});
}.on("didInsertElement"),

View File

@ -1,9 +1,9 @@
import UploadMixin from "discourse/mixins/upload";
export default Em.Component.extend(UploadMixin, {
export default Ember.Component.extend(UploadMixin, {
type: "csv",
uploadUrl: "/tags/upload",
addDisabled: Em.computed.alias("uploading"),
addDisabled: Ember.computed.alias("uploading"),
elementId: "tag-uploader",
validateUploadedFilesOptions() {

View File

@ -9,9 +9,9 @@ export default Ember.Component.extend({
childrenExpanded: false,
classNames: ["themes-list-item"],
classNameBindings: ["theme.selected:selected"],
hasComponents: Em.computed.gt("children.length", 0),
displayComponents: Em.computed.and("hasComponents", "theme.isActive"),
displayHasMore: Em.computed.gt("theme.childThemes.length", MAX_COMPONENTS),
hasComponents: Ember.computed.gt("children.length", 0),
displayComponents: Ember.computed.and("hasComponents", "theme.isActive"),
displayHasMore: Ember.computed.gt("theme.childThemes.length", MAX_COMPONENTS),
click(e) {
if (!$(e.target).hasClass("others-count")) {

View File

@ -7,12 +7,12 @@ export default Ember.Component.extend({
classNames: ["themes-list"],
hasThemes: Em.computed.gt("themesList.length", 0),
hasUserThemes: Em.computed.gt("userThemes.length", 0),
hasInactiveThemes: Em.computed.gt("inactiveThemes.length", 0),
hasThemes: Ember.computed.gt("themesList.length", 0),
hasUserThemes: Ember.computed.gt("userThemes.length", 0),
hasInactiveThemes: Ember.computed.gt("inactiveThemes.length", 0),
themesTabActive: Em.computed.equal("currentTab", THEMES),
componentsTabActive: Em.computed.equal("currentTab", COMPONENTS),
themesTabActive: Ember.computed.equal("currentTab", THEMES),
componentsTabActive: Ember.computed.equal("currentTab", COMPONENTS),
@computed("themes", "components", "currentTab")
themesList(themes, components) {
@ -79,7 +79,7 @@ export default Ember.Component.extend({
}
},
navigateToTheme(theme) {
Em.getOwner(this)
Ember.getOwner(this)
.lookup("router:main")
.transitionTo("adminCustomizeThemes.show", theme);
}

View File

@ -1,11 +1,11 @@
import computed from "ember-addons/ember-computed-decorators";
import UploadMixin from "discourse/mixins/upload";
export default Em.Component.extend(UploadMixin, {
export default Ember.Component.extend(UploadMixin, {
type: "csv",
classNames: "watched-words-uploader",
uploadUrl: "/admin/logs/watched_words/upload",
addDisabled: Em.computed.alias("uploading"),
addDisabled: Ember.computed.alias("uploading"),
validateUploadedFilesOptions() {
return { csvOnly: true };

View File

@ -1,5 +1,5 @@
export default Ember.Controller.extend({
logs: [],
adminBackups: Ember.inject.controller(),
status: Em.computed.alias("adminBackups.model")
status: Ember.computed.alias("adminBackups.model")
});

View File

@ -51,7 +51,7 @@ export default Ember.Controller.extend({
},
copy() {
var newColorScheme = Em.copy(this.get("model"), true);
var newColorScheme = Ember.copy(this.get("model"), true);
newColorScheme.set(
"name",
I18n.t("admin.customize.colors.copy_name_prefix") +

View File

@ -10,7 +10,7 @@ export default Ember.Controller.extend({
}.property("model.@each.id"),
baseColors: function() {
var baseColorsHash = Em.Object.create({});
var baseColorsHash = Ember.Object.create({});
this.get("baseColorScheme.colors").forEach(color => {
baseColorsHash.set(color.get("name"), color);
});
@ -23,7 +23,7 @@ export default Ember.Controller.extend({
"base_scheme_id",
baseKey
);
const newColorScheme = Em.copy(base, true);
const newColorScheme = Ember.copy(base, true);
newColorScheme.set("name", I18n.t("admin.customize.colors.new_name"));
newColorScheme.set("base_scheme_id", base.get("base_scheme_id"));
newColorScheme.save().then(() => {

View File

@ -179,7 +179,7 @@ export default Ember.Controller.extend({
toggleMaximize: function() {
this.toggleProperty("maximized");
Em.run.next(() => {
Ember.run.next(() => {
this.appEvents.trigger("ace:resize");
});
}

View File

@ -10,7 +10,7 @@ const THEME_UPLOAD_VAR = 2;
export default Ember.Controller.extend({
downloadUrl: url("model.id", "/admin/themes/%@"),
previewUrl: url("model.id", "/admin/themes/%@/preview"),
addButtonDisabled: Em.computed.empty("selectedChildThemeId"),
addButtonDisabled: Ember.computed.empty("selectedChildThemeId"),
editRouteName: "adminCustomizeThemes.edit",
@computed("model", "allThemes", "model.component")

View File

@ -5,7 +5,7 @@ export default Ember.Controller.extend({
@property sendTestEmailDisabled
**/
sendTestEmailDisabled: Em.computed.empty("testEmailAddress"),
sendTestEmailDisabled: Ember.computed.empty("testEmailAddress"),
/**
Clears the 'sentTestEmail' property on successful send.

View File

@ -4,7 +4,7 @@ const MAX_FIELDS = 20;
export default Ember.Controller.extend({
fieldTypes: null,
createDisabled: Em.computed.gte("model.length", MAX_FIELDS),
createDisabled: Ember.computed.gte("model.length", MAX_FIELDS),
fieldSortOrder: ["position"],
sortedFields: Ember.computed.sort("model", "fieldSortOrder"),

View File

@ -14,15 +14,15 @@ export default Ember.Controller.extend(CanCheckEmails, {
listFilter: null,
selectAll: false,
queryNew: Em.computed.equal("query", "new"),
queryPending: Em.computed.equal("query", "pending"),
queryHasApproval: Em.computed.or("queryNew", "queryPending"),
showApproval: Em.computed.and(
queryNew: Ember.computed.equal("query", "new"),
queryPending: Ember.computed.equal("query", "pending"),
queryHasApproval: Ember.computed.or("queryNew", "queryPending"),
showApproval: Ember.computed.and(
"siteSettings.must_approve_users",
"queryHasApproval"
),
searchHint: i18n("search_hint"),
hasSelection: Em.computed.gt("selectedCount", 0),
hasSelection: Ember.computed.gt("selectedCount", 0),
selectedCount: function() {
var model = this.get("model");

View File

@ -43,7 +43,7 @@ export default Ember.Controller.extend({
if (a) {
a.words.unshiftObject(arg);
a.incrementProperty("count");
Em.run.schedule("afterRender", () => {
Ember.run.schedule("afterRender", () => {
// remove from other actions lists
let match = null;
this.get("adminWatchedWords.model").forEach(action => {

View File

@ -63,8 +63,8 @@ export default Ember.Controller.extend(ModalFunctionality, {
this.set("fileSelected", false);
},
enabled: Em.computed.and("nameValid", "fileSelected"),
disabled: Em.computed.not("enabled"),
enabled: Ember.computed.and("nameValid", "fileSelected"),
disabled: Ember.computed.not("enabled"),
@computed("name", "adminCustomizeThemesShow.model.theme_fields")
errorMessage(name, themeFields) {
@ -105,7 +105,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
actions: {
updateName() {
let name = this.get("name");
if (Em.isEmpty(name)) {
if (Ember.isEmpty(name)) {
name = $("#file-input")[0].files[0].name;
this.set("name", name.split(".")[0]);
}

View File

@ -4,7 +4,7 @@ import ModalFunctionality from "discourse/mixins/modal-functionality";
export default Ember.Controller.extend(ModalFunctionality, {
modelChanged: function() {
const model = this.get("model");
const copy = Em.A();
const copy = Ember.A();
const store = this.store;
if (model) {

View File

@ -100,7 +100,7 @@ export default Ember.Mixin.create({
}.on("willDestroyElement"),
_save() {
Em.warn("You should define a `_save` method", {
Ember.warn("You should define a `_save` method", {
id: "admin.mixins.setting-component"
});
return Ember.RSVP.resolve();

View File

@ -305,7 +305,7 @@ const AdminUser = Discourse.User.extend({
return this.get("trust_level") < 4;
}.property("trust_level"),
canSuspend: Em.computed.not("staff"),
canSuspend: Ember.computed.not("staff"),
suspendDuration: function() {
const suspended_at = moment(this.suspended_at),

View File

@ -1,7 +1,7 @@
import computed from "ember-addons/ember-computed-decorators";
export default Discourse.Model.extend({
restoreDisabled: Em.computed.not("restoreEnabled"),
restoreDisabled: Ember.computed.not("restoreEnabled"),
@computed("allowRestore", "isOperationRunning")
restoreEnabled(allowRestore, isOperationRunning) {

View File

@ -30,7 +30,7 @@ const ColorScheme = Discourse.Model.extend(Ember.Copyable, {
var newScheme = ColorScheme.create({
name: this.get("name"),
can_edit: true,
colors: Em.A()
colors: Ember.A()
});
this.get("colors").forEach(c => {
newScheme.colors.pushObject(

View File

@ -10,9 +10,9 @@ const SETTINGS_TYPE_ID = 5;
const Theme = RestModel.extend({
FIELDS_IDS: [0, 1],
isActive: Em.computed.or("default", "user_selectable"),
isPendingUpdates: Em.computed.gt("remote_theme.commits_behind", 0),
hasEditedFields: Em.computed.gt("editedFields.length", 0),
isActive: Ember.computed.or("default", "user_selectable"),
isPendingUpdates: Ember.computed.gt("remote_theme.commits_behind", 0),
hasEditedFields: Ember.computed.gt("editedFields.length", 0),
@computed("theme_fields")
themeFields(fields) {
@ -50,7 +50,7 @@ const Theme = RestModel.extend({
@computed("theme_fields.[]")
editedFields(fields) {
return fields.filter(
field => !Em.isBlank(field.value) && field.type_id !== SETTINGS_TYPE_ID
field => !Ember.isBlank(field.value) && field.type_id !== SETTINGS_TYPE_ID
);
},
@ -67,11 +67,11 @@ const Theme = RestModel.extend({
hasEdited(target, name) {
if (name) {
return !Em.isEmpty(this.getField(target, name));
return !Ember.isEmpty(this.getField(target, name));
} else {
let fields = this.get("theme_fields") || [];
return fields.any(
field => field.target === target && !Em.isEmpty(field.value)
field => field.target === target && !Ember.isEmpty(field.value)
);
}
},

View File

@ -15,7 +15,7 @@ export default Ember.Route.extend({
return log.message.length === 0 || log.message[0] === "[";
})
.map(function(log) {
return Em.Object.create(log);
return Ember.Object.create(log);
})
.value();
logs.pushObjects(newLogs);

View File

@ -41,7 +41,7 @@ export default Discourse.Route.extend({
} else {
this.controllerFor("adminBackupsLogs")
.get("logs")
.pushObject(Em.Object.create(log));
.pushObject(Ember.Object.create(log));
}
});
},

View File

@ -4,7 +4,7 @@ import showModal from "discourse/lib/show-modal";
export default Ember.Route.extend({
serialize(m) {
return { badge_id: Em.get(m, "id") || "new" };
return { badge_id: Ember.get(m, "id") || "new" };
},
model(params) {
@ -49,7 +49,7 @@ export default Ember.Route.extend({
})
.catch(function(error) {
badge.set("preview_loading", false);
Em.Logger.error(error);
Ember.Logger.error(error);
bootbox.alert("Network error");
});
}

View File

@ -9,7 +9,7 @@ export default Discourse.Route.extend({
},
model(params) {
return AdminUser.find(Em.get(params, "user_id"));
return AdminUser.find(Ember.get(params, "user_id"));
},
renderTemplate() {

View File

@ -7,7 +7,7 @@
require("discourse/routes/application").default.reopen({
actions: {
didTransition: function() {
Em.run.next(function() {
Ember.run.next(function() {
Discourse.authenticationComplete(authenticationData);
});
return this._super();

View File

@ -24,7 +24,7 @@ RawHandlebars.helpers["get"] = function(context, options) {
context = context.slice(context.indexOf(".") + 1);
}
return val === undefined ? Em.get(firstContext, context) : val;
return val === undefined ? Ember.get(firstContext, context) : val;
};
// adds compatability so this works with stringParams
@ -45,7 +45,7 @@ RawHandlebars.registerHelper("each", function(
contextName,
options
) {
var list = Em.get(this, contextName);
var list = Ember.get(this, contextName);
var output = [];
var innerContext = objectCreate(this);
for (var i = 0; i < list.length; i++) {

View File

@ -1,7 +1,7 @@
import computed from "ember-addons/ember-computed-decorators";
import UploadMixin from "discourse/mixins/upload";
export default Em.Component.extend(UploadMixin, {
export default Ember.Component.extend(UploadMixin, {
type: "avatar",
tagName: "span",
imageIsNotASquare: false,

View File

@ -2,7 +2,7 @@ import { ajax } from "discourse/lib/ajax";
import computed from "ember-addons/ember-computed-decorators";
import UploadMixin from "discourse/mixins/upload";
export default Em.Component.extend(UploadMixin, {
export default Ember.Component.extend(UploadMixin, {
tagName: "span",
@computed("uploading", "uploadProgress")

View File

@ -9,5 +9,5 @@ export default Ember.Component.extend({
return $("<div>" + this.get("badge.description") + "</div>").text();
}.property("badge.description"),
attributeBindings: ["data-badge-name", "title"],
"data-badge-name": Em.computed.alias("badge.name")
"data-badge-name": Ember.computed.alias("badge.name")
});

View File

@ -2,9 +2,9 @@
export default Ember.Component.extend({
classNameBindings: ["hidden:hidden", ":category-breadcrumb"],
tagName: "ol",
parentCategory: Em.computed.alias("category.parentCategory"),
parentCategory: Ember.computed.alias("category.parentCategory"),
parentCategories: Em.computed.filter("categories", function(c) {
parentCategories: Ember.computed.filter("categories", function(c) {
if (
c.id === this.site.get("uncategorized_category_id") &&
!this.siteSettings.allow_uncategorized_topics

View File

@ -29,7 +29,7 @@ export default Ember.Component.extend({
search: debounce(function(title) {
const currentTopicId = this.get("currentTopicId");
if (Em.isEmpty(title)) {
if (Ember.isEmpty(title)) {
this.setProperties({ messages: null, loading: false });
return;
}
@ -53,7 +53,7 @@ export default Ember.Component.extend({
actions: {
chooseMessage(message) {
const messageId = Em.get(message, "id");
const messageId = Ember.get(message, "id");
this.set("selectedTopicId", messageId);
Ember.run.next(() =>
$(`#choose-message-${messageId}`).prop("checked", "true")

View File

@ -27,7 +27,7 @@ export default Ember.Component.extend({
const self = this,
currentTopicId = this.get("currentTopicId");
if (Em.isEmpty(title)) {
if (Ember.isEmpty(title)) {
self.setProperties({ topics: null, loading: false });
return;
}
@ -50,7 +50,7 @@ export default Ember.Component.extend({
actions: {
chooseTopic(topic) {
const topicId = Em.get(topic, "id");
const topicId = Ember.get(topic, "id");
this.set("selectedTopicId", topicId);
Ember.run.next(() =>
$("#choose-topic-" + topicId).prop("checked", "true")

View File

@ -583,7 +583,7 @@ export default Ember.Component.extend({
if (found.indexOf(name) === -1) {
// add a delay to allow for typing, so you don't open the warning right away
// previously we would warn after @bob even if you were about to mention @bob2
Em.run.later(
Ember.run.later(
this,
() => {
if (

View File

@ -79,7 +79,7 @@ export default Ember.Component.extend({
}
if (Ember.testing) {
Em.run.next(() =>
Ember.run.next(() =>
// not ideal but we don't want to run this in current
// runloop to avoid an error in console
this._checkForUrl()

View File

@ -11,7 +11,7 @@ const CookText = Ember.Component.extend({
this.set("cooked", cooked);
// no choice but to defer this cause
// pretty text may only be loaded now
Em.run.next(() =>
Ember.run.next(() =>
window
.requireModule("pretty-text/image-short-url")
.resolveAllShortUrls(ajax)

View File

@ -1,7 +1,7 @@
import computed from "ember-addons/ember-computed-decorators";
import UploadMixin from "discourse/mixins/upload";
export default Em.Component.extend(UploadMixin, {
export default Ember.Component.extend(UploadMixin, {
type: "csv",
tagName: "span",
uploadUrl: "/invites/upload_csv",

View File

@ -23,7 +23,7 @@ export default Ember.Component.extend({
setUp() {
$("html").on("keydown.discourse-modal", e => {
if (e.which === 27 && this.get("dismissable")) {
Em.run.next(() => $(".modal-header a.close").click());
Ember.run.next(() => $(".modal-header a.close").click());
}
});

View File

@ -6,7 +6,9 @@ import computed from "ember-addons/ember-computed-decorators";
export default buildCategoryPanel("general", {
foregroundColors: ["FFFFFF", "000000"],
canSelectParentCategory: Em.computed.not("category.isUncategorizedCategory"),
canSelectParentCategory: Ember.computed.not(
"category.isUncategorizedCategory"
),
// background colors are available as a pipe-separated string
@computed

View File

@ -5,12 +5,12 @@ import computed from "ember-addons/ember-computed-decorators";
export default buildCategoryPanel("settings", {
emailInEnabled: setting("email_in"),
showPositionInput: setting("fixed_category_positions"),
isParentCategory: Em.computed.empty("category.parent_category_id"),
showSubcategoryListStyle: Em.computed.and(
isParentCategory: Ember.computed.empty("category.parent_category_id"),
showSubcategoryListStyle: Ember.computed.and(
"category.show_subcategory_list",
"isParentCategory"
),
isDefaultSortOrder: Em.computed.empty("category.sort_order"),
isDefaultSortOrder: Ember.computed.empty("category.sort_order"),
@computed
availableSubcategoryListStyles() {

View File

@ -1,6 +1,6 @@
import { propertyEqual } from "discourse/lib/computed";
export default Em.Component.extend({
export default Ember.Component.extend({
tagName: "li",
classNameBindings: ["active", "tabClassName"],

View File

@ -1,11 +1,11 @@
import UploadMixin from "discourse/mixins/upload";
export default Em.Component.extend(UploadMixin, {
export default Ember.Component.extend(UploadMixin, {
type: "emoji",
uploadUrl: "/admin/customize/emojis",
hasName: Em.computed.notEmpty("name"),
addDisabled: Em.computed.not("hasName"),
hasName: Ember.computed.notEmpty("name"),
addDisabled: Ember.computed.not("hasName"),
data: function() {
return Ember.isBlank(this.get("name")) ? {} : { name: this.get("name") };

View File

@ -23,9 +23,9 @@ export default Ember.Component.extend({
return flag === selectedFlag;
},
showMessageInput: Em.computed.and("flag.is_custom_flag", "selected"),
showDescription: Em.computed.not("showMessageInput"),
isNotifyUser: Em.computed.equal("flag.name_key", "notify_user"),
showMessageInput: Ember.computed.and("flag.is_custom_flag", "selected"),
showDescription: Ember.computed.not("showMessageInput"),
isNotifyUser: Ember.computed.equal("flag.name_key", "notify_user"),
@computed("flag.description", "flag.short_description")
description(long_description, short_description) {

View File

@ -28,7 +28,7 @@ export default Ember.Component.extend({
return !usernames || !(usernames.length > 0);
},
showingFirst: Em.computed.lte("currentPage", 1),
showingFirst: Ember.computed.lte("currentPage", 1),
showingLast: propertyEqual("currentPage", "totalPages"),
actions: {
@ -60,7 +60,7 @@ export default Ember.Component.extend({
},
addMembers() {
if (Em.isEmpty(this.get("model.usernames"))) {
if (Ember.isEmpty(this.get("model.usernames"))) {
return;
}
this.get("model")

View File

@ -1,12 +1,12 @@
import computed from "ember-addons/ember-computed-decorators";
import UploadMixin from "discourse/mixins/upload";
export default Em.Component.extend(UploadMixin, {
export default Ember.Component.extend(UploadMixin, {
classNames: ["image-uploader"],
@computed("imageUrl")
backgroundStyle(imageUrl) {
if (Em.isEmpty(imageUrl)) {
if (Ember.isEmpty(imageUrl)) {
return "".htmlSafe();
}

View File

@ -1,7 +1,7 @@
import computed from "ember-addons/ember-computed-decorators";
import UploadMixin from "discourse/mixins/upload";
export default Em.Component.extend(UploadMixin, {
export default Ember.Component.extend(UploadMixin, {
type: "avatar",
tagName: "span",

View File

@ -6,8 +6,8 @@ export default Ember.Component.extend(
classNameBindings: [":tip", "good", "bad"],
rerenderTriggers: ["validation"],
bad: Em.computed.alias("validation.failed"),
good: Em.computed.not("bad"),
bad: Ember.computed.alias("validation.failed"),
good: Ember.computed.not("bad"),
buildBuffer(buffer) {
const reason = this.get("validation.reason");

View File

@ -20,7 +20,7 @@ export default Ember.Component.extend({
@observes("currentPath")
currentPathChanged() {
this.set("expanded", false);
Em.run.next(() => this._updateSelectedHtml());
Ember.run.next(() => this._updateSelectedHtml());
},
_updateSelectedHtml() {
@ -38,7 +38,7 @@ export default Ember.Component.extend({
toggleExpanded() {
this.toggleProperty("expanded");
Em.run.next(() => {
Ember.run.next(() => {
if (this.get("expanded")) {
$(window)
.off("click.mobile-nav")

View File

@ -68,7 +68,7 @@ export default Ember.Component.extend({
if (this.get("expanded")) {
DiscourseURL.appEvents.on("dom:clean", this, this.ensureDropClosed);
Em.run.next(() => {
Ember.run.next(() => {
if (!this.get("expanded")) {
return;
}

View File

@ -1,4 +1,4 @@
export default Em.Component.extend({
export default Ember.Component.extend({
classNames: ["controls"],
label: function() {

View File

@ -28,7 +28,7 @@ const REGEXP_POST_TIME_WHEN = /^(before|after)/gi;
const IN_OPTIONS_MAPPING = { images: "with" };
export default Em.Component.extend({
export default Ember.Component.extend({
classNames: ["search-advanced-options"],
inOptionsForUsers: [

View File

@ -9,7 +9,10 @@ export default Ember.Component.extend({
hideForSession() {
this.session.set("hideSignupCta", true);
this.keyValueStore.setItem("anon-cta-hidden", new Date().getTime());
Em.run.later(() => this.session.set("showSignupCta", false), 20 * 1000);
Ember.run.later(
() => this.session.set("showSignupCta", false),
20 * 1000
);
}
},

View File

@ -32,7 +32,7 @@ export default Ember.Component.extend({
if (
category &&
Em.get(category, "id") ===
Ember.get(category, "id") ===
Discourse.Site.currentProp("uncategorized_category_id")
) {
category = null;

View File

@ -39,7 +39,7 @@ export default Ember.Component.extend(
"topic.visited"
],
attributeBindings: ["data-topic-id"],
"data-topic-id": Em.computed.alias("topic.id"),
"data-topic-id": Ember.computed.alias("topic.id"),
@computed
newDotText() {

View File

@ -86,7 +86,7 @@ export default MountWidget.extend(Docking, {
this._super();
if (this.get("fullscreen") && !this.get("addShowClass")) {
Em.run.next(() => {
Ember.run.next(() => {
this.set("addShowClass", true);
this.queueRerender();
});

View File

@ -77,7 +77,7 @@ export default Ember.Component.extend(
willDestroyElement() {
if (this._delayedRerender) {
Em.run.cancel(this._delayedRerender);
Ember.run.cancel(this._delayedRerender);
}
},

View File

@ -15,10 +15,10 @@ export default Ember.Component.extend({
return userPath(username);
},
"data-username": Em.computed.alias("user.username"),
"data-username": Ember.computed.alias("user.username"),
// TODO: In later ember releases `hasBlock` works without this
hasBlock: Em.computed.alias("template"),
hasBlock: Ember.computed.alias("template"),
@computed("user.name", "user.username")
name(name, username) {

View File

@ -114,7 +114,7 @@ export default TextField.extend({
@observes("usernames")
_clearInput: function() {
if (arguments.length > 1) {
if (Em.isEmpty(this.get("usernames"))) {
if (Ember.isEmpty(this.get("usernames"))) {
this.$()
.parent()
.find("a")

View File

@ -13,7 +13,7 @@ export default Ember.Component.extend(LoadMore, {
classNames: ["user-stream"],
_scrollTopOnModelChange: function() {
Em.run.schedule("afterRender", () => $(document).scrollTop(0));
Ember.run.schedule("afterRender", () => $(document).scrollTop(0));
}.observes("stream.user.id"),
_inserted: function() {

View File

@ -17,7 +17,7 @@ export default Ember.Controller.extend({
});
},
disabled: Em.computed.empty("notificationLevelId"),
disabled: Ember.computed.empty("notificationLevelId"),
actions: {
changeNotificationLevel() {

View File

@ -47,7 +47,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
.then(function() {
self.send("closeModal");
self.setProperties({ date: "", time: "", saving: false });
Em.run.next(() => {
Ember.run.next(() => {
DiscourseURL.routeTo(topic.get("url"));
});
})

View File

@ -80,11 +80,11 @@ export default Ember.Controller.extend({
topicController: Ember.inject.controller("topic"),
application: Ember.inject.controller(),
replyAsNewTopicDraft: Em.computed.equal(
replyAsNewTopicDraft: Ember.computed.equal(
"model.draftKey",
Composer.REPLY_AS_NEW_TOPIC_KEY
),
replyAsNewPrivateMessageDraft: Em.computed.equal(
replyAsNewPrivateMessageDraft: Ember.computed.equal(
"model.draftKey",
Composer.REPLY_AS_NEW_PRIVATE_MESSAGE_KEY
),
@ -155,7 +155,7 @@ export default Ember.Controller.extend({
return "title";
},
showToolbar: Em.computed({
showToolbar: Ember.computed({
get() {
const keyValueStore = getOwner(this).lookup("key-value-store:main");
const storedVal = keyValueStore.get("toolbar-enabled");
@ -198,7 +198,7 @@ export default Ember.Controller.extend({
return currentUser && currentUser.get("staff");
},
canUnlistTopic: Em.computed.and("model.creatingTopic", "isStaffUser"),
canUnlistTopic: Ember.computed.and("model.creatingTopic", "isStaffUser"),
@computed("canWhisper", "model.post")
showWhisperToggle(canWhisper, repliedToPost) {

View File

@ -24,14 +24,14 @@ export default Ember.Controller.extend(
accountPasswordConfirm: 0,
accountChallenge: 0,
formSubmitted: false,
rejectedEmails: Em.A([]),
rejectedEmails: Ember.A([]),
prefilledUsername: null,
userFields: null,
isDeveloper: false,
hasAuthOptions: Em.computed.notEmpty("authOptions"),
hasAuthOptions: Ember.computed.notEmpty("authOptions"),
canCreateLocal: setting("enable_local_logins"),
showCreateForm: Em.computed.or("hasAuthOptions", "canCreateLocal"),
showCreateForm: Ember.computed.or("hasAuthOptions", "canCreateLocal"),
resetForm() {
// We wrap the fields in a structure so we can assign a value

View File

@ -7,10 +7,10 @@ export default Ember.Controller.extend({
loading: false,
category: Em.computed.alias("navigationCategory.category"),
noSubcategories: Em.computed.alias("navigationCategory.noSubcategories"),
category: Ember.computed.alias("navigationCategory.category"),
noSubcategories: Ember.computed.alias("navigationCategory.noSubcategories"),
loadedAllItems: Em.computed.not("discoveryTopics.model.canLoadMore"),
loadedAllItems: Ember.computed.not("discoveryTopics.model.canLoadMore"),
_showFooter: function() {
this.set("application.showFooter", this.get("loadedAllItems"));

View File

@ -115,16 +115,16 @@ const controllerOpts = {
);
}.property("model.filter", "model.topics.length"),
hasTopics: Em.computed.gt("model.topics.length", 0),
allLoaded: Em.computed.empty("model.more_topics_url"),
hasTopics: Ember.computed.gt("model.topics.length", 0),
allLoaded: Ember.computed.empty("model.more_topics_url"),
latest: endWith("model.filter", "latest"),
new: endWith("model.filter", "new"),
top: Em.computed.notEmpty("period"),
yearly: Em.computed.equal("period", "yearly"),
quarterly: Em.computed.equal("period", "quarterly"),
monthly: Em.computed.equal("period", "monthly"),
weekly: Em.computed.equal("period", "weekly"),
daily: Em.computed.equal("period", "daily"),
top: Ember.computed.notEmpty("period"),
yearly: Ember.computed.equal("period", "yearly"),
quarterly: Ember.computed.equal("period", "quarterly"),
monthly: Ember.computed.equal("period", "monthly"),
weekly: Ember.computed.equal("period", "weekly"),
daily: Ember.computed.equal("period", "daily"),
footerMessage: function() {
if (!this.get("allLoaded")) {

View File

@ -33,10 +33,10 @@ export default Ember.Controller.extend({
return false;
}.property(),
isNotFound: Em.computed.equal("thrown.status", 404),
isForbidden: Em.computed.equal("thrown.status", 403),
isServer: Em.computed.gte("thrown.status", 500),
isUnknown: Em.computed.none("isNetwork", "isServer"),
isNotFound: Ember.computed.equal("thrown.status", 404),
isForbidden: Ember.computed.equal("thrown.status", 403),
isServer: Ember.computed.gte("thrown.status", 500),
isUnknown: Ember.computed.none("isNetwork", "isServer"),
// TODO
// make ajax requests to /srv/status with exponential backoff
@ -63,7 +63,7 @@ export default Ember.Controller.extend({
}
}.property("isNetwork", "isServer", "isUnknown"),
requestUrl: Em.computed.alias("thrown.requestedUrl"),
requestUrl: Ember.computed.alias("thrown.requestedUrl"),
desc: function() {
if (this.get("networkFixed")) {
@ -100,7 +100,7 @@ export default Ember.Controller.extend({
tryLoading: function() {
this.set("loading", true);
var self = this;
Em.run.schedule("afterRender", function() {
Ember.run.schedule("afterRender", function() {
self.get("lastTransition").retry();
self.set("loading", false);
});

View File

@ -56,7 +56,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
return flagsAvailable;
} else {
// flagging topic
let lookup = Em.Object.create();
let lookup = Ember.Object.create();
let model = this.get("model");
model.get("actions_summary").forEach(a => {
a.flagTopic = model;
@ -94,7 +94,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
return true;
}.property("selected.is_custom_flag", "message.length"),
submitDisabled: Em.computed.not("submitEnabled"),
submitDisabled: Ember.computed.not("submitEnabled"),
// Staff accounts can "take action"
@computed("flagTopic", "selected.is_custom_flag")

View File

@ -50,7 +50,7 @@ export default Ember.Controller.extend({
@computed("q")
hasAutofocus(q) {
return Em.isEmpty(q);
return Ember.isEmpty(q);
},
@computed("q")

View File

@ -17,7 +17,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
const model = this.get("model");
const usernames = model.get("usernames");
if (Em.isEmpty(usernames)) {
if (Ember.isEmpty(usernames)) {
return;
}
let promise;

View File

@ -31,10 +31,12 @@ export default Ember.Controller.extend(ModalFunctionality, {
}
},
previousFeaturedLink: Em.computed.alias(
previousFeaturedLink: Ember.computed.alias(
"model.featured_link_changes.previous"
),
currentFeaturedLink: Em.computed.alias("model.featured_link_changes.current"),
currentFeaturedLink: Ember.computed.alias(
"model.featured_link_changes.current"
),
previousTagChanges: customTagArray("model.tags_changes.previous"),
currentTagChanges: customTagArray("model.tags_changes.current"),
@ -188,9 +190,9 @@ export default Ember.Controller.extend(ModalFunctionality, {
}
},
displayingInline: Em.computed.equal("viewMode", "inline"),
displayingSideBySide: Em.computed.equal("viewMode", "side_by_side"),
displayingSideBySideMarkdown: Em.computed.equal(
displayingInline: Ember.computed.equal("viewMode", "inline"),
displayingSideBySide: Ember.computed.equal("viewMode", "side_by_side"),
displayingSideBySideMarkdown: Ember.computed.equal(
"viewMode",
"side_by_side_markdown"
),

View File

@ -120,13 +120,13 @@ export default Ember.Controller.extend(ModalFunctionality, {
topicId: Ember.computed.alias("model.id"),
// Is Private Topic? (i.e. visible only to specific group members)
isPrivateTopic: Em.computed.and(
isPrivateTopic: Ember.computed.and(
"invitingToTopic",
"model.category.read_restricted"
),
// Is Private Message?
isMessage: Em.computed.equal("model.archetype", "private_message"),
isMessage: Ember.computed.equal("model.archetype", "private_message"),
// Allow Existing Members? (username autocomplete)
allowExistingMembers: Ember.computed.alias("invitingToTopic"),

View File

@ -32,7 +32,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
canLoginLocal: setting("enable_local_logins"),
canLoginLocalWithEmail: setting("enable_local_logins_via_email"),
loginRequired: Em.computed.alias("application.loginRequired"),
loginRequired: Ember.computed.alias("application.loginRequired"),
secondFactorMethod: SECOND_FACTOR_METHODS.TOTP,
resetForm() {
@ -67,7 +67,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
return loggingIn ? "login.logging_in" : "login.title";
},
loginDisabled: Em.computed.or("loggingIn", "loggedIn"),
loginDisabled: Ember.computed.or("loggingIn", "loggedIn"),
@computed("loggingIn", "authenticate", "application.canSignUp")
showSignupLink(loggingIn, authenticate, canSignUp) {

View File

@ -1,8 +1,8 @@
import NavigationDefaultController from "discourse/controllers/navigation/default";
export default NavigationDefaultController.extend({
showingParentCategory: Em.computed.none("category.parentCategory"),
showingSubcategoryList: Em.computed.and(
showingParentCategory: Ember.computed.none("category.parentCategory"),
showingSubcategoryList: Ember.computed.and(
"category.show_subcategory_list",
"showingParentCategory"
)

View File

@ -28,8 +28,8 @@ export default Ember.Controller.extend(
showAllAuthTokens: false,
cannotDeleteAccount: Em.computed.not("currentUser.can_delete_account"),
deleteDisabled: Em.computed.or(
cannotDeleteAccount: Ember.computed.not("currentUser.can_delete_account"),
deleteDisabled: Ember.computed.or(
"model.isSaving",
"deleting",
"cannotDeleteAccount"

View File

@ -10,8 +10,8 @@ export default Ember.Controller.extend({
success: false,
newEmail: null,
newEmailEmpty: Em.computed.empty("newEmail"),
saveDisabled: Em.computed.or(
newEmailEmpty: Ember.computed.empty("newEmail"),
saveDisabled: Ember.computed.or(
"saving",
"newEmailEmpty",
"taken",

View File

@ -15,8 +15,8 @@ export default Ember.Controller.extend({
maxLength: setting("max_username_length"),
minLength: setting("min_username_length"),
newUsernameEmpty: Em.computed.empty("newUsername"),
saveDisabled: Em.computed.or(
newUsernameEmpty: Ember.computed.empty("newUsername"),
saveDisabled: Ember.computed.or(
"saving",
"newUsernameEmpty",
"taken",

View File

@ -5,7 +5,7 @@ import { userPath } from "discourse/lib/url";
export default Ember.Controller.extend({
application: Ember.inject.controller(),
showLoginButton: Em.computed.equal("model.path", "login"),
showLoginButton: Ember.computed.equal("model.path", "login"),
@computed("model.path")
bodyClass: path => `static-${path}`,

View File

@ -889,7 +889,7 @@ export default Ember.Controller.extend(bufferedProperty("model"), {
composerController
.open(options)
.then(() => {
return Em.isEmpty(quotedText) ? "" : quotedText;
return Ember.isEmpty(quotedText) ? "" : quotedText;
})
.then(q => {
const postUrl = `${location.protocol}//${location.host}${post.get(
@ -1243,7 +1243,7 @@ export default Ember.Controller.extend(bufferedProperty("model"), {
if (callback) {
callback(this, data);
} else {
Em.Logger.warn("unknown topic bus message type", data);
Ember.Logger.warn("unknown topic bus message type", data);
}
}
}

View File

@ -35,7 +35,7 @@ export default Ember.Controller.extend({
});
}, 250).observes("searchTerm"),
inviteRedeemed: Em.computed.equal("filter", "redeemed"),
inviteRedeemed: Ember.computed.equal("filter", "redeemed"),
showBulkActionButtons: function() {
return (

View File

@ -7,11 +7,11 @@ export default Ember.Controller.extend({
user: Ember.inject.controller(),
pmView: false,
viewingSelf: Em.computed.alias("user.viewingSelf"),
isGroup: Em.computed.equal("pmView", "groups"),
currentPath: Em.computed.alias("application.currentPath"),
selected: Em.computed.alias("userTopicsList.selected"),
bulkSelectEnabled: Em.computed.alias("userTopicsList.bulkSelectEnabled"),
viewingSelf: Ember.computed.alias("user.viewingSelf"),
isGroup: Ember.computed.equal("pmView", "groups"),
currentPath: Ember.computed.alias("application.currentPath"),
selected: Ember.computed.alias("userTopicsList.selected"),
bulkSelectEnabled: Ember.computed.alias("userTopicsList.bulkSelectEnabled"),
showToggleBulkSelect: true,
pmTaggingEnabled: Ember.computed.alias("site.can_tag_pms"),
tagId: null,

View File

@ -53,7 +53,7 @@ export default Ember.Controller.extend(CanCheckEmails, {
return !suspended || isStaff;
},
linkWebsite: Em.computed.not("model.isBasic"),
linkWebsite: Ember.computed.not("model.isBasic"),
@computed("model.trust_level")
removeNoFollow(trustLevel) {

View File

@ -2,7 +2,7 @@ import { registerUnbound } from "discourse-common/lib/helpers";
import { isRTL } from "discourse/lib/text-direction";
import { iconHTML } from "discourse-common/lib/icon-library";
var get = Em.get,
var get = Ember.get,
escapeExpression = Handlebars.Utils.escapeExpression;
let _renderer = defaultCategoryLinkRenderer;

View File

@ -30,9 +30,9 @@ function renderAvatar(user, options) {
options = options || {};
if (user) {
const name = Em.get(user, options.namePath || "name");
const username = Em.get(user, options.usernamePath || "username");
const avatarTemplate = Em.get(
const name = Ember.get(user, options.namePath || "name");
const username = Ember.get(user, options.usernamePath || "username");
const avatarTemplate = Ember.get(
user,
options.avatarTemplatePath || "avatar_template"
);
@ -46,11 +46,11 @@ function renderAvatar(user, options) {
let title = options.title;
if (!title && !options.ignoreTitle) {
// first try to get a title
title = Em.get(user, "title");
title = Ember.get(user, "title");
// if there was no title provided
if (!title) {
// try to retrieve a description
const description = Em.get(user, "description");
const description = Ember.get(user, "description");
// if a description has been provided
if (description && description.length > 0) {
// preprend the username before the description
@ -61,7 +61,7 @@ function renderAvatar(user, options) {
return avatarImg({
size: options.imageSize,
extraClasses: Em.get(user, "extras") || options.extraClasses,
extraClasses: Ember.get(user, "extras") || options.extraClasses,
title: title || displayName,
avatarTemplate: avatarTemplate
});

View File

@ -5,7 +5,7 @@ export default {
after: "message-bus",
initialize(container) {
const banner = Em.Object.create(PreloadStore.get("banner")),
const banner = Ember.Object.create(PreloadStore.get("banner")),
site = container.lookup("site:main");
site.set("banner", banner);
@ -16,7 +16,7 @@ export default {
}
messageBus.subscribe("/site/banner", function(ban) {
site.set("banner", Em.Object.create(ban));
site.set("banner", Ember.Object.create(ban));
});
}
};

View File

@ -82,7 +82,7 @@ export default {
}
oldNotifications.insertAt(
insertPosition,
Em.Object.create(lastNotification)
Ember.Object.create(lastNotification)
);
}

View File

@ -8,7 +8,7 @@ import addonFmt from "ember-addons/fmt";
@return {Function} computedProperty function
**/
export function propertyEqual(p1, p2) {
return Em.computed(function() {
return Ember.computed(function() {
return this.get(p1) === this.get(p2);
}).property(p1, p2);
}
@ -22,7 +22,7 @@ export function propertyEqual(p1, p2) {
@return {Function} computedProperty function
**/
export function propertyNotEqual(p1, p2) {
return Em.computed(function() {
return Ember.computed(function() {
return this.get(p1) !== this.get(p2);
}).property(p1, p2);
}
@ -57,7 +57,7 @@ export function i18n(...args) {
/**
Uses an Ember String `fmt` call to format a string. See:
http://emberjs.com/api/classes/Em.String.html#method_fmt
http://emberjs.com/api/classes/Ember.String.html#method_fmt
@method fmt
@params {String} properties* to format
@ -100,7 +100,7 @@ export function url(...args) {
export function endWith() {
const args = Array.prototype.slice.call(arguments, 0);
const substring = args.pop();
const computed = Em.computed(function() {
const computed = Ember.computed(function() {
const self = this;
return _.all(
args.map(function(a) {
@ -124,7 +124,7 @@ export function endWith() {
@param {String} name of site setting
**/
export function setting(name) {
return Em.computed(function() {
return Ember.computed(function() {
return Discourse.SiteSettings[name];
}).property();
}

View File

@ -26,14 +26,14 @@ function init(messageBus, appEvents) {
try {
keyValueStore.getItem(focusTrackerKey);
} catch (e) {
Em.Logger.info(
Ember.Logger.info(
"Discourse desktop notifications are disabled - localStorage denied."
);
return;
}
if (!("Notification" in window)) {
Em.Logger.info(
Ember.Logger.info(
"Discourse desktop notifications are disabled - not supported by browser"
);
return;
@ -47,7 +47,7 @@ function init(messageBus, appEvents) {
return;
}
} catch (e) {
Em.Logger.warn(
Ember.Logger.warn(
"Unexpected error, Notification is defined on window but not a responding correctly " +
e
);
@ -58,7 +58,7 @@ function init(messageBus, appEvents) {
// Preliminary checks passed, continue with setup
setupNotifications(appEvents);
} catch (e) {
Em.Logger.error(e);
Ember.Logger.error(e);
}
}

View File

@ -97,7 +97,7 @@ export function translateResults(results, opts) {
!results.categories.length
);
return noResults ? null : Em.Object.create(results);
return noResults ? null : Ember.Object.create(results);
}
export function searchForTerm(term, opts) {

View File

@ -176,7 +176,7 @@ const DiscourseURL = Ember.Object.extend({
routeTo(path, opts) {
opts = opts || {};
if (Em.isEmpty(path)) {
if (Ember.isEmpty(path)) {
return;
}

View File

@ -10,7 +10,7 @@ export default Ember.Mixin.create({
return e.get("badge.name");
});
items.unshiftObject(
Em.Object.create({
Ember.Object.create({
badge: Badge.create({ name: I18n.t("badges.none") })
})
);
@ -36,5 +36,5 @@ export default Ember.Mixin.create({
return selectedUserBadge;
}.property("selectedUserBadgeId"),
disableSave: Em.computed.alias("saving")
disableSave: Ember.computed.alias("saving")
});

View File

@ -2,7 +2,7 @@
export function bufferedProperty(property) {
const mixin = {
buffered: function() {
return Em.ObjectProxy.extend(BufferedProxy).create({
return Ember.ObjectProxy.extend(BufferedProxy).create({
content: this.get(property)
});
}.property(property),

View File

@ -4,7 +4,7 @@ export default Ember.Mixin.create({
bulkSelectEnabled: false,
selected: null,
canBulkSelect: Em.computed.alias("currentUser.staff"),
canBulkSelect: Ember.computed.alias("currentUser.staff"),
resetSelected: function() {
this.set("selected", []);

View File

@ -3,12 +3,12 @@ import { propertyEqual, setting } from "discourse/lib/computed";
export default Ember.Mixin.create({
isCurrentUser: propertyEqual("model.id", "currentUser.id"),
showEmailOnProfile: setting("show_email_on_profile"),
canStaffCheckEmails: Em.computed.and(
canStaffCheckEmails: Ember.computed.and(
"showEmailOnProfile",
"currentUser.staff"
),
canAdminCheckEmails: Em.computed.alias("currentUser.admin"),
canCheckEmails: Em.computed.or(
canAdminCheckEmails: Ember.computed.alias("currentUser.admin"),
canCheckEmails: Ember.computed.or(
"isCurrentUser",
"canStaffCheckEmails",
"canAdminCheckEmails"

View File

@ -4,12 +4,12 @@ import {
} from "discourse/lib/utilities";
import getUrl from "discourse-common/lib/get-url";
export default Em.Mixin.create({
export default Ember.Mixin.create({
uploading: false,
uploadProgress: 0,
uploadDone() {
Em.warn("You should implement `uploadDone`");
Ember.warn("You should implement `uploadDone`");
},
validateUploadedFilesOptions() {

View File

@ -2,7 +2,7 @@ import { propertyEqual } from "discourse/lib/computed";
import RestModel from "discourse/models/rest";
export default RestModel.extend({
hasOptions: Em.computed.gt("options.length", 0),
hasOptions: Ember.computed.gt("options.length", 0),
isDefault: propertyEqual("id", "site.default_archetype"),
notDefault: Em.computed.not("isDefault")
notDefault: Ember.computed.not("isDefault")
});

View File

@ -3,7 +3,7 @@ import BadgeGrouping from "discourse/models/badge-grouping";
import RestModel from "discourse/models/rest";
const Badge = RestModel.extend({
newBadge: Em.computed.none("id"),
newBadge: Ember.computed.none("id"),
url: function() {
return Discourse.getURL(`/badges/${this.get("id")}/${this.get("slug")}`);

Some files were not shown because too many files have changed in this diff Show More