Commit 19a648ecf37f640e7db65745edbfd9870079241a

Authored by Edmar Moretti
1 parent 24e4570b

Inclusão de opção para editar uma classe da legenda diretamente na janela que mostra a legenda

aplicmap/legenda9.htm
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <tr><td style=text-align:left > 7 <tr><td style=text-align:left >
8 <img style='position:relative;top:3px;' class='i3GEOLegendaExcluiTema' onclick='i3GEO.mapa.legendaHTML.escondeTema("[leg_layer_name]")' title="Esconde" src="../imagens/oxygen/16x16/edit-delete.png" > 8 <img style='position:relative;top:3px;' class='i3GEOLegendaExcluiTema' onclick='i3GEO.mapa.legendaHTML.escondeTema("[leg_layer_name]")' title="Esconde" src="../imagens/oxygen/16x16/edit-delete.png" >
9 <b><span class=legendaTema ><input value="[leg_layer_name]" name="layer" onclick="i3GEO.mapa.legendaHTML.ativaDesativaTema(this)" type=checkbox checked class=inputsb style=opacity:0.3;cursor:pointer;position:relative;top:2px;left:2px; > 9 <b><span class=legendaTema ><input value="[leg_layer_name]" name="layer" onclick="i3GEO.mapa.legendaHTML.ativaDesativaTema(this)" type=checkbox checked class=inputsb style=opacity:0.3;cursor:pointer;position:relative;top:2px;left:2px; >
10 - <label style='cursor:pointer;' onmouseout='this.childNodes[1].style.display="none";' onmouseover='this.childNodes[1].style.display="block";' onclick='i3GEO.tema.dialogo.mudanome("[leg_layer_name]")'>&nbsp;&nbsp;[metadata name=TEMA] 10 + <label style='cursor:pointer;' onmouseout='this.getElementsByTagName("div")[0].style.display="none";' onmouseover='this.getElementsByTagName("div")[0].style.display="block";' onclick='i3GEO.tema.dialogo.mudanome("[leg_layer_name]")'>&nbsp;&nbsp;[metadata name=TEMA]
11 <div class='i3GEOiconeEditar' style='display:none;float:right;top:5px;' ></div> 11 <div class='i3GEOiconeEditar' style='display:none;float:right;top:5px;' ></div>
12 </label> 12 </label>
13 </span></b><br> </td> 13 </span></b><br> </td>
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
30 <td style=width:20px;text-align:left; ><input type=checkbox CHECKED title=liga/desliga class=inputsb style='border: 0px solid red;cursor:pointer;opacity:0.3;' value=[leg_class_index] name=[leg_layer_name] id='legendack_[leg_layer_name]_[leg_class_index]' onclick='i3GEO.arvoreDeCamadas.inverteStatusClasse(this)' /> 30 <td style=width:20px;text-align:left; ><input type=checkbox CHECKED title=liga/desliga class=inputsb style='border: 0px solid red;cursor:pointer;opacity:0.3;' value=[leg_class_index] name=[leg_layer_name] id='legendack_[leg_layer_name]_[leg_class_index]' onclick='i3GEO.arvoreDeCamadas.inverteStatusClasse(this)' />
31 </td> 31 </td>
32 <td style=text-align:left > 32 <td style=text-align:left >
  33 + <span style='cursor:pointer;' onmouseout='this.getElementsByTagName("div")[0].style.display="none";' onmouseover='this.getElementsByTagName("div")[0].style.display="block";' onclick='i3GEO.tema.dialogo.editaClasseLegenda("[leg_layer_name]",[leg_class_index])' >
33 [if name=layer_type oper=eq value=0] 34 [if name=layer_type oper=eq value=0]
34 <img src=[leg_icon width=30 height=30 ] /> 35 <img src=[leg_icon width=30 height=30 ] />
35 [/if] 36 [/if]
@@ -45,8 +46,11 @@ @@ -45,8 +46,11 @@
45 [if name=layer_type oper=eq value=8] 46 [if name=layer_type oper=eq value=8]
46 <img src=[leg_icon width=30 height=16 ] /> 47 <img src=[leg_icon width=30 height=16 ] />
47 [/if] 48 [/if]
  49 + <span style="font-size:11px;position:relative;left:2px;top: -3px;" >[leg_class_name]&nbsp;</span>
  50 + <div class='i3GEOiconeEditar' style='display:none;float:right;top:4px;' ></div>
  51 +
  52 + </span>
