Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
fixed formatting
Dieser Commit ist enthalten in:
Ursprung
f044ad6101
Commit
892914d649
2 geänderte Dateien mit 20 neuen und 19 gelöschten Zeilen
|
@ -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);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
Laden …
In neuem Issue referenzieren