Commit b1f9e7e5fa0e16fe00acf50801f3cffc21e6bf76
1 parent
5d90f935
Exists in
master
and in
7 other branches
Implementação do Mustache
Showing
3 changed files
with
5 additions
and
52 deletions
Show diff stats
ferramentas/loginusuario/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.loginusuario.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.loginusuario.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/loginusuario/dicionario.js
1 | //+$trad(1,i3GEOF.loginusuario.dicionario)+ | 1 | //+$trad(1,i3GEOF.loginusuario.dicionario)+ |
2 | i3GEOF.loginusuario.dicionario = { | 2 | i3GEOF.loginusuario.dicionario = { |
3 | -1: [{ | ||
4 | -pt:"", | ||
5 | -en:"", | ||
6 | -es:"" | ||
7 | -}] | 3 | + 1 : [ { |
4 | + pt : "", | ||
5 | + en : "", | ||
6 | + es : "" | ||
7 | + } ] | ||
8 | }; | 8 | }; |
9 | \ No newline at end of file | 9 | \ No newline at end of file |
ferramentas/loginusuario/template_mst.html
@@ -1,17 +0,0 @@ | @@ -1,17 +0,0 @@ | ||
1 | -<div style='width: 90%; margin: auto;'> | ||
2 | - <p class='paragrafo'> | ||
3 | - '+$trad("x30")+': <b><i>'+u+"</i></b> | ||
4 | - <p class='paragrafo'> | ||
5 | - '+$trad("x27")+':<br> | ||
6 | - <input id='i3geousuario' type='text' style='width: 200px;' value="'+usuario+'" /> | ||
7 | - <p class='paragrafo'> | ||
8 | - '+$trad("x28")+':<br> | ||
9 | - <input id='i3geosenha' type='password' style='width: 200px;' value='' /> | ||
10 | - <br> | ||
11 | - <p class='paragrafo'> | ||
12 | - <input id='i3GEOFloginusuario'size='20' type='button' value="'+$trad(" x29")+'" /> | ||
13 | - | ||
14 | - <input id='i3GEOFlogoutusuario' size='20' type='button' value='Logout' /> | ||
15 | - <p class='paragrafo' onclick='i3GEOF.loginusuario.recuperarSenha()' style='cursor: pointer; color: blue;'>'+$trad("x32")+'</p> | ||
16 | - <p class='paragrafo' onclick='i3GEOF.loginusuario.alterarSenha()' style='cursor: pointer; color: blue;'>'+$trad("x52")+'</p> | ||
17 | -</div> | ||
18 | \ No newline at end of file | 0 | \ No newline at end of file |