imports/vx/client/code/ux.js
/**
     * Save form, issue alert and resume with user callback.
     *
     * @param {object} error Error object.
     * @param {object} result Result object.
     * @param {function} callback Callback typically to stop ladda.
     * @param {boolean} nomessage True to suppress message on success.
     * @param {function} callback User-supplied callback for extra functionality.
     */
Save form, issue alert and resume with user callback.
@param {object} error Error object.
@param {object} result Result object.
@param {function} callback Callback typically to stop ladda.
@param {boolean} nomessage True to suppress message on success.
@param {function} callback User-supplied callback for extra functionality.
Save form issue alert and resume with user callback . @param { object } error Error object . @param { object } result Result object . @param { function } callback Callback typically to stop ladda . @param { boolean } nomessage True to suppress message on success . @param { function } callback User - supplied callback for extra functionality .
saveFormAlertAndCallback(error, result, callback, nomessage, userCallback) {
        Meteor.defer(() => {
            if (error) {
                OLog.error(`ux.js saveFormAlertAndCallback error=${error}`)
                UX.notifyForDatabaseError(error)
            }
            if (!nomessage) {
                UX.notify({ success : true, icon : "SAVE", key: "common.alert_save_succeeded" })
            }
            if (userCallback) {
                userCallback()
            }
            if (callback) {
                callback(error, result)
            }
        })
    }
saveFormAlertAndCallback ( error , result , callback , nomessage , userCallback ) { Meteor . defer ( ( ) => { if ( error ) { OLog . error ( ` ${ error } ` ) UX . notifyForDatabaseError ( error ) } if ( ! nomessage ) { UX . notify ( { success : true , icon : "SAVE" , key : "common.alert_save_succeeded" } ) } if ( userCallback ) { userCallback ( ) } if ( callback ) { callback ( error , result ) } } ) }
Save form, issue alert and resume with user callback.
Save form issue alert and resume with user callback .