";
+ $descricao .= "]]>'";
+ $sql = "select '' as tipo_ws,'".$url."/ms_criamapa.php?restauramapa='||id_mapa as link_ws, nome_mapa as nome_ws, ".$descricao." as desc_ws, '' as autor_ws from ".$esquemaadmin."i3geoadmin_mapas WHERE publicado_mapa = 'sim' AND mapfile != ''";
+ //echo $sql;exit;
+ return geraXmlRSS($locaplic,$sql,"Mapas cadastrados",$output);
+}
+
+//
+//$id_menu = id do menu que será montado
+//$perfil = perfis separados por espaços
+//$tipo = gruposeraiz|subgrupos|temas
+//$dbh objeto com a conexão com o banco
+//$locaplic = localização do i3geo no servidor
+//
+function geraXmlMenutemas($perfil,$id_menu,$tipo,$locaplic)
+{
+ global $esquemaadmin;
+ xml_testaNum([$id_menu]);
+ $dbh = "";
+ include($locaplic."/admin/php/conexao.php");
+ if (!isset($perfil)){$perfil = "";}
+ $perfil = str_replace(","," ",$perfil);
+ $perfil = explode(" ",$perfil);
+ if($convUTF)
+ $xml = "<"."\x3F"."xml version='1.0' encoding='UTF-8' "."\x3F".">";
+ else
+ $xml = "<"."\x3F"."xml version='1.0' encoding='ISO-8859-1' "."\x3F".">";
+ $xml .= "\n\n";
+ if(!isset($id_menu))
+ $xml .= "Utilize ?id_menu=1 por exemplo\n";
+ else
+ $xml .= "\n";
+ //
+ //pega os temas na raiz
+ //
+ $q = "select nome_tema,codigo_tema,desc_tema,link_tema,tipoa_tema,tags_tema,kml_tema,ogc_tema,download_tema,r.perfil as perfil from ".$esquemaadmin."i3geoadmin_raiz as r,".$esquemaadmin."i3geoadmin_temas as temas where r.id_nivel = 0 and r.id_tema = temas.id_tema and r.id_menu = $id_menu ";
+ $qtemasraiz = $dbh->query($q);
+ $xml = geraXmlMenutemas_notema($qtemasraiz,$xml,$perfil);
+ $q = "select nome_grupo,desc_grupo,n1.id_grupo,n1.id_n1,n1.n1_perfil as perfil from ".$esquemaadmin."i3geoadmin_n1 as n1,".$esquemaadmin."i3geoadmin_grupos as grupos where n1.id_menu = $id_menu and n1.id_grupo = grupos.id_grupo ";
+ $qgrupos = $dbh->query($q);
+ foreach($qgrupos as $row)
+ {
+ //filtra pelo perfil
+ if($row["perfil"] == "")
+ {$mostra = true;}
+ else
+ {
+ $perfilatual = explode(" ",str_replace(","," ",$row["perfil"]));
+ $mostra = array_in_array($perfil,$perfilatual);
+ }
+ if($mostra)
+ {
+ $xml .= "\n";
+ $xml .= " ".xmlTexto_prepara($row["nome_grupo"])."\n";
+ //
+ //pega temas na raiz
+ //
+ $q = "select nome_tema,codigo_tema,desc_tema,link_tema,tipoa_tema,tags_tema,kml_tema,ogc_tema,download_tema,r.perfil as perfil from ".$esquemaadmin."i3geoadmin_raiz as r,".$esquemaadmin."i3geoadmin_temas as temas where r.nivel = 1 and r.id_nivel = ".$row["id_n1"]." and r.id_tema = temas.id_tema and r.id_menu = $id_menu ";
+ $qtemasraiz = $dbh->query($q);
+ $xml = geraXmlMenutemas_notema($qtemasraiz,$xml,$perfil);
+ if(isset($tipo) && ($tipo == "subgrupos") || ($tipo == ""))
+ $xml = geraXmlMenutemas_pegasubgrupos($row["id_n1"],$xml,$dbh,$tipo,$perfil);
+ $xml .= " ".xmlTexto_prepara($row["desc_grupo"])."\n";
+ $xml .= " ".$row["perfil"]."\n";
+ $xml .= "\n";
+ }
+ }
+ $xml .= "\n";
+ $dbh = null;
+ $dbhw = null;
+ return $xml;
+}
+function geraXmlMenutemas_pegasubgrupos($id_n1,$xml,$dbh,$tipo,$perfil)
+{
+ global $esquemaadmin;
+ xml_testaNum([$id_n1]);
+ $q = "select subgrupos.id_subgrupo,nome_subgrupo,id_n2,n2.n2_perfil as perfil from ".$esquemaadmin."i3geoadmin_n2 as n2,".$esquemaadmin."i3geoadmin_subgrupos as subgrupos where n2.id_n1 = $id_n1 and n2.id_subgrupo = subgrupos.id_subgrupo ";
+ //echo $q;exit;
+ $qsgrupos = $dbh->query($q);
+ foreach($qsgrupos as $row)
+ {
+ if($row["perfil"] == "")
+ $mostra = true;
+ else
+ {
+ $perfilatual = explode(" ",str_replace(","," ",$row["perfil"]));
+ $mostra = array_in_array($perfil,$perfilatual);
+ }
+ if($mostra)
+ {
+ $xml .= "\n";
+ $xml .= "".xmlTexto_prepara($row["nome_subgrupo"])."\n";
+ $xml .= "".xmlTexto_prepara($row["perfil"])."\n";
+ if(isset($tipo) && ($tipo == "temas") || ($tipo == ""))
+ $xml = geraXmlMenutemas_pegatemas($row["id_n2"],$xml,$dbh,$perfil);
+ $xml .= "\n";
+ }
+ }
+ return $xml;
+}
+function geraXmlMenutemas_pegatemas($id_n2,$xml,$dbh,$perfil)
+{
+ global $esquemaadmin;
+ xml_testaNum([$id_n2]);
+ $q = "select nome_tema,codigo_tema,desc_tema,link_tema,tipoa_tema,tags_tema,kml_tema,ogc_tema,download_tema,n3.n3_perfil as perfil from ".$esquemaadmin."i3geoadmin_n3 as n3,".$esquemaadmin."i3geoadmin_temas as temas where n3.id_n2 = $id_n2 and n3.id_tema = temas.id_tema ";
+ $qtemas = $dbh->query($q);
+ $xml = geraXmlMenutemas_notema($qtemas,$xml,$perfil);
+ return $xml;
+}
+function geraXmlMenutemas_notema($qtemas,$xml,$perfil)
+{
+ global $esquemaadmin;
+ foreach($qtemas as $row)
+ {
+ if($row["perfil"] == "")
+ {$mostra = true;}
+ else
+ {
+ $perfilatual = explode(" ",str_replace(","," ",$row["perfil"]));
+ $mostra = array_in_array($perfil,$perfilatual);
+ }
+ if($mostra)
+ {
+ $xml .= "\n";
+ $xml .= "".$row["codigo_tema"]."\n";
+ $xml .= "".$row["perfil"]."\n";
+ $xml .= "".xmlTexto_prepara($row["nome_tema"])."\n";
+ $xml .= "".xmlTexto_prepara($row["desc_tema"])."\n";
+ $xml .= "\n";
+ $xml .= "".$row["tipoa_tema"]."\n";
+ $xml .= "".xmlTexto_prepara($row["tags_tema"])."\n";
+ $xml .= "".$row["kml_tema"]."\n";
+ if($row["tipoa_tema"] == "WMS")
+ {$xml .= "nao\n";}
+ else
+ {$xml .= "".$row["ogc_tema"]."\n";}
+ $xml .= "".$row["download_tema"]."\n";
+ $xml .= "\n";
+ $xml .= "\n";
+ }
+ }
+ return $xml;
+}
+function geraXmlAtlas_pegapranchas($xml,$id_atlas,$dbh)
+{
+ global $esquemaadmin;
+ xml_testaNum([$id_atlas]);
+ $q = "select * from ".$esquemaadmin."i3geoadmin_atlasp as p where p.id_atlas = $id_atlas order by ordem_prancha";
+ $qpranchas = $dbh->query($q);
+ foreach($qpranchas as $row)
+ {
+ $xml .= " \n";
+ $xml .= " ".$row["id_prancha"]."\n";
+ $xml .= " ".xmlTexto_prepara($row["titulo_prancha"])."\n";
+ $xml .= " ".xmlTexto_prepara($row["desc_prancha"])."\n";
+ $xml .= " ".$row["icone_prancha"]."\n";
+ $xml .= " \n";
+ $xml .= " ".$row["w_prancha"]."\n";
+ $xml .= " ".$row["h_prancha"]."\n";
+ $xml .= " ".$row["mapext_prancha"]."\n";
+ $xml .= " \n";
+ $xml = geraXmlAtlas_pegatemas($xml,$row["id_prancha"],$dbh);
+ $xml .= " \n";
+ $xml .= " \n";
+ }
+ return $xml;
+}
+function geraXmlAtlas_pegatemas($xml,$id_prancha,$dbh)
+{
+ global $esquemaadmin;
+ xml_testaNum([$id_prancha]);
+ $q = "select t.codigo_tema,t.ligado_tema from ".$esquemaadmin."i3geoadmin_atlast as t where t.id_prancha = '$id_prancha' order by ordem_tema";
+ //echo $q;
+ $qtemas = $dbh->query($q);
+ foreach($qtemas as $row)
+ {
+ $xml .= "\n";
+ $xml .= "".$row["codigo_tema"]."\n";
+ $xml .= "".$row["ligado_tema"]."\n";
+ $xml .= "\n";
+ }
+ return $xml;
+}
+function geraXmlSistemas_pegafuncoes($perfil,$xml,$id_sistema,$dbh)
+{
+ global $esquemaadmin;
+ xml_testaNum([$id_sistema]);
+ $q = "select * from ".$esquemaadmin."i3geoadmin_sistemasf where id_sistema = '$id_sistema'";
+ $qtemas = $dbh->query($q);
+ foreach($qtemas as $row)
+ {
+ if($row["perfil_funcao"] == "")
+ $mostra = true;
+ else
+ {
+ $perfilF = explode(" ",str_replace(","," ",$row["perfil_funcao"]));
+ $mostra = array_in_array($perfil,$perfilF);
+ }
+ if($mostra)
+ {
+ $xml .= "\n";
+ $xml .= " ".xmlTexto_prepara($row["nome_funcao"])."\n";
+ $xml .= " ".xmlTexto_prepara($row["abrir_funcao"])."\n";
+ $xml .= " ".$row["w_funcao"]."\n";
+ $xml .= " ".$row["h_funcao"]."\n";
+ $xml .= " ".$row["perfil_funcao"]."\n";
+ $xml .= "\n";
+ }
+ }
+ return $xml;
+}
+function array_in_array($needle, $haystack)
+{
+ //Make sure $needle is an array for foreach
+ if(!is_array($needle)) $needle = array($needle);
+ //For each value in $needle, return TRUE if in $haystack
+ foreach($needle as $pin)
+ if(in_array($pin, $haystack)) return TRUE;
+ //Return FALSE if none of the values from $needle are found in $haystack
+ return FALSE;
+}
+function xmlTexto_prepara($texto)
+{
+ return str_replace("&","&",$texto);
+}
+function entity_decode($texto)
+{
+ return html_entity_decode($texto);
+}
+function xml_testaNum($valores){
+ foreach ($valores as $valor) {
+ if(!empty($valor) && !is_numeric($valor)) {
+ echo "valor nao numerico";
+ exit;
+ }
+ }
+}
+?>
diff --git a/admin/php/xml.php b/admin/php/xml.php
index 5696bd6..2d0bcf8 100755
--- a/admin/php/xml.php
+++ b/admin/php/xml.php
@@ -119,12 +119,13 @@ Retorno:
RSS
*/
-function geraRSScomentariosTemas($locaplic,$id_tema="")
-{
+function geraRSScomentariosTemas($locaplic,$id_tema=""){
global $esquemaadmin;
+ xml_testaNum([$id_tema]);
$sql = "select '' as tipo_ws, b.nome_tema||' '||a.data as nome_ws,a.openidnome||' '||a.openidurl||' <br>'||a.comentario as desc_ws, a.openidnome as autor_ws, b.link_tema as link_ws from ".$esquemaadmin."i3geoadmin_comentarios as a,".$esquemaadmin."i3geoadmin_temas as b where a.id_tema = b.id_tema ";
- if($id_tema != "")
- {$sql .= " and a.id_tema = $id_tema ";}
+ if($id_tema != ""){
+ $sql .= " and a.id_tema = $id_tema ";
+ }
return geraXmlRSS($locaplic,$sql,"Lista de comentarios");
}
/*
@@ -145,6 +146,7 @@ RSS
function geraRSStemas($locaplic,$id_n2,$output="xml")
{
global $esquemaadmin;
+ xml_testaNum([$id_n2]);
$sql = "
select '' as tipo_ws, i3geoadmin_temas.codigo_tema as id_ws,i3geoadmin_temas.nome_tema as nome_ws,'' as desc_ws,'php/parsemapfile.php?id='||i3geoadmin_temas.codigo_tema as link_ws,i3geoadmin_temas.link_tema as autor_ws
from ".$esquemaadmin."i3geoadmin_n3 as n3
@@ -173,6 +175,7 @@ RSS
function geraRSStemasRaiz($locaplic,$id,$nivel)
{
global $esquemaadmin;
+ xml_testaNum([$id,$nivel]);
$sql = "
select '' as tipo_ws, i3geoadmin_temas.codigo_tema as id_ws,i3geoadmin_temas.nome_tema as nome_ws,'' as desc_ws,'php/parsemapfile.php?id='||i3geoadmin_temas.codigo_tema as link_ws,i3geoadmin_temas.link_tema as autor_ws
from ".$esquemaadmin."i3geoadmin_raiz as r
@@ -199,6 +202,7 @@ RSS
function geraRSSsubgrupos($locaplic,$id_n1,$output="json")
{
global $esquemaadmin;
+ xml_testaNum([$id_n1]);
$sql = "select '' as tipo_ws, n2.id_n2 as id_ws,g.nome_subgrupo as nome_ws,'' as desc_ws,'rsstemas.php?id='||n2.id_n2 as link_ws,'' as autor_ws from ".$esquemaadmin."i3geoadmin_n2 as n2,".$esquemaadmin."i3geoadmin_subgrupos as g ";
$sql .= " where g.id_subgrupo = n2.id_subgrupo and n2.id_n1 = '$id_n1' and n2.n2_perfil = '' and n2.publicado != 'NAO' order by nome_ws";
return geraXmlRSS($locaplic,$sql,"Lista de sub-grupos",$output);
@@ -737,6 +741,7 @@ function geraRSSmapas($locaplic,$output)
function geraXmlMenutemas($perfil,$id_menu,$tipo,$locaplic)
{
global $esquemaadmin;
+ xml_testaNum([$id_menu]);
$dbh = "";
include($locaplic."/admin/php/conexao.php");
if (!isset($perfil)){$perfil = "";}
@@ -794,6 +799,7 @@ function geraXmlMenutemas($perfil,$id_menu,$tipo,$locaplic)
function geraXmlMenutemas_pegasubgrupos($id_n1,$xml,$dbh,$tipo,$perfil)
{
global $esquemaadmin;
+ xml_testaNum([$id_n1]);
$q = "select subgrupos.id_subgrupo,nome_subgrupo,id_n2,n2.n2_perfil as perfil from ".$esquemaadmin."i3geoadmin_n2 as n2,".$esquemaadmin."i3geoadmin_subgrupos as subgrupos where n2.id_n1 = $id_n1 and n2.id_subgrupo = subgrupos.id_subgrupo ";
//echo $q;exit;
$qsgrupos = $dbh->query($q);
@@ -821,6 +827,7 @@ function geraXmlMenutemas_pegasubgrupos($id_n1,$xml,$dbh,$tipo,$perfil)
function geraXmlMenutemas_pegatemas($id_n2,$xml,$dbh,$perfil)
{
global $esquemaadmin;
+ xml_testaNum([$id_n2]);
$q = "select nome_tema,codigo_tema,desc_tema,link_tema,tipoa_tema,tags_tema,kml_tema,ogc_tema,download_tema,n3.n3_perfil as perfil from ".$esquemaadmin."i3geoadmin_n3 as n3,".$esquemaadmin."i3geoadmin_temas as temas where n3.id_n2 = $id_n2 and n3.id_tema = temas.id_tema ";
$qtemas = $dbh->query($q);
$xml = geraXmlMenutemas_notema($qtemas,$xml,$perfil);
@@ -863,6 +870,7 @@ function geraXmlMenutemas_notema($qtemas,$xml,$perfil)
function geraXmlAtlas_pegapranchas($xml,$id_atlas,$dbh)
{
global $esquemaadmin;
+ xml_testaNum([$id_atlas]);
$q = "select * from ".$esquemaadmin."i3geoadmin_atlasp as p where p.id_atlas = $id_atlas order by ordem_prancha";
$qpranchas = $dbh->query($q);
foreach($qpranchas as $row)
@@ -886,6 +894,7 @@ function geraXmlAtlas_pegapranchas($xml,$id_atlas,$dbh)
function geraXmlAtlas_pegatemas($xml,$id_prancha,$dbh)
{
global $esquemaadmin;
+ xml_testaNum([$id_prancha]);
$q = "select t.codigo_tema,t.ligado_tema from ".$esquemaadmin."i3geoadmin_atlast as t where t.id_prancha = '$id_prancha' order by ordem_tema";
//echo $q;
$qtemas = $dbh->query($q);
@@ -901,6 +910,7 @@ function geraXmlAtlas_pegatemas($xml,$id_prancha,$dbh)
function geraXmlSistemas_pegafuncoes($perfil,$xml,$id_sistema,$dbh)
{
global $esquemaadmin;
+ xml_testaNum([$id_sistema]);
$q = "select * from ".$esquemaadmin."i3geoadmin_sistemasf where id_sistema = '$id_sistema'";
$qtemas = $dbh->query($q);
foreach($qtemas as $row)
@@ -943,5 +953,13 @@ function entity_decode($texto)
{
return html_entity_decode($texto);
}
-
+function xml_testaNum($valores){
+ foreach ($valores as $valor) {
+ if(!empty($valor) && !is_numeric($valor)) {
+ ob_clean();
+ header ( "HTTP/1.1 403 valor nao numerico" );
+ exit;
+ }
+ }
+}
?>
diff --git a/admin/rsscomentariostemas.php b/admin/rsscomentariostemas.php
index c8fae87..3aa64d9 100755
--- a/admin/rsscomentariostemas.php
+++ b/admin/rsscomentariostemas.php
@@ -41,11 +41,13 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
-include_once($locaplic."/admin/php/xml.php");
+include_once(dirname(__FILE__)."/../classesphp/sani_request.php");
$parametros = array_merge($_POST,$_GET);
-if(empty($parametros["id_tema"]))
-{$parametros["id_tema"] = "";}
+include_once($locaplic."/admin/php/xml.php");
+
+if(empty($parametros["id_tema"])){
+ $parametros["id_tema"] = "";
+}
echo header("Content-type: application/xml");
echo geraRSScomentariosTemas($locaplic,$parametros["id_tema"]);
?>
diff --git a/admin/rssgrupos.php b/admin/rssgrupos.php
index 67cd198..40c525e 100755
--- a/admin/rssgrupos.php
+++ b/admin/rssgrupos.php
@@ -36,7 +36,7 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once(dirname(__FILE__)."/../classesphp/sani_request.php");
include_once($locaplic."/admin/php/xml.php");
$output = "xml";
if(strtolower($_GET["output"]) == "json" || strtolower($_POST["output"]) == "json"){
diff --git a/admin/rssmapas.php b/admin/rssmapas.php
index 77f3d3f..0ab4888 100755
--- a/admin/rssmapas.php
+++ b/admin/rssmapas.php
@@ -36,7 +36,7 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once(dirname(__FILE__)."/../classesphp/sani_request.php");
include_once($locaplic."/admin/php/xml.php");
$output = "xml";
if(strtolower($_GET["output"]) == "json" || strtolower($_POST["output"]) == "json"){
diff --git a/admin/rsssubgrupos.php b/admin/rsssubgrupos.php
index f9eb309..ced3856 100755
--- a/admin/rsssubgrupos.php
+++ b/admin/rsssubgrupos.php
@@ -42,12 +42,13 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once(dirname(__FILE__)."/../classesphp/sani_request.php");
+$_GET = array_merge($_GET,$_POST);
include_once($locaplic."/admin/php/xml.php");
$output = "xml";
if(strtolower($_GET["output"]) == "json" || strtolower($_POST["output"]) == "json"){
$output = "json";
}
echo header("Content-type: application/".$output);
-echo geraRSSsubgrupos($locaplic,$id,$output);
+echo geraRSSsubgrupos($locaplic,$_GET["id"],$output);
?>
diff --git a/admin/rsstemas.php b/admin/rsstemas.php
index 012a5d0..2369d71 100755
--- a/admin/rsstemas.php
+++ b/admin/rsstemas.php
@@ -42,12 +42,13 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once(dirname(__FILE__)."/../classesphp/sani_request.php");
+$_GET = array_merge($_GET,$_POST);
include_once($locaplic."/admin/php/xml.php");
$output = "xml";
if(strtolower($_GET["output"]) == "json" || strtolower($_POST["output"]) == "json"){
$output = "json";
}
echo header("Content-type: application/".$output);
-echo geraRSStemas($locaplic,$id,$output);
+echo geraRSStemas($locaplic,$_GET["id"],$output);
?>
diff --git a/admin/rsstemasdownload.php b/admin/rsstemasdownload.php
index cb3be76..5a412d5 100755
--- a/admin/rsstemasdownload.php
+++ b/admin/rsstemasdownload.php
@@ -39,7 +39,8 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once(dirname(__FILE__)."/../classesphp/sani_request.php");
+$_GET = array_merge($_GET,$_POST);
include_once($locaplic."/admin/php/xml.php");
echo header("Content-type: application/xml");
echo geraRSStemasDownload($locaplic);
diff --git a/admin/rsstemaskml.php b/admin/rsstemaskml.php
index 30f8cac..930273f 100755
--- a/admin/rsstemaskml.php
+++ b/admin/rsstemaskml.php
@@ -39,7 +39,8 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once(dirname(__FILE__)."/../classesphp/sani_request.php");
+$_GET = array_merge($_GET,$_POST);
include_once($locaplic."/admin/php/xml.php");
echo header("Content-type: application/xml");
echo geraRSStemasKml($locaplic);
diff --git a/admin/rsstemasogc.php b/admin/rsstemasogc.php
index 320d1b3..cf540a6 100755
--- a/admin/rsstemasogc.php
+++ b/admin/rsstemasogc.php
@@ -38,7 +38,8 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once(dirname(__FILE__)."/../classesphp/sani_request.php");
+$_GET = array_merge($_GET,$_POST);
include_once($locaplic."/admin/php/xml.php");
echo header("Content-type: application/xml");
echo geraRSStemasOgc($locaplic);
diff --git a/admin/rsstemasraiz.php b/admin/rsstemasraiz.php
index 55e090e..eb4771a 100755
--- a/admin/rsstemasraiz.php
+++ b/admin/rsstemasraiz.php
@@ -44,8 +44,9 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once(dirname(__FILE__)."/../classesphp/sani_request.php");
+$_GET = array_merge($_GET,$_POST);
include_once($locaplic."/admin/php/xml.php");
echo header("Content-type: application/xml");
-echo geraRSStemasRaiz($locaplic,$id,$nivel);
+echo geraRSStemasRaiz($locaplic,$_GET["id"],$_GET["nivel"]);
?>
diff --git a/admin/xmlatlas.php b/admin/xmlatlas.php
index f43e904..61b68f6 100755
--- a/admin/xmlatlas.php
+++ b/admin/xmlatlas.php
@@ -4,8 +4,8 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once($locaplic."/admin/safe.php");
include_once($locaplic."/admin/php/xml.php");
echo header("Content-type: application/xml");
-echo geraXmlAtlas($locaplic,$editores);
+echo geraXmlAtlas($locaplic);
?>
diff --git a/admin/xmlgeorss.php b/admin/xmlgeorss.php
index b29fcc2..f99f6dc 100755
--- a/admin/xmlgeorss.php
+++ b/admin/xmlgeorss.php
@@ -39,7 +39,7 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once($locaplic."/admin/safe.php");
include_once($locaplic."/admin/php/xml.php");
$output = "xml";
if(strtolower($_GET["output"]) == "json" || strtolower($_POST["output"]) == "json"){
diff --git a/admin/xmlidentifica.php b/admin/xmlidentifica.php
index bb0f4fd..4bc0f73 100755
--- a/admin/xmlidentifica.php
+++ b/admin/xmlidentifica.php
@@ -43,9 +43,9 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once($locaplic."/admin/safe.php");
include_once($locaplic."/admin/php/xml.php");
if(!isset($perfil)){$perfil = "";}
echo header("Content-type: application/xml");
-echo geraXmlIdentifica($perfil,$locaplic,$editores);
+echo geraXmlIdentifica($perfil,$locaplic);
?>
diff --git a/admin/xmlkmlrss.php b/admin/xmlkmlrss.php
index 62a73a7..fe44e21 100755
--- a/admin/xmlkmlrss.php
+++ b/admin/xmlkmlrss.php
@@ -38,7 +38,7 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once($locaplic."/admin/safe.php");
include_once($locaplic."/admin/php/xml.php");
echo header("Content-type: application/xml");
echo geraXmlKmlrss($locaplic);
diff --git a/admin/xmllinksdownload.php b/admin/xmllinksdownload.php
index 7cd4e5f..bdfcc55 100755
--- a/admin/xmllinksdownload.php
+++ b/admin/xmllinksdownload.php
@@ -39,7 +39,7 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once($locaplic."/admin/safe.php");
include_once($locaplic."/admin/php/xml.php");
echo header("Content-type: application/xml");
echo geraXmlDownload($locaplic);
diff --git a/admin/xmlmapas.php b/admin/xmlmapas.php
index c48d696..aa10e03 100755
--- a/admin/xmlmapas.php
+++ b/admin/xmlmapas.php
@@ -39,9 +39,9 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once($locaplic."/admin/safe.php");
include_once($locaplic."/admin/php/xml.php");
if(!isset($perfil)){$perfil = "";}
echo header("Content-type: application/xml");
-echo geraXmlMapas($perfil,$locaplic,$editores);
+echo geraXmlMapas($perfil,$locaplic);
?>
diff --git a/admin/xmlmenutemas.php b/admin/xmlmenutemas.php
index 818198d..63c89f4 100755
--- a/admin/xmlmenutemas.php
+++ b/admin/xmlmenutemas.php
@@ -3,7 +3,7 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once($locaplic."/admin/safe.php");
include_once($locaplic."/admin/php/xml.php");
if(!isset($perfil)){$perfil = "";}
if(!isset($id_menu)){$id_menu = "";}
diff --git a/admin/xmlmetaestatogc.php b/admin/xmlmetaestatogc.php
index 68e0fec..80d0cfd 100755
--- a/admin/xmlmetaestatogc.php
+++ b/admin/xmlmetaestatogc.php
@@ -38,7 +38,7 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once($locaplic."/admin/safe.php");
include_once($locaplic."/admin/php/xml.php");
echo header("Content-type: application/xml");
echo geraXmlWMSmetaestat($locaplic);
diff --git a/admin/xmlservicoswms.php b/admin/xmlservicoswms.php
index 8675ea8..e5d4ed8 100755
--- a/admin/xmlservicoswms.php
+++ b/admin/xmlservicoswms.php
@@ -39,7 +39,7 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once($locaplic."/admin/safe.php");
include_once($locaplic."/admin/php/xml.php");
$output = "xml";
if(strtolower($_GET["output"]) == "json" || strtolower($_POST["output"]) == "json"){
diff --git a/admin/xmlservicosws.php b/admin/xmlservicosws.php
index 0514625..cf68f8d 100755
--- a/admin/xmlservicosws.php
+++ b/admin/xmlservicosws.php
@@ -39,7 +39,7 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once($locaplic."/admin/safe.php");
include_once($locaplic."/admin/php/xml.php");
$output = "xml";
diff --git a/admin/xmlsistemas.php b/admin/xmlsistemas.php
index a2ff54b..d7e87fb 100755
--- a/admin/xmlsistemas.php
+++ b/admin/xmlsistemas.php
@@ -39,9 +39,9 @@ error_reporting(0);
if(!isset($locaplic)){
include(dirname(__FILE__)."/../ms_configura.php");
}
-include_once($locaplic."/classesphp/pega_variaveis.php");
+include_once($locaplic."/admin/safe.php");
include_once($locaplic."/admin/php/xml.php");
if(!isset($perfil)){$perfil = "";}
echo header("Content-type: application/xml");
-echo geraXmlSistemas($perfil,$locaplic,$editores);
+echo geraXmlSistemas($perfil,$locaplic);
?>
diff --git a/pacotes/bootstrap-accessibility-plugin/LICENSE.md b/pacotes/bootstrap-accessibility-plugin/LICENSE.md
new file mode 100755
index 0000000..cdaf62e
--- /dev/null
+++ b/pacotes/bootstrap-accessibility-plugin/LICENSE.md
@@ -0,0 +1,27 @@
+Copyright (c) 2014, PayPal
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+
+* Neither the name of the PayPal nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pacotes/bootstrap-accessibility-plugin/README.md b/pacotes/bootstrap-accessibility-plugin/README.md
new file mode 100755
index 0000000..304286d
--- /dev/null
+++ b/pacotes/bootstrap-accessibility-plugin/README.md
@@ -0,0 +1,145 @@
+
+# Bootstrap Accessibility Plugin, v1.0
+## by the PayPal Accessibility Team
+See the [Authors](#authors) section below for more information.
+
+## What is it?
+This plugin adds accessibility mark-up to the [default components of Bootstrap 3](http://getbootstrap.com/javascript/) to make them accessible for keyboard and screen reader users. Do not worry, the plugin does not affect the performance or the visual layout of your website. Let the magic remain magic!
+
+## Why do I want it?
+If you use Bootstrap library (version 3.x) on your website, your pages will now be much more usable and navigable for and by keyboard and screen reader users with no work on your part. Believe us, for this they will thank you! Read on to learn about all the enhancements introduced by this plugin.
+
+## How do I get it on my website?
+1. Download and include Bootstrap.js from [getbootstrap.com](http://getbootstrap.com/).
+2. Download and include the [bootstrap accessibility plugin js](plugins/js).
+3. Download and include the [bootstrap accessibility plugin css](plugins/css) to override css styles.
+4. Optional: Lazily load the JavaScript plugin after the page is loaded ([example](demo.html)).
+5. For basic implementation:
+
+ ```html
+
+
+
+
+
+
+ ```
+6. You can also install it from npm or bower:
+
+ ```sh
+ bower install bootstrapaccessibilityplugin
+ npm install bootstrap-accessibility-plugin
+ ```
+
+## Which components become accessible?
+- Alert
+- Tooltip
+- Popover
+- Modal dialog
+- Dropdown menu
+- Tab panel
+- Collapse
+- Carousel
+
+## Plugin Live Demo
+Feel free to play with the [live demo](https://paypal.github.io/bootstrap-accessibility-plugin/demo.html) of the components listed above and the Bootstrap Accessibility Plugin in action. Seeing how "accessified" widgets work in this demo will help you verify whether the plugin is installed correctly on your website.
+
+## Details
+
+### Alert
+1. Add role of Alert to Alert, Warning, and Success Bootstrap Messages.
+2. Increase the color contrast. The foreground to background color contrast ratio for the message was too low.
+3. Add instructions in message dialog, so that the developer using the alert knows to manage keyboard focus on alert dismissal.
+4. Close button now accessible to screen readers.
+
+### Tooltip
+1. Add role of Tooltip to tooltip div.
+2. Generate a random id, assign it to the tooltip div, and reference it from the Tooltip element with the ARIA attribute "aria-describedby".
+3. Remove aria-describedby when the tooltip is hidden.
+
+### Popover
+1. Add role of Tooltip to popover div.
+2. Generate a random id, assign it to Popover div, and reference it from the Tooltip element with the ARIA attribute "aria-describedby".
+3. Remove aria-describedby when the popover is dismissed.
+
+### Modal Dialog
+1. Add role of Document to content div inside dialog, so that NVDA can force document mode and read contents inside Dialog.
+2. When the Modal is closed, return the focus to the element which opened the dialog.
+3. Change the focus outline of close button to visible.
+4. Close button now accessible to screen readers.
+
+### Dropdown
+1. Add aria-haspopup and and aria-expanded attributes to dropdown toggle link.
+2. Dynamically change aria-expanded when the dropdown closes or opens.
+3. Focus to first item on activating dropdown.
+4. Add ability to open dropdown with spacebar.
+5. Close dropdown when tabbing out from dropdown.
+6. Change the focus outline of dropdown to visible.
+
+### Tab Panel
+1. Add ARIA roles like tablist, presentation, and tab for tabs UL, LI.
+2. Add tabIndex, aria-expanded, aria-selected, aria-controls for tab.
+3. Add ARIA roles of tabPanel, tabIndex, aria-hidden, and aria-labelledBy for tabPanel.
+4. Add keydown event listener for the tab to work with keyboard.
+5. Dynamically flip tabIndex, aria-selected, and aria-expanded for tab when it is activated and add aria-hidden to hide the previously visible tab.
+
+### Collapse
+1. Add tab role, aria-selected, aria-expanded, aria-controls, and tabIndex for collapse tab.
+2. Add ARIA roles of tabPanel, tabIndex, aria-hidden, and aria-labelledBy for collapsible panel.
+3. Add role of tabList and aria-multiselectable for collapse container div.
+4. Dynamically flip tabIndex, aria-selected, and aria-expanded for tab when it is activated and add aria-hidden to hide the previously visible collapse tabpanel.
+5. Add keydown event listener for the collapse component to work with keyboard.
+
+### Carousel
+1. Prevent automatic cycling of the carousel.
+2. Prevent wrapping to first item on next button navigation or wrapping to last item on previous button navigation.
+3. Add role of listbox for carousel div.
+4. Add ARIA role of option, aria-selected, and tabIndex for individual carousel items.
+5. Add role of button for previous and next anchor links and a hidden screen reader text of "Previous" and "Next".
+6. Add keydown event listener for the carousel to work with keyboard.
+7. Dynamically change tabIndex and aria-selected property of active and inactive tabs.
+8. Remove display:none and hide (offscreen) of the inactive carousel items, so that screen readers can count the total number of carousel items.
+
+## Re-compiling
+You may want to extend the plugin further or change some of the code. Here is how to do it:
+
+1. Get NodeJS from [http://nodejs.org](http://nodejs.org)
+2. Clone the latest code from [https://github.com/paypal/bootstrap-accessibility-plugin.git](https://github.com/paypal/bootstrap-accessibility-plugin.git)
+3. Go to the root of this project and install Compass and Sass:
+
+ ```sh
+ cd bootstrap-accessibility-plugin
+ sudo gem install compass
+ ```
+4. Install and run grunt:
+
+ ```sh
+ sudo npm install grunt-cli -g
+ npm install
+ grunt
+ ```
+5. To run the examples, initialize the git submodules:
+
+ ```sh
+ git submodule init
+ git submodule update
+ ```
+
+## Feedback and Contributions
+Please do not hesitate to open an issue or send a pull request if something doesn't work or you have ideas for improvement. For instructions on how to contribute to this project please read the [contribution guide](CONTRIBUTING.md).
+
+## Authors
+
+ - Prem Nawaz Khan, primary developer || [https://github.com/mpnkhan](https://github.com/mpnkhan) || [@mpnkhan](https://twitter.com/mpnkhan)
+ - Victor Tsaran, project manager, user interaction, testing, documentation || [https://github.com/vick08](https://github.com/vick08) || [@vick08](https://twitter.com/vick08)
+ - Dennis Lembree, developer, user interaction, testing || [https://github.com/weboverhauls](https://github.com/weboverhauls) || [@dennisl](https://twitter.com/dennisl)
+ - Srinivasu Chakravarthula, user interaction, testing || [@csrinivasu](https://twitter.com/csrinivasu)
+ - Cathy O'Connor, design || [@cagocon](https://twitter.com/cagocon)
+
+## Related Resources
+
+ - [Bootstrap a11y theme](https://github.com/bassjobsen/bootstrap-a11y-theme) - makes web accessibility easier for Bootstrap developers, a pure LESS/CSS solution.
+
+## Copyright and License
+
+Copyright 2015, PayPal under [the BSD license](LICENSE.md).
diff --git a/pacotes/bootstrap-accessibility-plugin/plugins/css/bootstrap-accessibility.css b/pacotes/bootstrap-accessibility-plugin/plugins/css/bootstrap-accessibility.css
new file mode 100755
index 0000000..e5bc6f7
--- /dev/null
+++ b/pacotes/bootstrap-accessibility-plugin/plugins/css/bootstrap-accessibility.css
@@ -0,0 +1 @@
+.btn:focus{outline:dotted 2px #000}div.active:focus{outline:dotted 1px #000}a:focus{outline:dotted 1px #000}.close:hover,.close:focus{outline:dotted 1px #000}.nav>li>a:hover,.nav>li>a:focus{outline:dotted 1px #000}.carousel-indicators li,.carousel-indicators li.active{height:18px;width:18px;border-width:2px;position:relative;box-shadow:0px 0px 0px 1px #808080}.carousel-indicators.active li{background-color:rgba(100,149,253,0.6)}.carousel-indicators.active li.active{background-color:white}.carousel-tablist-highlight{display:block;position:absolute;outline:2px solid transparent;background-color:transparent;box-shadow:0px 0px 0px 1px transparent}.carousel-tablist-highlight.focus{outline:2px solid #6495ED;background-color:rgba(0,0,0,0.4)}a.carousel-control:focus{outline:2px solid #6495ED;background-image:linear-gradient(to right, transparent 0px, rgba(0,0,0,0.5) 100%);box-shadow:0px 0px 0px 1px #000000}.carousel-pause-button{position:absolute;top:-30em;left:-300em;display:block}.carousel-pause-button.focus{top:0.5em;left:0.5em}.carousel:hover .carousel-caption,.carousel.contrast .carousel-caption{background-color:rgba(0,0,0,0.5);z-index:10}.alert-success{color:#2d4821}.alert-info{color:#214c62}.alert-warning{color:#6c4a00;background-color:#f9f1c6}.alert-danger{color:#e13023}.alert-danger:hover{color:#a82824}
diff --git a/pacotes/bootstrap-accessibility-plugin/plugins/js/bootstrap-accessibility.js b/pacotes/bootstrap-accessibility-plugin/plugins/js/bootstrap-accessibility.js
new file mode 100755
index 0000000..15b82f5
--- /dev/null
+++ b/pacotes/bootstrap-accessibility-plugin/plugins/js/bootstrap-accessibility.js
@@ -0,0 +1,716 @@
+/* ========================================================================
+* Extends Bootstrap v3.1.1
+
+* Copyright (c) <2015> PayPal
+
+* All rights reserved.
+
+* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+* Neither the name of PayPal or any of its subsidiaries or affiliates nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+* ======================================================================== */
+
+
+ (function($) {
+ "use strict";
+
+ // GENERAL UTILITY FUNCTIONS
+ // ===============================
+
+ var uniqueId = function(prefix) {
+ return (prefix || 'ui-id') + '-' + Math.floor((Math.random()*1000)+1)
+ }
+
+
+ var removeMultiValAttributes = function (el, attr, val) {
+ var describedby = (el.attr( attr ) || "").split( /\s+/ )
+ , index = $.inArray(val, describedby)
+ if ( index !== -1 ) {
+ describedby.splice( index, 1 )
+ }
+ describedby = $.trim( describedby.join( " " ) )
+ if (describedby ) {
+ el.attr( attr, describedby )
+ } else {
+ el.removeAttr( attr )
+ }
+ }
+
+// selectors Courtesy: https://github.com/jquery/jquery-ui/blob/master/ui/focusable.js and tabbable.js
+/*
+Copyright jQuery Foundation and other contributors, https://jquery.org/
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/jquery/jquery-ui
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code contained within the demos directory.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+*/
+
+ var focusable = function ( element, isTabIndexNotNaN ) {
+ var map, mapName, img,
+ nodeName = element.nodeName.toLowerCase();
+ if ( "area" === nodeName ) {
+ map = element.parentNode;
+ mapName = map.name;
+ if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
+ return false;
+ }
+ img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
+ return !!img && visible( img );
+ }
+ return ( /input|select|textarea|button|object/.test( nodeName ) ?
+ !element.disabled :
+ "a" === nodeName ?
+ element.href || isTabIndexNotNaN :isTabIndexNotNaN) && visible( element ); // the element and all of its ancestors must be visible
+ }
+ var visible = function ( element ) {
+ return $.expr.filters.visible( element ) &&
+ !$( element ).parents().addBack().filter(function() {
+ return $.css( this, "visibility" ) === "hidden";
+ }).length;
+ }
+
+ $.extend( $.expr[ ":" ], {
+ data: $.expr.createPseudo ?
+ $.expr.createPseudo(function( dataName ) {
+ return function( elem ) {
+ return !!$.data( elem, dataName );
+ };
+ }) :
+ // support: jQuery <1.8
+ function( elem, i, match ) {
+ return !!$.data( elem, match[ 3 ] );
+ },
+
+ focusable: function( element ) {
+ return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
+ },
+
+ tabbable: function( element ) {
+ var tabIndex = $.attr( element, "tabindex" ),
+ isTabIndexNaN = isNaN( tabIndex );
+ return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
+ }
+ });
+
+ // Modal Extension
+ // ===============================
+
+ $('.modal-dialog').attr( {'role' : 'document'})
+ var modalhide = $.fn.modal.Constructor.prototype.hide
+ $.fn.modal.Constructor.prototype.hide = function(){
+ modalhide.apply(this, arguments)
+ $(document).off('keydown.bs.modal')
+ }
+
+ var modalfocus = $.fn.modal.Constructor.prototype.enforceFocus
+ $.fn.modal.Constructor.prototype.enforceFocus = function(){
+ var $content = this.$element.find(".modal-content")
+ var focEls = $content.find(":tabbable")
+ , $lastEl = $(focEls[focEls.length-1])
+ , $firstEl = $(focEls[0])
+ $lastEl.on('keydown.bs.modal', $.proxy(function (ev) {
+ if(ev.keyCode === 9 && !(ev.shiftKey | ev.ctrlKey | ev.metaKey | ev.altKey)) { // TAB pressed
+ ev.preventDefault();
+ $firstEl.focus();
+ }
+ }, this))
+ $firstEl.on('keydown.bs.modal', $.proxy(function (ev) {
+ if(ev.keyCode === 9 && ev.shiftKey) { // SHIFT-TAB pressed
+ ev.preventDefault();
+ $lastEl.focus();
+ }
+ }, this))
+ modalfocus.apply(this, arguments)
+ }
+
+ // DROPDOWN Extension
+ // ===============================
+
+ var toggle = '[data-toggle=dropdown]'
+ , $par
+ , firstItem
+ , focusDelay = 200
+ , menus = $(toggle).parent().find('ul').attr('role','menu')
+ , lis = menus.find('li').attr('role','presentation')
+
+ // add menuitem role and tabIndex to dropdown links
+ lis.find('a').attr({'role':'menuitem', 'tabIndex':'-1'})
+ // add aria attributes to dropdown toggle
+ $(toggle).attr({ 'aria-haspopup':'true', 'aria-expanded': 'false'})
+
+ $(toggle).parent()
+ // Update aria-expanded when open
+ .on('shown.bs.dropdown',function(e){
+ $par = $(this)
+ var $toggle = $par.find(toggle)
+ $toggle.attr('aria-expanded','true')
+ $toggle.on('keydown.bs.dropdown', $.proxy(function (ev) {
+ setTimeout(function() {
+ firstItem = $('.dropdown-menu [role=menuitem]:visible', $par)[0]
+ try{ firstItem.focus()} catch(ex) {}
+ }, focusDelay)
+ }, this))
+
+ })
+ // Update aria-expanded when closed
+ .on('hidden.bs.dropdown',function(e){
+ $par = $(this)
+ var $toggle = $par.find(toggle)
+ $toggle.attr('aria-expanded','false')
+ })
+
+ // Close the dropdown if tabbed away from
+ $(document)
+ .on('focusout.dropdown.data-api', '.dropdown-menu', function(e){
+ var $this = $(this)
+ , that = this;
+ // since we're trying to close when appropriate,
+ // make sure the dropdown is open
+ if (!$this.parent().hasClass('open')) {
+ return;
+ }
+ setTimeout(function() {
+ if(!$.contains(that, document.activeElement)){
+ $this.parent().find('[data-toggle=dropdown]').dropdown('toggle')
+ }
+ }, 150)
+ })
+ .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , $.fn.dropdown.Constructor.prototype.keydown);
+
+ // Tab Extension
+ // ===============================
+
+ var $tablist = $('.nav-tabs, .nav-pills')
+ , $lis = $tablist.children('li')
+ , $tabs = $tablist.find('[data-toggle="tab"], [data-toggle="pill"]')
+
+ if($tabs){
+ $tablist.attr('role', 'tablist')
+ $lis.attr('role', 'presentation')
+ $tabs.attr('role', 'tab')
+ }
+
+ $tabs.each(function( index ) {
+ var tabpanel = $($(this).attr('href'))
+ , tab = $(this)
+ , tabid = tab.attr('id') || uniqueId('ui-tab')
+
+ tab.attr('id', tabid)
+
+ if(tab.parent().hasClass('active')){
+ tab.attr( { 'tabIndex' : '0', 'aria-selected' : 'true', 'aria-controls': tab.attr('href').substr(1) } )
+ tabpanel.attr({ 'role' : 'tabpanel', 'tabIndex' : '0', 'aria-hidden' : 'false', 'aria-labelledby':tabid })
+ }else{
+ tab.attr( { 'tabIndex' : '-1', 'aria-selected' : 'false', 'aria-controls': tab.attr('href').substr(1) } )
+ tabpanel.attr( { 'role' : 'tabpanel', 'tabIndex' : '-1', 'aria-hidden' : 'true', 'aria-labelledby':tabid } )
+ }
+ })
+
+ $.fn.tab.Constructor.prototype.keydown = function (e) {
+ var $this = $(this)
+ , $items
+ , $ul = $this.closest('ul[role=tablist] ')
+ , index
+ , k = e.which || e.keyCode
+
+ $this = $(this)
+ if (!/(37|38|39|40)/.test(k)) return
+
+ $items = $ul.find('[role=tab]:visible')
+ index = $items.index($items.filter(':focus'))
+
+ if (k == 38 || k == 37) index-- // up & left
+ if (k == 39 || k == 40) index++ // down & right
+
+
+ if(index < 0) index = $items.length -1
+ if(index == $items.length) index = 0
+
+ var nextTab = $items.eq(index)
+ if(nextTab.attr('role') ==='tab'){
+
+ nextTab.tab('show') //Comment this line for dynamically loaded tabPabels, to save Ajax requests on arrow key navigation
+ .focus()
+ }
+ // nextTab.focus()
+
+ e.preventDefault()
+ e.stopPropagation()
+ }
+
+ $(document).on('keydown.tab.data-api','[data-toggle="tab"], [data-toggle="pill"]' , $.fn.tab.Constructor.prototype.keydown)
+
+ var tabactivate = $.fn.tab.Constructor.prototype.activate;
+ $.fn.tab.Constructor.prototype.activate = function (element, container, callback) {
+ var $active = container.find('> .active')
+ $active.find('[data-toggle=tab], [data-toggle=pill]').attr({ 'tabIndex' : '-1','aria-selected' : false })
+ $active.filter('.tab-pane').attr({ 'aria-hidden' : true,'tabIndex' : '-1' })
+
+ tabactivate.apply(this, arguments)
+
+ element.addClass('active')
+ element.find('[data-toggle=tab], [data-toggle=pill]').attr({ 'tabIndex' : '0','aria-selected' : true })
+ element.filter('.tab-pane').attr({ 'aria-hidden' : false,'tabIndex' : '0' })
+ }
+
+ // Collapse Extension
+ // ===============================
+
+ var $colltabs = $('[data-toggle="collapse"]')
+ $colltabs.each(function( index ) {
+ var colltab = $(this)
+ , collpanel = (colltab.attr('data-target')) ? $(colltab.attr('data-target')) : $(colltab.attr('href'))
+ , parent = colltab.attr('data-parent')
+ , collparent = parent && $(parent)
+ , collid = colltab.attr('id') || uniqueId('ui-collapse')
+
+ colltab.attr('id', collid)
+
+ if(collparent){
+ colltab.attr({ 'role':'tab', 'aria-selected':'false', 'aria-expanded':'false' })
+ $(collparent).find('div:not(.collapse,.panel-body), h4').attr('role','presentation')
+ collparent.attr({ 'role' : 'tablist', 'aria-multiselectable' : 'true' })
+
+ if(collpanel.hasClass('in')){
+ colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected':'true', 'aria-expanded':'true', 'tabindex':'0' })
+ collpanel.attr({ 'role':'tabpanel', 'tabindex':'0', 'aria-labelledby':collid, 'aria-hidden':'false' })
+ }else{
+ colltab.attr({'aria-controls' : collpanel.attr('id'), 'tabindex':'-1' })
+ collpanel.attr({ 'role':'tabpanel', 'tabindex':'-1', 'aria-labelledby':collid, 'aria-hidden':'true' })
+ }
+ }
+ })
+
+ var collToggle = $.fn.collapse.Constructor.prototype.toggle
+ $.fn.collapse.Constructor.prototype.toggle = function(){
+ var prevTab = this.$parent && this.$parent.find('[aria-expanded="true"]') , href
+
+ if(prevTab){
+ var prevPanel = prevTab.attr('data-target') || (href = prevTab.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')
+ , $prevPanel = $(prevPanel)
+ , $curPanel = this.$element
+ , par = this.$parent
+ , curTab
+
+ if (this.$parent) curTab = this.$parent.find('[data-toggle=collapse][href="#' + this.$element.attr('id') + '"]')
+
+ collToggle.apply(this, arguments)
+
+ if ($.support.transition) {
+ this.$element.one($.support.transition.end, function(){
+
+ prevTab.attr({ 'aria-selected':'false','aria-expanded':'false', 'tabIndex':'-1' })
+ $prevPanel.attr({ 'aria-hidden' : 'true','tabIndex' : '-1'})
+
+ curTab.attr({ 'aria-selected':'true','aria-expanded':'true', 'tabIndex':'0' })
+
+ if($curPanel.hasClass('in')){
+ $curPanel.attr({ 'aria-hidden' : 'false','tabIndex' : '0' })
+ }else{
+ curTab.attr({ 'aria-selected':'false','aria-expanded':'false'})
+ $curPanel.attr({ 'aria-hidden' : 'true','tabIndex' : '-1' })
+ }
+ })
+ }
+ }else{
+ collToggle.apply(this, arguments)
+ }
+ }
+
+ $.fn.collapse.Constructor.prototype.keydown = function (e) {
+ var $this = $(this)
+ , $items
+ , $tablist = $this.closest('div[role=tablist] ')
+ , index
+ , k = e.which || e.keyCode
+
+ $this = $(this)
+ if (!/(32|37|38|39|40)/.test(k)) return
+ if(k==32) $this.click()
+
+ $items = $tablist.find('[role=tab]')
+ index = $items.index($items.filter(':focus'))
+
+ if (k == 38 || k == 37) index-- // up & left
+ if (k == 39 || k == 40) index++ // down & right
+ if(index < 0) index = $items.length -1
+ if(index == $items.length) index = 0
+
+ $items.eq(index).focus()
+
+ e.preventDefault()
+ e.stopPropagation()
+
+ }
+
+ $(document).on('keydown.collapse.data-api','[data-toggle="collapse"]' , $.fn.collapse.Constructor.prototype.keydown);
+
+
+// Carousel Extension
+ // ===============================
+
+ $('.carousel').each(function (index) {
+
+ // This function positions a highlight box around the tabs in the tablist to use in focus styling
+
+ function setTablistHighlightBox() {
+
+ var $tab
+ , offset
+ , height
+ , width
+ , highlightBox = {}
+
+ highlightBox.top = 0
+ highlightBox.left = 32000
+ highlightBox.height = 0
+ highlightBox.width = 0
+
+ for (var i = 0; i < $tabs.length; i++) {
+ $tab = $tabs[i]
+ offset = $($tab).offset()
+ height = $($tab).height()
+ width = $($tab).width()
+
+// console.log(" Top: " + offset.top + " Left: " + offset.left + " Height: " + height + " Width: " + width)
+
+ if (highlightBox.top < offset.top) {
+ highlightBox.top = Math.round(offset.top)
+ }
+
+ if (highlightBox.height < height) {
+ highlightBox.height = Math.round(height)
+ }
+
+ if (highlightBox.left > offset.left) {
+ highlightBox.left = Math.round(offset.left)
+ }
+
+ var w = (offset.left - highlightBox.left) + Math.round(width)
+
+ if (highlightBox.width < w) {
+ highlightBox.width = w
+ }
+
+ } // end for
+
+// console.log("[HIGHLIGHT] Top: " + highlightBox.top + " Left: " + highlightBox.left + " Height: " + highlightBox.height + " Width: " + highlightBox.width)
+
+ $tablistHighlight.style.top = (highlightBox.top - 2) + 'px'
+ $tablistHighlight.style.left = (highlightBox.left - 2) + 'px'
+ $tablistHighlight.style.height = (highlightBox.height + 7) + 'px'
+ $tablistHighlight.style.width = (highlightBox.width + 8) + 'px'
+
+ } // end function
+
+ var $this = $(this)
+ , $prev = $this.find('[data-slide="prev"]')
+ , $next = $this.find('[data-slide="next"]')
+ , $tablist = $this.find('.carousel-indicators')
+ , $tabs = $this.find('.carousel-indicators li')
+ , $tabpanels = $this.find('.item')
+ , $tabpanel
+ , $tablistHighlight
+ , $pauseCarousel
+ , $complementaryLandmark
+ , $tab
+ , $is_paused = false
+ , offset
+ , height
+ , width
+ , i
+ , id_title = 'id_title'
+ , id_desc = 'id_desc'
+
+
+ $tablist.attr('role', 'tablist')
+
+ $tabs.focus(function() {
+ $this.carousel('pause')
+ $is_paused = true
+ $pauseCarousel.innerHTML = "Play Carousel"
+ $(this).parent().addClass('active');
+// $(this).addClass('focus')
+ setTablistHighlightBox()
+ $($tablistHighlight).addClass('focus')
+ $(this).parents('.carousel').addClass('contrast')
+ })
+
+ $tabs.blur(function(event) {
+ $(this).parent().removeClass('active');
+// $(this).removeClass('focus')
+ $($tablistHighlight).removeClass('focus')
+ $(this).parents('.carousel').removeClass('contrast')
+ })
+
+
+ for (i = 0; i < $tabpanels.length; i++) {
+ $tabpanel = $tabpanels[i]
+ $tabpanel.setAttribute('role', 'tabpanel')
+ $tabpanel.setAttribute('id', 'tabpanel-' + index + '-' + i)
+ $tabpanel.setAttribute('aria-labelledby', 'tab-' + index + '-' + i)
+ }
+
+ if (typeof $this.attr('role') !== 'string') {
+ $this.attr('role', 'complementary');
+ $this.attr('aria-labelledby', id_title);
+ $this.attr('aria-describedby', id_desc);
+ $this.prepend('
A carousel is a rotating set of images, rotation stops on keyboard focus on carousel tab controls or hovering the mouse pointer over images. Use the tabs or the previous and next buttons to change the displayed slide.
')
+ $this.prepend('
Carousel content with ' + $tabpanels.length + ' slides.
')
+ }
+
+
+ for (i = 0; i < $tabs.length; i++) {
+ $tab = $tabs[i]
+
+ $tab.setAttribute('role', 'tab')
+ $tab.setAttribute('id', 'tab-' + index + '-' + i)
+ $tab.setAttribute('aria-controls', 'tabpanel-' + index + '-' + i)
+
+ var tpId = '#tabpanel-' + index + '-' + i
+ var caption = $this.find(tpId).find('h1').text()
+
+ if ((typeof caption !== 'string') || (caption.length === 0)) caption = $this.find(tpId).text()
+ if ((typeof caption !== 'string') || (caption.length === 0)) caption = $this.find(tpId).find('h3').text()
+ if ((typeof caption !== 'string') || (caption.length === 0)) caption = $this.find(tpId).find('h4').text()
+ if ((typeof caption !== 'string') || (caption.length === 0)) caption = $this.find(tpId).find('h5').text()
+ if ((typeof caption !== 'string') || (caption.length === 0)) caption = $this.find(tpId).find('h6').text()
+ if ((typeof caption !== 'string') || (caption.length === 0)) caption = "no title";
+
+// console.log("CAPTION: " + caption )
+
+ var tabName = document.createElement('span')
+ tabName.setAttribute('class', 'sr-only')
+ tabName.innerHTML='Slide ' + (i+1)
+ if (caption) tabName.innerHTML += ": " + caption
+ $tab.appendChild(tabName)
+
+ }
+
+ // create div for focus styling of tablist
+ $tablistHighlight = document.createElement('div')
+ $tablistHighlight.className = 'carousel-tablist-highlight'
+ document.body.appendChild($tablistHighlight)
+
+ // create button for screen reader users to stop rotation of carousel
+
+ // create button for screen reader users to pause carousel for virtual mode review
+ $complementaryLandmark = document.createElement('aside')
+ $complementaryLandmark.setAttribute('class', 'carousel-aside-pause')
+ $complementaryLandmark.setAttribute('aria-label', 'carousel pause/play control')
+ $this.prepend($complementaryLandmark)
+
+ $pauseCarousel = document.createElement('button')
+ $pauseCarousel.className = "carousel-pause-button"
+ $pauseCarousel.innerHTML = "Pause Carousel"
+ $pauseCarousel.setAttribute('title', "Pause/Play carousel button can be used by screen reader users to stop carousel animations")
+ $($complementaryLandmark).append($pauseCarousel)
+
+ $($pauseCarousel).click(function() {
+ if ($is_paused) {
+ $pauseCarousel.innerHTML = "Pause Carousel"
+ $this.carousel('cycle')
+ $is_paused = false
+ }
+ else {
+ $pauseCarousel.innerHTML = "Play Carousel"
+ $this.carousel('pause')
+ $is_paused = true
+ }
+ })
+ $($pauseCarousel).focus(function() {
+ $(this).addClass('focus')
+ })
+
+ $($pauseCarousel).blur(function() {
+ $(this).removeClass('focus')
+ })
+
+ setTablistHighlightBox()
+
+ $( window ).resize(function() {
+ setTablistHighlightBox()
+ })
+
+ // Add space bar behavior to prev and next buttons for SR compatibility
+ $prev.attr('aria-label', 'Previous Slide')
+ $prev.keydown(function(e) {
+ var k = e.which || e.keyCode
+ if (/(13|32)/.test(k)) {
+ e.preventDefault()
+ e.stopPropagation()
+ $prev.trigger('click');
+ }
+ });
+
+ $prev.focus(function() {
+ $(this).parents('.carousel').addClass('contrast')
+ })
+
+ $prev.blur(function() {
+ $(this).parents('.carousel').removeClass('contrast')
+ })
+
+ $next.attr('aria-label', 'Next Slide')
+ $next.keydown(function(e) {
+ var k = e.which || e.keyCode
+ if (/(13|32)/.test(k)) {
+ e.preventDefault()
+ e.stopPropagation()
+ $next.trigger('click');
+ }
+ });
+
+ $next.focus(function() {
+ $(this).parents('.carousel').addClass('contrast')
+ })
+
+ $next.blur(function() {
+ $(this).parents('.carousel').removeClass('contrast')
+ })
+
+ $('.carousel-inner a').focus(function() {
+ $(this).parents('.carousel').addClass('contrast')
+ })
+
+ $('.carousel-inner a').blur(function() {
+ $(this).parents('.carousel').removeClass('contrast')
+ })
+
+ $tabs.each(function () {
+ var item = $(this)
+ if(item.hasClass('active')) {
+ item.attr({ 'aria-selected': 'true', 'tabindex' : '0' })
+ }else{
+ item.attr({ 'aria-selected': 'false', 'tabindex' : '-1' })
+ }
+ })
+ })
+
+ var slideCarousel = $.fn.carousel.Constructor.prototype.slide
+ $.fn.carousel.Constructor.prototype.slide = function (type, next) {
+ var $element = this.$element
+ , $active = $element.find('[role=tabpanel].active')
+ , $next = next || $active[type]()
+ , $tab
+ , $tab_count = $element.find('[role=tabpanel]').size()
+ , $prev_side = $element.find('[data-slide="prev"]')
+ , $next_side = $element.find('[data-slide="next"]')
+ , $index = 0
+ , $prev_index = $tab_count -1
+ , $next_index = 1
+ , $id
+
+ if ($next && $next.attr('id')) {
+ $id = $next.attr('id')
+ $index = $id.lastIndexOf("-")
+ if ($index >= 0) $index = parseInt($id.substring($index+1), 10)
+
+ $prev_index = $index - 1
+ if ($prev_index < 1) $prev_index = $tab_count - 1
+
+ $next_index = $index + 1
+ if ($next_index >= $tab_count) $next_index = 0
+ }
+
+ $prev_side.attr('aria-label', 'Show slide ' + ($prev_index+1) + ' of ' + $tab_count)
+ $next_side.attr('aria-label', 'Show slide ' + ($next_index+1) + ' of ' + $tab_count)
+
+
+ slideCarousel.apply(this, arguments)
+
+ $active
+ .one('bsTransitionEnd', function () {
+ var $tab
+
+ $tab = $element.find('li[aria-controls="' + $active.attr('id') + '"]')
+ if ($tab) $tab.attr({'aria-selected':false, 'tabIndex': '-1'})
+
+ $tab = $element.find('li[aria-controls="' + $next.attr('id') + '"]')
+ if ($tab) $tab.attr({'aria-selected': true, 'tabIndex': '0'})
+
+ })
+ }
+
+ var $this;
+ $.fn.carousel.Constructor.prototype.keydown = function (e) {
+
+ $this = $this || $(this)
+ if(this instanceof Node) $this = $(this)
+
+ function selectTab(index) {
+ if (index >= $tabs.length) return
+ if (index < 0) return
+
+ $carousel.carousel(index)
+ setTimeout(function () {
+ $tabs[index].focus()
+ // $this.prev().focus()
+ }, 150)
+ }
+
+ var $carousel = $(e.target).closest('.carousel')
+ , $tabs = $carousel.find('[role=tab]')
+ , k = e.which || e.keyCode
+ , index
+
+ if (!/(37|38|39|40)/.test(k)) return
+
+ index = $tabs.index($tabs.filter('.active'))
+ if (k == 37 || k == 38) { // Up
+ index--
+ selectTab(index);
+ }
+
+ if (k == 39 || k == 40) { // Down
+ index++
+ selectTab(index);
+ }
+
+ e.preventDefault()
+ e.stopPropagation()
+ }
+ $(document).on('keydown.carousel.data-api', 'li[role=tab]', $.fn.carousel.Constructor.prototype.keydown);
+
+
+ })(jQuery);
\ No newline at end of file
diff --git a/pacotes/bootstrap-accessibility-plugin/plugins/js/bootstrap-accessibility.min.js b/pacotes/bootstrap-accessibility-plugin/plugins/js/bootstrap-accessibility.min.js
new file mode 100755
index 0000000..41a37c4
--- /dev/null
+++ b/pacotes/bootstrap-accessibility-plugin/plugins/js/bootstrap-accessibility.min.js
@@ -0,0 +1,4 @@
+/*! bootstrap-accessibility-plugin - v1.0.5 - 2016-07-19
+* https://github.com/paypal/bootstrap-accessibility-plugin
+* Copyright (c) 2016 PayPal Accessibility Team; Licensed BSD */
+!function($){"use strict";var uniqueId=function(prefix){return(prefix||"ui-id")+"-"+Math.floor(1e3*Math.random()+1)},focusable=function(element,isTabIndexNotNaN){var map,mapName,img,nodeName=element.nodeName.toLowerCase();return"area"===nodeName?(map=element.parentNode,mapName=map.name,element.href&&mapName&&"map"===map.nodeName.toLowerCase()?(img=$("img[usemap='#"+mapName+"']")[0],!!img&&visible(img)):!1):(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"===nodeName?element.href||isTabIndexNotNaN:isTabIndexNotNaN)&&visible(element)},visible=function(element){return $.expr.filters.visible(element)&&!$(element).parents().addBack().filter(function(){return"hidden"===$.css(this,"visibility")}).length};$.extend($.expr[":"],{data:$.expr.createPseudo?$.expr.createPseudo(function(dataName){return function(elem){return!!$.data(elem,dataName)}}):function(elem,i,match){return!!$.data(elem,match[3])},focusable:function(element){return focusable(element,!isNaN($.attr(element,"tabindex")))},tabbable:function(element){var tabIndex=$.attr(element,"tabindex"),isTabIndexNaN=isNaN(tabIndex);return(isTabIndexNaN||tabIndex>=0)&&focusable(element,!isTabIndexNaN)}}),$(".modal-dialog").attr({role:"document"});var modalhide=$.fn.modal.Constructor.prototype.hide;$.fn.modal.Constructor.prototype.hide=function(){modalhide.apply(this,arguments),$(document).off("keydown.bs.modal")};var modalfocus=$.fn.modal.Constructor.prototype.enforceFocus;$.fn.modal.Constructor.prototype.enforceFocus=function(){var $content=this.$element.find(".modal-content"),focEls=$content.find(":tabbable"),$lastEl=$(focEls[focEls.length-1]),$firstEl=$(focEls[0]);$lastEl.on("keydown.bs.modal",$.proxy(function(ev){9!==ev.keyCode||ev.shiftKey|ev.ctrlKey|ev.metaKey|ev.altKey||(ev.preventDefault(),$firstEl.focus())},this)),$firstEl.on("keydown.bs.modal",$.proxy(function(ev){9===ev.keyCode&&ev.shiftKey&&(ev.preventDefault(),$lastEl.focus())},this)),modalfocus.apply(this,arguments)};var $par,firstItem,toggle="[data-toggle=dropdown]",focusDelay=200,menus=$(toggle).parent().find("ul").attr("role","menu"),lis=menus.find("li").attr("role","presentation");lis.find("a").attr({role:"menuitem",tabIndex:"-1"}),$(toggle).attr({"aria-haspopup":"true","aria-expanded":"false"}),$(toggle).parent().on("shown.bs.dropdown",function(e){$par=$(this);var $toggle=$par.find(toggle);$toggle.attr("aria-expanded","true"),$toggle.on("keydown.bs.dropdown",$.proxy(function(ev){setTimeout(function(){firstItem=$(".dropdown-menu [role=menuitem]:visible",$par)[0];try{firstItem.focus()}catch(ex){}},focusDelay)},this))}).on("hidden.bs.dropdown",function(e){$par=$(this);var $toggle=$par.find(toggle);$toggle.attr("aria-expanded","false")}),$(document).on("focusout.dropdown.data-api",".dropdown-menu",function(e){var $this=$(this),that=this;$this.parent().hasClass("open")&&setTimeout(function(){$.contains(that,document.activeElement)||$this.parent().find("[data-toggle=dropdown]").dropdown("toggle")},150)}).on("keydown.bs.dropdown.data-api",toggle+", [role=menu]",$.fn.dropdown.Constructor.prototype.keydown);var $tablist=$(".nav-tabs, .nav-pills"),$lis=$tablist.children("li"),$tabs=$tablist.find('[data-toggle="tab"], [data-toggle="pill"]');$tabs&&($tablist.attr("role","tablist"),$lis.attr("role","presentation"),$tabs.attr("role","tab")),$tabs.each(function(index){var tabpanel=$($(this).attr("href")),tab=$(this),tabid=tab.attr("id")||uniqueId("ui-tab");tab.attr("id",tabid),tab.parent().hasClass("active")?(tab.attr({tabIndex:"0","aria-selected":"true","aria-controls":tab.attr("href").substr(1)}),tabpanel.attr({role:"tabpanel",tabIndex:"0","aria-hidden":"false","aria-labelledby":tabid})):(tab.attr({tabIndex:"-1","aria-selected":"false","aria-controls":tab.attr("href").substr(1)}),tabpanel.attr({role:"tabpanel",tabIndex:"-1","aria-hidden":"true","aria-labelledby":tabid}))}),$.fn.tab.Constructor.prototype.keydown=function(e){var $items,index,$this=$(this),$ul=$this.closest("ul[role=tablist] "),k=e.which||e.keyCode;if($this=$(this),/(37|38|39|40)/.test(k)){$items=$ul.find("[role=tab]:visible"),index=$items.index($items.filter(":focus")),(38==k||37==k)&&index--,(39==k||40==k)&&index++,0>index&&(index=$items.length-1),index==$items.length&&(index=0);var nextTab=$items.eq(index);"tab"===nextTab.attr("role")&&nextTab.tab("show").focus(),e.preventDefault(),e.stopPropagation()}},$(document).on("keydown.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',$.fn.tab.Constructor.prototype.keydown);var tabactivate=$.fn.tab.Constructor.prototype.activate;$.fn.tab.Constructor.prototype.activate=function(element,container,callback){var $active=container.find("> .active");$active.find("[data-toggle=tab], [data-toggle=pill]").attr({tabIndex:"-1","aria-selected":!1}),$active.filter(".tab-pane").attr({"aria-hidden":!0,tabIndex:"-1"}),tabactivate.apply(this,arguments),element.addClass("active"),element.find("[data-toggle=tab], [data-toggle=pill]").attr({tabIndex:"0","aria-selected":!0}),element.filter(".tab-pane").attr({"aria-hidden":!1,tabIndex:"0"})};var $colltabs=$('[data-toggle="collapse"]');$colltabs.each(function(index){var colltab=$(this),collpanel=$(colltab.attr("data-target")?colltab.attr("data-target"):colltab.attr("href")),parent=colltab.attr("data-parent"),collparent=parent&&$(parent),collid=colltab.attr("id")||uniqueId("ui-collapse");colltab.attr("id",collid),collparent&&(colltab.attr({role:"tab","aria-selected":"false","aria-expanded":"false"}),$(collparent).find("div:not(.collapse,.panel-body), h4").attr("role","presentation"),collparent.attr({role:"tablist","aria-multiselectable":"true"}),collpanel.hasClass("in")?(colltab.attr({"aria-controls":collpanel.attr("id"),"aria-selected":"true","aria-expanded":"true",tabindex:"0"}),collpanel.attr({role:"tabpanel",tabindex:"0","aria-labelledby":collid,"aria-hidden":"false"})):(colltab.attr({"aria-controls":collpanel.attr("id"),tabindex:"-1"}),collpanel.attr({role:"tabpanel",tabindex:"-1","aria-labelledby":collid,"aria-hidden":"true"})))});var collToggle=$.fn.collapse.Constructor.prototype.toggle;$.fn.collapse.Constructor.prototype.toggle=function(){var href,prevTab=this.$parent&&this.$parent.find('[aria-expanded="true"]');if(prevTab){var curTab,prevPanel=prevTab.attr("data-target")||(href=prevTab.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,""),$prevPanel=$(prevPanel),$curPanel=this.$element;this.$parent;this.$parent&&(curTab=this.$parent.find('[data-toggle=collapse][href="#'+this.$element.attr("id")+'"]')),collToggle.apply(this,arguments),$.support.transition&&this.$element.one($.support.transition.end,function(){prevTab.attr({"aria-selected":"false","aria-expanded":"false",tabIndex:"-1"}),$prevPanel.attr({"aria-hidden":"true",tabIndex:"-1"}),curTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:"0"}),$curPanel.hasClass("in")?$curPanel.attr({"aria-hidden":"false",tabIndex:"0"}):(curTab.attr({"aria-selected":"false","aria-expanded":"false"}),$curPanel.attr({"aria-hidden":"true",tabIndex:"-1"}))})}else collToggle.apply(this,arguments)},$.fn.collapse.Constructor.prototype.keydown=function(e){var $items,index,$this=$(this),$tablist=$this.closest("div[role=tablist] "),k=e.which||e.keyCode;$this=$(this),/(32|37|38|39|40)/.test(k)&&(32==k&&$this.click(),$items=$tablist.find("[role=tab]"),index=$items.index($items.filter(":focus")),(38==k||37==k)&&index--,(39==k||40==k)&&index++,0>index&&(index=$items.length-1),index==$items.length&&(index=0),$items.eq(index).focus(),e.preventDefault(),e.stopPropagation())},$(document).on("keydown.collapse.data-api",'[data-toggle="collapse"]',$.fn.collapse.Constructor.prototype.keydown),$(".carousel").each(function(index){function setTablistHighlightBox(){var $tab,offset,height,width,highlightBox={};highlightBox.top=0,highlightBox.left=32e3,highlightBox.height=0,highlightBox.width=0;for(var i=0;i<$tabs.length;i++){$tab=$tabs[i],offset=$($tab).offset(),height=$($tab).height(),width=$($tab).width(),highlightBox.topoffset.left&&(highlightBox.left=Math.round(offset.left));var w=offset.left-highlightBox.left+Math.round(width);highlightBox.widthA carousel is a rotating set of images, rotation stops on keyboard focus on carousel tab controls or hovering the mouse pointer over images. Use the tabs or the previous and next buttons to change the displayed slide.
'),$this.prepend('
Carousel content with '+$tabpanels.length+" slides.
")),i=0;i<$tabs.length;i++){$tab=$tabs[i],$tab.setAttribute("role","tab"),$tab.setAttribute("id","tab-"+index+"-"+i),$tab.setAttribute("aria-controls","tabpanel-"+index+"-"+i);var tpId="#tabpanel-"+index+"-"+i,caption=$this.find(tpId).find("h1").text();("string"!=typeof caption||0===caption.length)&&(caption=$this.find(tpId).text()),("string"!=typeof caption||0===caption.length)&&(caption=$this.find(tpId).find("h3").text()),("string"!=typeof caption||0===caption.length)&&(caption=$this.find(tpId).find("h4").text()),("string"!=typeof caption||0===caption.length)&&(caption=$this.find(tpId).find("h5").text()),("string"!=typeof caption||0===caption.length)&&(caption=$this.find(tpId).find("h6").text()),("string"!=typeof caption||0===caption.length)&&(caption="no title");var tabName=document.createElement("span");tabName.setAttribute("class","sr-only"),tabName.innerHTML="Slide "+(i+1),caption&&(tabName.innerHTML+=": "+caption),$tab.appendChild(tabName)}$tablistHighlight=document.createElement("div"),$tablistHighlight.className="carousel-tablist-highlight",document.body.appendChild($tablistHighlight),$complementaryLandmark=document.createElement("aside"),$complementaryLandmark.setAttribute("class","carousel-aside-pause"),$complementaryLandmark.setAttribute("aria-label","carousel pause/play control"),$this.prepend($complementaryLandmark),$pauseCarousel=document.createElement("button"),$pauseCarousel.className="carousel-pause-button",$pauseCarousel.innerHTML="Pause Carousel",$pauseCarousel.setAttribute("title","Pause/Play carousel button can be used by screen reader users to stop carousel animations"),$($complementaryLandmark).append($pauseCarousel),$($pauseCarousel).click(function(){$is_paused?($pauseCarousel.innerHTML="Pause Carousel",$this.carousel("cycle"),$is_paused=!1):($pauseCarousel.innerHTML="Play Carousel",$this.carousel("pause"),$is_paused=!0)}),$($pauseCarousel).focus(function(){$(this).addClass("focus")}),$($pauseCarousel).blur(function(){$(this).removeClass("focus")}),setTablistHighlightBox(),$(window).resize(function(){setTablistHighlightBox()}),$prev.attr("aria-label","Previous Slide"),$prev.keydown(function(e){var k=e.which||e.keyCode;/(13|32)/.test(k)&&(e.preventDefault(),e.stopPropagation(),$prev.trigger("click"))}),$prev.focus(function(){$(this).parents(".carousel").addClass("contrast")}),$prev.blur(function(){$(this).parents(".carousel").removeClass("contrast")}),$next.attr("aria-label","Next Slide"),$next.keydown(function(e){var k=e.which||e.keyCode;/(13|32)/.test(k)&&(e.preventDefault(),e.stopPropagation(),$next.trigger("click"))}),$next.focus(function(){$(this).parents(".carousel").addClass("contrast")}),$next.blur(function(){$(this).parents(".carousel").removeClass("contrast")}),$(".carousel-inner a").focus(function(){$(this).parents(".carousel").addClass("contrast")}),$(".carousel-inner a").blur(function(){$(this).parents(".carousel").removeClass("contrast")}),$tabs.each(function(){var item=$(this);item.hasClass("active")?item.attr({"aria-selected":"true",tabindex:"0"}):item.attr({"aria-selected":"false",tabindex:"-1"})})});var slideCarousel=$.fn.carousel.Constructor.prototype.slide;$.fn.carousel.Constructor.prototype.slide=function(type,next){var $id,$element=this.$element,$active=$element.find("[role=tabpanel].active"),$next=next||$active[type](),$tab_count=$element.find("[role=tabpanel]").size(),$prev_side=$element.find('[data-slide="prev"]'),$next_side=$element.find('[data-slide="next"]'),$index=0,$prev_index=$tab_count-1,$next_index=1;$next&&$next.attr("id")&&($id=$next.attr("id"),$index=$id.lastIndexOf("-"),$index>=0&&($index=parseInt($id.substring($index+1),10)),$prev_index=$index-1,1>$prev_index&&($prev_index=$tab_count-1),$next_index=$index+1,$next_index>=$tab_count&&($next_index=0)),$prev_side.attr("aria-label","Show slide "+($prev_index+1)+" of "+$tab_count),$next_side.attr("aria-label","Show slide "+($next_index+1)+" of "+$tab_count),slideCarousel.apply(this,arguments),$active.one("bsTransitionEnd",function(){var $tab;$tab=$element.find('li[aria-controls="'+$active.attr("id")+'"]'),$tab&&$tab.attr({"aria-selected":!1,tabIndex:"-1"}),$tab=$element.find('li[aria-controls="'+$next.attr("id")+'"]'),$tab&&$tab.attr({"aria-selected":!0,tabIndex:"0"})})};var $this;$.fn.carousel.Constructor.prototype.keydown=function(e){function selectTab(index){index>=$tabs.length||0>index||($carousel.carousel(index),setTimeout(function(){$tabs[index].focus()},150))}$this=$this||$(this),this instanceof Node&&($this=$(this));var index,$carousel=$(e.target).closest(".carousel"),$tabs=$carousel.find("[role=tab]"),k=e.which||e.keyCode;/(37|38|39|40)/.test(k)&&(index=$tabs.index($tabs.filter(".active")),(37==k||38==k)&&(index--,selectTab(index)),(39==k||40==k)&&(index++,selectTab(index)),e.preventDefault(),e.stopPropagation())},$(document).on("keydown.carousel.data-api","li[role=tab]",$.fn.carousel.Constructor.prototype.keydown)}(jQuery);
\ No newline at end of file
--
libgit2 0.21.2