Commit cf603ae003706da330011dd1cc020942d3d11209
1 parent
adf5b5fb
Exists in
master
and in
7 other branches
Conversão da ferramenta Mapa de Calor para Bootstrap
Showing
3 changed files
with
70 additions
and
67 deletions
Show diff stats
admin/admin.db
No preview for this file type
ferramentas/heatmap/index.js
| @@ -213,12 +213,6 @@ i3GEOF.heatmap = | @@ -213,12 +213,6 @@ i3GEOF.heatmap = | ||
| 213 | "i3GEOheatmapresultado", | 213 | "i3GEOheatmapresultado", |
| 214 | true, | 214 | true, |
| 215 | "i3GEOF.heatmap_rodape"); | 215 | "i3GEOF.heatmap_rodape"); |
| 216 | - var b = new YAHOO.widget.Button("i3GEOheatmapbotao1", { | ||
| 217 | - onclick : { | ||
| 218 | - fn : i3GEOF.heatmap.criaheatmap | ||
| 219 | - } | ||
| 220 | - }); | ||
| 221 | - b.addClass("rodar"); | ||
| 222 | }, | 216 | }, |
| 223 | /** | 217 | /** |
| 224 | * Function: criaheatmap | 218 | * Function: criaheatmap |
| @@ -245,11 +239,9 @@ i3GEOF.heatmap = | @@ -245,11 +239,9 @@ i3GEOF.heatmap = | ||
| 245 | p = | 239 | p = |
| 246 | i3GEO.configura.locaplic + "/ferramentas/heatmap/exec.php?g_sid=" + i3GEO.configura.sid + "&funcao=criaheatmap" | 240 | i3GEO.configura.locaplic + "/ferramentas/heatmap/exec.php?g_sid=" + i3GEO.configura.sid + "&funcao=criaheatmap" |
| 247 | + "&tema=" + $i("i3GEOheatmaptemasComSel").value | 241 | + "&tema=" + $i("i3GEOheatmaptemasComSel").value |
| 248 | - // + "&multiplicar=" | ||
| 249 | - // + $i("i3GEOheatmapdfator").value | ||
| 250 | + "&coluna=" + $i("i3GEOheatmaptemasItem").value + "&valorPonto=" + $i("i3GEOheatmapd").value + "&titulo=" | 242 | + "&coluna=" + $i("i3GEOheatmaptemasItem").value + "&valorPonto=" + $i("i3GEOheatmapd").value + "&titulo=" |
| 251 | + $i("i3GEOheatmapTitulo").value + "&opacidade=" + $i("i3GEOheatmapOpacidade").value + "&raio=" | 243 | + $i("i3GEOheatmapTitulo").value + "&opacidade=" + $i("i3GEOheatmapOpacidade").value + "&raio=" |
| 252 | - + $i("i3GEOheatmapRaio").value;// + "&raio=" + $i("i3GEOheatmapMax").value; | 244 | + + $i("i3GEOheatmapRaio").value; |
| 253 | 245 | ||
| 254 | cp = new cpaint(); | 246 | cp = new cpaint(); |
| 255 | cp.set_response_type("JSON"); | 247 | cp.set_response_type("JSON"); |
| @@ -269,19 +261,30 @@ i3GEOF.heatmap = | @@ -269,19 +261,30 @@ i3GEOF.heatmap = | ||
| 269 | * <i3GEO.util.comboTemas> | 261 | * <i3GEO.util.comboTemas> |
| 270 | */ | 262 | */ |
| 271 | comboTemasSel : function() { | 263 | comboTemasSel : function() { |
| 272 | - i3GEO.util.comboTemas("i3GEOheatmaptemasComSel", function(retorno) { | ||
| 273 | - $i("i3GEOheatmapSelTemas").innerHTML = retorno.dados; | ||
| 274 | - $i("i3GEOheatmapSelTemas").style.display = "block"; | ||
| 275 | - if ($i("i3GEOheatmaptemasComSel")) { | ||
| 276 | - $i("i3GEOheatmaptemasComSel").onchange = function() { | ||
| 277 | - i3GEO.mapa.ativaTema($i("i3GEOheatmaptemasComSel").value); | ||
| 278 | - }; | ||
| 279 | - } | ||
| 280 | - if (i3GEO.temaAtivo !== "") { | ||
| 281 | - $i("i3GEOheatmaptemasComSel").value = i3GEO.temaAtivo; | ||
| 282 | - $i("i3GEOheatmaptemasComSel").onchange.call(); | ||
| 283 | - } | ||
| 284 | - }, "i3GEOheatmapSelTemas", "", false, "ligados", "display:block;"); | 264 | + i3GEO.util.comboTemas( |
| 265 | + "i3GEOheatmaptemasComSel", | ||
| 266 | + function(retorno) { | ||
| 267 | + $i("i3GEOheatmapSelTemas").innerHTML = retorno.dados; | ||
| 268 | + $i("i3GEOheatmapSelTemas").style.display = "block"; | ||
| 269 | + if ($i("i3GEOheatmaptemasComSel")) { | ||
| 270 | + $i("i3GEOheatmaptemasComSel").onchange = function() { | ||
| 271 | + i3GEO.mapa.ativaTema($i("i3GEOheatmaptemasComSel").value); | ||
| 272 | + }; | ||
| 273 | + } | ||
| 274 | + if (i3GEO.temaAtivo !== "") { | ||
| 275 | + $i("i3GEOheatmaptemasComSel").value = i3GEO.temaAtivo; | ||
| 276 | + $i("i3GEOheatmaptemasComSel").onchange.call(); | ||
| 277 | + } | ||
| 278 | + }, | ||
| 279 | + "i3GEOheatmapSelTemas", | ||
| 280 | + "", | ||
| 281 | + false, | ||
| 282 | + "ligados", | ||
| 283 | + " ", | ||
| 284 | + false, | ||
| 285 | + true, | ||
| 286 | + "form-control comboTema" | ||
| 287 | + ); | ||
| 285 | }, | 288 | }, |
| 286 | /** | 289 | /** |
| 287 | * Function: comboItens | 290 | * Function: comboItens |
| @@ -294,12 +297,18 @@ i3GEOF.heatmap = | @@ -294,12 +297,18 @@ i3GEOF.heatmap = | ||
| 294 | * | 297 | * |
| 295 | */ | 298 | */ |
| 296 | comboItens : function() { | 299 | comboItens : function() { |
| 297 | - i3GEO.util.comboItens("i3GEOheatmaptemasItem", $i("i3GEOheatmaptemasComSel").value, function(retorno) { | ||
| 298 | - $i("i3GEOheatmapondeItens").innerHTML = retorno.dados; | ||
| 299 | - // + " " | ||
| 300 | - //+ $trad('multiplica', i3GEOF.heatmap.dicionario) | ||
| 301 | - //+ " <input class=digitar id='i3GEOheatmapdfator' type=text size=10 value='1'/>"; | ||
| 302 | - $i("i3GEOheatmapondeItens").style.display = "block"; | ||
| 303 | - }, "i3GEOheatmapondeItens"); | 300 | + i3GEO.util.comboItens( |
| 301 | + "i3GEOheatmaptemasItem", | ||
| 302 | + $i("i3GEOheatmaptemasComSel").value, | ||
| 303 | + function(retorno) { | ||
| 304 | + $i("i3GEOheatmapondeItens").innerHTML = retorno.dados; | ||
| 305 | + $i("i3GEOheatmapondeItens").style.display = "block"; | ||
| 306 | + }, | ||
| 307 | + "i3GEOheatmapondeItens", | ||
| 308 | + "", | ||
| 309 | + "", | ||
| 310 | + "", | ||
| 311 | + "form-control comboTema" | ||
| 312 | + ); | ||
| 304 | } | 313 | } |
| 305 | }; | 314 | }; |
| 306 | \ No newline at end of file | 315 | \ No newline at end of file |
ferramentas/heatmap/template_mst.html
| 1 | -<div style='padding: 5px; background-color: #F2F2F2; top: 0px; left: 0px; display: block; width: 98%;' id='i3GEOheatmapresultado'> | 1 | +<div class='container-fluid' id='i3GEOheatmapresultado'> |
| 2 | <div id='i3GEOFgradeDePontost0'> | 2 | <div id='i3GEOFgradeDePontost0'> |
| 3 | - <img class='i3GeoExemploImg' | ||
| 4 | - src='{{{locaplic}}}/ferramentas/heatmap/exemplo.png' /> | ||
| 5 | - <p class='paragrafo'>{{{ajuda}}} | ||
| 6 | - <p class='paragrafo'>{{{ajuda2}}} | 3 | + <img class="img-rounded pull-left" style="margin: 5px; width: 40px;" src='{{{locaplic}}}/ferramentas/heatmap/exemplo.png' /> |
| 4 | + <h5>{{{ajuda}}}</h5> | ||
| 5 | + <h5>{{{ajuda2}}}</h5> | ||
| 7 | </div> | 6 | </div> |
| 8 | <div id='i3GEOF.heatmap.t1'> | 7 | <div id='i3GEOF.heatmap.t1'> |
| 9 | - <p class='paragrafo'>{{{selecionaTema}}}:</p> | ||
| 10 | - <div id='i3GEOheatmapSelTemas' class='styled-select'></div> | 8 | + <div style="width: 100%;" class='form-group label-fixed condensed'> |
| 9 | + <label class="control-label" for="">{{{selecionaTema}}}</label> | ||
| 10 | + <div style="width: 100%;" class="input-group"> | ||
| 11 | + <div id='i3GEOheatmapSelTemas'></div> | ||
| 12 | + </div> | ||
| 13 | + </div> | ||
| 11 | </div> | 14 | </div> |
| 12 | <div id='i3GEOF.heatmap.t2'> | 15 | <div id='i3GEOF.heatmap.t2'> |
| 13 | - <p class='paragrafo'>{{{valorPonto}}}</p> | ||
| 14 | - <div class='i3geoForm i3geoFormIconeEdita'> | ||
| 15 | - <input id='i3GEOheatmapd' type='text' value='1' /> | 16 | + <div class='form-group label-fixed condensed'> |
| 17 | + <label class="control-label" for="i3GEOheatmapd">{{{valorPonto}}}</label> | ||
| 18 | + <input class="form-control input-lg" type='text' id='i3GEOheatmapd' value='1' /> | ||
| 19 | + </div> | ||
| 20 | + <div style="width: 100%;" class='form-group label-fixed condensed'> | ||
| 21 | + <label class="control-label" for="">{{{selecionaAtributo}}}</label> | ||
| 22 | + <div style="width: 100%;" class="input-group"> | ||
| 23 | + <div id='i3GEOheatmapondeItens'></div> | ||
| 24 | + </div> | ||
| 16 | </div> | 25 | </div> |
| 17 | - <br> | ||
| 18 | - <p class='paragrafo'>{{{selecionaAtributo}}}</p> | ||
| 19 | - <div class='styled-select' id='i3GEOheatmapondeItens' style='display: block'></div> | ||
| 20 | </div> | 26 | </div> |
| 21 | <div id='i3GEOF.heatmap.t3'> | 27 | <div id='i3GEOF.heatmap.t3'> |
| 22 | - <p class='paragrafo'> | ||
| 23 | - {{{tituloNovaCamada}}}<br> | ||
| 24 | - </p> | ||
| 25 | - <div class='i3geoForm i3geoFormIconeEdita'> | ||
| 26 | - <input id='i3GEOheatmapTitulo' type='text' value='Mapa de calor' /> | 28 | + <div class='form-group label-fixed condensed'> |
| 29 | + <label class="control-label" for="i3GEOheatmapTitulo">{{{tituloNovaCamada}}}</label> | ||
| 30 | + <input class="form-control input-lg" type='text' id='i3GEOheatmapTitulo' value='Mapa de calor' /> | ||
| 27 | </div> | 31 | </div> |
| 28 | - <br> | ||
| 29 | - <br> | ||
| 30 | - <p class='paragrafo'> | ||
| 31 | - {{{valorRaio}}}<br> | ||
| 32 | - </p> | ||
| 33 | - <div class='i3geoForm i3geoFormIconeNumero'> | ||
| 34 | - <input id='i3GEOheatmapRaio' type='number' size='10' value='15' /> | 32 | + <div class='form-group label-fixed condensed'> |
| 33 | + <label class="control-label" for="i3GEOheatmapRaio">{{{valorRaio}}}</label> | ||
| 34 | + <input class="form-control input-lg" type='text' id='i3GEOheatmapRaio' value='15' /> | ||
| 35 | </div> | 35 | </div> |
| 36 | - <br> | ||
| 37 | - <br> | ||
| 38 | - <p class='paragrafo'> | ||
| 39 | - {{{opacidade}}}<br> | ||
| 40 | - </p> | ||
| 41 | - <div class='i3geoForm i3geoFormIconeEdita'> | ||
| 42 | - <input id='i3GEOheatmapOpacidade' type='text' size='10' value='50' /> | 36 | + <div class='form-group label-fixed condensed'> |
| 37 | + <label class="control-label" for="i3GEOheatmapOpacidade">{{{opacidade}}}</label> | ||
| 38 | + <input class="form-control input-lg" type='text' id='i3GEOheatmapOpacidade' value='50' /> | ||
| 43 | </div> | 39 | </div> |
| 44 | </div> | 40 | </div> |
| 45 | <div id='i3GEOF.heatmap.t4'> | 41 | <div id='i3GEOF.heatmap.t4'> |
| 46 | - <p class='paragrafo'> | ||
| 47 | - {{{adicionaTema}}}<br> | ||
| 48 | - <br> | ||
| 49 | - <input id='i3GEOheatmapbotao1' type='button' value='{{{criaCamada}}}' /> | 42 | + <h5>{{{adicionaTema}}}</h5> |
| 43 | + <button onclick="i3GEOF.heatmap.criaheatmap()" class='btn btn-primary btn-sm btn-raised'>{{{criaCamada}}}</button> | ||
| 44 | + <h5 id='i3GEOheatmapfim'></h5> | ||
| 50 | </div> | 45 | </div> |
| 51 | -</div> | ||
| 52 | -<div style='top: 10px; left: 0px; display: block; width: 98%; color: red' id='i3GEOheatmapfim'></div> | ||
| 53 | \ No newline at end of file | 46 | \ No newline at end of file |
| 47 | +</div> | ||
| 54 | \ No newline at end of file | 48 | \ No newline at end of file |