Commit 0ac2e32cebf675913a8cf875e83398ed81fcd129

Authored by Edmar Moretti
1 parent 85ccb84c

--no commit message

classesjs/classe_barradebotoes.js
@@ -1054,7 +1054,8 @@ i3GEO.barraDeBotoes = { @@ -1054,7 +1054,8 @@ i3GEO.barraDeBotoes = {
1054 'edita':true, 1054 'edita':true,
1055 'apaga':true, 1055 'apaga':true,
1056 'procura':false, 1056 'procura':false,
1057 - 'salva':true 1057 + 'salva':true,
  1058 + 'fecha':true
1058 } 1059 }
1059 i3GEOOL.layergrafico = new OpenLayers.Layer.Vector("Edição",{displayInLayerSwitcher:false,visibility:true}); 1060 i3GEOOL.layergrafico = new OpenLayers.Layer.Vector("Edição",{displayInLayerSwitcher:false,visibility:true});
1060 i3GEOOL.mapa.addLayers([i3GEOOL.layergrafico]); 1061 i3GEOOL.mapa.addLayers([i3GEOOL.layergrafico]);
mashups/openlayers.css
@@ -94,6 +94,12 @@ background-position:-435px 0; @@ -94,6 +94,12 @@ background-position:-435px 0;
94 .olControlEditingToolbar1 .salvaItemActive { 94 .olControlEditingToolbar1 .salvaItemActive {
95 background-position:-435px -28px; 95 background-position:-435px -28px;
96 } 96 }
  97 +.olControlEditingToolbar1 .fechaItemInactive {
  98 +background-position:-464px 0;
  99 +}
  100 +.olControlEditingToolbar1 .fechaItemActive {
  101 +background-position:-464px -28px;
  102 +}
97 .olControlEditingToolbar1 { 103 .olControlEditingToolbar1 {
98 width:500px; 104 width:500px;
99 float:right; 105 float:right;
mashups/openlayers.js.php
@@ -53,7 +53,8 @@ i3GEOOL = { @@ -53,7 +53,8 @@ i3GEOOL = {
53 'edita':true, 53 'edita':true,
54 'apaga':true, 54 'apaga':true,
55 'procura':true, 55 'procura':true,
56 - 'salva':true 56 + 'salva':true,
  57 + 'fecha':false
57 }, 58 },
58 pontos: [], 59 pontos: [],
59 marca: "../pacotes/openlayers/img/marker-gold.png", 60 marca: "../pacotes/openlayers/img/marker-gold.png",
@@ -112,7 +113,6 @@ i3GEOOL = { @@ -112,7 +113,6 @@ i3GEOOL = {
112 i3GEOOL.criaJanelaBusca(); 113 i3GEOOL.criaJanelaBusca();
113 i3GEOOL.criaJanelaAtivaTema(); 114 i3GEOOL.criaJanelaAtivaTema();
114 i3GEOOL.criaBotoes(i3GEOOL.botoes); 115 i3GEOOL.criaBotoes(i3GEOOL.botoes);
115 -  
116 }, 116 },
117 layersLigados: function(){ 117 layersLigados: function(){
118 var layers = i3GEOOL.mapa.layers; 118 var layers = i3GEOOL.mapa.layers;
@@ -195,21 +195,28 @@ i3GEOOL = { @@ -195,21 +195,28 @@ i3GEOOL = {
195 combo += "<option value='"+i+"' >"+layers[i].name+"</option>"; 195 combo += "<option value='"+i+"' >"+layers[i].name+"</option>";
196 } 196 }
197 combo += "</select>"; 197 combo += "</select>";
198 - try{ 198 + if(!document.getElementById("paneltemaativo")){
199 YAHOO.namespace("temaativo.container"); 199 YAHOO.namespace("temaativo.container");
200 - YAHOO.temaativo.container.panel = new YAHOO.widget.Panel("paneltemaativo", {zIndex:2000, iframe:false, width:"250px", visible:false, draggable:true, close:true } );  
201 - YAHOO.temaativo.container.panel.setHeader("Tema ativo"); 200 + YAHOO.temaativo.container.panel = new YAHOO.widget.Panel("paneltemaativo", {zIndex:20000, iframe:true, width:"250px", visible:false, draggable:true, close:true } );
202 YAHOO.temaativo.container.panel.setBody(combo); 201 YAHOO.temaativo.container.panel.setBody(combo);
  202 + YAHOO.temaativo.container.panel.setHeader("Tema ativo");
203 YAHOO.temaativo.container.panel.setFooter(""); 203 YAHOO.temaativo.container.panel.setFooter("");
204 YAHOO.temaativo.container.panel.render(document.body); 204 YAHOO.temaativo.container.panel.render(document.body);
205 YAHOO.temaativo.container.panel.center(); 205 YAHOO.temaativo.container.panel.center();
206 - document.getElementById("i3GEOOLlistaTemasAtivos").onchange = function(){  
207 - if(botaoIdentifica){  
208 - botaoIdentifica.layers = [i3GEOOL.layersLigados()[this.value]];  
209 - }  
210 - }; 206 + YAHOO.util.Event.addListener(YAHOO.temaativo.container.panel.close, "click", function(){
  207 + i3GEOpanelEditor.deactivate();
  208 + i3GEOpanelEditor.activate();
  209 + });
211 } 210 }
212 - catch(e){} 211 + else{
  212 + YAHOO.temaativo.container.panel.render(document.body);
  213 + YAHOO.temaativo.container.panel.show();
  214 + }
  215 + document.getElementById("i3GEOOLlistaTemasAtivos").onchange = function(){
  216 + if(botaoIdentifica){
  217 + botaoIdentifica.layers = [i3GEOOL.layersLigados()[this.value]];
  218 + }
  219 + };
213 }, 220 },
214 ativaTema: function(id){ 221 ativaTema: function(id){
215 document.getElementById("i3GEOOLlistaTemasAtivos").value = id; 222 document.getElementById("i3GEOOLlistaTemasAtivos").value = id;
@@ -428,7 +435,7 @@ i3GEOOL = { @@ -428,7 +435,7 @@ i3GEOOL = {
428 var styleMap = new OpenLayers.StyleMap({"default": style}); 435 var styleMap = new OpenLayers.StyleMap({"default": style});
429 var adiciona = false; 436 var adiciona = false;
430 var controles = new Array(); 437 var controles = new Array();
431 - var panel = new OpenLayers.Control.Panel({ 438 + i3GEOpanelEditor = new OpenLayers.Control.Panel({
432 displayClass: "olControlEditingToolbar1 noprint" 439 displayClass: "olControlEditingToolbar1 noprint"
433 }); 440 });
434 if(botoes.procura==true){ 441 if(botoes.procura==true){
@@ -528,8 +535,7 @@ i3GEOOL = { @@ -528,8 +535,7 @@ i3GEOOL = {
528 )); 535 ));
529 }, 536 },
530 activate: function(){ 537 activate: function(){
531 - try{YAHOO.temaativo.container.panel.show();}  
532 - catch(e){} 538 + i3GEOOL.criaJanelaAtivaTema();
533 } 539 }
534 } 540 }
535 }); 541 });
@@ -629,12 +635,24 @@ i3GEOOL = { @@ -629,12 +635,24 @@ i3GEOOL = {
629 controles.push(button); 635 controles.push(button);
630 var adiciona = true; 636 var adiciona = true;
631 } 637 }
  638 + if(botoes.fecha==true){
  639 + var button = new OpenLayers.Control.Button({
  640 + displayClass: "fecha",
  641 + trigger: function(){
  642 + i3GEOpanelEditor.destroy();
  643 + YAHOO.temaativo.container.panel.destroy();
  644 + },
  645 + title: "Fechar editor"
  646 + });
  647 + controles.push(button);
  648 + var adiciona = true;
  649 + }
