From 52c4c8b4715f3fe4c364e23e6b6d10e17aaed391 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Tue, 14 Jan 2014 00:07:40 +0000 Subject: [PATCH] $1 --- ferramentas/saiku/esquemaxml.php | 77 ++++++++++++++++++++++++++++++++++++++++++----------------------------------- ferramentas/saiku/saiku-server/tomcat/webapps/WEB-INF/classes/saiku.properties | 15 +++++++++++++++ mashups/openlayers.js | 8 ++++---- mashups/openlayers_compacto.js | 8 ++++---- mashups/openlayers_compacto.js.php | 8 ++++---- 5 files changed, 69 insertions(+), 47 deletions(-) create mode 100755 ferramentas/saiku/saiku-server/tomcat/webapps/WEB-INF/classes/saiku.properties diff --git a/ferramentas/saiku/esquemaxml.php b/ferramentas/saiku/esquemaxml.php index 2d7ac3a..f52891c 100644 --- a/ferramentas/saiku/esquemaxml.php +++ b/ferramentas/saiku/esquemaxml.php @@ -115,16 +115,25 @@ $xml .= " "; +//as dimensoes sao duplicadas +//uma delas contem o geocodigo que permite a geracao do mapa +$xml1 = ""; +$xml2 = ""; foreach($regioes as $regiao){ $caminho = $m->hierarquiaPath($regiao["codigo_tipo_regiao"]); - $xml .= " + $xml1 .= " "; + $xml2 .= " + + + "; //cria uma view juntando as tabelas da hierarquia de regioes $n = count($caminho); $colunas = array(); - $niveis = array(); + $niveis1 = array(); + $niveis2 = array(); $sql = "SELECT __COLUNAS__ FROM {$regiao['esquemadb']}.{$regiao['tabela']} AS regiao "; $colunas[] = "regiao.{$regiao['identificador']} AS codigo "; $colunas[] = "regiao.{$regiao['colunanomeregiao']} AS nome"; @@ -137,16 +146,26 @@ foreach($regioes as $regiao){ AS j$i ON j$i.{$r['identificador']}::text = {$tabelaAnt}.{$r['identificador']}::text "; $tabelaAnt = "j".$i; - $niveis[] = " + $niveis1[] = " "; + $niveis2[] = " + + "; } - $niveis[] = " + $niveis1[] = " + nameColumn='nome' uniqueMembers='true' /> + "; + $niveis2[] = " + "; //verifica outras colunas $vis = $regiao['colunasvisiveis']; @@ -169,10 +188,15 @@ foreach($regioes as $regiao){ $sql .= " WHERE regiao.".$rs["sql"]; } - $xml .= " + $xml1 .= " $sql "; - $xml .= implode(" ",$niveis); + $xml2 .= " + $sql + "; + $xml1 .= implode(" ",$niveis1); + $xml2 .= implode(" ",$niveis2); + /* //verifica se existem propriedades (colunas adicionais) if($vis != ""){ //apelidos @@ -193,13 +217,17 @@ foreach($regioes as $regiao){ "; } } - //fecha os elementos. LEVEL deve ser fechado pois o ultimo recebe as propriedades - $xml .= " - + */ + $xml1 .= " + + + "; + $xml2 .= " "; } +$xml .= $xml1.$xml2; //junta as medidas conforme o nome da tabela utilizada $medidas = $m->listaMedidaVariavel(); $tbs = array(); @@ -223,6 +251,9 @@ foreach($tbs as $tb){ $VirtualCubeDimension[] = " "; + $VirtualCubeDimension[] = " + + "; //verifica as dimensoes do tipo tempo $dimTempo = array(); foreach($tb as $medida){ @@ -233,30 +264,6 @@ foreach($tbs as $tb){ if($parametro["tipo"] < 5){ $parComposto[] = $parametro["coluna"]; } - /* - if($parametro["tipo"] == 1){ - if(count($parametros) == 1){ - $VirtualCubeDimension[] = " - - "; - $dimTempo[] = " - - "; - } - $parComposto[] = $parametro["coluna"]; - } - if($parametro["tipo"] == 2){ - $parComposto[] = $parametro["coluna"]; - if(count($parametros) == 2){ - $VirtualCubeDimension[] = " - - "; - $dimTempo[] = " - - "; - } - } - */ } $VirtualCubeDimension[] = " @@ -264,7 +271,6 @@ foreach($tbs as $tb){ $dimTempo[] = " "; - //echo "
";var_dump($parametro);exit;
 	}
 	$xml .= "
 	";
