Commit c0c49f548f72cd948ce9ec049772b0faf7f64c6c
1 parent
c724b12d
Exists in
master
and in
7 other branches
Reorganização do layout do editor de atlas
Showing
14 changed files
with
297 additions
and
136 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/js/estat_editor.js
| ... | ... | @@ -610,7 +610,7 @@ i3GEOadmin.editor = { |
| 610 | 610 | '<p class="paragrafo" ><input type=checkbox name=i3GEOuploadCriaMapfile id=i3GEOuploadCriaMapfile style="cursor:pointer;position:relative;top:2px;" /> Marque para criar o arquivo de configuração (mapfile) e visualizar os dados no mapa interativo (você poderá editar esse arquivo posteriormente no editor de mapfiles)' + |
| 611 | 611 | '<p class="paragrafo" ><input type="checkbox" id="incluiserialshp" name="incluiserialshp" style="cursor:pointer;position:relative;top:2px;"> Inclui uma coluna gid do tipo serial e chave primária com código único</p>' + |
| 612 | 612 | '<p class="paragrafo" ><input id=i3GEOuploadsubmit type="button" value="Enviar shapefile" size=12 />' + |
| 613 | - '<input type="hidden" name="MAX_FILE_SIZE" value="100000000">' + | |
| 613 | + '<input type="hidden" name="MAX_FILE_SIZE" value="10000000000000">' + | |
| 614 | 614 | '<input type="hidden" id="i3GEOuploadcodigoconexao" name="i3GEOuploadcodigoconexao" value="">' + |
| 615 | 615 | '<input type="hidden" id="i3GEOuploadesquema" name="i3GEOuploadesquema" value="">' + |
| 616 | 616 | "<p class='paragrafo' style=color:red >Não utilize '_' no nome do arquivo. Apenas letras e números são aceitos!!!</p>" + | ... | ... |
admin/safe.php
admin1/catalogo/atlas/exec.php
| ... | ... | @@ -31,7 +31,9 @@ include_once (dirname ( __FILE__ ) . "/../../../admin/php/login.php"); |
| 31 | 31 | $funcoesEdicao = array ( |
| 32 | 32 | "ADICIONAR", |
| 33 | 33 | "ALTERAR", |
| 34 | - "EXCLUIR" | |
| 34 | + "EXCLUIR", | |
| 35 | + "LISTA", | |
| 36 | + "LISTAUNICO" | |
| 35 | 37 | ); |
| 36 | 38 | if (in_array ( strtoupper ( $funcao ), $funcoesEdicao )) { |
| 37 | 39 | if (verificaOperacaoSessao ( "admin/html/atlas" ) === false) { |
| ... | ... | @@ -74,8 +76,20 @@ switch ($funcao) { |
| 74 | 76 | retornaJSON ( $dados ); |
| 75 | 77 | exit (); |
| 76 | 78 | break; |
| 79 | + case "LISTAUNICO" : | |
| 80 | + $dados = pegaDados("SELECT id_atlas, titulo_atlas, publicado_atlas, ordem_atlas, basemapfile_atlas, desc_atlas, h_atlas, w_atlas, icone_atlas, link_atlas, pranchadefault_atlas, template_atlas, tipoguias_atlas from ".$esquemaadmin."i3geoadmin_atlas WHERE id_atlas = $id_atlas", $dbh, false); | |
| 81 | + if ($dados === false) { | |
| 82 | + $dbhw = null; | |
| 83 | + $dbh = null; | |
| 84 | + header ( "HTTP/1.1 500 erro ao consultar banco de dados tabela de atlas" ); | |
| 85 | + exit (); | |
| 86 | + } | |
| 87 | + $dbhw = null; | |
| 88 | + $dbh = null; | |
| 89 | + retornaJSON ( array("dados"=>$dados[0]) ); | |
| 90 | + break; | |
| 77 | 91 | case "LISTA" : |
| 78 | - $dados = pegaDados("SELECT id_atlas, titulo_atlas, publicado_atlas, ordem_atlas, basemapfile_atlas, desc_atlas, h_atlas, w_atlas, icone_atlas, link_atlas, pranchadefault_atlas, template_atlas, tipoguias_atlas from ".$esquemaadmin."i3geoadmin_atlas ORDER BY lower(titulo_atlas), ordem_atlas", $dbh, false); | |
| 92 | + $dados = pegaDados("SELECT id_atlas, titulo_atlas, ordem_atlas from ".$esquemaadmin."i3geoadmin_atlas ORDER BY lower(titulo_atlas), ordem_atlas", $dbh, false); | |
| 79 | 93 | if ($dados === false) { |
| 80 | 94 | $dbhw = null; |
| 81 | 95 | $dbh = null; | ... | ... |
admin1/catalogo/atlas/index.js
| ... | ... | @@ -27,6 +27,8 @@ i3GEOadmin.atlas = { |
| 27 | 27 | ondeLista: "", |
| 28 | 28 | //conteudo html do formulario de adicao de operacao |
| 29 | 29 | formAdiciona: "", |
| 30 | + //parametros obtidos do formulario de edicao antes de abrir o modal de confirmacao | |
| 31 | + parametrosSalvar: "", | |
| 30 | 32 | init: function(onde){ |
| 31 | 33 | i3GEOadmin.atlas.ondeLista = onde; |
| 32 | 34 | i3GEOadmin.atlas.lista(); |
| ... | ... | @@ -59,28 +61,7 @@ Obt&eacute;m a lista |
| 59 | 61 | { |
| 60 | 62 | "data": json["dados"], |
| 61 | 63 | "onExcluir": "i3GEOadmin.atlas.excluirDialogo",//funcao |
| 62 | - "onSalvar": "i3GEOadmin.atlas.salvarDialogo",//funcao | |
| 63 | - "opcoesPublicado": function(){ | |
| 64 | - var hash = {}; | |
| 65 | - hash["sim"] = i3GEOadmin.atlas.dicionario.sim; | |
| 66 | - hash["nao"] = i3GEOadmin.atlas.dicionario.nao; | |
| 67 | - if(this.publicado_atlas == ""){ | |
| 68 | - this.publicado_atlas = "SIM"; | |
| 69 | - } | |
| 70 | - hash[this.publicado_atlas + "-sel"] = "selected"; | |
| 71 | - return Mustache.to_html( | |
| 72 | - $("#templateOpcoesPublicado").html(), | |
| 73 | - hash | |
| 74 | - ); | |
| 75 | - }, | |
| 76 | - "opcoesTipoGuia": function(){ | |
| 77 | - var hash = {}; | |
| 78 | - hash[this.tipoguias_atlas + "-sel"] = "selected"; | |
| 79 | - return Mustache.to_html( | |
| 80 | - $("#templateOpcoesTipoGuia").html(), | |
| 81 | - hash | |
| 82 | - ); | |
| 83 | - } | |
| 64 | + "onEditar": "i3GEOadmin.atlas.editarDialogo" | |
| 84 | 65 | } |
| 85 | 66 | ) |
| 86 | 67 | ); |
| ... | ... | @@ -135,6 +116,60 @@ Obt&eacute;m a lista |
| 135 | 116 | i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); |
| 136 | 117 | }); |
| 137 | 118 | }, |
| 119 | + editarDialogo: function(id){ | |
| 120 | + i3GEOadmin.core.fechaModalGeral(); | |
| 121 | + i3GEOadmin.core.modalAguarde(true); | |
| 122 | + $.post( | |
| 123 | + "exec.php?funcao=listaunico", | |
| 124 | + "id_atlas=" + id | |
| 125 | + ) | |
| 126 | + .done( | |
| 127 | + function(data, status){ | |
| 128 | + var json = jQuery.parseJSON(data); | |
| 129 | + var templateLista = $("#templateFormLista").html(); | |
| 130 | + var html = Mustache.to_html( | |
| 131 | + "{{#data}}" + templateLista + "{{/data}}", | |
| 132 | + $.extend( | |
| 133 | + {}, | |
| 134 | + i3GEOadmin.atlas.dicionario, | |
| 135 | + { | |
| 136 | + "data": json["dados"], | |
| 137 | + "onExcluir": "i3GEOadmin.atlas.excluirDialogo",//funcao | |
| 138 | + "onSalvar": "i3GEOadmin.atlas.salvarDialogo",//funcao | |
| 139 | + "opcoesPublicado": function(){ | |
| 140 | + var hash = {}; | |
| 141 | + hash["sim"] = i3GEOadmin.atlas.dicionario.sim; | |
| 142 | + hash["nao"] = i3GEOadmin.atlas.dicionario.nao; | |
| 143 | + if(this.publicado_atlas == ""){ | |
| 144 | + this.publicado_atlas = "SIM"; | |
| 145 | + } | |
| 146 | + hash[this.publicado_atlas + "-sel"] = "selected"; | |
| 147 | + return Mustache.to_html( | |
| 148 | + $("#templateOpcoesPublicado").html(), | |
| 149 | + hash | |
| 150 | + ); | |
| 151 | + }, | |
| 152 | + "opcoesTipoGuia": function(){ | |
| 153 | + var hash = {}; | |
| 154 | + hash[this.tipoguias_atlas + "-sel"] = "selected"; | |
| 155 | + return Mustache.to_html( | |
| 156 | + $("#templateOpcoesTipoGuia").html(), | |
| 157 | + hash | |
| 158 | + ); | |
| 159 | + } | |
| 160 | + } | |
| 161 | + ) | |
| 162 | + ); | |
| 163 | + i3GEOadmin.core.abreModalGeral(html); | |
| 164 | + } | |
| 165 | + ) | |
| 166 | + .fail( | |
| 167 | + function(data){ | |
| 168 | + i3GEOadmin.core.modalAguarde(false); | |
| 169 | + i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); | |
| 170 | + } | |
| 171 | + ); | |
| 172 | + }, | |
| 138 | 173 | adicionaDialogo: function(){ |
| 139 | 174 | i3GEOadmin.core.abreModalGeral(i3GEOadmin.atlas.formAdiciona); |
| 140 | 175 | }, |
| ... | ... | @@ -192,17 +227,18 @@ Obt&eacute;m a lista |
| 192 | 227 | ); |
| 193 | 228 | }, |
| 194 | 229 | salvarDialogo: function(id){ |
| 230 | + i3GEOadmin.atlas.parametrosSalvar = $("#form-edicao-" + id).serialize(); | |
| 195 | 231 | var hash = { |
| 196 | 232 | "mensagem": i3GEOadmin.atlas.dicionario.confirma, |
| 197 | 233 | "onBotao1": "i3GEOadmin.atlas.salvar('"+id+"')", |
| 198 | 234 | "botao1": i3GEOadmin.atlas.dicionario.sim, |
| 199 | - "onBotao2": "i3GEOadmin.core.fechaModalConfirma();", | |
| 235 | + "onBotao2": "i3GEOadmin.atlas.parametrosSalvar = '';i3GEOadmin.core.fechaModalConfirma();", | |
| 200 | 236 | "botao2": i3GEOadmin.atlas.dicionario.nao |
| 201 | 237 | }; |
| 202 | 238 | i3GEOadmin.core.abreModalConfirma(hash); |
| 203 | 239 | }, |
| 204 | 240 | salvar: function(id){ |
| 205 | - var parametros = $("#form-" + id + " form").serialize(); | |
| 241 | + var parametros = i3GEOadmin.atlas.parametrosSalvar; | |
| 206 | 242 | i3GEOadmin.core.fechaModalGeral(); |
| 207 | 243 | i3GEOadmin.core.modalAguarde(true); |
| 208 | 244 | $.post( |
| ... | ... | @@ -212,6 +248,7 @@ Obt&eacute;m a lista |
| 212 | 248 | .done( |
| 213 | 249 | function(data, status){ |
| 214 | 250 | i3GEOadmin.core.modalAguarde(false); |
| 251 | + i3GEOadmin.atlas.parametrosSalvar = ''; | |
| 215 | 252 | i3GEOadmin.core.iconeAguarde(i3GEOadmin.atlas.ondeLista); |
| 216 | 253 | i3GEOadmin.atlas.lista(); |
| 217 | 254 | } |
| ... | ... | @@ -219,6 +256,7 @@ Obt&eacute;m a lista |
| 219 | 256 | .fail( |
| 220 | 257 | function(data){ |
| 221 | 258 | i3GEOadmin.core.modalAguarde(false); |
| 259 | + i3GEOadmin.atlas.parametrosSalvar = ''; | |
| 222 | 260 | i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); |
| 223 | 261 | } |
| 224 | 262 | ); | ... | ... |
admin1/catalogo/atlas/index.php
| ... | ... | @@ -26,7 +26,6 @@ include "../../head.php"; |
| 26 | 26 | <blockquote>{{{txtDesc}}}</blockquote> |
| 27 | 27 | <!-- aqui entra o filtro --> |
| 28 | 28 | <div class="form-group"> |
| 29 | - | |
| 30 | 29 | <select title="{{{filtro}}}" onchange="i3GEOadmin.core.filtra(this)" id="filtro" class="form-control input-lg"> |
| 31 | 30 | </select> |
| 32 | 31 | </div> |
| ... | ... | @@ -57,7 +56,7 @@ include "../../head.php"; |
| 57 | 56 | <option value="form-{{id_atlas}}">{{{titulo_atlas}}}</option> |
| 58 | 57 | </script> |
| 59 | 58 | <script id="templateFormLista" type="x-tmpl-mustache"> |
| 60 | -<form style="" action="#" onsubmit="{{onSalvar}}('{{id_atlas}}');return false;" onchange="this.style.boxShadow='2px 2px 5px 0 #009688';" class="form-horizontal" role="form" method="post" > | |
| 59 | +<form id="form-edicao-{{id_atlas}}" style="" action="#" onsubmit="{{onSalvar}}('{{id_atlas}}');return false;" onchange="this.style.boxShadow='2px 2px 5px 0 #009688';" class="form-horizontal" role="form" method="post" > | |
| 61 | 60 | <div class="row"> |
| 62 | 61 | <div class="col-md-12"> |
| 63 | 62 | <div class="form-group form-group-lg"> |
| ... | ... | @@ -167,28 +166,27 @@ include "../../head.php"; |
| 167 | 166 | </form> |
| 168 | 167 | </script> |
| 169 | 168 | <script id="templateLista" type="x-tmpl-mustache"> |
| 170 | -<div class="panel panel-default" id="form-{{id_atlas}}"> | |
| 171 | - <div class="panel-heading icon" role="tab"> | |
| 172 | - <h3 class="panel-title {{escondido}}"> | |
| 173 | - <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_atlas}}')" class="btn btn-danger btn-fab btn-fab-mini" role="button"> | |
| 174 | - <i class="material-icons">delete_forever</i> | |
| 169 | +<div class="list-group-item" id="form-{{id_atlas}}"> | |
| 170 | + <div class="row-content"> | |
| 171 | + <h3 class="list-group-item-heading {{escondido}}"> | |
| 172 | + {{{titulo_atlas}}} | |
| 173 | + <div class="pull-right"> | |
| 174 | + <a role="button" class="btn btn-danger btn-fab btn-fab-mini pull-left" onclick="i3GEOadmin.atlas.editarPranchas('{{id_atlas}}','{{{titulo_atlas}}}')" href="javascript:void(0)"> | |
| 175 | + <i class="material-icons md-18">folder_open</i> | |
| 176 | + </a> | |
| 177 | + <label class=pull-right><h6 style="margin-top: 5px; margin-bottom: 5px;"> {{{pranchas}}}</h6></label> | |
| 178 | + </div> | |
| 179 | + <span class="pull-right"> </span> | |
| 180 | + <a href="javascript:void(0)" onclick="{{onEditar}}('{{id_atlas}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
| 181 | + <i class="material-icons md-18">edit</i> | |
| 182 | + </a> | |
| 183 | + <span class="pull-right"> </span> | |
| 184 | + <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_atlas}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
| 185 | + <i class="material-icons md-18">delete_forever</i> | |
| 175 | 186 | </a> |
| 176 | - | |
| 177 | - <a class="collapsed in" role="button" data-toggle="collapse" href="#body-form-{{id_atlas}}" | |
| 178 | - aria-expanded="false" aria-controls="#body-form-{{id_atlas}}"> {{{titulo_atlas}}} </a> | |
| 179 | 187 | </h3> |
| 180 | 188 | </div> |
| 181 | - <div class="panel-body panel-collapse collapse" id="body-form-{{id_atlas}}"> | |
| 182 | - {{{templateFormLista}}} | |
| 183 | - </div> | |
| 184 | - <div class="panel-footer {{{escondido}}}" style="padding-top: 0px; padding-bottom: 0px;"> | |
| 185 | - <div class="pull-right"> | |
| 186 | - <button style="color:#007a6f;" onclick="i3GEOadmin.atlas.editarPranchas('{{id_atlas}}','{{{titulo_atlas}}}')" class="btn btn-primary btn-xs" style="margin-top: 2px; margin-bottom: 2px;"> | |
| 187 | - <i class="material-icons">folder_open</i> {{{pranchas}}} | |
| 188 | - </button> | |
| 189 | - </div> | |
| 190 | - <div class="clearfix"></div> | |
| 191 | - </div> | |
| 189 | + <div class="list-group-separator"></div> | |
| 192 | 190 | </div> |
| 193 | 191 | </script> |
| 194 | 192 | <script id="templateOpcoesTipoGuia" type="x-tmpl-mustache"> | ... | ... |
admin1/catalogo/atlas/pranchas/exec.php
| ... | ... | @@ -31,7 +31,9 @@ include_once (dirname ( __FILE__ ) . "/../../../../admin/php/login.php"); |
| 31 | 31 | $funcoesEdicao = array ( |
| 32 | 32 | "ADICIONAR", |
| 33 | 33 | "ALTERAR", |
| 34 | - "EXCLUIR" | |
| 34 | + "EXCLUIR", | |
| 35 | + "LISTA", | |
| 36 | + "LISTAUNICO" | |
| 35 | 37 | ); |
| 36 | 38 | if (in_array ( strtoupper ( $funcao ), $funcoesEdicao )) { |
| 37 | 39 | if (verificaOperacaoSessao ( "admin/html/atlas" ) === false) { |
| ... | ... | @@ -74,8 +76,20 @@ switch ($funcao) { |
| 74 | 76 | retornaJSON ( $dados ); |
| 75 | 77 | exit (); |
| 76 | 78 | break; |
| 79 | + case "LISTAUNICO" : | |
| 80 | + $dados = pegaDados("SELECT id_atlas, id_prancha, titulo_prancha, ordem_prancha, desc_prancha, h_prancha, icone_prancha, link_prancha, mapext_prancha, w_prancha from ".$esquemaadmin."i3geoadmin_atlasp WHERE id_prancha = '$id_prancha'", $dbh, false); | |
| 81 | + if ($dados === false) { | |
| 82 | + $dbhw = null; | |
| 83 | + $dbh = null; | |
| 84 | + header ( "HTTP/1.1 500 erro ao consultar banco de dados tabela de pranchas" ); | |
| 85 | + exit (); | |
| 86 | + } | |
| 87 | + $dbhw = null; | |
| 88 | + $dbh = null; | |
| 89 | + retornaJSON ( array("dados"=>$dados[0]) ); | |
| 90 | + break; | |
| 77 | 91 | case "LISTA" : |
| 78 | - $dados = pegaDados("SELECT id_atlas, id_prancha, titulo_prancha, ordem_prancha, desc_prancha, h_prancha, icone_prancha, link_prancha, mapext_prancha, w_prancha from ".$esquemaadmin."i3geoadmin_atlasp WHERE id_atlas = '$id_atlas'", $dbh, false); | |
| 92 | + $dados = pegaDados("SELECT id_atlas, id_prancha, titulo_prancha from ".$esquemaadmin."i3geoadmin_atlasp WHERE id_atlas = '$id_atlas' ORDER by ordem_prancha", $dbh, false); | |
| 79 | 93 | if ($dados === false) { |
| 80 | 94 | $dbhw = null; |
| 81 | 95 | $dbh = null; | ... | ... |
admin1/catalogo/atlas/pranchas/index.js
| ... | ... | @@ -28,6 +28,8 @@ i3GEOadmin.prancha = { |
| 28 | 28 | ondeLista: "", |
| 29 | 29 | //conteudo html do formulario de adicao de operacao |
| 30 | 30 | formAdiciona: "", |
| 31 | + //parametros obtidos do formulario de edicao antes de abrir o modal de confirmacao | |
| 32 | + parametrosSalvar: "", | |
| 31 | 33 | init: function(onde){ |
| 32 | 34 | i3GEOadmin.prancha.ondeLista = onde; |
| 33 | 35 | i3GEOadmin.prancha.lista(); |
| ... | ... | @@ -51,7 +53,6 @@ Obt&eacute;m a lista |
| 51 | 53 | var json = jQuery.parseJSON(data); |
| 52 | 54 | //template do form de cada operacao |
| 53 | 55 | var templateLista = $("#templateLista").html(); |
| 54 | - templateLista = templateLista.replace("{{{templateFormLista}}}",$("#templateFormLista").html()); | |
| 55 | 56 | //lista todas as menus |
| 56 | 57 | var html = Mustache.to_html( |
| 57 | 58 | "{{#data}}" + templateLista + "{{/data}}", |
| ... | ... | @@ -61,7 +62,7 @@ Obt&eacute;m a lista |
| 61 | 62 | { |
| 62 | 63 | "data": json["dados"], |
| 63 | 64 | "onExcluir": "i3GEOadmin.prancha.excluirDialogo",//funcao |
| 64 | - "onSalvar": "i3GEOadmin.prancha.salvarDialogo"//funcao | |
| 65 | + "onEditar": "i3GEOadmin.prancha.editarDialogo"//funcao | |
| 65 | 66 | } |
| 66 | 67 | ) |
| 67 | 68 | ); |
| ... | ... | @@ -107,6 +108,40 @@ Obt&eacute;m a lista |
| 107 | 108 | i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); |
| 108 | 109 | }); |
| 109 | 110 | }, |
| 111 | + editarDialogo: function(id){ | |
| 112 | + i3GEOadmin.core.fechaModalGeral(); | |
| 113 | + i3GEOadmin.core.modalAguarde(true); | |
| 114 | + $.post( | |
| 115 | + "exec.php?funcao=listaunico", | |
| 116 | + "id_prancha=" + id | |
| 117 | + ) | |
| 118 | + .done( | |
| 119 | + function(data, status){ | |
| 120 | + var json = jQuery.parseJSON(data); | |
| 121 | + var templateLista = $("#templateFormLista").html(); | |
| 122 | + //lista todas as menus | |
| 123 | + var html = Mustache.to_html( | |
| 124 | + "{{#data}}" + templateLista + "{{/data}}", | |
| 125 | + $.extend( | |
| 126 | + {}, | |
| 127 | + i3GEOadmin.prancha.dicionario, | |
| 128 | + { | |
| 129 | + "data": json["dados"], | |
| 130 | + "onExcluir": "i3GEOadmin.prancha.excluirDialogo",//funcao | |
| 131 | + "onSalvar": "i3GEOadmin.prancha.salvarDialogo"//funcao | |
| 132 | + } | |
| 133 | + ) | |
| 134 | + ); | |
| 135 | + i3GEOadmin.core.abreModalGeral(html); | |
| 136 | + } | |
| 137 | + ) | |
| 138 | + .fail( | |
| 139 | + function(data){ | |
| 140 | + i3GEOadmin.core.modalAguarde(false); | |
| 141 | + i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); | |
| 142 | + } | |
| 143 | + ); | |
| 144 | + }, | |
| 110 | 145 | adicionaDialogo: function(){ |
| 111 | 146 | i3GEOadmin.core.abreModalGeral(i3GEOadmin.prancha.formAdiciona); |
| 112 | 147 | }, |
| ... | ... | @@ -164,17 +199,18 @@ Obt&eacute;m a lista |
| 164 | 199 | ); |
| 165 | 200 | }, |
| 166 | 201 | salvarDialogo: function(id){ |
| 202 | + i3GEOadmin.prancha.parametrosSalvar = $("#form-edicao-" + id).serialize(); | |
| 167 | 203 | var hash = { |
| 168 | 204 | "mensagem": i3GEOadmin.prancha.dicionario.confirma, |
| 169 | 205 | "onBotao1": "i3GEOadmin.prancha.salvar('"+id+"')", |
| 170 | 206 | "botao1": i3GEOadmin.prancha.dicionario.sim, |
| 171 | - "onBotao2": "i3GEOadmin.core.fechaModalConfirma();", | |
| 207 | + "onBotao2": "i3GEOadmin.prancha.parametrosSalvar = '';i3GEOadmin.core.fechaModalConfirma();", | |
| 172 | 208 | "botao2": i3GEOadmin.prancha.dicionario.nao |
| 173 | 209 | }; |
| 174 | 210 | i3GEOadmin.core.abreModalConfirma(hash); |
| 175 | 211 | }, |
| 176 | 212 | salvar: function(id){ |
| 177 | - var parametros = $("#form-" + id + " form").serialize(); | |
| 213 | + var parametros = i3GEOadmin.prancha.parametrosSalvar; | |
| 178 | 214 | i3GEOadmin.core.fechaModalGeral(); |
| 179 | 215 | i3GEOadmin.core.modalAguarde(true); |
| 180 | 216 | $.post( |
| ... | ... | @@ -184,6 +220,7 @@ Obt&eacute;m a lista |
| 184 | 220 | .done( |
| 185 | 221 | function(data, status){ |
| 186 | 222 | i3GEOadmin.core.modalAguarde(false); |
| 223 | + i3GEOadmin.prancha.parametrosSalvar = ''; | |
| 187 | 224 | i3GEOadmin.core.iconeAguarde(i3GEOadmin.prancha.ondeLista); |
| 188 | 225 | i3GEOadmin.prancha.lista(); |
| 189 | 226 | } |
| ... | ... | @@ -191,6 +228,7 @@ Obt&eacute;m a lista |
| 191 | 228 | .fail( |
| 192 | 229 | function(data){ |
| 193 | 230 | i3GEOadmin.core.modalAguarde(false); |
| 231 | + i3GEOadmin.prancha.parametrosSalvar = ''; | |
| 194 | 232 | i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); |
| 195 | 233 | } |
| 196 | 234 | ); | ... | ... |
admin1/catalogo/atlas/pranchas/index.php
| ... | ... | @@ -6,15 +6,15 @@ include "../../../head.php"; |
| 6 | 6 | $id_atlas = filter_var($_GET["id_atlas"], FILTER_SANITIZE_NUMBER_INT); |
| 7 | 7 | $titulo_atlas = filter_var($_GET["titulo_atlas"], FILTER_SANITIZE_STRING); |
| 8 | 8 | ?> |
| 9 | -<div class="container-fluid"> | |
| 9 | +<div class="container-fluid migalha"> | |
| 10 | 10 | <div class="row"> |
| 11 | - <ol class="breadcrumb"> | |
| 12 | - <li><a href="../../../init/index.php">i3Geo</a></li> | |
| 13 | - <li><a href="../../../index.php">Admin</a></li> | |
| 14 | - <li>Catálogo</li> | |
| 15 | - <li><a href="../index.php?id_filtro=<?php echo $id_atlas; ?>">Atlas - <?php echo $titulo_atlas; ?></a></li> | |
| 16 | - <li class="active">Pranchas</li> | |
| 17 | - </ol> | |
| 11 | + <div class="btn-group btn-breadcrumb"> | |
| 12 | + <a class="btn btn-default" href="../../../../init/index.php"><div>i3Geo</div></a> | |
| 13 | + <a class="btn btn-default" href="../../../index.php"><div>Admin</div></a> | |
| 14 | + <a class="btn btn-default" style="pointer-events: none"><div>Catálogo</div></a> | |
| 15 | + <a class="btn btn-default" href="../index.php"><div>Atlas</div></a> | |
| 16 | + <a class="btn btn-default" style="pointer-events: none"><div>Pranchas</div></a> | |
| 17 | + </div> | |
| 18 | 18 | </div> |
| 19 | 19 | </div> |
| 20 | 20 | <div class="container"> |
| ... | ... | @@ -26,10 +26,11 @@ $titulo_atlas = filter_var($_GET["titulo_atlas"], FILTER_SANITIZE_STRING); |
| 26 | 26 | <i class="material-icons">help</i> |
| 27 | 27 | </button> |
| 28 | 28 | <h2><small>{{{txtTitulo}}}</small></h2> |
| 29 | + <h3><small>Atlas: <?php echo $titulo_atlas; ?></small></h3> | |
| 29 | 30 | <!--<blockquote>{{{txtDesc}}}</blockquote>--> |
| 30 | 31 | <!-- aqui entra o filtro --> |
| 31 | 32 | <div class="form-group"> |
| 32 | - | |
| 33 | + | |
| 33 | 34 | <select title="{{{filtro}}}" onchange="i3GEOadmin.core.filtra(this)" id="filtro" class="form-control input-lg"> |
| 34 | 35 | </select> |
| 35 | 36 | </div> |
| ... | ... | @@ -59,7 +60,7 @@ $titulo_atlas = filter_var($_GET["titulo_atlas"], FILTER_SANITIZE_STRING); |
| 59 | 60 | <option value="form-{{id_prancha}}">{{{titulo_prancha}}}</option> |
| 60 | 61 | </script> |
| 61 | 62 | <script id="templateFormLista" type="x-tmpl-mustache"> |
| 62 | -<form style="" action="#" onsubmit="{{onSalvar}}('{{id_prancha}}');return false;" onchange="this.style.boxShadow='2px 2px 5px 0 #009688';" class="form-horizontal" role="form" method="post" > | |
| 63 | +<form id="form-edicao-{{id_prancha}}" style="" action="#" onsubmit="{{onSalvar}}('{{id_prancha}}');return false;" onchange="this.style.boxShadow='2px 2px 5px 0 #009688';" class="form-horizontal" role="form" method="post" > | |
| 63 | 64 | <div class="row"> |
| 64 | 65 | <div class="col-md-12"> |
| 65 | 66 | <div class="form-group form-group-lg"> |
| ... | ... | @@ -133,28 +134,29 @@ $titulo_atlas = filter_var($_GET["titulo_atlas"], FILTER_SANITIZE_STRING); |
| 133 | 134 | </form> |
| 134 | 135 | </script> |
| 135 | 136 | <script id="templateLista" type="x-tmpl-mustache"> |
| 136 | -<div class="panel panel-default" id="form-{{id_prancha}}"> | |
| 137 | - <div class="panel-heading icon" role="tab"> | |
| 138 | - <h3 class="panel-title {{escondido}}"> | |
| 139 | - <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_prancha}}')" class="btn btn-danger btn-fab btn-fab-mini" role="button"> | |
| 140 | - <i class="material-icons">delete_forever</i> | |
| 137 | +<div class="list-group-item" id="form-{{id_prancha}}"> | |
| 138 | + <div class="row-content"> | |
| 139 | + <h3 class="list-group-item-heading {{escondido}}"> | |
| 140 | + {{{titulo_prancha}}} | |
| 141 | + | |
| 142 | + <div class="pull-right"> | |
| 143 | + <a role="button" class="btn btn-danger btn-fab btn-fab-mini pull-left" onclick="i3GEOadmin.prancha.editarTemas('{{id_atlas}}','{{id_prancha}}','{{{titulo_prancha}}}')" href="javascript:void(0)"> | |
| 144 | + <i class="material-icons md-18">folder_open</i> | |
| 145 | + </a> | |
| 146 | + <label class=pull-right><h6 style="margin-top: 5px; margin-bottom: 5px;"> {{{editarTema}}}</h6></label> | |
| 147 | + </div> | |
| 148 | + | |
| 149 | + <span class="pull-right"> </span> | |
| 150 | + <a href="javascript:void(0)" onclick="{{onEditar}}('{{id_prancha}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
| 151 | + <i class="material-icons md-18">edit</i> | |
| 152 | + </a> | |
| 153 | + <span class="pull-right"> </span> | |
| 154 | + <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_prancha}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
| 155 | + <i class="material-icons md-18">delete_forever</i> | |
| 141 | 156 | </a> |
| 142 | - | |
| 143 | - <a class="collapsed in" role="button" data-toggle="collapse" href="#body-form-{{id_prancha}}" | |
| 144 | - aria-expanded="false" aria-controls="#body-form-{{id_prancha}}"> {{{titulo_prancha}}} </a> | |
| 145 | 157 | </h3> |
| 146 | 158 | </div> |
| 147 | - <div class="panel-body panel-collapse collapse" id="body-form-{{id_prancha}}"> | |
| 148 | - {{{templateFormLista}}} | |
| 149 | - </div> | |
| 150 | - <div class="panel-footer {{{escondido}}}" style="padding-top: 0px; padding-bottom: 0px;"> | |
| 151 | - <div class="pull-right"> | |
| 152 | - <button style="color:#007a6f;" onclick="i3GEOadmin.prancha.editarTemas('{{id_atlas}}','{{id_prancha}}','{{{titulo_prancha}}}')" class="btn btn-primary btn-xs" style="margin-top: 2px; margin-bottom: 2px;"> | |
| 153 | - <i class="material-icons">folder_open</i> {{{editarTema}}} | |
| 154 | - </button> | |
| 155 | - </div> | |
| 156 | - <div class="clearfix"></div> | |
| 157 | - </div> | |
| 159 | + <div class="list-group-separator"></div> | |
| 158 | 160 | </div> |
| 159 | 161 | </script> |
| 160 | 162 | <script type="text/javascript" src="index.js"></script> | ... | ... |
admin1/catalogo/atlas/pranchas/temas/exec.php
| ... | ... | @@ -31,7 +31,9 @@ include_once (dirname ( __FILE__ ) . "/../../../../../admin/php/login.php"); |
| 31 | 31 | $funcoesEdicao = array ( |
| 32 | 32 | "ADICIONAR", |
| 33 | 33 | "ALTERAR", |
| 34 | - "EXCLUIR" | |
| 34 | + "EXCLUIR", | |
| 35 | + "LISTA", | |
| 36 | + "LISTAUNICO" | |
| 35 | 37 | ); |
| 36 | 38 | if (in_array ( strtoupper ( $funcao ), $funcoesEdicao )) { |
| 37 | 39 | if (verificaOperacaoSessao ( "admin/html/atlas" ) === false) { |
| ... | ... | @@ -74,8 +76,24 @@ switch ($funcao) { |
| 74 | 76 | retornaJSON ( $dados ); |
| 75 | 77 | exit (); |
| 76 | 78 | break; |
| 79 | + case "LISTAUNICO" : | |
| 80 | + $dados = pegaDados("SELECT id_tema, ordem_tema, codigo_tema, ligado_tema from ".$esquemaadmin."i3geoadmin_atlast WHERE id_tema = '$id_tema'", $dbh, false); | |
| 81 | + if ($dados === false) { | |
| 82 | + $dbhw = null; | |
| 83 | + $dbh = null; | |
| 84 | + header ( "HTTP/1.1 500 erro ao consultar banco de dados tabela de temas de uma prancha" ); | |
| 85 | + exit (); | |
| 86 | + } | |
| 87 | + $dbhw = null; | |
| 88 | + $dbh = null; | |
| 89 | + //pega a lista de temas | |
| 90 | + include("../../../../../admin/php/classe_arvore.php"); | |
| 91 | + $arvore = new Arvore($locaplic); | |
| 92 | + $temas = $arvore->pegaTodosTemas(true); | |
| 93 | + retornaJSON ( array("dados"=>$dados[0], "temas"=>$temas) ); | |
| 94 | + break; | |
| 77 | 95 | case "LISTA" : |
| 78 | - $dados = pegaDados("SELECT id_tema, ordem_tema, codigo_tema, ligado_tema from ".$esquemaadmin."i3geoadmin_atlast WHERE id_prancha = '$id_prancha'", $dbh, false); | |
| 96 | + $dados = pegaDados("SELECT id_tema, codigo_tema from ".$esquemaadmin."i3geoadmin_atlast WHERE id_prancha = '$id_prancha' ORDER BY ordem_tema", $dbh, false); | |
| 79 | 97 | if ($dados === false) { |
| 80 | 98 | $dbhw = null; |
| 81 | 99 | $dbh = null; | ... | ... |
admin1/catalogo/atlas/pranchas/temas/index.js
| ... | ... | @@ -28,6 +28,8 @@ i3GEOadmin.tema = { |
| 28 | 28 | ondeLista: "", |
| 29 | 29 | //conteudo html do formulario de adicao de operacao |
| 30 | 30 | formAdiciona: "", |
| 31 | + //parametros obtidos do formulario de edicao antes de abrir o modal de confirmacao | |
| 32 | + parametrosSalvar: "", | |
| 31 | 33 | init: function(onde){ |
| 32 | 34 | i3GEOadmin.tema.ondeLista = onde; |
| 33 | 35 | i3GEOadmin.tema.lista(); |
| ... | ... | @@ -51,7 +53,6 @@ Obt&eacute;m a lista |
| 51 | 53 | var json = jQuery.parseJSON(data); |
| 52 | 54 | //template do form de cada operacao |
| 53 | 55 | var templateLista = $("#templateLista").html(); |
| 54 | - templateLista = templateLista.replace("{{{templateFormLista}}}",$("#templateFormLista").html()); | |
| 55 | 56 | var opcoesTema = '<option value="">---</option>' + Mustache.to_html( |
| 56 | 57 | "{{#data}}" + $("#templateTemas").html() + "{{/data}}", |
| 57 | 58 | {"data":json["temas"]} |
| ... | ... | @@ -65,18 +66,7 @@ Obt&eacute;m a lista |
| 65 | 66 | { |
| 66 | 67 | "data": json["dados"], |
| 67 | 68 | "onExcluir": "i3GEOadmin.tema.excluirDialogo",//funcao |
| 68 | - "onSalvar": "i3GEOadmin.tema.salvarDialogo",//funcao | |
| 69 | - "opcoesLigado": function(){ | |
| 70 | - var hash = {}; | |
| 71 | - hash["sim"] = i3GEOadmin.prancha.dicionario.sim; | |
| 72 | - hash["nao"] = i3GEOadmin.prancha.dicionario.nao; | |
| 73 | - hash[this.ligado_tema + "-sel"] = "selected"; | |
| 74 | - return Mustache.to_html( | |
| 75 | - $("#templateOpcoesLigado").html(), | |
| 76 | - hash | |
| 77 | - ); | |
| 78 | - }, | |
| 79 | - "opcoesTema": opcoesTema, | |
| 69 | + "onEditar": "i3GEOadmin.tema.editarDialogo",//funcao | |
| 80 | 70 | "esconde": "hidden" |
| 81 | 71 | } |
| 82 | 72 | ) |
| ... | ... | @@ -95,7 +85,7 @@ Obt&eacute;m a lista |
| 95 | 85 | i3GEOadmin.core.defineFiltro(filtro); |
| 96 | 86 | i3GEOadmin.core.filtra(i3GEOadmin.core.pegaFiltro()); |
| 97 | 87 | } |
| 98 | - //monta um template para o modal de inclusao de novo usuario | |
| 88 | + //monta um template para o modal de inclusao de novo tema | |
| 99 | 89 | if(i3GEOadmin.tema.formAdiciona == ""){ |
| 100 | 90 | html = Mustache.to_html( |
| 101 | 91 | $("#templateFormLista").html(), |
| ... | ... | @@ -132,6 +122,57 @@ Obt&eacute;m a lista |
| 132 | 122 | i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); |
| 133 | 123 | }); |
| 134 | 124 | }, |
| 125 | + editarDialogo: function(id,codigo_tema){ | |
| 126 | + i3GEOadmin.core.fechaModalGeral(); | |
| 127 | + i3GEOadmin.core.modalAguarde(true); | |
| 128 | + $.post( | |
| 129 | + "exec.php?funcao=listaunico", | |
| 130 | + "id_tema=" + id | |
| 131 | + ) | |
| 132 | + .done( | |
| 133 | + function(data, status){ | |
| 134 | + var json = jQuery.parseJSON(data); | |
| 135 | + var templateLista = $("#templateFormLista").html(); | |
| 136 | + var opcoesTema = '<option value="">---</option>' + Mustache.to_html( | |
| 137 | + "{{#data}}" + $("#templateTemas").html() + "{{/data}}", | |
| 138 | + {"data":json["temas"]} | |
| 139 | + ); | |
| 140 | + //lista | |
| 141 | + var html = Mustache.to_html( | |
| 142 | + "{{#data}}" + templateLista + "{{/data}}", | |
| 143 | + $.extend( | |
| 144 | + {}, | |
| 145 | + i3GEOadmin.prancha.dicionario, | |
| 146 | + { | |
| 147 | + "data": json["dados"], | |
| 148 | + "onExcluir": "i3GEOadmin.tema.excluirDialogo",//funcao | |
| 149 | + "onSalvar": "i3GEOadmin.tema.salvarDialogo",//funcao | |
| 150 | + "opcoesLigado": function(){ | |
| 151 | + var hash = {}; | |
| 152 | + hash["sim"] = i3GEOadmin.prancha.dicionario.sim; | |
| 153 | + hash["nao"] = i3GEOadmin.prancha.dicionario.nao; | |
| 154 | + hash[this.ligado_tema + "-sel"] = "selected"; | |
| 155 | + return Mustache.to_html( | |
| 156 | + $("#templateOpcoesLigado").html(), | |
| 157 | + hash | |
| 158 | + ); | |
| 159 | + }, | |
| 160 | + "opcoesTema": opcoesTema, | |
| 161 | + "esconde": "hidden" | |
| 162 | + } | |
| 163 | + ) | |
| 164 | + ); | |
| 165 | + i3GEOadmin.core.abreModalGeral(html); | |
| 166 | + $("#form-edicao-" + id + " [name='codigo_tema']").val(codigo_tema); | |
| 167 | + } | |
| 168 | + ) | |
| 169 | + .fail( | |
| 170 | + function(data){ | |
| 171 | + i3GEOadmin.core.modalAguarde(false); | |
| 172 | + i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); | |
| 173 | + } | |
| 174 | + ); | |
| 175 | + }, | |
| 135 | 176 | adicionaDialogo: function(){ |
| 136 | 177 | i3GEOadmin.core.abreModalGeral(i3GEOadmin.tema.formAdiciona); |
| 137 | 178 | }, |
| ... | ... | @@ -189,17 +230,18 @@ Obt&eacute;m a lista |
| 189 | 230 | ); |
| 190 | 231 | }, |
| 191 | 232 | salvarDialogo: function(id,codigo){ |
| 233 | + i3GEOadmin.tema.parametrosSalvar = $("#form-edicao-" + id).serialize(); | |
| 192 | 234 | var hash = { |
| 193 | 235 | "mensagem": i3GEOadmin.prancha.dicionario.confirma, |
| 194 | 236 | "onBotao1": "i3GEOadmin.tema.salvar('"+id+"','"+codigo+"')", |
| 195 | 237 | "botao1": i3GEOadmin.prancha.dicionario.sim, |
| 196 | - "onBotao2": "i3GEOadmin.core.fechaModalConfirma();", | |
| 238 | + "onBotao2": "i3GEOadmin.tema.parametrosSalvar = '';i3GEOadmin.core.fechaModalConfirma();", | |
| 197 | 239 | "botao2": i3GEOadmin.prancha.dicionario.nao |
| 198 | 240 | }; |
| 199 | 241 | i3GEOadmin.core.abreModalConfirma(hash); |
| 200 | 242 | }, |
| 201 | 243 | salvar: function(id,codigo){ |
| 202 | - var parametros = $("#form-" + id + " form").serialize(); | |
| 244 | + var parametros = i3GEOadmin.prancha.parametrosSalvar; | |
| 203 | 245 | i3GEOadmin.core.fechaModalGeral(); |
| 204 | 246 | i3GEOadmin.core.modalAguarde(true); |
| 205 | 247 | $.post( |
| ... | ... | @@ -208,6 +250,7 @@ Obt&eacute;m a lista |
| 208 | 250 | ) |
| 209 | 251 | .done( |
| 210 | 252 | function(data, status){ |
| 253 | + i3GEOadmin.tema.parametrosSalvar = ''; | |
| 211 | 254 | i3GEOadmin.core.modalAguarde(false); |
| 212 | 255 | i3GEOadmin.core.iconeAguarde(i3GEOadmin.tema.ondeLista); |
| 213 | 256 | i3GEOadmin.tema.lista(); |
| ... | ... | @@ -215,18 +258,12 @@ Obt&eacute;m a lista |
| 215 | 258 | ) |
| 216 | 259 | .fail( |
| 217 | 260 | function(data){ |
| 261 | + i3GEOadmin.tema.parametrosSalvar = ''; | |
| 218 | 262 | i3GEOadmin.core.modalAguarde(false); |
| 219 | 263 | i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); |
| 220 | 264 | } |
| 221 | 265 | ); |
| 222 | 266 | }, |
| 223 | - editarTemas: function(id_prancha, id_tema,titulo_tema){ | |
| 224 | - //muda a url para que o usuario possa voltar pelo botao do navegador | |
| 225 | - var u = window.location.origin + window.location.pathname + "?id_prancha=" + id_prancha + "&id_filtro=" + id_tema; | |
| 226 | - window.history.replaceState(null,null,u); | |
| 227 | - //abre a pagina de edicao | |
| 228 | - window.location.href = "temas/index.php?id_tema=" + id_tema + "&titulo_tema=" + titulo_tema; | |
| 229 | - }, | |
| 230 | 267 | addInput: function(id,valor){ |
| 231 | 268 | var i = $("#"+id); |
| 232 | 269 | $(i.val(i.val() + ' ' + valor)); | ... | ... |
admin1/catalogo/atlas/pranchas/temas/index.php
| ... | ... | @@ -7,27 +7,27 @@ $id_prancha = filter_var($_GET["id_prancha"], FILTER_SANITIZE_NUMBER_INT); |
| 7 | 7 | $titulo_prancha = filter_var($_GET["titulo_prancha"], FILTER_SANITIZE_STRING); |
| 8 | 8 | $id_atlas = filter_var($_GET["id_atlas"], FILTER_SANITIZE_NUMBER_INT); |
| 9 | 9 | ?> |
| 10 | -<div class="container-fluid"> | |
| 10 | +<div class="container-fluid migalha"> | |
| 11 | 11 | <div class="row"> |
| 12 | - <ol class="breadcrumb"> | |
| 13 | - <li><a href="../../../../init/index.php">i3Geo</a></li> | |
| 14 | - <li><a href="../../../../index.php">Admin</a></li> | |
| 15 | - <li>Catálogo</li> | |
| 16 | - <li>Atlas</li> | |
| 17 | - <li><a href="../index.php?id_atlas=<?php echo $id_atlas; ?>&id_filtro=<?php echo $id_prancha; ?>">Prancha - <?php echo $titulo_prancha; ?></a></li> | |
| 18 | - <li class="active">Temas</li> | |
| 19 | - </ol> | |
| 12 | + <div class="btn-group btn-breadcrumb"> | |
| 13 | + <a class="btn btn-default" href="../../../../../init/index.php"><div>i3Geo</div></a> | |
| 14 | + <a class="btn btn-default" href="../../../../index.php"><div>Admin</div></a> | |
| 15 | + <a class="btn btn-default" style="pointer-events: none"><div>Catálogo</div></a> | |
| 16 | + <a class="btn btn-default" href="../../index.php"><div>Atlas</div></a> | |
| 17 | + <a class="btn btn-default" href="../index.php?id_atlas=<?php echo $id_atlas; ?>&id_filtro=<?php echo $id_prancha; ?>"><div>Pranchas</div></a> | |
| 18 | + <a class="btn btn-default" style="pointer-events: none"><div>Temas</div></a> | |
| 19 | + </div> | |
| 20 | 20 | </div> |
| 21 | 21 | </div> |
| 22 | 22 | <div class="container"> |
| 23 | 23 | <div class="row center-block"> |
| 24 | 24 | <div class="col-md-12" id="titulo"> |
| 25 | 25 | <div class="well hidden" > |
| 26 | - <h3>{{{txtTituloTema}}}</h3> | |
| 27 | - <h4>{{{txtDescTema}}}</h4> | |
| 26 | + <h2>{{{txtTituloTema}}}</h2> | |
| 27 | + <h3><small>Prancha: <?php echo $titulo_prancha; ?></small></h3> | |
| 28 | + <blockquote>{{{txtDescTema}}}</blockquote> | |
| 28 | 29 | <!-- aqui entra o filtro --> |
| 29 | 30 | <div class="form-group"> |
| 30 | - | |
| 31 | 31 | <select title="{{{filtro}}}" onchange="i3GEOadmin.core.filtra(this)" id="filtro" class="form-control input-lg"> |
| 32 | 32 | </select> |
| 33 | 33 | </div> |
| ... | ... | @@ -48,9 +48,9 @@ $id_atlas = filter_var($_GET["id_atlas"], FILTER_SANITIZE_NUMBER_INT); |
| 48 | 48 | <option value="form-{{id_tema}}">{{{codigo_tema}}}</option> |
| 49 | 49 | </script> |
| 50 | 50 | <script id="templateFormLista" type="x-tmpl-mustache"> |
| 51 | -<form style="" action="#" onsubmit="{{onSalvar}}('{{id_tema}}','{{{codigo_tema}}}');return false;" onchange="this.style.boxShadow='2px 2px 5px 0 #009688';" class="form-horizontal" role="form" method="post" > | |
| 51 | +<form id="form-edicao-{{id_tema}}" style="" action="#" onsubmit="{{onSalvar}}('{{id_tema}}','{{{codigo_tema}}}');return false;" onchange="this.style.boxShadow='2px 2px 5px 0 #009688';" class="form-horizontal" role="form" method="post" > | |
| 52 | 52 | <div class="row"> |
| 53 | - <div class="col-md-12 {{esconde}}"> | |
| 53 | + <div class="col-md-12"> | |
| 54 | 54 | <div class="form-group form-group-lg"> |
| 55 | 55 | <label class="col-md-4 control-label" for="codigo_tema" >{{{codigoTema}}}</label> |
| 56 | 56 | <div class="col-md-8"> |
| ... | ... | @@ -86,20 +86,22 @@ $id_atlas = filter_var($_GET["id_atlas"], FILTER_SANITIZE_NUMBER_INT); |
| 86 | 86 | </form> |
| 87 | 87 | </script> |
| 88 | 88 | <script id="templateLista" type="x-tmpl-mustache"> |
| 89 | -<div class="panel panel-default" id="form-{{id_tema}}"> | |
| 90 | - <div class="panel-heading icon" role="tab"> | |
| 91 | - <h3 class="panel-title {{escondido}}"> | |
| 92 | - <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_tema}}')" class="btn btn-danger btn-fab btn-fab-mini" role="button"> | |
| 93 | - <i class="material-icons">delete_forever</i> | |
| 89 | +<div class="list-group-item" id="form-{{id_tema}}"> | |
| 90 | + <div class="row-content"> | |
| 91 | + <h3 class="list-group-item-heading {{escondido}}"> | |
| 92 | + {{{codigo_tema}}} | |
| 93 | + | |
| 94 | + <span class="pull-right"> </span> | |
| 95 | + <a href="javascript:void(0)" onclick="{{onEditar}}('{{id_tema}}','{{codigo_tema}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
| 96 | + <i class="material-icons md-18">edit</i> | |
| 97 | + </a> | |
| 98 | + <span class="pull-right"> </span> | |
| 99 | + <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_tema}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
| 100 | + <i class="material-icons md-18">delete_forever</i> | |
| 94 | 101 | </a> |
| 95 | - | |
| 96 | - <a class="collapsed in" role="button" data-toggle="collapse" href="#body-form-{{id_tema}}" | |
| 97 | - aria-expanded="false" aria-controls="#body-form-{{id_tema}}"> {{{codigo_tema}}} </a> | |
| 98 | 102 | </h3> |
| 99 | 103 | </div> |
| 100 | - <div class="panel-body panel-collapse collapse" id="body-form-{{id_tema}}"> | |
| 101 | - {{{templateFormLista}}} | |
| 102 | - </div> | |
| 104 | + <div class="list-group-separator"></div> | |
| 103 | 105 | </div> |
| 104 | 106 | </script> |
| 105 | 107 | <script id="templateTemas" type="x-tmpl-mustache"> | ... | ... |
admin1/dicionario/atlas.js