48 </td> 53 </td>
49 - <td style="text-align:left;width:195px" ><span style="font-size:11px;position:relative;left:2px;" >[leg_class_name]</span></td>  
50 </tr> 54 </tr>
51 [/if] 55 [/if]
52 [/if] 56 [/if]
classesjs/classe_tema.js
@@ -734,6 +734,33 @@ i3GEO.tema = @@ -734,6 +734,33 @@ i3GEO.tema =
734 "i3GEOF.legenda.iniciaJanelaFlutuante()"); 734 "i3GEOF.legenda.iniciaJanelaFlutuante()");
735 }, 735 },
736 /** 736 /**
  737 + * Function: editaClasseLegenda
  738 + *
  739 + * Abre a janela de dialogo da ferramenta legenda deiretamente no editor de simbolo de uma classe especifica
  740 + *
  741 + * Parametros:
  742 + *
  743 + * {string} - id que identifica o tema conforme definido no map file
  744 + */
  745 + editaClasseLegenda : function(idtema,idclasse) {
  746 + i3GEO.mapa.ativaTema(idtema);
  747 + var temp = function() {
  748 + i3GEOF.legenda.aposIniciar = function(){
  749 + i3GEOF.legenda.classe = 0;
  750 + i3GEOF.legenda.estilo = 0;
  751 + i3GEOF.legenda.editaSimbolo('i3GEOlegendaid_'+idtema+"-"+idclasse);
  752 + i3GEOF.legenda.aposIniciar = function(){};
  753 + };
  754 + i3GEOF.legenda.iniciaJanelaFlutuante(idtema);
  755 + };
  756 + i3GEO.util.dialogoFerramenta(
  757 + "i3GEO.tema.dialogo.editaLegenda()",
  758 + "legenda",
  759 + "legenda",
  760 + "dependencias.php",
  761 + temp);
  762 + },
  763 + /**
737 * Function: download 764 * Function: download
738 * 765 *
739 * Abre a janela de dialogo da ferramenta download 766 * Abre a janela de dialogo da ferramenta download
ferramentas/legenda/index.js
@@ -100,6 +100,14 @@ i3GEOF.legenda = @@ -100,6 +100,14 @@ i3GEOF.legenda =
100 */ 100 */
101 MUSTACHE : "", 101 MUSTACHE : "",
102 /** 102 /**
  103 + * Funcao do usuario que e executada apos iniciar a ferramenta
  104 + */
  105 + aposIniciar : function(){
  106 + i3GEOF.legenda.classe = 0;
  107 + i3GEOF.legenda.estilo = 0;
  108 + i3GEOF.legenda.editaSimbolo('i3GEOlegendaid_'+i3GEOF.legenda.tema+"-0");
  109 + },
  110 + /**
103 * Susbtitutos para o template 111 * Susbtitutos para o template
104 */ 112 */
105 mustacheHash : function() { 113 mustacheHash : function() {
@@ -373,8 +381,10 @@ i3GEOF.legenda = @@ -373,8 +381,10 @@ i3GEOF.legenda =
373 i3GEO.tema.invertestatuslegenda(i3GEOF.legenda.tema); 381 i3GEO.tema.invertestatuslegenda(i3GEOF.legenda.tema);
374 }; 382 };
375 i3GEO.util.aplicaAquarela("i3GEOF.legenda_corpo"); 383 i3GEO.util.aplicaAquarela("i3GEOF.legenda_corpo");
  384 + i3GEOF.legenda.aposIniciar.call();
