From aa07727e0c015a91f2d36a15bf5214371bf53fc4 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Tue, 3 Mar 2015 01:45:30 +0000 Subject: [PATCH] Inclusão de um novo icone na arvore de camadas que abre as ferramentas referentes ao mapa --- ferramentas/atalhosmapa/dependencias.php | 30 ++++++++++++++++++++++++++++++ ferramentas/atalhosmapa/dicionario.js | 4 ++++ ferramentas/atalhosmapa/exec.php | 1 + ferramentas/atalhosmapa/index.js | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ferramentas/atalhosmapa/template_mst.html | 0 5 files changed, 116 insertions(+), 0 deletions(-) create mode 100755 ferramentas/atalhosmapa/dependencias.php create mode 100755 ferramentas/atalhosmapa/dicionario.js create mode 100755 ferramentas/atalhosmapa/exec.php create mode 100755 ferramentas/atalhosmapa/index.js create mode 100755 ferramentas/atalhosmapa/template_mst.html diff --git a/ferramentas/atalhosmapa/dependencias.php b/ferramentas/atalhosmapa/dependencias.php new file mode 100755 index 0000000..bded1b1 --- /dev/null +++ b/ferramentas/atalhosmapa/dependencias.php @@ -0,0 +1,30 @@ + ou com a funcao scripttag do i3Geo + * Alem de carregar os scripts, carrega tambem o template no formato MUSTACHE, definindo a variavel + * javascript i3GEOF.atalhosmapa.MUSTACHE + * O template e substituido pelos valores definidos em index.js no momento da inicializacao da ferramenta + */ +if(extension_loaded('zlib')){ + ob_start('ob_gzhandler'); +} +header("Content-type: text/javascript"); +include("index.js"); +include("dicionario.js"); +echo "\n"; +/** + * Inclui o template mustache do HTML usado para criar o conteudo da janela + */ +echo 'i3GEOF.atalhosmapa.MUSTACHE = "'; +$texto = file_get_contents("template_mst.html"); +$texto = str_replace("\n", "", $texto); +$texto = str_replace("\r", "", $texto); +$texto = str_replace("\t", "", $texto); +$texto = str_replace('"', "'", $texto); +echo $texto; +echo '";'; +if(extension_loaded('zlib')){ + ob_end_flush(); +} +?> diff --git a/ferramentas/atalhosmapa/dicionario.js b/ferramentas/atalhosmapa/dicionario.js new file mode 100755 index 0000000..7f4185d --- /dev/null +++ b/ferramentas/atalhosmapa/dicionario.js @@ -0,0 +1,4 @@ +//+$trad(1,i3GEOF.atalhosmapa.dicionario)+ +i3GEOF.atalhosmapa.dicionario = { + +}; diff --git a/ferramentas/atalhosmapa/exec.php b/ferramentas/atalhosmapa/exec.php new file mode 100755 index 0000000..d3f5a12 --- /dev/null +++ b/ferramentas/atalhosmapa/exec.php @@ -0,0 +1 @@ + diff --git a/ferramentas/atalhosmapa/index.js b/ferramentas/atalhosmapa/index.js new file mode 100755 index 0000000..029b36f --- /dev/null +++ b/ferramentas/atalhosmapa/index.js @@ -0,0 +1,81 @@ +if (typeof (i3GEOF) === 'undefined') { + var i3GEOF = {}; +} +/* + * Classe: i3GEOF.atalhosmapa + */ +i3GEOF.atalhosmapa = +{ + /* + * Function: inicia + * + * Inicia a ferramenta. É chamado por criaJanelaFlutuante + * + * Parametro: + * + * iddiv {String} - id do div que receberá o conteudo HTML da ferramenta + */ + inicia : function(iddiv) { + //pega os itens do menu suspenso e que contem a lista de aplicativos + var s, b, m, n, i, t, ins = "
"; + m = i3GEO.configura.oMenuData.submenus.ferramentas; + n = m.length; + for(i=0;i

"; + } + $i(iddiv).innerHTML = ins + "
"; + for(i=0;i