0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 18:50:27 +01:00
Dieser Commit ist enthalten in:
Angus McLeod 2017-11-02 09:27:21 +08:00
Ursprung 80fccbf093
Commit 1425c1e783

Datei anzeigen

@ -2,8 +2,9 @@ export default {
name: 'custom-routes', name: 'custom-routes',
initialize(app) { initialize(app) {
console.log('running initializer', app.constructor.name, app.get('rootElement')) console.log('running custom initializer')
if (app.constructor.name !== 'Class' || app.get('rootElement') !== '#custom-wizard-main') return; if (app.constructor.name !== 'Class' || typeof app.get !== 'function' ||
app.get('rootElement') !== '#custom-wizard-main') return;
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;
@ -24,6 +25,8 @@ export default {
}); });
}); });
console.log("added routes")
ApplicationRoute.reopen({ ApplicationRoute.reopen({
redirect() { redirect() {
this.transitionTo('custom'); this.transitionTo('custom');