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 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);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Laden …
In neuem Issue referenzieren