Browse Source

Remove unnecessary additions

Angus McLeod 7 years ago
parent
commit
df65c92665

+ 1 - 12
assets/javascripts/wizard/custom-wizard.js.es6

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

+ 1 - 5
assets/javascripts/wizard/initializers/custom.js.es6

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