diff --git a/ferramentas/etiqueta/index.js b/ferramentas/etiqueta/index.js index 9d04c0e..155bb72 100755 --- a/ferramentas/etiqueta/index.js +++ b/ferramentas/etiqueta/index.js @@ -50,6 +50,7 @@ i3GEOF.etiqueta = { * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php */ MUSTACHE : "", + MUSTACHELISTA : "", /** * Susbtitutos para o template */ @@ -69,12 +70,20 @@ i3GEOF.etiqueta = { */ inicia: function(iddiv){ if(i3GEOF.etiqueta.MUSTACHE == ""){ - $.get(i3GEO.configura.locaplic + "/ferramentas/etiqueta/template_mst.html", function(template) { - i3GEOF.etiqueta.MUSTACHE = template; + var t1 = i3GEO.configura.locaplic + "/ferramentas/etiqueta/template_mst.html", + t2 = i3GEO.configura.locaplic + "/ferramentas/etiqueta/templateLista_mst.html"; + + $.when( $.get(t1),$.get(t2) ).done(function(r1,r2) { + i3GEOF.etiqueta.MUSTACHE = r1[0]; + i3GEOF.etiqueta.MUSTACHELISTA = r2[0]; i3GEOF.etiqueta.inicia(iddiv); + }).fail(function() { + i3GEO.janela.closeMsg($trad("erroTpl")); + return; }); return; } + if (!$i("i3GEOFetiquetaComboCabecaSel")) { i3GEO.janela.comboCabecalhoTemasBs("i3GEOFetiquetaComboCabeca","i3GEOFetiquetaComboCabecaSel","etiqueta","ligadosComTabela",function(evt){ var botao = evt.target; @@ -96,16 +105,7 @@ i3GEOF.etiqueta = { } try{ $i(iddiv).innerHTML += i3GEOF.etiqueta.html(); - var b = new YAHOO.widget.Button( - "i3GEOetiquetabotao1", - {onclick:{fn: i3GEOF.etiqueta.ativa}} - ); - b.addClass("rodar150"); - b = new YAHOO.widget.Button( - "i3GEOetiquetabotao2", - {onclick:{fn: i3GEOF.etiqueta.desativa}} - ); - b.addClass("rodar150"); + i3GEOF.etiqueta.ativaFoco(); } catch(erro){i3GEO.janela.tempoMsg(erro);} @@ -141,7 +141,7 @@ i3GEOF.etiqueta = { i3GEO.janela.minimiza("i3GEOF.etiqueta"); }; //cria a janela flutuante - titulo = "
Coluna | Identifica | Tip | Busca | Alias | Link | "); n = retorno.data.valores.length; for (i=0;i"+item+" | "); - //itens + temp.item = item; if(i3GEO.util.in_array(item,lista.itens) || i3GEO.util.in_array(item,itensatuais) || lista.itembuscarapida[item]){ - ck = "checked"; + temp.ckIdentifica = "checked"; } else{ - ck = ""; + temp.ckIdentifica = ""; } - ins.push(""); - - //etiquetas tip if(i3GEO.util.in_array(item,itensatuais)){ - ck = "checked"; + temp.ckEtiquetaTip = "checked"; } else{ - ck = ""; + temp.ckEtiquetaTip = ""; } - ins.push(" | "); //buscarapida if(lista.itembuscarapida === item){ - ck = "checked"; + temp.ckBuscaRapida = "checked"; } else{ - ck = ""; + temp.ckBuscaRapida = ""; } - ins.push(" | "); - //alias dos itens if(lista.itensdesc[item]){ - ck = lista.itensdesc[item]; + temp.ckitensdesc = lista.itensdesc[item]; } else{ - ck = item; + temp.ckitensdesc = item; } - ins.push(" | "); //links if(lista.itenslink[item]){ - ck = lista.itenslink[item]; + temp.ckitem = lista.itenslink[item]; } else{ - ck = ""; + temp.ckitem = ""; } - ins.push(" | "); - - - ins.push(" |
Coluna | +Identifica | +Tip | +Busca | +Alias | +Link | +
{{{item}}} | +
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
- - -
- {{{selecionaItem}}}
-