ngBootbox icon indicating copy to clipboard operation
ngBootbox copied to clipboard

How to disable dialog button during callback?

Open jexneedls opened this issue 10 years ago • 0 comments

Here's my config.

vm.add_inspiration_image_opts = {
            className: "inspiration-image-modal",
            scope: $scope,
            backdrop: 'static',
            animate: false,
            title: 'Add Inspiration Image',
            size: 'large',
            templateUrl: '/app/assets/templates/admin/add_inspiration_image_modal.tpl.html',            
            buttons: {
                add: {
                    label: '<i class="fa fa-floppy-o"></i>&nbsp;&nbsp;Save Image',
                    className: 'btn-primary btn-save',
                    callback: function () {                     
                        // vm.add_inspiration_image_opts.buttons.add.disabled = "true";
                        angular.element('.inspiration-image-modal .submit-button').trigger('click');

                        return false;
                    }
                }
            },
            onEscape: function () {
                resetForm();

                return true;
            }
        };

jexneedls avatar Mar 17 '16 15:03 jexneedls