Commit 17dc9b2d09059fef4420102143a7a6254a7daee0

Authored by Murilo Caixêta
1 parent 3a3d2c7b

Implementação do Mustache

ferramentas/buscafotos/dependencias.php
@@ -1,30 +0,0 @@ @@ -1,30 +0,0 @@
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.buscaFotos.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.buscaFotos.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 -?>  
31 \ No newline at end of file 0 \ No newline at end of file
ferramentas/buscafotos/template_mst.html
@@ -1,54 +0,0 @@ @@ -1,54 +0,0 @@
1 -<div id='i3GEObuscafotosaviso' style='display: block; padding: 5px;'>  
2 - <p class='paragrafo'>{{{ajuda}}}  
3 - <p class='paragrafo'>{{{ajuda2}}}  
4 - <p class='paragrafo'>{{{ajuda3}}} if(i3GEO.parametros.mapscale > 30000001){  
5 - <p class='paragrafo'>{{{msgForaEscala}}}  
6 - <p class='paragrafo'>  
7 - <input id='i3GEObuscafotosbotao3' size='20' type='button' value='{{{ajusta}}}' />  
8 - } else{  
9 - <p>  
10 - <input id='i3GEObuscafotosbotao2' size='20' type='button' value='{{{continua}}}' />  
11 - }  
12 -</div>  
13 -<div id='i3GEObuscafotosbusca' style='display: none; padding: 5px;'>  
14 - <div id='i3GEObuscafotosf' style='display: none'>  
15 - <p class='paragrafo'>  
16 - <i>{{{ajudaFlickr}}}</i>  
17 - <p class='paragrafo'>{{{opcoes}}} {{{maxRegistros}}} {{{ajudaAno}}}  
18 - <p class='paragrafo'>  
19 - {{{texto}}}: <br>  
20 - <div class='styled-select'>  
21 - <input onclick='javascript:this.select();' style='cursor: text' type='text' size='30' value='' id='i3GEObuscafotostexto' />  
22 - </div>  
23 - <br>  
24 - <p class='paragrafo'>  
25 - {{{anoInicial}}}: <br>  
26 - <div class='styled-select'>  
27 - <input onclick='javascript:this.select();' style='cursor: text' type='text' size='10' value='2009' id='i3GEObuscafotosai' />  
28 - </div>  
29 - <br>  
30 - <p class='paragrafo'>  
31 - {{{anoFinal}}}: <br>  
32 - <div class='styled-select'>  
33 - <input onclick='javascript:this.select();' style='cursor: text' type='text' size='10' value='2009' id='i3GEObuscafotosaf' />  
34 - </div>  
35 - <br>  
36 - <br>  
37 - <input id='i3GEObuscafotosbotao1' size='20' type='button' value='{{{procuraFotos}}}' />  
38 - </div>  
39 - <div>  
40 - <br>  
41 - <p class='paragrafo'>  
42 - {{{servidores}}}:  
43 - <input type='radio' style='top: 2px; background-color: #f2f2f2; none; border: 0px solid white; cursor: pointer; position: relative;' onclick='i3GEOF.buscaFotos.esconde(this)' name='buscador' value='flickr' id='i3GEObuscafotosbuscaflickr' />  
44 - <a href='http://www.flickr.com' target='_blank'>Flickr</a>  
45 - <input type='radio' style='top: 2px; background-color: #f2f2f2; border: 0px solid white; cursor: pointer; position: relative;' onclick='i3GEOF.buscaFotos.esconde(this)' name='buscador' value='panoramio' id='i3GEObuscafotosbuscapanoramio' />  
46 - <a href='http://www.panoramio.com' target='_blank'>Panoramio</a>  
47 - <input type='radio' style='top: 2px; background-color: #f2f2f2; border: 0px solid white; cursor: pointer; position: relative;' onclick='i3GEOF.buscaFotos.esconde(this)' name='buscador' value='locr' id='i3GEObuscafotosbuscalocr' />  
48 - <a href='http://www.locr.com' target='_blank'>Locr</a>  
49 - </div>  
50 - <div id='i3GEObuscafotospaginas' style='top: 10px;'></div>  
51 - <br>  
52 - <div style='top: 0px; left: 5px; display: block; width: 95%; overflow: auto' id='i3GEObuscafotosresultadofotos'></div>  
53 - <br>  
54 -</div>  
55 \ No newline at end of file 0 \ No newline at end of file