function createCustomEvents() {

        var $this = this;
        /**
         * When user inserts content into modal through ajax the modal should show NOT when .show() function is called BUT
         * when the content is received so a special event is needed
         */
        $(document).on('showModalAfterDomRenderedEvent', "#" + $this.defaults.id, function () {
            $this._isVisible ? $("#" + $this.defaults.id).modal('show') : '';
        });
        /**
         * Event for submitting the form
         * @event click
         */
        $(document).on('click', "." + $this.defaults.id + 'btnSubmit', function () {
            saveFormActionUsingAjax.call($this);
        });
        /**
         * Show modal loader
         * @event showModalLoader
         */
        $(document).on('showModalLoader', "#" + $this.defaults.id, function () {
            _loaderIsVisible = true;
            var modalBody = $("#" + $this.defaults.id).find('.modal-body');
            $(modalBody).addClass('pad-top-40').blockControl();
        });
        /**
         * Hide modal loader
         * @event hideModalLoader
         */
        $(document).on('hideModalLoader', "#" + $this.defaults.id, function () {
            _loaderIsVisible = false;
            var modalBody = $("#" + $this.defaults.id).find('.modal-body');
            $(modalBody).removeClass('pad-top-40').unblockControl();
        });
    }
/**
     * This is a container used for setting custom events on modals
     */
This is a container used for setting custom events on modals
This is a container used for setting custom events on modals
function createCustomEvents() {
        var $this = this;
        $(document).on('showModalAfterDomRenderedEvent', "#" + $this.defaults.id, function () {
            $this._isVisible ? $("#" + $this.defaults.id).modal('show') : '';
        });
        $(document).on('click', "." + $this.defaults.id + 'btnSubmit', function () {
            saveFormActionUsingAjax.call($this);
        });
        $(document).on('showModalLoader', "#" + $this.defaults.id, function () {
            _loaderIsVisible = true;
            var modalBody = $("#" + $this.defaults.id).find('.modal-body');
            $(modalBody).addClass('pad-top-40').blockControl();
        });
        $(document).on('hideModalLoader', "#" + $this.defaults.id, function () {
            _loaderIsVisible = false;
            var modalBody = $("#" + $this.defaults.id).find('.modal-body');
            $(modalBody).removeClass('pad-top-40').unblockControl();
        });
    }
function createCustomEvents ( ) { var $this = this ; $ ( document ) . on ( 'showModalAfterDomRenderedEvent' , "#" + $this . defaults . id , function ( ) { $this . _isVisible ? $ ( "#" + $this . defaults . id ) . modal ( 'show' ) : '' ; } ) ; $ ( document ) . on ( 'click' , "." + $this . defaults . id + 'btnSubmit' , function ( ) { saveFormActionUsingAjax . call ( $this ) ; } ) ; $ ( document ) . on ( 'showModalLoader' , "#" + $this . defaults . id , function ( ) { _loaderIsVisible = true ; var modalBody = $ ( "#" + $this . defaults . id ) . find ( '.modal-body' ) ; $ ( modalBody ) . addClass ( 'pad-top-40' ) . blockControl ( ) ; } ) ; $ ( document ) . on ( 'hideModalLoader' , "#" + $this . defaults . id , function ( ) { _loaderIsVisible = false ; var modalBody = $ ( "#" + $this . defaults . id ) . find ( '.modal-body' ) ; $ ( modalBody ) . removeClass ( 'pad-top-40' ) . unblockControl ( ) ; } ) ; }
This is a container used for setting custom events on modals
This is a container used for setting custom events on modals
/**
         * When user inserts content into modal through ajax the modal should show NOT when .show() function is called BUT
         * when the content is received so a special event is needed
         */ /**
         * Event for submitting the form
         * @event click
         */ /**
         * Show modal loader
         * @event showModalLoader
         */ /**
         * Hide modal loader
         * @event hideModalLoader
         */