imports/vx/client/code/ux.js
/**
     * Create a legacy-style alert (Bootstrap).  This function has been largely superseded
     * by notify, which leverages PNotify.
     *
     * @param {string} type Bootstrap alert type (e.g., alert-danger, alert-warning, alert-info, alert-success).
     * @param {string} key Message key.
     * @param {object} variables Object consisting of variables to insert into message.
     * @param {string} selector Optional selector for placeholder div.
     */
Create a legacy-style alert (Bootstrap).  This function has been largely superseded
by notify, which leverages PNotify.

@param {string} type Bootstrap alert type .
@param {string} key Message key.
@param {object} variables Object consisting of variables to insert into message.
@param {string} selector Optional selector for placeholder div.
Create a legacy - style alert ( Bootstrap ) . This function has been largely superseded by notify which leverages PNotify . @param { string } type Bootstrap alert type . @param { string } key Message key . @param { object } variables Object consisting of variables to insert into message . @param { string } selector Optional selector for placeholder div .
createAlertLegacy(type, key, variables, selector) {
        selector = selector || CX.SELECTOR_ALERT_PLACEHOLDER
        let localizedMessage = Util.i18n(key, variables)
        $(selector).append('<div id="alertdiv" style="opacity:0" class="alert ' + type + '"><a class="close" data-dismiss="alert">&times</a><span>' + localizedMessage + "</span></div>")
        $(".alert").animate( { opacity: 1 }, 500, "linear")
        Meteor.setTimeout(() => {
            $(".alert").animate( { opacity: 0 }, 500, "linear", function() {
                $(".alert").off("closed.bs.alert")
                UX.clearAlertLegacy(selector)
            })
        }, 4000)
    }
createAlertLegacy ( type , key , variables , selector ) { selector = selector || CX . SELECTOR_ALERT_PLACEHOLDER let localizedMessage = Util . i18n ( key , variables ) $ ( selector ) . append ( '<div id="alertdiv" style="opacity:0" class="alert ' + type + '"><a class="close" data-dismiss="alert">&times</a><span>' + localizedMessage + "</span></div>" ) $ ( ".alert" ) . animate ( { opacity : 1 } , 500 , "linear" ) Meteor . setTimeout ( ( ) => { $ ( ".alert" ) . animate ( { opacity : 0 } , 500 , "linear" , function ( ) { $ ( ".alert" ) . off ( "closed.bs.alert" ) UX . clearAlertLegacy ( selector ) } ) } , 4000 ) }
Create a legacy-style alert (Bootstrap).
Create a legacy - style alert ( Bootstrap ) .