136
| <![CDATA[<script type="text/javascript">
//-------------------------------------
var corInvertida = false;
function handleDialogRequest(xhr, status, args, dialog) {
if (args.notValid || args.validationFailed)
return;
dialog.hide();
}
function handleDialogOpenRequest(xhr, status, args, dialog) {
if (args.notValid || args.validationFailed)
return;
dialog.show();
}
function inverterCores() {
if (corInvertida) {
$("body").css("background", "#EEE !important");
$("body").css("-webkit-background-color", "#EEE !important");
$("body").css("-moz-background-color", "#EEE !important");
$("body").css("-ms-background-color", "#EEE !important");
$("body").css("-o-background-color", "#EEE !important");
$("body").css("background-color", "#EEE !important");
$("html").css("-webkit-filter", "none");
$("html").css("-moz-filter", "none");
$("html").css("-ms-filter", "none");
$("html").css("-o-filter", "none");
$("html").css("filter", "none");
$("#mainContent").css("-webkit-filter", "none");
$("#mainContent").css("-moz-filter", "none");
$("#mainContent").css("-ms-filter", "none");
$("#mainContent").css("-o-filter", "none");
$("#mainContent").css("filter", "none");
corInvertida = false;
} else {
$("body").css("background", "#222 !important");
$("body").css("-webkit-background-color", "#222 !important");
$("body").css("-moz-background-color", "#222 !important");
$("body").css("-ms-background-color", "#222 !important");
$("body").css("-o-background-color", "#222 !important");
$("body").css("background-color", "#222 !important");
$("html")
.css("-webkit-filter",
"invert(0%) contrast(110%) saturate(100%) brightness(100%)");
$("html")
.css("-moz-filter",
"invert(0%) contrast(110%) saturate(100%) brightness(100%)");
$("html")
.css("-ms-filter",
"invert(0%) contrast(110%) saturate(100%) brightness(100%)");
$("html")
.css("-o-filter",
"invert(0%) contrast(110%) saturate(100%) brightness(100%)");
$("html")
.css("filter",
"invert(0%) contrast(110%) saturate(100%) brightness(100%)");
$("#mainContent")
.css("-webkit-filter",
"invert(100%) contrast(110%) saturate(10%) brightness(200%)");
$("#mainContent")
.css("-moz-filter",
"invert(100%) contrast(110%) saturate(10%) brightness(200%)");
$("#mainContent")
.css("-ms-filter",
"invert(100%) contrast(110%) saturate(10%) brightness(200%)");
$("#mainContent")
.css("-o-filter",
"invert(100%) contrast(110%) saturate(10%) brightness(200%)");
$("#mainContent")
.css("filter",
"invert(100%) contrast(110%) saturate(10%) brightness(200%)");
corInvertida = true;
}
}
function ajustarFonte(tipo) {
var content = document.getElementById('container');
var valorAtual = 100;
var ajuste = 10;
if (content == null)
return;
if (content.style.fontSize == "") {
content.style.fontSize = "100%";
}
if (content.style.fontSize != "") {
valorAtual = parseInt(content.style.fontSize.replace("%", ""));
}
if (tipo == 'aumentar') {
content.style.fontSize = (valorAtual + ajuste) + "%";
} else if (tipo == 'diminuir') {
content.style.fontSize = (valorAtual - ajuste) + "%";
} else {
content.style.fontSize = "100%";
}
}
// --------------------------------
var alturaDataTableFechado = null;
function rolagemParaItemSelecionado(formId, dataTableId, isBusca, formId2, dataTableId2) {
var numLinhas = $('#' + formId + '\\:hiddenLinhasExibidas').val();
var linhaSelecionada = $('#' + formId + '\\:hiddenLinhaSelecionada').val();
var alturaDataTable = $('#' + formId + '\\:' + dataTableId ).height();
if (alturaDataTableFechado == null)
alturaDataTableFechado = alturaDataTable;
var alturaDataTable2 = 0;
if (dataTableId2 != ''){
alturaDataTable2 = $('#' + formId2 + '\\:' + dataTableId2 ).height();
alturaDataTable2 += 100;
} else if (formId2 != ''){
alturaDataTable2 = $('#' + formId2).height();
alturaDataTable2 += 100;
}
var alturaPorLinha = parseInt(alturaDataTableFechado) / parseInt(numLinhas);
// 110 = altura em pixels da barra do topo (TCE)
// 42 = altura em pixels do menu
var posicaoRolagem = Math.round( parseInt(linhaSelecionada) * alturaPorLinha ) + 110 + 42 + alturaDataTable2;
if (isBusca)
posicaoRolagem += 350;
//alert(numLinhas+"\n"+linhaSelecionada+"\n"+alturaDataTable+"\n"+alturaDataTableFechado+"\n"+posicaoRolagem);
$('html, body').animate({scrollTop: posicaoRolagem}, 1000);
}
function atualizaNumeroDownloads(accordionId, numeroLinha){
var numDownloads = document.getElementById(accordionId + ":" + numeroLinha + ':numeroDownloads');
numDownloads.innerHTML = parseInt(numDownloads.innerHTML) + 1;
};
// --------------------------------
</script>]]>
|