Commit 19a648ecf37f640e7db65745edbfd9870079241a
1 parent
24e4570b
Exists in
master
and in
7 other branches
Inclusão de opção para editar uma classe da legenda diretamente na janela que mostra a legenda
Showing
4 changed files
with
74 additions
and
6 deletions
Show diff stats
aplicmap/legenda9.htm
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | <tr><td style=text-align:left > |
| 8 | 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 | 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]")'> [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]")'> [metadata name=TEMA] | |
| 11 | 11 | <div class='i3GEOiconeEditar' style='display:none;float:right;top:5px;' ></div> |
| 12 | 12 | </label> |
| 13 | 13 | </span></b><br> </td> |
| ... | ... | @@ -30,6 +30,7 @@ |
| 30 | 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 | 31 | </td> |
| 32 | 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 | 34 | [if name=layer_type oper=eq value=0] |
| 34 | 35 | <img src=[leg_icon width=30 height=30 ] /> |
| 35 | 36 | [/if] |
| ... | ... | @@ -45,8 +46,11 @@ |
| 45 | 46 | [if name=layer_type oper=eq value=8] |
| 46 | 47 | <img src=[leg_icon width=30 height=16 ] /> |
| 47 | 48 | [/if] |
| 49 | + <span style="font-size:11px;position:relative;left:2px;top: -3px;" >[leg_class_name] </span> | |
| 50 | + <div class='i3GEOiconeEditar' style='display:none;float:right;top:4px;' ></div> | |
| 51 | + | |
| 52 | + </span> | |
| 48 | 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 | 54 | </tr> |
| 51 | 55 | [/if] |
| 52 | 56 | [/if] | ... | ... |
classesjs/classe_tema.js
| ... | ... | @@ -734,6 +734,33 @@ i3GEO.tema = |
| 734 | 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 | 764 | * Function: download |
| 738 | 765 | * |
| 739 | 766 | * Abre a janela de dialogo da ferramenta download | ... | ... |
ferramentas/legenda/index.js
| ... | ... | @@ -100,6 +100,14 @@ i3GEOF.legenda = |
| 100 | 100 | */ |
| 101 | 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 | 111 | * Susbtitutos para o template |
| 104 | 112 | */ |
| 105 | 113 | mustacheHash : function() { |
| ... | ... | @@ -373,8 +381,10 @@ i3GEOF.legenda = |
| 373 | 381 | i3GEO.tema.invertestatuslegenda(i3GEOF.legenda.tema); |
| 374 | 382 | }; |
| 375 | 383 | i3GEO.util.aplicaAquarela("i3GEOF.legenda_corpo"); |
| 384 | + i3GEOF.legenda.aposIniciar.call(); | |
| 376 | 385 | } catch (erro) { |
| 377 | 386 | i3GEO.janela.tempoMsg(erro); |
| 387 | + i3GEOF.legenda.aposIniciar = function(){}; | |
| 378 | 388 | } |
| 379 | 389 | i3GEO.guias.ajustaGuiaFerramenta("i3GEOF.legenda", "i3GEOlegenda"); |
| 380 | 390 | }, |
| ... | ... | @@ -1338,7 +1348,7 @@ i3GEOF.legenda = |
| 1338 | 1348 | } |
| 1339 | 1349 | var item = $i("i3GEOlegendaitensMetade").getElementsByTagName("select")[0].value, |
| 1340 | 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 | 1352 | p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
| 1343 | 1353 | + i3GEO.configura.sid |
| 1344 | 1354 | + "&funcao=alteraclasse" |
| ... | ... | @@ -1351,8 +1361,8 @@ i3GEOF.legenda = |
| 1351 | 1361 | + "&opcao=metade&ignorar=" |
| 1352 | 1362 | + $i("i3GEOlegendaignorar").value |
| 1353 | 1363 | + "&ext=" |
| 1354 | - + ext, | |
| 1355 | - cp = new cpaint(), | |
| 1364 | + + ext, | |
| 1365 | + cp = new cpaint(), | |
| 1356 | 1366 | fim = function() { |
| 1357 | 1367 | i3GEOF.legenda.aposAlterarLegenda(); |
| 1358 | 1368 | i3GEOF.legenda.aguarde.visibility = "hidden"; | ... | ... |
js/tema.js
| ... | ... | @@ -601,7 +601,7 @@ i3GEO.tema = |
| 601 | 601 | * Parametros: |
| 602 | 602 | * |
| 603 | 603 | * {string} - codigo do tema |
| 604 | - * | |
| 604 | + * | |
| 605 | 605 | * {objeto} - propriedades (ver ferramentas/graficotema/index.js funcao iniciaJanelaFlutuante) |
| 606 | 606 | */ |
| 607 | 607 | graficotema : function(idtema,propriedades) { |
| ... | ... | @@ -732,6 +732,33 @@ i3GEO.tema = |
| 732 | 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 | 762 | * Function: download |
| 736 | 763 | * |
| 737 | 764 | * Abre a janela de dialogo da ferramenta download | ... | ... |