1
0
Fork 0

fixed formatting

Dieser Commit ist enthalten in:
Faizaan Gagan 2021-11-11 17:38:53 +05:30
Ursprung f044ad6101
Commit 892914d649
2 geänderte Dateien mit 20 neuen und 19 gelöschten Zeilen

Datei anzeigen

@ -1,24 +1,23 @@
import { ajax } from "discourse/lib/ajax";
import CustomWizard from "../../models/custom-wizard"; import CustomWizard from "../../models/custom-wizard";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
export default { export default {
setupComponent(attrs, component) { setupComponent(attrs, component) {
CustomWizard.all() CustomWizard.all()
.then(result => { .then((result) => {
component.set('wizardList', result); component.set("wizardList", result);
}) })
.catch(popupAjaxError); .catch(popupAjaxError);
component.set( component.set(
'wizardListVal', "wizardListVal",
attrs.category.custom_fields.create_topic_wizard attrs.category.custom_fields.create_topic_wizard
); );
}, },
actions: { actions: {
changeWizard(wizard){ changeWizard(wizard) {
this.set('wizardListVal', wizard); this.set("wizardListVal", wizard);
this.set('category.custom_fields.create_topic_wizard', wizard); this.set("category.custom_fields.create_topic_wizard", wizard);
} },
} },
} };

Datei anzeigen

@ -21,18 +21,20 @@ export default {
withPluginApi("0.8.7", (api) => { withPluginApi("0.8.7", (api) => {
api.modifyClass("component:d-navigation", { api.modifyClass("component:d-navigation", {
pluginId: 'custom-wizard', pluginId: "custom-wizard",
actions: { actions: {
clickCreateTopicButton(){ clickCreateTopicButton() {
let createTopicWizard = this.get('category.custom_fields.create_topic_wizard'); let createTopicWizard = this.get(
"category.custom_fields.create_topic_wizard"
);
if (createTopicWizard) { if (createTopicWizard) {
window.location.href = getUrl(`/w/${createTopicWizard}`); window.location.href = getUrl(`/w/${createTopicWizard}`);
} else { } else {
this._super(); this._super();
} }
} },
} },
}) });
}); });
}, },
}; };