1
0
Fork 0

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'; 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);
}
});
}
}); });

Datei anzeigen

@ -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');