Commit 5a660fd71ce994caa76d998151697ef4b5abc464
1 parent
e018024f
Exists in
master
and in
7 other branches
Implementação do Mustache
Showing
2 changed files
with
28 additions
and
40 deletions
Show diff stats
ferramentas/centromassa/index.js
| ... | ... | @@ -48,12 +48,6 @@ i3GEOF.centromassa = { |
| 48 | 48 | Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. |
| 49 | 49 | */ |
| 50 | 50 | aguarde: "", |
| 51 | - /* | |
| 52 | - Para efeitos de compatibilidade antes da versão 4.7 que não tinha dicionário | |
| 53 | - */ | |
| 54 | - criaJanelaFlutuante: function(){ | |
| 55 | - i3GEOF.centromassa.iniciaDicionario(); | |
| 56 | - }, | |
| 57 | 51 | /** |
| 58 | 52 | * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php |
| 59 | 53 | */ |
| ... | ... | @@ -63,29 +57,10 @@ i3GEOF.centromassa = { |
| 63 | 57 | */ |
| 64 | 58 | mustacheHash : function() { |
| 65 | 59 | var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.centromassa.dicionario); |
| 60 | + dicionario["locaplic"] = i3GEO.configura.locaplic; | |
| 66 | 61 | return dicionario; |
| 67 | 62 | }, |
| 68 | 63 | /* |
| 69 | - /* | |
| 70 | - Function: iniciaDicionario | |
| 71 | - | |
| 72 | - Carrega o dicionário e chama a função que inicia a ferramenta | |
| 73 | - | |
| 74 | - O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script | |
| 75 | - */ | |
| 76 | - iniciaDicionario: function(){ | |
| 77 | - if(typeof(i3GEOF.centromassa.dicionario) === 'undefined'){ | |
| 78 | - i3GEO.util.scriptTag( | |
| 79 | - i3GEO.configura.locaplic+"/ferramentas/centromassa/dicionario.js", | |
| 80 | - "i3GEOF.centromassa.iniciaJanelaFlutuante()", | |
| 81 | - "i3GEOF.centromassa.dicionario_script" | |
| 82 | - ); | |
| 83 | - } | |
| 84 | - else{ | |
| 85 | - i3GEOF.centromassa.iniciaJanelaFlutuante(); | |
| 86 | - } | |
| 87 | - }, | |
| 88 | - /* | |
| 89 | 64 | Function: inicia |
| 90 | 65 | |
| 91 | 66 | Inicia a ferramenta. É chamado por criaJanelaFlutuante |
| ... | ... | @@ -157,24 +132,16 @@ i3GEOF.centromassa = { |
| 157 | 132 | }, |
| 158 | 133 | t0: function() |
| 159 | 134 | { |
| 160 | - var ins = "<img class=i3GeoExemploImg src='"+i3GEO.configura.locaplic+"/ferramentas/centromassa/exemplo.png' />" + | |
| 161 | - "<p class='paragrafo'>"+$trad('ajuda',i3GEOF.centromassa.dicionario)+"</p>" + | |
| 162 | - "<p class='paragrafo'>"+$trad('ajuda2',i3GEOF.centromassa.dicionario)+"</p>"; | |
| 163 | - i3GEO.util.proximoAnterior("","i3GEOF.centromassa.t1()",ins,"i3GEOFgradeDePontost0","i3GEOcentromassaresultado",true,"i3GEOF.centromassa_rodape"); | |
| 135 | + | |
| 136 | + i3GEO.util.proximoAnterior("","i3GEOF.centromassa.t1()","","i3GEOFgradeDePontost0","i3GEOcentromassaresultado",true,"i3GEOF.centromassa_rodape"); | |
| 164 | 137 | }, |
| 165 | 138 | t1: function(){ |
| 166 | - var ins = "<p class='paragrafo' >"+$trad('selecionaTema',i3GEOF.centromassa.dicionario)+"<br>"; | |
| 167 | - ins += "<div style='text-align:left;' id='i3GEOcentromassaDivPontos' ></div><br>"; | |
| 168 | - ins += "<p class='paragrafo' >"+$trad('selecionaItem',i3GEOF.centromassa.dicionario)+"<br>"; | |
| 169 | - ins += "<div id=i3GEOondeItens style='text-align:left;display:block' ></div>"; | |
| 170 | - i3GEO.util.proximoAnterior("i3GEOF.centromassa.t0()","i3GEOF.centromassa.t2()",ins,"i3GEOF.centromassa.t1","i3GEOcentromassaresultado",true,"i3GEOF.centromassa_rodape"); | |
| 139 | + i3GEO.util.proximoAnterior("i3GEOF.centromassa.t0()","i3GEOF.centromassa.t2()","","i3GEOF.centromassa.t1","i3GEOcentromassaresultado",true,"i3GEOF.centromassa_rodape"); | |
| 171 | 140 | i3GEOF.centromassa.comboTemasPontos(); |
| 172 | 141 | }, |
| 173 | 142 | t2: function(){ |
| 174 | - var b,ins = "<p class='paragrafo'>"+$trad('ajuda3',i3GEOF.centromassa.dicionario); | |
| 175 | - ins += "<br><br><input id=i3GEOcentromassabotao1 type='buttom' value='"+$trad('calcula',i3GEOF.centromassa.dicionario)+"' />"; | |
| 176 | - i3GEO.util.proximoAnterior("i3GEOF.centromassa.t1()","",ins,"i3GEOF.centromassa.t2","i3GEOcentromassaresultado",true,"i3GEOF.centromassa_rodape"); | |
| 177 | - b = new YAHOO.widget.Button( | |
| 143 | + i3GEO.util.proximoAnterior("i3GEOF.centromassa.t1()","","","i3GEOF.centromassa.t2","i3GEOcentromassaresultado",true,"i3GEOF.centromassa_rodape"); | |
| 144 | + var b = new YAHOO.widget.Button( | |
| 178 | 145 | "i3GEOcentromassabotao1", |
| 179 | 146 | {onclick:{fn: i3GEOF.centromassa.calcula}} |
| 180 | 147 | ); | ... | ... |
ferramentas/centromassa/template_mst.html
| 1 | -<div style='padding: 5px; background-color: #F2F2F2; top: 0px; left: 0px; display: block; width: 98%;' id='i3GEOcentromassaresultado'></div> | |
| 1 | +<div style='padding: 5px; background-color: #F2F2F2; top: 0px; left: 0px; display: block; width: 98%;' id='i3GEOcentromassaresultado'> | |
| 2 | +<div id='i3GEOFgradeDePontost0'> | |
| 3 | + <img class='i3GeoExemploImg' | |
| 4 | + src='{{{locaplic}}}/ferramentas/centromassa/exemplo.png'/> | |
| 5 | + <p class='paragrafo'>{{{ajuda}}}</p> | |
| 6 | + <p class='paragrafo'>{{{ajuda2}}}</p> | |
| 7 | +</div> | |
| 8 | +<div id='i3GEOF.centromassa.t1'> | |
| 9 | + <p class='paragrafo'> | |
| 10 | + {{{selecionaTema}}}<br> | |
| 11 | + <div style='text-align: left;' id='i3GEOcentromassaDivPontos'></div> | |
| 12 | + <br> | |
| 13 | + <p class='paragrafo'> | |
| 14 | + {{{selecionaItem}}}<br> | |
| 15 | + <div id='i3GEOondeItens' style='text-align: left; display: block'></div> | |
| 16 | +</div> | |
| 17 | +<div id='i3GEOF.centromassa.t2'> | |
| 18 | + <p class='paragrafo'> | |
| 19 | + {{{ajuda3}}} <br> | |
| 20 | + <br> | |
| 21 | + <input id='i3GEOcentromassabotao1' type='button' value='{{{calcula}}}'/></div> | |
| 22 | +</div> | |
| 2 | 23 | <div style='top: 10px; left: 0px; display: block; width: 98%; color: red' id='i3GEOcentromassafim'></div> |
| 3 | 24 | \ No newline at end of file | ... | ... |