Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
Remove unnecessary additions
Dieser Commit ist enthalten in:
Ursprung
7731859e95
Commit
df65c92665
2 geänderte Dateien mit 2 neuen und 17 gelöschten Zeilen
|
@ -1,16 +1,5 @@
|
||||||
import WizardApplication from 'wizard/wizard';
|
import WizardApplication from 'wizard/wizard';
|
||||||
|
|
||||||
export default WizardApplication.extend({
|
export default WizardApplication.extend({
|
||||||
rootElement: '#custom-wizard-main',
|
rootElement: '#custom-wizard-main'
|
||||||
|
|
||||||
start() {
|
|
||||||
Object.keys(requirejs._eak_seen).forEach(key => {
|
|
||||||
if (/\/initializers\//.test(key)) {
|
|
||||||
console.log('running initializer', key);
|
|
||||||
const module = requirejs(key, null, null, true);
|
|
||||||
if (!module) { throw new Error(key + ' must export an initializer.'); }
|
|
||||||
this.initializer(module.default);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
export default {
|
export default {
|
||||||
name: 'custom-routes',
|
name: 'custom-routes',
|
||||||
|
|
||||||
initialize(app) {
|
initialize() {
|
||||||
if (window.location.pathname.indexOf('/w/') < 0) return;
|
if (window.location.pathname.indexOf('/w/') < 0) return;
|
||||||
|
|
||||||
console.log('running initializer')
|
|
||||||
|
|
||||||
const Router = requirejs('wizard/router').default;
|
const Router = requirejs('wizard/router').default;
|
||||||
const ApplicationRoute = requirejs('wizard/routes/application').default;
|
const ApplicationRoute = requirejs('wizard/routes/application').default;
|
||||||
const ajax = requirejs('wizard/lib/ajax').ajax;
|
const ajax = requirejs('wizard/lib/ajax').ajax;
|
||||||
|
@ -25,8 +23,6 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("added routes")
|
|
||||||
|
|
||||||
ApplicationRoute.reopen({
|
ApplicationRoute.reopen({
|
||||||
redirect() {
|
redirect() {
|
||||||
this.transitionTo('custom');
|
this.transitionTo('custom');
|
||||||
|
|
Laden …
In neuem Issue referenzieren