@@ -275,6 +281,7 @@ foreach($tbs as $tb){
 	$xml .= "
 		$sql
 			
+			
 	";
 
 	$xml .= implode(" ",array_unique($dimTempo));
diff --git a/ferramentas/saiku/saiku-server/tomcat/webapps/WEB-INF/classes/saiku.properties b/ferramentas/saiku/saiku-server/tomcat/webapps/WEB-INF/classes/saiku.properties
new file mode 100755
index 0000000..b5242fe
--- /dev/null
+++ b/ferramentas/saiku/saiku-server/tomcat/webapps/WEB-INF/classes/saiku.properties
@@ -0,0 +1,15 @@
+# SAIKU PROPERTIES
+
+
+saiku.olap.nonempty = true
+saiku.web.export.csv.name = saiku-export
+saiku.web.export.excel.name = saiku-export
+saiku.web.export.excel.format = xlsx
+saiku.web.export.excel.numberformat=#.##0,00
+
+saiku.format.numberformat=#.##0,00
+
+# SET FIXED LOCALE, otherwise JVM locale
+#saiku.format.default.locale=de_AT
+#saiku.format.default.locale=en
+#saiku.format.default.locale=lt
\ No newline at end of file
diff --git a/mashups/openlayers.js b/mashups/openlayers.js
index 91eb0f3..05aff3d 100755
--- a/mashups/openlayers.js
+++ b/mashups/openlayers.js
@@ -1601,10 +1601,10 @@ i3GEO.editorOL = {
 			}
 		}
 		YAHOO.editorOL.container.panel.show();
-		if(i3GEO.configura)
-		{$i("panelpropriedadesEditor").getElementsByTagName("div")[2].style.overflow = "auto";}
-		else
-		{$i("panelpropriedadesEditor").getElementsByTagName("div")[1].style.overflow = "auto";}
+		temp = $i("panelpropriedadesEditor").getElementsByTagName("div")
+		if(temp && temp[2]){
+			temp[2].style.overflow = "auto";
+		}
 	},
 	listaGeometrias: function(){
 		if(!document.getElementById("panellistagEditor")){
diff --git a/mashups/openlayers_compacto.js b/mashups/openlayers_compacto.js
index 1844c1c..82f06ec 100644
--- a/mashups/openlayers_compacto.js
+++ b/mashups/openlayers_compacto.js
@@ -4606,10 +4606,10 @@ temp.onclick = function(){i3GEO.janela.minimiza("panelpropriedadesEditor");};
 }
 }
 YAHOO.editorOL.container.panel.show();
-if(i3GEO.configura)
-{$i("panelpropriedadesEditor").getElementsByTagName("div")[2].style.overflow = "auto";}
-else
-{$i("panelpropriedadesEditor").getElementsByTagName("div")[1].style.overflow = "auto";}
+temp = $i("panelpropriedadesEditor").getElementsByTagName("div")
+if(temp && temp[2]){
+temp[2].style.overflow = "auto";
+}
 },
 listaGeometrias: function(){
 if(!document.getElementById("panellistagEditor")){
diff --git a/mashups/openlayers_compacto.js.php b/mashups/openlayers_compacto.js.php
index fa13849..0c9c73a 100644
--- a/mashups/openlayers_compacto.js.php
+++ b/mashups/openlayers_compacto.js.php
@@ -4606,10 +4606,10 @@ temp.onclick = function(){i3GEO.janela.minimiza("panelpropriedadesEditor");};
 }
 }
 YAHOO.editorOL.container.panel.show();
-if(i3GEO.configura)
-{$i("panelpropriedadesEditor").getElementsByTagName("div")[2].style.overflow = "auto";}
-else
-{$i("panelpropriedadesEditor").getElementsByTagName("div")[1].style.overflow = "auto";}
+temp = $i("panelpropriedadesEditor").getElementsByTagName("div")
+if(temp && temp[2]){
+temp[2].style.overflow = "auto";
+}
 },
 listaGeometrias: function(){
 if(!document.getElementById("panellistagEditor")){
--
libgit2 0.21.2