Sha256: 314005847ecd725379c08d6ab0cb008d4832b7e4e22c9e3bcd2a909d81d4423d

Contents?: true

Size: 1.28 KB

Versions: 18

Compression:

Stored size: 1.28 KB

Contents

import {eventHandlerMixin} from "./mixins/event-handler";
import {VBaseContainer} from "./base-container";
import {hookupComponents} from "./base-component";


export function initSteppers(e) {
    console.debug('\tStepper');
    hookupComponents(e, '.v-stepper', VStepper, null);
}

export class VStepper extends eventHandlerMixin(VBaseContainer) {
    constructor(element, mdcComponent) {
        super(element, mdcComponent);

        if (typeof componentHandler !== 'undefined') { // MDL is loaded?
            componentHandler.upgradeElement(element);
            this.stepper = element.MaterialStepper;
        }
    }

    inputs() {
        // A stepper content area does not live within the stepper element so let's get it from the right place
        return document.querySelectorAll('#' + this.element.id + '-content .v-input')
    }

    navigate(nav_action){
        if(nav_action === 'continue' || nav_action === 'next') {
            this.next_step();
        }
        else if(nav_action === 'back'){
            this.back_step();
        }
        else if(nav_action === 'skip'){
            this.skip_step();
        }
    }

    next_step() {
        this.stepper.next();
    }
    back_step() {
        this.stepper.back();
    }
    skip_step() {
        this.stepper.skip();
    }
}

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
coprl-3.0.0.beta.12 views/mdc/assets/js/components/steppers.js
coprl-3.0.0.beta.11 views/mdc/assets/js/components/steppers.js
coprl-3.0.0.beta.10 views/mdc/assets/js/components/steppers.js
coprl-3.0.0.beta.9 views/mdc/assets/js/components/steppers.js
coprl-3.0.0.beta.8 views/mdc/assets/js/components/steppers.js
coprl-3.0.0.beta.7 views/mdc/assets/js/components/steppers.js
coprl-3.0.0.beta.6 views/mdc/assets/js/components/steppers.js
coprl-3.0.0.beta.5 views/mdc/assets/js/components/steppers.js
voom-presenters-2.1.2 views/mdc/assets/js/components/steppers.js
coprl-3.0.0.beta.4 views/mdc/assets/js/components/steppers.js
coprl-3.0.0.beta.3 views/mdc/assets/js/components/steppers.js
coprl-3.0.0.beta.2 views/mdc/assets/js/components/steppers.js
coprl-3.0.0.beta.1 views/mdc/assets/js/components/steppers.js
voom-presenters-2.1.0 views/mdc/assets/js/components/steppers.js
voom-presenters-2.0.3 views/mdc/assets/js/components/steppers.js
voom-presenters-2.0.2 views/mdc/assets/js/components/steppers.js
voom-presenters-2.0.1 views/mdc/assets/js/components/steppers.js
voom-presenters-2.0.0 views/mdc/assets/js/components/steppers.js