632 // 650 //
633 //adiciona o painel ao mapa se alguma op��o foi inserida 651 //adiciona o painel ao mapa se alguma op��o foi inserida
634 // 652 //
635 if(adiciona == true){ 653 if(adiciona == true){
636 - panel.addControls(controles);  
637 - i3GEOOL.mapa.addControl(panel); 654 + i3GEOpanelEditor.addControls(controles);
  655 + i3GEOOL.mapa.addControl(i3GEOpanelEditor);
638 } 656 }
639 }, 657 },
640 adicionaMarcas: function(){ 658 adicionaMarcas: function(){
mashups/openlayers.php
@@ -71,6 +71,8 @@ if(isset($botoes)){ @@ -71,6 +71,8 @@ if(isset($botoes)){
71 {$objBotoes[] = "'procura':false";} 71 {$objBotoes[] = "'procura':false";}
72 if(in_array("salva",$botoes)) 72 if(in_array("salva",$botoes))
73 {$objBotoes[] = "'salva':false";} 73 {$objBotoes[] = "'salva':false";}
  74 + if(in_array("fecha",$botoes))
  75 + {$objBotoes[] = "'fecha':false";}
74 $botoes = "{".implode(",",$objBotoes)."}"; 76 $botoes = "{".implode(",",$objBotoes)."}";
75 } 77 }
76 78
@@ -170,6 +172,7 @@ Parâmetros: @@ -170,6 +172,7 @@ Parâmetros:
170 captura 172 captura
171 procura 173 procura
172 salva 174 salva
  175 + fecha
173 176
174 Para ver a lista de códigos de temas, que podem ser utilizados no parâmetro 'temas', acesse: 177 Para ver a lista de códigos de temas, que podem ser utilizados no parâmetro 'temas', acesse:
175 <a href='../ogc.php?lista=temas' >lista de temas</a>. Os códigos são mostrados em vermelho. 178 <a href='../ogc.php?lista=temas' >lista de temas</a>. Os códigos são mostrados em vermelho.
mashups/openlayers.png

16.7 KB | W: | H:

18.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin