Commit ff9ce555ba1adbed570e3761df86a2cfbd93037e

Authored by Edmar Moretti
1 parent 2ffcdf80

Permissão para edição da legenda de temas do tipo gráfico

admin/admin.db
No preview for this file type
classesjs/classe_arvoredecamadas.js
@@ -938,7 +938,7 @@ i3GEO.arvoreDeCamadas = { @@ -938,7 +938,7 @@ i3GEO.arvoreDeCamadas = {
938 i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node); 938 i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node);
939 } 939 }
940 } 940 }
941 - if (ltema.type < 4 && funcoes.editorlegenda === true){ 941 + if ((ltema.type < 4 || ltema.type === 8) && funcoes.editorlegenda === true){
942 i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node); 942 i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node);
943 } 943 }
944 if(funcoes.destacar === true && i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth" && i3GEO.Interface.ATUAL !== "flamingo"){ 944 if(funcoes.destacar === true && i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth" && i3GEO.Interface.ATUAL !== "flamingo"){
@@ -1429,6 +1429,7 @@ i3GEO.arvoreDeCamadas = { @@ -1429,6 +1429,7 @@ i3GEO.arvoreDeCamadas = {
1429 var novon = novo.length,i; 1429 var novon = novo.length,i;
1430 if(novon !== atual.length) 1430 if(novon !== atual.length)
1431 {return (false);} 1431 {return (false);}
  1432 +
1432 for (i=0;i<novon;i += 1){ 1433 for (i=0;i<novon;i += 1){
1433 if(novo[i].name !== atual[i].name) 1434 if(novo[i].name !== atual[i].name)
1434 {return (false);} 1435 {return (false);}
@@ -1460,17 +1461,17 @@ i3GEO.arvoreDeCamadas = { @@ -1460,17 +1461,17 @@ i3GEO.arvoreDeCamadas = {
1460 */ 1461 */
1461 pegaTema: function(idtema,camadas){ 1462 pegaTema: function(idtema,camadas){
1462 if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.pegaTema()");} 1463 if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.pegaTema()");}
1463 - var i,c,  
1464 - v = ""; 1464 + var i;
1465 if(!camadas) 1465 if(!camadas)
1466 {camadas = i3GEO.arvoreDeCamadas.CAMADAS;} 1466 {camadas = i3GEO.arvoreDeCamadas.CAMADAS;}
1467 - c = camadas.length;  
1468 - for (i=0; i<c; i += 1){ 1467 + i = camadas.length;
  1468 + while(i > 0){
  1469 + i -= 1;
1469 if(camadas[i].name === idtema){ 1470 if(camadas[i].name === idtema){
1470 - v = camadas[i]; 1471 + return camadas[i];
1471 } 1472 }
1472 - }  
1473 - return v; 1473 + }
  1474 + return false;
1474 }, 1475 },
1475 /* 1476 /*
1476 Function: filtraCamadas 1477 Function: filtraCamadas
classesjs/classe_configura.js
@@ -189,6 +189,7 @@ i3GEO.configura = { @@ -189,6 +189,7 @@ i3GEO.configura = {
189 { id:"omenudataFerramentas5b",text: $trad("t29"), url: "javascript:i3GEO.tema.dialogo.filtro()"}, 189 { id:"omenudataFerramentas5b",text: $trad("t29"), url: "javascript:i3GEO.tema.dialogo.filtro()"},
190 { id:"omenudataFerramentas6b",text: $trad("t33"), url: "javascript:i3GEO.tema.dialogo.editaLegenda()"}, 190 { id:"omenudataFerramentas6b",text: $trad("t33"), url: "javascript:i3GEO.tema.dialogo.editaLegenda()"},
191 { id:"omenudataFerramentas7b",text: $trad("t42"), url: "javascript:i3GEO.tema.dialogo.cortina()"}, 191 { id:"omenudataFerramentas7b",text: $trad("t42"), url: "javascript:i3GEO.tema.dialogo.cortina()"},
  192 + { id:"omenudataFerramentas8b",text: $trad("t37"), url: "javascript:i3GEO.tema.dialogo.graficotema()"},
192 { id:"omenudataFerramentas0c",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("a15")+'</b></span>',url: "#"}, 193 { id:"omenudataFerramentas0c",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("a15")+'</b></span>',url: "#"},
193 { id:"omenudataFerramentas1c",text: $trad("a16"), url: "javascript:i3GEO.arvoreDeTemas.dialogo.conectaservico()"}, 194 { id:"omenudataFerramentas1c",text: $trad("a16"), url: "javascript:i3GEO.arvoreDeTemas.dialogo.conectaservico()"},
194 { id:"omenudataFerramentas0d",text: '<span style=color:gray;text-decoration:underline; ><b>Upload</b></span>',url: "#"}, 195 { id:"omenudataFerramentas0d",text: '<span style=color:gray;text-decoration:underline; ><b>Upload</b></span>',url: "#"},
classesjs/classe_eventos.js
@@ -512,20 +512,22 @@ i3GEO.eventos = { @@ -512,20 +512,22 @@ i3GEO.eventos = {
512 if (g_tipoacao !== "capturaponto"){return;} 512 if (g_tipoacao !== "capturaponto"){return;}
513 else{ 513 else{
514 try{ 514 try{
515 - x = objposicaocursor.dmsx.split(" ");  
516 - y = objposicaocursor.dmsy.split(" ");  
517 - if (doc.getElementById(ixg))  
518 - {doc.getElementById(ixg).value = x[0];}  
519 - if (doc.getElementById(ixm))  
520 - {doc.getElementById(ixm).value = x[1];}  
521 - if (doc.getElementById(ixs))  
522 - {doc.getElementById(ixs).value = x[2];}  
523 - if (doc.getElementById(iyg))  
524 - {doc.getElementById(iyg).value = y[0];}  
525 - if (doc.getElementById(iym))  
526 - {doc.getElementById(iym).value = y[1];}  
527 - if (doc.getElementById(iys))  
528 - {doc.getElementById(iys).value = y[2];} 515 + if(doc){
  516 + x = objposicaocursor.dmsx.split(" ");
  517 + y = objposicaocursor.dmsy.split(" ");
  518 + if (doc.getElementById(ixg))
  519 + {doc.getElementById(ixg).value = x[0];}
  520 + if (doc.getElementById(ixm))
  521 + {doc.getElementById(ixm).value = x[1];}
  522 + if (doc.getElementById(ixs))
  523 + {doc.getElementById(ixs).value = x[2];}
  524 + if (doc.getElementById(iyg))
  525 + {doc.getElementById(iyg).value = y[0];}
  526 + if (doc.getElementById(iym))
  527 + {doc.getElementById(iym).value = y[1];}
  528 + if (doc.getElementById(iys))
  529 + {doc.getElementById(iys).value = y[2];}
  530 + }
529 } 531 }
530 catch(m){ 532 catch(m){
531 if(typeof(console) !== 'undefined'){console.error(m);} 533 if(typeof(console) !== 'undefined'){console.error(m);}
classesjs/classe_janela.js
@@ -805,7 +805,10 @@ i3GEO.janela = { @@ -805,7 +805,10 @@ i3GEO.janela = {
805 c.style.position = "relative"; 805 c.style.position = "relative";
806 c.style.fontSize = "10px"; 806 c.style.fontSize = "10px";
807 c.style.color = "#686868"; 807 c.style.color = "#686868";
808 - c.value = i3GEOF[ferramenta].tema; 808 + if(i3GEO.temaAtivo !== "")
  809 + {c.value = i3GEO.temaAtivo;}
  810 + if(i3GEOF[ferramenta].tema)
  811 + {c.value = i3GEOF[ferramenta].tema;}
809 if(c.value === ""){ 812 if(c.value === ""){
810 i3GEOF[ferramenta].tema = ""; 813 i3GEOF[ferramenta].tema = "";
811 $i("i3GEOF."+ferramenta+"_corpo").innerHTML = ""; 814 $i("i3GEOF."+ferramenta+"_corpo").innerHTML = "";
classesjs/classe_mapa.js
@@ -73,7 +73,7 @@ i3GEO.mapa = { @@ -73,7 +73,7 @@ i3GEO.mapa = {
73 var temp,Dw,Dh, r = false; 73 var temp,Dw,Dh, r = false;
74 Dw = YAHOO.util.Dom.getViewportWidth(); 74 Dw = YAHOO.util.Dom.getViewportWidth();
75 Dh = YAHOO.util.Dom.getViewportHeight(); 75 Dh = YAHOO.util.Dom.getViewportHeight();
76 - if(typeof(console) !== 'undefined'){console.info(Dw+" "+Dh+" "+i3GEO.tamanhodoc);} 76 +
77 if(Math.abs(Dw - i3GEO.tamanhodoc[0]) > 50){ 77 if(Math.abs(Dw - i3GEO.tamanhodoc[0]) > 50){
78 r = true; 78 r = true;
79 } 79 }
classesjs/classe_util.js
@@ -1491,7 +1491,7 @@ i3GEO.util = { @@ -1491,7 +1491,7 @@ i3GEO.util = {
1491 {nome = "";} 1491 {nome = "";}
1492 if (arguments.length < 5) 1492 if (arguments.length < 5)
1493 {multiplo = false;} 1493 {multiplo = false;}
1494 - var monta, lista, temp; 1494 + var monta, lista, temp, temp1, temp2;
1495 monta = function(retorno){ 1495 monta = function(retorno){
1496 var i,comboTemas,temp,n,nome; 1496 var i,comboTemas,temp,n,nome;
1497 if (retorno !== undefined) 1497 if (retorno !== undefined)
@@ -1542,7 +1542,9 @@ i3GEO.util = { @@ -1542,7 +1542,9 @@ i3GEO.util = {
1542 if(tipoCombo === "ligadosComTabela"){ 1542 if(tipoCombo === "ligadosComTabela"){
1543 if(i3GEO.arvoreDeCamadas.CAMADAS !== ""){ 1543 if(i3GEO.arvoreDeCamadas.CAMADAS !== ""){
1544 temp = i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS); 1544 temp = i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);
1545 - monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp)); 1545 + temp1 = i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);
  1546 + temp2 = i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);
  1547 + monta(temp1.concat(temp2));
1546 } 1548 }
1547 else 1549 else
1548 {i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid);} 1550 {i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid);}
classesphp/classe_temas.php
@@ -892,7 +892,7 @@ lista - lista de item e cores de cada parte do grafico @@ -892,7 +892,7 @@ lista - lista de item e cores de cada parte do grafico
892 $novolayer = ms_newLayerObj($this->mapa, $this->layer); 892 $novolayer = ms_newLayerObj($this->mapa, $this->layer);
893 $nomer = nomeRandomico(); 893 $nomer = nomeRandomico();
894 $novolayer->set("name",$nomer); 894 $novolayer->set("name",$nomer);
895 - //$novolayer->set("group",$nomer); 895 + $novolayer->set("group","");
896 $novolayer->set("type",MS_LAYER_CHART); 896 $novolayer->set("type",MS_LAYER_CHART);
897 $novolayer->setprocessing("CHART_TYPE=$tipo"); 897 $novolayer->setprocessing("CHART_TYPE=$tipo");
898 $novolayer->setprocessing("CHART_SIZE=$tamanho"); 898 $novolayer->setprocessing("CHART_SIZE=$tamanho");
ferramentas/graficotema/index.js.php
@@ -59,6 +59,11 @@ i3GEOF.graficoTema = { @@ -59,6 +59,11 @@ i3GEOF.graficoTema = {
59 iddiv {String} - id do div que receberá o conteudo HTML da ferramenta 59 iddiv {String} - id do div que receberá o conteudo HTML da ferramenta
60 */ 60 */
61 inicia: function(iddiv){ 61 inicia: function(iddiv){
  62 + i3GEO.janela.comboCabecalhoTemas("i3GEOFgraficotemaComboCabeca","i3GEOFgraficotemaComboCabecaSel","graficoTema","ligadosComTabela");
  63 + if(i3GEO.temaAtivo === ""){
  64 + $i(iddiv).innerHTML = "Escolha um tema na lista mostrada no cabeçalho";
  65 + return;
  66 + }
62 try{ 67 try{
63 $i(iddiv).innerHTML += i3GEOF.graficoTema.html(); 68 $i(iddiv).innerHTML += i3GEOF.graficoTema.html();
64 i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficotemaguia1","i3GEOgraficotemaguia"); 69 i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficotemaguia1","i3GEOgraficotemaguia");
@@ -148,8 +153,12 @@ i3GEOF.graficoTema = { @@ -148,8 +153,12 @@ i3GEOF.graficoTema = {
148 */ 153 */
149 criaJanelaFlutuante: function(){ 154 criaJanelaFlutuante: function(){
150 var minimiza,cabecalho,janela,divid,temp,titulo; 155 var minimiza,cabecalho,janela,divid,temp,titulo;
  156 + if($i("i3GEOF.graficoTema")){
  157 + i3GEOF.graficoTema.inicia("i3GEOF.graficoTema_corpo");
  158 + return;
  159 + }
151 //cria a janela flutuante 160 //cria a janela flutuante
152 - titulo = "Graficos <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=8&idajuda=40' >&nbsp;&nbsp;&nbsp;</a>"; 161 + titulo = "<div style='z-index:1;position:absolute' id='i3GEOFgraficotemaComboCabeca' >------</div>&nbsp;&nbsp;&nbsp;Graficos <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=8&idajuda=40' >&nbsp;&nbsp;&nbsp;</a>";
153 janela = i3GEO.janela.cria( 162 janela = i3GEO.janela.cria(
154 "400px", 163 "400px",
155 "320px", 164 "320px",
@@ -165,6 +174,11 @@ i3GEOF.graficoTema = { @@ -165,6 +174,11 @@ i3GEOF.graficoTema = {
165 i3GEOF.graficoTema.aguarde = $i("i3GEOF.graficoTema_imagemCabecalho").style; 174 i3GEOF.graficoTema.aguarde = $i("i3GEOF.graficoTema_imagemCabecalho").style;
166 $i("i3GEOF.graficoTema_corpo").style.backgroundColor = "white"; 175 $i("i3GEOF.graficoTema_corpo").style.backgroundColor = "white";
167 i3GEOF.graficoTema.inicia(divid); 176 i3GEOF.graficoTema.inicia(divid);
  177 + temp = function(){
  178 + if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search('i3GEO.janela.comboCabecalhoTemas("i3GEOFgraficotemaComboCabeca","i3GEOFgraficotemaComboCabecaSel","tabela","ligadosComTabela")') > 0)
  179 + {i3GEO.eventos.ATUALIZAARVORECAMADAS.remove('i3GEO.janela.comboCabecalhoTemas("i3GEOFgraficotemaComboCabeca","i3GEOFgraficotemaComboCabecaSel","tabela","ligadosComTabela")');}
  180 + };
  181 + YAHOO.util.Event.addListener(janela[0].close, "click", temp);
168 }, 182 },
169 /* 183 /*
170 Function: montaListaItens 184 Function: montaListaItens
interface/openlayers.htm
@@ -101,7 +101,7 @@ @@ -101,7 +101,7 @@
101 </div> 101 </div>
102 </div> 102 </div>
103 103
104 -<script src="../classesjs/i3geo.js"></script> 104 +<script src="../classesjs/i3geonaocompacto.js"></script>
105 <script src="../pacotes/openlayers/OpenLayers29.js.php"></script> 105 <script src="../pacotes/openlayers/OpenLayers29.js.php"></script>
106 <!-- estilo necessário para a ferramenta de edição --> 106 <!-- estilo necessário para a ferramenta de edição -->
107 <style> 107 <style>