Commit 599d9f5c689a1de205af16ef2735fb0f020d53f0

Authored by Murilo Caixêta
1 parent f32c0fb9

Implementação do Mustache

ferramentas/carregakml/dependencias.php 0 → 100755
... ... @@ -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.carregakml.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.carregakml.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
... ...
ferramentas/carregakml/template_mst.html 0 → 100644
... ... @@ -0,0 +1,6 @@
  1 +<p class='paragrafo'>
  2 + {{{insereKml}}}:<br> <br> {{{nomeArquivo}}} <br> <br>
  3 +<div id='i3GEOcarregakmlCombo' style='left: 1px; display: block; width: 315px; text-align: left;'>{{{digite}}}</div>
  4 +<br>
  5 +<br>
  6 +<input id='i3GEOcarregakmlbotao1' type='button' value='{{{botao}}}' />
0 7 \ No newline at end of file
... ...