376 } catch (erro) { 385 } catch (erro) {
377 i3GEO.janela.tempoMsg(erro); 386 i3GEO.janela.tempoMsg(erro);
  387 + i3GEOF.legenda.aposIniciar = function(){};
378 } 388 }
379 i3GEO.guias.ajustaGuiaFerramenta("i3GEOF.legenda", "i3GEOlegenda"); 389 i3GEO.guias.ajustaGuiaFerramenta("i3GEOF.legenda", "i3GEOlegenda");
380 }, 390 },
@@ -1338,7 +1348,7 @@ i3GEOF.legenda = @@ -1338,7 +1348,7 @@ i3GEOF.legenda =
1338 } 1348 }
1339 var item = $i("i3GEOlegendaitensMetade").getElementsByTagName("select")[0].value, 1349 var item = $i("i3GEOlegendaitensMetade").getElementsByTagName("select")[0].value,
1340 itemid = $i("i3GEOlegendaitensMetadeId").getElementsByTagName("select")[0].value, 1350 itemid = $i("i3GEOlegendaitensMetadeId").getElementsByTagName("select")[0].value,
1341 - ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), 1351 + ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten),
1342 p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" 1352 p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1343 + i3GEO.configura.sid 1353 + i3GEO.configura.sid
1344 + "&funcao=alteraclasse" 1354 + "&funcao=alteraclasse"
@@ -1351,8 +1361,8 @@ i3GEOF.legenda = @@ -1351,8 +1361,8 @@ i3GEOF.legenda =
1351 + "&opcao=metade&ignorar=" 1361 + "&opcao=metade&ignorar="
1352 + $i("i3GEOlegendaignorar").value 1362 + $i("i3GEOlegendaignorar").value
1353 + "&ext=" 1363 + "&ext="
1354 - + ext,  
1355 - cp = new cpaint(), 1364 + + ext,
  1365 + cp = new cpaint(),
1356 fim = function() { 1366 fim = function() {
1357 i3GEOF.legenda.aposAlterarLegenda(); 1367 i3GEOF.legenda.aposAlterarLegenda();
1358 i3GEOF.legenda.aguarde.visibility = "hidden"; 1368 i3GEOF.legenda.aguarde.visibility = "hidden";
@@ -601,7 +601,7 @@ i3GEO.tema = @@ -601,7 +601,7 @@ i3GEO.tema =
601 * Parametros: 601 * Parametros:
602 * 602 *
603 * {string} - codigo do tema 603 * {string} - codigo do tema
604 - * 604 + *
605 * {objeto} - propriedades (ver ferramentas/graficotema/index.js funcao iniciaJanelaFlutuante) 605 * {objeto} - propriedades (ver ferramentas/graficotema/index.js funcao iniciaJanelaFlutuante)
606 */ 606 */
607 graficotema : function(idtema,propriedades) { 607 graficotema : function(idtema,propriedades) {
@@ -732,6 +732,33 @@ i3GEO.tema = @@ -732,6 +732,33 @@ i3GEO.tema =
732 "i3GEOF.legenda.iniciaJanelaFlutuante()"); 732 "i3GEOF.legenda.iniciaJanelaFlutuante()");
733 }, 733 },
734 /** 734 /**
  735 + * Function: editaClasseLegenda
  736 + *
  737 + * Abre a janela de dialogo da ferramenta legenda deiretamente no editor de simbolo de uma classe especifica
  738 + *
  739 + * Parametros:
  740 + *
  741 + * {string} - id que identifica o tema conforme definido no map file
  742 + */
  743 + editaClasseLegenda : function(idtema,idclasse) {
  744 + i3GEO.mapa.ativaTema(idtema);
  745 + var temp = function() {
  746 + i3GEOF.legenda.aposIniciar = function(){
  747 + i3GEOF.legenda.classe = 0;
  748 + i3GEOF.legenda.estilo = 0;
  749 + i3GEOF.legenda.editaSimbolo('i3GEOlegendaid_'+idtema+"-"+idclasse);
  750 + i3GEOF.legenda.aposIniciar = function(){};
  751 + };
  752 + i3GEOF.legenda.iniciaJanelaFlutuante(idtema);
  753 + };
  754 + i3GEO.util.dialogoFerramenta(
  755 + "i3GEO.tema.dialogo.editaLegenda()",
  756 + "legenda",
  757 + "legenda",
  758 + "dependencias.php",
  759 + temp);
  760 + },
  761 + /**
735 * Function: download 762 * Function: download
736 * 763 *
737 * Abre a janela de dialogo da ferramenta download 764 * Abre a janela de dialogo da ferramenta download