imports/vx/client/code/ux.js
/**
     * Make event types array.

     * @param {boolean} all True to include ALL value at beginning of array.
     * @return {array} Array of event types.
     */
Make event types array.
@param {boolean} all True to include ALL value at beginning of array.
@return {array} Array of event types.
Make event types array . @param { boolean } all True to include ALL value at beginning of array . @return { array } Array of event types .
makeEventTypesArray(all) {
        let codeArray = []
        _.each(Meteor.i18nMessages.codes.eventType, (object, key) => {
            codeArray.push( { code: key, localized : key } )
        })
        codeArray.sort((eventTypeA, eventTypeB) => {
            if (eventTypeA.code && eventTypeA.code) {
                return Util.safeCompare(eventTypeA.code, eventTypeB.code)
            }
            return 0;
        })
        if (all) {
            codeArray.unshift({ code : "ALL", localized : Util.i18n("events.event_type_all") })
        }
        return codeArray
    }
makeEventTypesArray ( all ) { let codeArray = [ ] _ . each ( Meteor . i18nMessages . codes . eventType , ( object , key ) => { codeArray . push ( { code : key , localized : key } ) } ) codeArray . sort ( ( eventTypeA , eventTypeB ) => { if ( eventTypeA . code && eventTypeA . code ) { return Util . safeCompare ( eventTypeA . code , eventTypeB . code ) } return 0 ; } ) if ( all ) { codeArray . unshift ( { code : "ALL" , localized : Util . i18n ( "events.event_type_all" ) } ) } return codeArray }
Make event types array.
Make event types array .