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 { popupAjaxError } from "discourse/lib/ajax-error";
export default {
setupComponent(attrs, component) {
CustomWizard.all()
.then(result => {
component.set('wizardList', result);
.then((result) => {
component.set("wizardList", result);
})
.catch(popupAjaxError);
component.set(
'wizardListVal',
attrs.category.custom_fields.create_topic_wizard
);
component.set(
"wizardListVal",
attrs.category.custom_fields.create_topic_wizard
);
},
actions: {
changeWizard(wizard){
this.set('wizardListVal', wizard);
this.set('category.custom_fields.create_topic_wizard', wizard);
}
}
}
changeWizard(wizard) {
this.set("wizardListVal", wizard);
this.set("category.custom_fields.create_topic_wizard", wizard);
},
},
};

Datei anzeigen

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