Sha256: f242e3733e02e37a916ab9d623940def612d56b4041ef9dcef137f1cb5576b8b

Contents?: true

Size: 613 Bytes

Versions: 8

Compression:

Stored size: 613 Bytes

Contents

export class VToggleVisiblity  {
    constructor(options, params, event) {
        this.targetId = options.target;
        this.params = params;
        this.event = event;
    }

    call(results) {
        var targetId = this.targetId;
        var promiseObj = new Promise(function (resolve) {
            console.log("Toggling visiblity on: " + targetId);
            var elem = document.getElementById(targetId);
            elem.classList.toggle("v-hidden");
            results.push({action:'toggle_visiblity', statusCode: 200});
            resolve(results);
        });
        return promiseObj;
    }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
voom-presenters-0.1.7 views/mdc/assets/js/components/events/toggle_visiblity.js
voom-presenters-0.1.6 views/mdc/assets/js/components/events/toggle_visiblity.js
voom-presenters-0.1.5 views/mdc/assets/js/components/events/toggle_visiblity.js
voom-presenters-0.1.4 views/mdc/assets/js/components/events/toggle_visiblity.js
voom-presenters-0.1.3 views/mdc/assets/js/components/events/toggle_visiblity.js
voom-presenters-0.1.2 views/mdc/assets/js/components/events/toggle_visiblity.js
voom-presenters-0.1.1 views/mdc/assets/js/components/events/toggle_visiblity.js
voom-presenters-0.1.0 views/mdc/assets/js/components/events/toggle_visiblity.js