Skip to content

Instantly share code, notes, and snippets.

@devfabriciobr
Created November 21, 2023 16:16
Show Gist options
  • Select an option

  • Save devfabriciobr/8e8cd4c96d02424c4d737ece6a334691 to your computer and use it in GitHub Desktop.

Select an option

Save devfabriciobr/8e8cd4c96d02424c4d737ece6a334691 to your computer and use it in GitHub Desktop.

Revisions

  1. devfabriciobr created this gist Nov 21, 2023.
    43 changes: 43 additions & 0 deletions .js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,43 @@
    # 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();');