ngBootbox
ngBootbox copied to clipboard
How to disable dialog button during callback?
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> 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;
}
};