imports/vx/client/code/ux.js
/**
     * Create a PNotify notification based on a standard result object.
     *
     * @param {object} result Standard result object.
     */
Create a PNotify notification based on a standard result object.
@param {object} result Standard result object.
Create a PNotify notification based on a standard result object . @param { object } result Standard result object .
createNotificationForResult(result) {
        if (!result) {
            OLog.error("ux.js createNotificationForResult no result object supplied")
            return
        }
        let success = result.success ? "success" : "error"
        let type = result.type ? CX.NOTIFICATION_TYPE_MAP[result.type] : success
        let icon = CX.NOTIFICATION_ICON_MAP[result.icon || "ENVELOPE"]
        let text = Util.i18n(result.key, result.variables)
        UX.createNotification({ type : type, icon : icon, text : text })
    }
createNotificationForResult ( result ) { if ( ! result ) { OLog . error ( "ux.js createNotificationForResult no result object supplied" ) return } let success = result . success ? "success" : "error" let type = result . type ? CX . NOTIFICATION_TYPE_MAP [ result . type ] : success let icon = CX . NOTIFICATION_ICON_MAP [ result . icon || "ENVELOPE" ] let text = Util . i18n ( result . key , result . variables ) UX . createNotification ( { type : type , icon : icon , text : text } ) }
Create a PNotify notification based on a standard result object.
Create a PNotify notification based on a standard result object .