INNER CODE UNIT · JavaScript

setupEvent

adaptlearning/adapt_authoring · frontend/src/modules/colorLabel/index.js:29

    function setupEvent() {
        parentView.on(eventName, showPopup);
    }

    function removeEvent() {
        if (!parentView) return;

        parentView.off(eventName, showPopup);
        parentView = null;
        eventName = '';
    }

    function showPopup() {
        (new ColorLabelPopupView({
            model: new ColorsModel(),
            parentView: parentView
        })).$el.appendTo(document.body);
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…