index.js
1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
if(typeof(i3GEOF) === 'undefined'){
var i3GEOF = {};
}
i3GEOF.filtroarvore = {
renderFunction: i3GEO.janela.formModal,
_parameters : {
"mustache": "",
"idContainer": "i3GEOfiltroarvoreguiasContainer",
"namespace": "filtroarvore"
},
start : function(){
var p = this._parameters,
i3f = this,
t1 = i3GEO.configura.locaplic + "/ferramentas/"+p.namespace+"/template_mst.html";
if(p.mustache === ""){
$.get(t1, function(template) {
p.mustache = template;
i3f.html();
}).fail(function() {
i3GEO.janela.tempoMsg($trad("erroTpl"));
});
} else {
i3f.html();
}
},
html:function() {
var p = this._parameters,
i3f = this,
hash = i3GEO.idioma.objetoIdioma(i3GEOF[p.namespace].dicionario);
hash["locaplic"] = i3GEO.configura.locaplic;
hash["namespace"] = p.namespace;
hash["idContainer"] = p.idContainer;
i3f.renderFunction.call(this,{texto: Mustache.render(p.mustache, hash)});
//i3GEO.janela.applyScrollBar(p.idContainer);
$('#' + p.idContainer + ' button[name="' + i3GEO.arvoreDeCamadas.FILTRO + '"]').button('toggle');
},
filtrar: function(filtro){
i3GEO.arvoreDeCamadas.FILTRO = filtro;
i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true);
},
excluir: function(){
var lista = i3GEO.arvoreDeCamadas.listaLigadosDesligados();
if(lista[3].length > 0){
i3GEO.arvoreDeCamadas.FILTRO = "";
i3GEO.php.excluitema(i3GEO.atualiza,lista[3]);
}
}
};