Commit 63d1ec612dba03da620691cabdc69dfdb26535b2
1 parent
d3ca91f9
Exists in
master
and in
7 other branches
--no commit message
Showing
1 changed file
with
47 additions
and
45 deletions
Show diff stats
classesjs/atlas.js
... | ... | @@ -71,59 +71,61 @@ function iniciaAtlas(combow) |
71 | 71 | if(retorno.data.tipoguias == "") |
72 | 72 | retorno.data.tipoguias = "combo" |
73 | 73 | var pai = document.getElementById("guiasAtlas"); |
74 | - var ins = '<ul class="yui-nav" style="border-width:0pt 0pt 2px;border-color:rgb(240,240,240)">'; | |
75 | - //coloca as guias com barra de rolagem | |
76 | - if (retorno.data.tipoguias == "expandida") | |
77 | - { | |
78 | - var ins = '<ul class="yui-nav" style="width:2000px;border-width:0pt 0pt 2px;border-color:rgb(240,240,240)">'; | |
79 | - pai.style.width=i3GEO.parametros.w; | |
80 | - pai.style.height="35px"; | |
81 | - //pai.style.overflow=""; | |
82 | - } | |
83 | - var texto = ""; | |
84 | - var pranchas = retorno.data.pranchas; | |
85 | - if (retorno.data.tipoguias == "combo") | |
86 | - { | |
87 | - pai.style.textAlign="left" | |
88 | - ins = "Escolha a prancha: <select onchange='abrePrancha(this.value)' "; | |
89 | - if(combow > 0) | |
90 | - {ins += "style=width:"+combow+"px ";} | |
91 | - ins += ">"; | |
92 | - ins += "<option value=''>---</option>" | |
93 | - } | |
94 | - if (pai) | |
95 | - { | |
96 | - if(pai.className == "") | |
97 | - {pai.className = "yui-navset";} | |
98 | - var i = 0; | |
99 | - do | |
74 | + if(pai){ | |
75 | + var ins = '<ul class="yui-nav" style="border-width:0pt 0pt 2px;border-color:rgb(240,240,240)">'; | |
76 | + //coloca as guias com barra de rolagem | |
77 | + if (retorno.data.tipoguias == "expandida") | |
78 | + { | |
79 | + var ins = '<ul class="yui-nav" style="width:2000px;border-width:0pt 0pt 2px;border-color:rgb(240,240,240)">'; | |
80 | + pai.style.width=i3GEO.parametros.w; | |
81 | + pai.style.height="35px"; | |
82 | + //pai.style.overflow=""; | |
83 | + } | |
84 | + var texto = ""; | |
85 | + var pranchas = retorno.data.pranchas; | |
86 | + if (retorno.data.tipoguias == "combo") | |
87 | + { | |
88 | + pai.style.textAlign="left" | |
89 | + ins = "Escolha a prancha: <select onchange='abrePrancha(this.value)' "; | |
90 | + if(combow > 0) | |
91 | + {ins += "style=width:"+combow+"px ";} | |
92 | + ins += ">"; | |
93 | + ins += "<option value=''>---</option>" | |
94 | + } | |
95 | + if (pai) | |
100 | 96 | { |
101 | - if (pranchas[i]) | |
97 | + if(pai.className == "") | |
98 | + {pai.className = "yui-navset";} | |
99 | + var i = 0; | |
100 | + do | |
102 | 101 | { |
103 | - //monta as guias das pranchas | |
104 | - if (retorno.data.tipoguias == "combo") | |
105 | - { | |
106 | - ins += "<option value='"+pranchas[i].id+"'>"+pranchas[i].titulo+"</option>" | |
107 | - } | |
108 | - else | |
102 | + if (pranchas[i]) | |
109 | 103 | { |
110 | - ins += '<li><a href="#"><em><div onclick="abrePrancha(\''+pranchas[i].id+'\')" id=guiaAtlas'+i+' style=text-align:center;font-size:10px;left:0px; >'; | |
111 | - var icone = i3GEO.configura.locaplic+"/imagens/branco.gif"; | |
112 | - if(pranchas[i].icone != "") | |
104 | + //monta as guias das pranchas | |
105 | + if (retorno.data.tipoguias == "combo") | |
106 | + { | |
107 | + ins += "<option value='"+pranchas[i].id+"'>"+pranchas[i].titulo+"</option>" | |
108 | + } | |
109 | + else | |
113 | 110 | { |
114 | - var icone = pranchas[i].icone; | |
111 | + ins += '<li><a href="#"><em><div onclick="abrePrancha(\''+pranchas[i].id+'\')" id=guiaAtlas'+i+' style=text-align:center;font-size:10px;left:0px; >'; | |
112 | + var icone = i3GEO.configura.locaplic+"/imagens/branco.gif"; | |
113 | + if(pranchas[i].icone != "") | |
114 | + { | |
115 | + var icone = pranchas[i].icone; | |
116 | + } | |
117 | + ins += "<img src='"+icone+"'/> "; | |
118 | + ins += pranchas[i].titulo+'</div></em></a></li>'; | |
115 | 119 | } |
116 | - ins += "<img src='"+icone+"'/> "; | |
117 | - ins += pranchas[i].titulo+'</div></em></a></li>'; | |
118 | 120 | } |
121 | + var i = i + 1; | |
119 | 122 | } |
120 | - var i = i + 1; | |
123 | + while(pranchas[i]) | |
124 | + if (retorno.data.tipoguias == "combo"){ins += "</select>"} | |
125 | + else | |
126 | + ins += "</ul>"; | |
127 | + pai.innerHTML = ins; | |
121 | 128 | } |
122 | - while(pranchas[i]) | |
123 | - if (retorno.data.tipoguias == "combo"){ins += "</select>"} | |
124 | - else | |
125 | - ins += "</ul>"; | |
126 | - pai.innerHTML = ins; | |
127 | 129 | } |
128 | 130 | if (localTitulo) |
129 | 131 | { | ... | ... |