mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:29:34 +08:00
DEV: apply new coding standards (#10592)
This commit is contained in:
@ -11,8 +11,8 @@ export default Controller.extend({
|
||||
filter: null,
|
||||
|
||||
@observes("filter")
|
||||
show: discourseDebounce(function() {
|
||||
Permalink.findAll(this.filter).then(result => {
|
||||
show: discourseDebounce(function () {
|
||||
Permalink.findAll(this.filter).then((result) => {
|
||||
this.set("model", result);
|
||||
this.set("loading", false);
|
||||
});
|
||||
@ -33,28 +33,28 @@ export default Controller.extend({
|
||||
textArea.remove();
|
||||
},
|
||||
|
||||
destroy: function(record) {
|
||||
destroy: function (record) {
|
||||
return bootbox.confirm(
|
||||
I18n.t("admin.permalink.delete_confirm"),
|
||||
I18n.t("no_value"),
|
||||
I18n.t("yes_value"),
|
||||
result => {
|
||||
(result) => {
|
||||
if (result) {
|
||||
record.destroy().then(
|
||||
deleted => {
|
||||
(deleted) => {
|
||||
if (deleted) {
|
||||
this.model.removeObject(record);
|
||||
} else {
|
||||
bootbox.alert(I18n.t("generic_error"));
|
||||
}
|
||||
},
|
||||
function() {
|
||||
function () {
|
||||
bootbox.alert(I18n.t("generic_error"));
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user