Commit e40fe0847b1a1e1bece069aad52dd70a420e29af
1 parent
30481602
Exists in
master
and in
7 other branches
Padronização do código e da interface da opção de listagem de mapas, conforme o …
…modelo adotado no sistema de administração
Showing
6 changed files
with
86 additions
and
57 deletions
Show diff stats
admin1/cadastros/identifica/index.php
| ... | ... | @@ -19,12 +19,6 @@ include "../../head.php"; |
| 19 | 19 | <div class="row center-block"> |
| 20 | 20 | <div class="col-md-12" id="titulo"> |
| 21 | 21 | <div class="well hidden" > |
| 22 | - <!-- | |
| 23 | - <button data-toggle="modal" data-target="#ajudaPrincipal" | |
| 24 | - class="btn btn-primary btn-fab btn-fab-mini pull-right"> | |
| 25 | - <i class="material-icons">help</i> | |
| 26 | - </button> | |
| 27 | - --> | |
| 28 | 22 | <button data-toggle="modal" data-target="#modalFiltro" |
| 29 | 23 | class="btn btn-primary btn-fab btn-fab-mini pull-right"> |
| 30 | 24 | <i class="material-icons">search</i> |
| ... | ... | @@ -32,17 +26,6 @@ include "../../head.php"; |
| 32 | 26 | <h2><small>{{{txtTitulo}}}</small></h2> |
| 33 | 27 | <blockquote>{{{txtDesc}}}</blockquote> |
| 34 | 28 | <div class="clearfix"></div> |
| 35 | - <!--Modal ajuda | |
| 36 | - <div id="ajudaPrincipal" class="modal fade" tabindex="-1"> | |
| 37 | - <div class="modal-dialog"> | |
| 38 | - <div class="modal-content"> | |
| 39 | - <div class="modal-body"> | |
| 40 | - <p>{{{txtIdentifica}}}</p> | |
| 41 | - </div> | |
| 42 | - </div> | |
| 43 | - </div> | |
| 44 | - </div> | |
| 45 | - --> | |
| 46 | 29 | </div> |
| 47 | 30 | <div class="well hidden"> |
| 48 | 31 | <div class="panel-heading"> | ... | ... |
mapas/dicionario.js
| ... | ... | @@ -10,5 +10,25 @@ g_traducao_mapas = |
| 10 | 10 | pt : "Copiado", |
| 11 | 11 | en : "", |
| 12 | 12 | es : "" |
| 13 | + }], | |
| 14 | + "outrosLinks" : [{ | |
| 15 | + pt : "outros links", | |
| 16 | + en : "", | |
| 17 | + es : "" | |
| 18 | + }], | |
| 19 | + "linkDefault" : [{ | |
| 20 | + pt : "abre o mapa", | |
| 21 | + en : "", | |
| 22 | + es : "" | |
| 23 | + }], | |
| 24 | + "tituloModal" : [{ | |
| 25 | + pt : "O mapa pode ser aberto com diferentes interfaces, escolha abaixo", | |
| 26 | + en : "", | |
| 27 | + es : "" | |
| 28 | + }], | |
| 29 | + "txtDesc" : [{ | |
| 30 | + pt : "Lista de mapas que foram elaborados previamente. Os mapas podem ser abertos com diferentes interfaces ou como foram salvos originalmente. Utilize os links principais de cada um para abrir ou a opção de links adicionais.", | |
| 31 | + en : "", | |
| 32 | + es : "" | |
| 13 | 33 | }] |
| 14 | 34 | }; | ... | ... |
mapas/index.js
| ... | ... | @@ -10,9 +10,12 @@ function mostraBotoesBT(){ |
| 10 | 10 | } |
| 11 | 11 | html = Mustache.to_html( |
| 12 | 12 | "{{#mapas}}" + $("#templateLista").html() + "{{/mapas}}", |
| 13 | - d | |
| 13 | + $.extend( | |
| 14 | + {}, | |
| 15 | + i3GEO.idioma.objetoIdioma(g_traducao_mapas), | |
| 16 | + d | |
| 17 | + ) | |
| 14 | 18 | ); |
| 15 | - | |
| 16 | 19 | $("#corpo").html(html); |
| 17 | 20 | d.mapas.push({ |
| 18 | 21 | "ID_MAPA": "topo", |
| ... | ... | @@ -32,6 +35,7 @@ function mostraBotoesBT(){ |
| 32 | 35 | //cpJSON vem de classe_php.js |
| 33 | 36 | cpJSON.call("../classesphp/mapa_controle.php?map_file=&funcao=pegaMapas&g_sid=", "foo", r); |
| 34 | 37 | } |
| 38 | +//define os links adicionais conforme o tipo de mapa | |
| 35 | 39 | function verificaMapa(mapa){ |
| 36 | 40 | var link, nome, combo, links = [], html; |
| 37 | 41 | //imagem dinamica ou nao | ... | ... |
mapas/index.php
| ... | ... | @@ -91,19 +91,7 @@ include "../init/head.php"; |
| 91 | 91 | width: 80px; |
| 92 | 92 | } |
| 93 | 93 | </style> |
| 94 | -<script id="templateLinks" type="x-tmpl-mustache"> | |
| 95 | -<div class="list-group"> | |
| 96 | - <div class="row-content" > | |
| 97 | - <h4 class="list-group-item-heading"> | |
| 98 | - {{{nome}}} | |
| 99 | - </h4> | |
| 100 | - <p class="list-group-item-text hidden-xs hidden-sm"> | |
| 101 | - <a href="{{{link}}}" target="_blank">{{{link}}}</a> | |
| 102 | - </p> | |
| 103 | - </div> | |
| 104 | - <div class="list-group-separator"></div> | |
| 105 | -</div> | |
| 106 | -</script> | |
| 94 | + | |
| 107 | 95 | <body style="padding-top: 55px; position: relative;" > |
| 108 | 96 | <nav class="navbar navbar-default navbar-fixed-top"> |
| 109 | 97 | <div class="container-fluid"> |
| ... | ... | @@ -131,6 +119,13 @@ include "../init/head.php"; |
| 131 | 119 | <div class="container"> |
| 132 | 120 | <div class="row center-block"> |
| 133 | 121 | <div class="col-md-12"> |
| 122 | + <div class="well hidden escondido" > | |
| 123 | + <blockquote id="titulo"></blockquote> | |
| 124 | + </div> | |
| 125 | + </div> | |
| 126 | + </div> | |
| 127 | + <div class="row center-block"> | |
| 128 | + <div class="col-md-12"> | |
| 134 | 129 | <div class="well" id="corpo"> |
| 135 | 130 | <i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i> <span class="sr-only">Loading...</span> |
| 136 | 131 | </div> |
| ... | ... | @@ -149,30 +144,10 @@ include "../init/head.php"; |
| 149 | 144 | </div> |
| 150 | 145 | </div> |
| 151 | 146 | </div> |
| 152 | -<script id="templateLista" type="x-tmpl-mustache"> | |
| 153 | -<div class="list-group-item" > | |
| 154 | - <div class="row-content" > | |
| 155 | - <h4 class="list-group-item-heading"> | |
| 156 | - <span class="pull-right"> </span> | |
| 157 | - <a onclick="mostraLinks('detalhe_{{ID_MAPA}}')" href="javascript:void(0)" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
| 158 | - <i class="material-icons md-18">more_horiz</i> | |
| 159 | - </a> | |
| 160 | - <span class="pull-right"> </span> | |
| 161 | - <a title="default" href="{{{LINK}}}" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
| 162 | - <i class="material-icons md-18">launch</i> | |
| 163 | - </a> | |
| 164 | - <span class="pull-right"> </span> | |
| 165 | - <a title="link" role="button" href="javascript:void(0)" data-toggle="quadroQrcode" data-url="{{{LINK}}}" class="btn btn-danger btn-fab btn-fab-mini pull-right"> | |
| 166 | - <span class="glyphicon glyphicon-qrcode" aria-hidden="true"></span> | |
| 167 | - </a> | |
| 168 | - <a href="{{{LINK}}}"><img class="img-rounded" src="{{{IMAGEM}}}" /> {{{NOME}}}</a> | |
| 169 | - </h4> | |
| 170 | - </div> | |
| 171 | - <div class="list-group-separator"></div> | |
| 172 | -</div> | |
| 173 | -<!-- dados para o modal --> | |
| 174 | -<div style="display:none" id="detalhe_{{ID_MAPA}}">{{{subtitulo}}}</div> | |
| 175 | -</script> | |
| 147 | + <?php | |
| 148 | + include("templates/templatelinks.php"); | |
| 149 | + include("templates/templatelista.php"); | |
| 150 | + ?> | |
| 176 | 151 | <script src='../pacotes/cpaint/cpaint2_compacto.inc.js'></script> |
| 177 | 152 | <script src='../classesjs/compactados/dicionario_compacto.js'></script> |
| 178 | 153 | <script src='../classesjs/compactados/classe_util_compacto.js'></script> |
| ... | ... | @@ -185,7 +160,13 @@ include "../init/head.php"; |
| 185 | 160 | <script> |
| 186 | 161 | $(document).ready(function(){ |
| 187 | 162 | i3GEO.configura = {"locaplic" : window.location.href.split("/mapas")[0],"sid": ""}; |
| 188 | - $(".active").html($trad("mapas",g_traducao_mapas)); | |
| 163 | + //traducoes de alguns elementos individualmente | |
| 164 | + $(".active").html( | |
| 165 | + $trad("mapas",g_traducao_mapas) | |
| 166 | + ); | |
| 167 | + $("#titulo").html( | |
| 168 | + $trad("txtDesc",g_traducao_mapas) | |
| 169 | + ); | |
| 189 | 170 | mostraBotoesBT(); |
| 190 | 171 | $('.escondido').removeClass('hidden'); |
| 191 | 172 | $.material.init(); | ... | ... |
| ... | ... | @@ -0,0 +1,14 @@ |
| 1 | +<script id="templateLinks" type="x-tmpl-mustache"> | |
| 2 | +<div class="list-group"> | |
| 3 | + <div class="list-group-separator"></div> | |
| 4 | + <div class="row-content" > | |
| 5 | + <h4 class="list-group-item-heading"> | |
| 6 | + {{{nome}}} | |
| 7 | + </h4> | |
| 8 | + <p class="list-group-item-text hidden-xs hidden-sm"> | |
| 9 | + <a href="{{{link}}}" target="_blank">{{{link}}}</a> | |
| 10 | + </p> | |
| 11 | + </div> | |
| 12 | + <div class="list-group-separator"></div> | |
| 13 | +</div> | |
| 14 | +</script> | |
| 0 | 15 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,27 @@ |
| 1 | +<script id="templateLista" type="x-tmpl-mustache"> | |
| 2 | +<div class="list-group-item" > | |
| 3 | + <div class="row-content" > | |
| 4 | + <h4 class="list-group-item-heading"> | |
| 5 | + <span class="pull-right"> </span> | |
| 6 | + <a title="{{{outrosLinks}}}" onclick="mostraLinks('detalhe_{{ID_MAPA}}')" href="javascript:void(0)" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
| 7 | + <i class="material-icons md-18">more_horiz</i> | |
| 8 | + </a> | |
| 9 | + <span class="pull-right"> </span> | |
| 10 | + <a title="{{{linkDefault}}}" href="{{{LINK}}}" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
| 11 | + <i class="material-icons md-18">launch</i> | |
| 12 | + </a> | |
| 13 | + <span class="pull-right"> </span> | |
| 14 | + <a title="link" role="button" href="javascript:void(0)" data-toggle="quadroQrcode" data-url="{{{LINK}}}" class="btn btn-danger btn-fab btn-fab-mini pull-right"> | |
| 15 | + <span class="glyphicon glyphicon-qrcode" aria-hidden="true"></span> | |
| 16 | + </a> | |
| 17 | + <a href="{{{LINK}}}"><img class="img-rounded" src="{{{IMAGEM}}}" /> {{{NOME}}}</a> | |
| 18 | + </h4> | |
| 19 | + </div> | |
| 20 | + <div class="list-group-separator"></div> | |
| 21 | +</div> | |
| 22 | +<!-- dados para o modal --> | |
| 23 | +<div style="display:none" id="detalhe_{{ID_MAPA}}"> | |
| 24 | +<h4>{{{tituloModal}}}</h4> | |
| 25 | +{{{subtitulo}}} | |
| 26 | +</div> | |
| 27 | +</script> | |
| 0 | 28 | \ No newline at end of file | ... | ... |