Skip to content

Instantly share code, notes, and snippets.

@cupertinobr
Forked from fayqLs/.js
Created November 21, 2023 16:26
Show Gist options
  • Save cupertinobr/75881ac5b67229860d443d80786ba589 to your computer and use it in GitHub Desktop.
Save cupertinobr/75881ac5b67229860d443d80786ba589 to your computer and use it in GitHub Desktop.
CUSTOMIZAR A MENSAGEM CARREGANDO
# CRIE UM ARQUIVO JS NO PROJETO
function __adianti_block_ui(mensagem)
{
if (typeof $.blockUI == 'function')
{
if (typeof Adianti.blockUIConter == 'undefined')
{
Adianti.blockUIConter = 0;
}
Adianti.blockUIConter = Adianti.blockUIConter + 1;
if (typeof mensagem == 'undefined')
{
mensagem = Adianti.waitMessage;
}
$.blockUI({
message: '<h1><i class="fa fa-spinner fa-pulse"></i> '+mensagem+'</h1>',
fadeIn: 0,
fadeOut: 0,
css: {
border: 'none',
top: '100px',
left: 0,
maxWidth: '300px',
width: 'inherit',
padding: '15px',
backgroundColor: '#000',
'border-radius': '5px 5px 5px 5px',
opacity: .5,
color: '#fff'
}
});
$('.blockUI.blockMsg').mycenter();
}
}
EXEMPLO DE USO
ABRIR
TScript::create("__adianti_block_ui('AGUARDE, CARREGANDO..');");
FECHAR
TScript::create('__adianti_unblock_ui();');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment