0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-18 23:01:11 +02:00

Remove unnecessary additions

Dieser Commit ist enthalten in:
Angus McLeod 2017-11-02 09:56:40 +08:00
Ursprung 7731859e95
Commit df65c92665
2 geänderte Dateien mit 2 neuen und 17 gelöschten Zeilen

Datei anzeigen

@ -1,16 +1,5 @@
import WizardApplication from 'wizard/wizard';
export default WizardApplication.extend({
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);
}
});
}
rootElement: '#custom-wizard-main'
});

Datei anzeigen

@ -1,11 +1,9 @@
export default {
name: 'custom-routes',
initialize(app) {
initialize() {
if (window.location.pathname.indexOf('/w/') < 0) return;
console.log('running initializer')
const Router = requirejs('wizard/router').default;
const ApplicationRoute = requirejs('wizard/routes/application').default;
const ajax = requirejs('wizard/lib/ajax').ajax;
@ -25,8 +23,6 @@ export default {
});
});
console.log("added routes")
ApplicationRoute.reopen({
redirect() {
this.transitionTo('custom');