Commit 68332bd3735b82b8d47680da5b82564f1ccffb59

Authored by Murilo Caixêta
1 parent 17dc9b2d

Implementação do Mustache

ferramentas/carouseltemas/dependencias.php
... ... @@ -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.carouseltemas.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.carouseltemas.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 0 \ No newline at end of file
ferramentas/carouseltemas/template_mst.html
... ... @@ -1,3 +0,0 @@
1   -<div id='i3GEOcarouseltemasImagens'></div>
2   -<p class='paragrafo' style='width: 180px'>{{{adicionaTema}}} if(i3GEOF.carouseltemas.incluiAmpliacao === true)
3   -<div style='text-align: left;' id='i3GEOcarouseltemasImagemmaior'></div>
4 0 \ No newline at end of file