function onClickRelatorios() { document.getElementById("isRelatorio").value = true; } function bloquearBrowser() { $("#bloquerBrowser").show(); } function desbloquearBrowser() { $("#bloquerBrowser").hide(); } $(function() { $(document).ajaxStart( function() { bloquearBrowser(); }); $(document).ajaxComplete( function() { desbloquearBrowser(); }); $(document).ajaxError( function(request, settings, exception) { desbloquearBrowser(); }); $("form").submit(function(eventObject){ if($('#isRelatorio') == undefined || $('#isRelatorio').attr('value') == undefined || $('#isRelatorio').attr('value') == 'false'){ bloquearBrowser(); }else{ desbloquearBrowser(); } }); // Dialog exemplo $('#dialog-exemplo').dialog({ autoOpen : false, modal : true, width : 600, height : 400, resizable : false }); // Dialog exemplo link $('#dialog-exemplo-link').click(function() { $('#dialog-exemplo').dialog('open'); return false; }); // Dialog confirm $('#dialog-confirm').dialog({ autoOpen : false, modal : true, resizable : false, buttons : { "N�o" : function() { $(this).dialog("close"); }, "Sim" : function() { submeter(); $(this).dialog("close"); } } }); // Dialog confirm link $('#dialog-confirm-link').click(function() { $('#dialog-confirm').dialog('open'); return false; }); // Dialog fun��es gerais $('#dialog-funcoes').dialog({ autoOpen : false, modal : true, width : 600, height : 400, resizable : false }); // Dialog fiun��es gerais link $('#dialog-funcoes-link').click(function() { $('#dialog-funcoes').dialog('open'); return false; }); // Dialog fiun��es gerais link $('#dialog-situacao-link').click(function() { $('#dialog-situacao').dialog('open'); return false; }); // Datepicker $('#campo-data-de').datepicker({ changeMonth : true, changeYear : true, yearRange : '1900:2010' }); $('#campo-data-a').datepicker({ changeMonth : true, changeYear : true, yearRange : '1900:2010' }); $("input[type='submit']") .click( function(eventObject) { if (($(this).attr('value').toUpperCase() == 'CONSULTAR') || ($(this).attr('value').toUpperCase() == 'CONSULTA')) { $("input[name='paginaAtual']").attr('value', '1'); } }); });