abstractClick(attrs, e) {

        const { t } = this.props;

        this.addLoader(attrs,e.target);

        if (attrs.onclick.indexOf('lhinst.updateTriggerClicked') !== -1) {
            this.updateTriggerClicked({type:'triggerclicked'}, attrs, e.target);
        } else if (attrs.onclick.indexOf('notificationsLHC.sendNotification') !== -1) {
            // todo
        } else if (attrs.onclick.indexOf('lhinst.buttonClicked') !== -1) {
            this.updateTriggerClicked({type:''}, attrs, e.target);
        } else if (attrs.onclick.indexOf('lhinst.updateChatClicked') !== -1) {
            this.updateTriggerClicked({type:'',mainType: 'updatebuttonclicked'}, attrs, e.target);
        } else if (attrs.onclick.indexOf('lhinst.editGenericStep') !== -1) {
            this.updateTriggerClicked({type:'editgenericstep'}, attrs, e.target);
        } else if (attrs.onclick.indexOf('lhinst.dropdownClicked') !== -1) {
            const list = document.getElementById('id_generic_list-' + attrs['data-id']);
            if (list && list.value != "0" && list.value != "") {
                attrs['data-payload'] = list.value;
                this.updateTriggerClicked({type:'valueclicked'}, attrs, e.target);
            } else {
                alert(t('bot.please_choose'));
            }
        } else {
            helperFunctions.emitEvent('MessageClick',[attrs, this.props.dispatch]);
            console.log('Unknown click event: ' + attrs.onclick);
        }

        e.preventDefault();
    }
/**
     * Here we handle bot buttons actions
     * */
Here we handle bot buttons actions
Here we handle bot buttons actions
abstractClick(attrs, e) {
        const { t } = this.props;
        this.addLoader(attrs,e.target);
        if (attrs.onclick.indexOf('lhinst.updateTriggerClicked') !== -1) {
            this.updateTriggerClicked({type:'triggerclicked'}, attrs, e.target);
        } else if (attrs.onclick.indexOf('notificationsLHC.sendNotification') !== -1) {
        } else if (attrs.onclick.indexOf('lhinst.buttonClicked') !== -1) {
            this.updateTriggerClicked({type:''}, attrs, e.target);
        } else if (attrs.onclick.indexOf('lhinst.updateChatClicked') !== -1) {
            this.updateTriggerClicked({type:'',mainType: 'updatebuttonclicked'}, attrs, e.target);
        } else if (attrs.onclick.indexOf('lhinst.editGenericStep') !== -1) {
            this.updateTriggerClicked({type:'editgenericstep'}, attrs, e.target);
        } else if (attrs.onclick.indexOf('lhinst.dropdownClicked') !== -1) {
            const list = document.getElementById('id_generic_list-' + attrs['data-id']);
            if (list && list.value != "0" && list.value != "") {
                attrs['data-payload'] = list.value;
                this.updateTriggerClicked({type:'valueclicked'}, attrs, e.target);
            } else {
                alert(t('bot.please_choose'));
            }
        } else {
            helperFunctions.emitEvent('MessageClick',[attrs, this.props.dispatch]);
            console.log('Unknown click event: ' + attrs.onclick);
        }
        e.preventDefault();
    }
abstractClick ( attrs , e ) { const { t } = this . props ; this . addLoader ( attrs , e . target ) ; if ( attrs . onclick . indexOf ( 'lhinst.updateTriggerClicked' ) !== - 1 ) { this . updateTriggerClicked ( { type : 'triggerclicked' } , attrs , e . target ) ; } else if ( attrs . onclick . indexOf ( 'notificationsLHC.sendNotification' ) !== - 1 ) { } else if ( attrs . onclick . indexOf ( 'lhinst.buttonClicked' ) !== - 1 ) { this . updateTriggerClicked ( { type : '' } , attrs , e . target ) ; } else if ( attrs . onclick . indexOf ( 'lhinst.updateChatClicked' ) !== - 1 ) { this . updateTriggerClicked ( { type : '' , mainType : 'updatebuttonclicked' } , attrs , e . target ) ; } else if ( attrs . onclick . indexOf ( 'lhinst.editGenericStep' ) !== - 1 ) { this . updateTriggerClicked ( { type : 'editgenericstep' } , attrs , e . target ) ; } else if ( attrs . onclick . indexOf ( 'lhinst.dropdownClicked' ) !== - 1 ) { const list = document . getElementById ( 'id_generic_list-' + attrs [ 'data-id' ] ) ; if ( list && list . value != "0" && list . value != "" ) { attrs [ 'data-payload' ] = list . value ; this . updateTriggerClicked ( { type : 'valueclicked' } , attrs , e . target ) ; } else { alert ( t ( 'bot.please_choose' ) ) ; } } else { helperFunctions . emitEvent ( 'MessageClick' , [ attrs , this . props . dispatch ] ) ; console . log ( 'Unknown click event: ' + attrs . onclick ) ; } e . preventDefault ( ) ; }
Here we handle bot buttons actions
Here we handle bot buttons actions
// todo