Commit 01fceb0aa1d0ac2ecd6f1349e80c5e417891f65d
1 parent
c3ab5311
Exists in
master
and in
7 other branches
Implementação do Mustache
Showing
2 changed files
with
52 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,30 @@ |
1 | +<?php | |
2 | +/** | |
3 | + * Carrega os programas javascript necessarios para a ferramenta | |
4 | + * Esse programa e usado na tag <script> ou com a funcao scripttag do i3Geo | |
5 | + * Alem de carregar os scripts, carrega tambem o template no formato MUSTACHE, definindo a variavel | |
6 | + * javascript i3GEOF.nptpol.MUSTACHE | |
7 | + * O template e substituido pelos valores definidos em index.js no momento da inicializacao da ferramenta | |
8 | + */ | |
9 | +if(extension_loaded('zlib')){ | |
10 | + ob_start('ob_gzhandler'); | |
11 | +} | |
12 | +header("Content-type: text/javascript"); | |
13 | +include("index.js"); | |
14 | +include("dicionario.js"); | |
15 | +echo "\n"; | |
16 | +/** | |
17 | + * Inclui o template mustache do HTML usado para criar o conteudo da janela | |
18 | + */ | |
19 | +echo 'i3GEOF.nptpol.MUSTACHE = "'; | |
20 | +$texto = file_get_contents("template_mst.html"); | |
21 | +$texto = str_replace("\n", "", $texto); | |
22 | +$texto = str_replace("\r", "", $texto); | |
23 | +$texto = str_replace("\t", "", $texto); | |
24 | +$texto = str_replace('"', "'", $texto); | |
25 | +echo $texto; | |
26 | +echo '";'; | |
27 | +if(extension_loaded('zlib')){ | |
28 | + ob_end_flush(); | |
29 | +} | |
30 | +?> | |
0 | 31 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,22 @@ |
1 | +<div style='padding: 5px; background-color: #F2F2F2; top: 0px; left: 0px; display: block; width: 98%;'id='i3GEOnptpolresultado'> | |
2 | + <div id='i3GEOFgradeDePontost0'> | |
3 | + <img class='i3GeoExemploImg' src='{{{locaplic}}}/ferramentas/nptpol/exemplo.png' /> | |
4 | + <p class='paragrafo'>{{{ajuda}}}</p> | |
5 | + <p class='paragrafo'>{{{ajuda2}}}</p> | |
6 | + <p class='paragrafo'>{{{ajuda3}}}</p> | |
7 | + </div> | |
8 | + <div id='i3GEOF.nptpol.t1'> | |
9 | + <p class='paragrafo'>{{{selecionaTemaPonto}}}:<br> | |
10 | + <div style='text-align: left;' id='i3GEOnptpolDivPontos'></div> | |
11 | + <br> | |
12 | + <p class='paragrafo'>{{{selecionaItemSoma}}}:<br> | |
13 | + <div id='i3GEOnptpolondeItens' style='text-align: left; display: block'>-</div> | |
14 | + <br> | |
15 | + <p class='paragrafo'>{{{selecionaTemaPoligono}}}:<br> | |
16 | + <div style='text-align: left;' id='i3GEOnptpolDivPoligonos'></div> | |
17 | + </div> | |
18 | + <div id='i3GEOF.nptpol.t2'> | |
19 | + <p class='paragrafo'>{{{adicionaTema}}}<br><br><input id='i3GEOnptpolbotao1' type='button' value='{{{calcula}}}' /> | |
20 | + </div> | |
21 | +</div> | |
22 | +<div style='top: 10px; left: 0px; display: block; width: 98%; color: red' id='i3GEOnptpolfim'></div> | |
0 | 23 | \ No newline at end of file | ... | ... |