pen one
08/21/2021, 9:43 PMfunction selectOption(context) {
var options = {
title: 'Select Option',
message: 'Select your option.',
buttons: [{
label: 'Option 1',
value: 1
},
{
label: 'Option 2',
value: 2
}
]
};
function success(result) {
var rec = currentRecord.get();
if (result == 1) {
jQuery('#_loading_dialog').attr('title', 'Running Automation');
jQuery('#_loading_dialog').html( "<div style='text-align:center; font-style: italic;'>Please Wait</div><br><br><div style='text-align: center; width:100%;'><i class='fas fa-cog fa-spin' data=fa-transform='grow-18'></i></div>" );
jQuery('#_loading_dialog').dialog({
modal: true,
width: 400,
height: 160,
resizable: false,
closeOnEscape: false,
position: { my: "top", at: "top+160", of: '#main_form' },
open: function (evt, ui) {
// jQuery(".ui-dialog-titlebar-close").hide();
setTimeout(function(){
// My Code Here
}, 100);
}
});
jQuery('#_loading_dialog').dialog('destroy');
}
if (result == 2) {
// My Code Here
}
}
function failure(reason) {
console.log('Failure: ' + reason)
}
dialog.create(options).then(success).catch(failure);
}
Where should I put the jQuery('#_loading_dialog').dialog('destroy');
Steve82
08/21/2021, 11:24 PMpen one
08/21/2021, 11:37 PM