Commit ebe6bbfb8f963624f5f1232c9a024ad38e4ccf56
1 parent
60c7a36e
Exists in
master
and in
7 other branches
Reformulação do layout e programas da página que lista os serviços OGC. Reformul…
…ação do editor da árvore do catálogo. Teste do catálogo em Postgres com utf8 e latin1
Showing
66 changed files
with
2075 additions
and
759 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin1/cadastros/identifica/exec.php
... | ... | @@ -130,7 +130,7 @@ function adicionar($publicado_i, $abrir_i, $nome_i, $target_i,$dbhw) { |
130 | 130 | function alterar($id_i, $publicado_i, $abrir_i, $nome_i, $target_i, $dbhw) { |
131 | 131 | global $convUTF, $esquemaadmin; |
132 | 132 | if ($convUTF != true){ |
133 | - $nome_i = utf8_encode($nome_i); | |
133 | + $nome_i = utf8_decode($nome_i); | |
134 | 134 | } |
135 | 135 | $dataCol = array( |
136 | 136 | "publicado_i" => $publicado_i, | ... | ... |
admin1/cadastros/identifica/index.php
... | ... | @@ -88,7 +88,7 @@ include "../../head.php"; |
88 | 88 | <div class="form-group form-group-lg"> |
89 | 89 | <label class="col-md-2 control-label" for="publicado_i">{{{publicado}}}?</label> |
90 | 90 | <div class="col-md-10"> |
91 | - <select title="{{{publicado}}}" class="form-control" name="publicado_i"> | |
91 | + <select title="{{{publicado}}}" class="form-control" name="publicado_i" required > | |
92 | 92 | {{{opcoesPublicado}}} |
93 | 93 | </select> |
94 | 94 | </div> |
... | ... | @@ -112,7 +112,7 @@ include "../../head.php"; |
112 | 112 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_i}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
113 | 113 | <i class="material-icons md-18">delete_forever</i> |
114 | 114 | </a> |
115 | - {{{nome_i}}} | |
115 | + {{{nome_i}}} | |
116 | 116 | </h3> |
117 | 117 | </div> |
118 | 118 | <div class="list-group-separator"></div> | ... | ... |
admin1/cadastros/perfis/exec.php
... | ... | @@ -133,7 +133,7 @@ function alterar($id_perfil, $perfil,$dbhw) { |
133 | 133 | $original = $original[0]["perfil"]; |
134 | 134 | |
135 | 135 | if ($convUTF != true){ |
136 | - $perfil = utf8_encode($perfil); | |
136 | + $perfil = utf8_decode($perfil); | |
137 | 137 | } |
138 | 138 | $dataCol = array( |
139 | 139 | "perfil" => $perfil | ... | ... |
admin1/cadastros/perfis/index.php
... | ... | @@ -87,7 +87,7 @@ include "../../head.php"; |
87 | 87 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_perfil}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
88 | 88 | <i class="material-icons md-18">delete_forever</i> |
89 | 89 | </a> |
90 | - {{{perfil}}} | |
90 | + {{{perfil}}} | |
91 | 91 | </h3> |
92 | 92 | </div> |
93 | 93 | <div class="list-group-separator"></div> | ... | ... |
admin1/cadastros/servicos/exec.php
... | ... | @@ -131,9 +131,9 @@ function adicionar($autor_ws,$desc_ws,$link_ws,$nome_ws,$tipo_ws,$dbhw) { |
131 | 131 | function alterar($id_ws,$autor_ws,$desc_ws,$link_ws,$nome_ws,$tipo_ws,$dbhw) { |
132 | 132 | global $convUTF, $esquemaadmin; |
133 | 133 | if ($convUTF != true){ |
134 | - $nome_ws = utf8_encode($nome_ws); | |
135 | - $desc_ws = utf8_encode($desc_ws); | |
136 | - $autor_ws = utf8_encode($autor_ws); | |
134 | + $nome_ws = utf8_decode($nome_ws); | |
135 | + $desc_ws = utf8_decode($desc_ws); | |
136 | + $autor_ws = utf8_decode($autor_ws); | |
137 | 137 | } |
138 | 138 | $dataCol = array( |
139 | 139 | "desc_ws" => $desc_ws, | ... | ... |
admin1/cadastros/servicos/index.php
... | ... | @@ -113,7 +113,7 @@ include "../../head.php"; |
113 | 113 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_ws}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
114 | 114 | <i class="material-icons md-18">delete_forever</i> |
115 | 115 | </a> |
116 | - {{{nome_ws}}} | |
116 | + {{{nome_ws}}} | |
117 | 117 | </h3> |
118 | 118 | </div> |
119 | 119 | <div class="list-group-separator"></div> | ... | ... |
admin1/cadastros/sistemas/exec.php
... | ... | @@ -140,7 +140,7 @@ function adicionar( $publicado_sistema,$nome_sistema,$perfil_sistema, $dbhw) { |
140 | 140 | function alterar($id_sistema,$publicado_sistema,$nome_sistema,$perfil_sistema, $dbhw) { |
141 | 141 | global $convUTF, $esquemaadmin; |
142 | 142 | if ($convUTF != true){ |
143 | - $nome_sistema = utf8_encode($nome_sistema); | |
143 | + $nome_sistema = utf8_decode($nome_sistema); | |
144 | 144 | } |
145 | 145 | $dataCol = array( |
146 | 146 | "publicado_sistema" => $publicado_sistema, | ... | ... |
admin1/cadastros/sistemas/funcoes/exec.php
... | ... | @@ -138,7 +138,7 @@ function adicionar( $id_sistema,$nome_funcao,$abrir_funcao,$h_funcao,$w_funcao,$ |
138 | 138 | function alterar($id_funcao,$nome_funcao,$abrir_funcao,$h_funcao,$w_funcao,$perfil_funcao, $dbhw) { |
139 | 139 | global $convUTF, $esquemaadmin; |
140 | 140 | if ($convUTF != true){ |
141 | - $nome_funcao = utf8_encode($nome_funcao); | |
141 | + $nome_funcao = utf8_decode($nome_funcao); | |
142 | 142 | } |
143 | 143 | $dataCol = array( |
144 | 144 | "nome_funcao" => $nome_funcao, | ... | ... |
admin1/cadastros/sistemas/funcoes/index.php
... | ... | @@ -118,7 +118,7 @@ $nome_sistema = filter_var($_GET["nome_sistema"], FILTER_SANITIZE_STRING); |
118 | 118 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_funcao}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
119 | 119 | <i class="material-icons md-18">delete_forever</i> |
120 | 120 | </a> |
121 | - {{{nome_funcao}}} | |
121 | + {{{nome_funcao}}} | |
122 | 122 | </h3> |
123 | 123 | </div> |
124 | 124 | <div class="list-group-separator"></div> | ... | ... |
admin1/cadastros/sistemas/index.php
... | ... | @@ -57,7 +57,7 @@ include "../../head.php"; |
57 | 57 | <div class="form-group form-group-lg"> |
58 | 58 | <label class="col-md-4 control-label" for="publicado_sistema">{{{publicado}}}</label> |
59 | 59 | <div class="col-md-8"> |
60 | - <select title="{{{publicado}}}" name="publicado_sistema" class="form-control"> | |
60 | + <select title="{{{publicado}}}" name="publicado_sistema" class="form-control" required > | |
61 | 61 | {{{opcoesPublicado}}} |
62 | 62 | </select> |
63 | 63 | </div> |
... | ... | @@ -100,7 +100,7 @@ include "../../head.php"; |
100 | 100 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_sistema}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
101 | 101 | <i class="material-icons md-18">delete_forever</i> |
102 | 102 | </a> |
103 | - {{{nome_sistema}}} | |
103 | + {{{nome_sistema}}} | |
104 | 104 | </h3> |
105 | 105 | </div> |
106 | 106 | <div class="list-group-separator"></div> | ... | ... |
admin1/cadastros/tags/exec.php
... | ... | @@ -129,7 +129,7 @@ function adicionar($nome, $dbhw) { |
129 | 129 | function alterar($id_tag, $nome,$dbhw) { |
130 | 130 | global $convUTF, $esquemaadmin; |
131 | 131 | if ($convUTF != true){ |
132 | - $nome = utf8_encode($nome); | |
132 | + $nome = utf8_decode($nome); | |
133 | 133 | } |
134 | 134 | $dataCol = array( |
135 | 135 | "nome" => $nome | ... | ... |
admin1/cadastros/tags/index.php
... | ... | @@ -82,7 +82,7 @@ include "../../head.php"; |
82 | 82 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_tag}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
83 | 83 | <i class="material-icons md-18">delete_forever</i> |
84 | 84 | </a> |
85 | - {{{nome}}} | |
85 | + {{{nome}}} | |
86 | 86 | </h3> |
87 | 87 | </div> |
88 | 88 | <div class="list-group-separator"></div> | ... | ... |
admin1/catalogo/atlas/exec.php
... | ... | @@ -148,8 +148,8 @@ function adicionar( $titulo_atlas, $publicado_atlas, $ordem_atlas, $basemapfile_ |
148 | 148 | function alterar($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, $dbhw) { |
149 | 149 | global $convUTF, $esquemaadmin; |
150 | 150 | if ($convUTF != true){ |
151 | - $desc_atlas = utf8_encode($desc_atlas); | |
152 | - $titulo_atlas = utf8_encode($titulo_atlas); | |
151 | + $desc_atlas = utf8_decode($desc_atlas); | |
152 | + $titulo_atlas = utf8_decode($titulo_atlas); | |
153 | 153 | } |
154 | 154 | $dataCol = array( |
155 | 155 | "publicado_atlas"=>$publicado_atlas, | ... | ... |
admin1/catalogo/atlas/index.php
... | ... | @@ -85,7 +85,7 @@ include "../../head.php"; |
85 | 85 | <div class="form-group form-group-lg"> |
86 | 86 | <label class="col-md-4 control-label" for="publicado_atlas">{{{publicado}}}</label> |
87 | 87 | <div class="col-md-8"> |
88 | - <select title="{{{publicado}}}" name="publicado_atlas" class="form-control"> | |
88 | + <select title="{{{publicado}}}" name="publicado_atlas" class="form-control" required > | |
89 | 89 | {{{opcoesPublicado}}} |
90 | 90 | </select> |
91 | 91 | </div> |
... | ... | @@ -95,7 +95,7 @@ include "../../head.php"; |
95 | 95 | <div class="form-group form-group-lg"> |
96 | 96 | <label class="col-md-4 control-label" for="ordem_atlas" >{{{ordem}}}</label> |
97 | 97 | <div class="col-md-8"> |
98 | - <input title="{{{ordem}}}" type="text" value="{{{ordem_atlas}}}" class="form-control" name="ordem_atlas" > | |
98 | + <input title="{{{ordem}}}" type="text" value="{{{ordem_atlas}}}" class="form-control" name="ordem_atlas" required > | |
99 | 99 | </div> |
100 | 100 | </div> |
101 | 101 | </div> |
... | ... | @@ -182,7 +182,7 @@ include "../../head.php"; |
182 | 182 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_atlas}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
183 | 183 | <i class="material-icons md-18">delete_forever</i> |
184 | 184 | </a> |
185 | - {{{titulo_atlas}}} | |
185 | + {{{titulo_atlas}}} | |
186 | 186 | </h3> |
187 | 187 | </div> |
188 | 188 | <div class="list-group-separator"></div> | ... | ... |
admin1/catalogo/atlas/pranchas/exec.php
... | ... | @@ -145,8 +145,8 @@ function adicionar( $id_atlas, $titulo_prancha, $ordem_prancha, $desc_prancha, $ |
145 | 145 | function alterar($id_atlas, $id_prancha, $titulo_prancha, $ordem_prancha, $desc_prancha, $h_prancha, $icone_prancha, $link_prancha, $mapext_prancha, $w_prancha, $dbhw) { |
146 | 146 | global $convUTF, $esquemaadmin; |
147 | 147 | if ($convUTF != true){ |
148 | - $desc_prancha = utf8_encode($desc_prancha); | |
149 | - $titulo_prancha = utf8_encode($titulo_prancha); | |
148 | + $desc_prancha = utf8_decode($desc_prancha); | |
149 | + $titulo_prancha = utf8_decode($titulo_prancha); | |
150 | 150 | } |
151 | 151 | $dataCol = array( |
152 | 152 | "ordem_prancha"=>$ordem_prancha, | ... | ... |
admin1/catalogo/atlas/pranchas/index.php
... | ... | @@ -89,7 +89,7 @@ $titulo_atlas = filter_var($_GET["titulo_atlas"], FILTER_SANITIZE_STRING); |
89 | 89 | <div class="form-group form-group-lg"> |
90 | 90 | <label class="col-md-4 control-label" for="ordem_prancha" >{{{ordem}}}</label> |
91 | 91 | <div class="col-md-8"> |
92 | - <input title="{{{ordem}}}" type="text" value="{{{ordem_prancha}}}" class="form-control" name="ordem_prancha" > | |
92 | + <input title="{{{ordem}}}" type="text" value="{{{ordem_prancha}}}" class="form-control" name="ordem_prancha" required > | |
93 | 93 | </div> |
94 | 94 | </div> |
95 | 95 | </div> |
... | ... | @@ -151,7 +151,7 @@ $titulo_atlas = filter_var($_GET["titulo_atlas"], FILTER_SANITIZE_STRING); |
151 | 151 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_prancha}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
152 | 152 | <i class="material-icons md-18">delete_forever</i> |
153 | 153 | </a> |
154 | - {{{titulo_prancha}}} | |
154 | + {{{titulo_prancha}}} | |
155 | 155 | </h3> |
156 | 156 | </div> |
157 | 157 | <div class="list-group-separator"></div> | ... | ... |
admin1/catalogo/atlas/pranchas/temas/index.php
... | ... | @@ -64,7 +64,7 @@ $id_atlas = filter_var($_GET["id_atlas"], FILTER_SANITIZE_NUMBER_INT); |
64 | 64 | <div class="form-group form-group-lg"> |
65 | 65 | <label class="col-md-4 control-label" for="ordem_tema" >{{{ordem}}}</label> |
66 | 66 | <div class="col-md-8"> |
67 | - <input title="{{{ordem}}}" type="text" value="{{{ordem_tema}}}" class="form-control" name="ordem_tema" > | |
67 | + <input title="{{{ordem}}}" type="text" value="{{{ordem_tema}}}" class="form-control" name="ordem_tema" required > | |
68 | 68 | </div> |
69 | 69 | </div> |
70 | 70 | </div> |
... | ... | @@ -97,7 +97,7 @@ $id_atlas = filter_var($_GET["id_atlas"], FILTER_SANITIZE_NUMBER_INT); |
97 | 97 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_tema}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
98 | 98 | <i class="material-icons md-18">delete_forever</i> |
99 | 99 | </a> |
100 | - {{{codigo_tema}}} | |
100 | + {{{codigo_tema}}} | |
101 | 101 | </h3> |
102 | 102 | </div> |
103 | 103 | <div class="list-group-separator"></div> | ... | ... |
admin1/catalogo/mapas/exec.php
... | ... | @@ -163,10 +163,10 @@ function adicionar($publicado_mapa, $ordem_mapa, $perfil_mapa, $ligados_mapa, $t |
163 | 163 | // $papeis deve ser um array |
164 | 164 | function alterar($id_mapa, $publicado_mapa, $ordem_mapa, $perfil_mapa, $ligados_mapa, $temas_mapa, $desc_mapa, $ext_mapa, $imagem_mapa, $linkdireto_mapa, $nome_mapa, $outros_mapa, $mapfile, $dbhw) { |
165 | 165 | global $convUTF, $esquemaadmin; |
166 | - if ($convUTF) { | |
167 | - $nome_mapa = utf8_encode ( $nome_mapa ); | |
168 | - $desc_mapa = utf8_encode ( $desc_mapa ); | |
169 | - $perfil_menu = utf8_encode ( $perfil_mapa ); | |
166 | + if ($convUTF != true) { | |
167 | + $nome_mapa = utf8_decode ( $nome_mapa ); | |
168 | + $desc_mapa = utf8_decode ( $desc_mapa ); | |
169 | + $perfil_menu = utf8_decode ( $perfil_mapa ); | |
170 | 170 | } |
171 | 171 | $perfil_mapa = str_replace ( ",", " ", trim ( $perfil_mapa ) ); |
172 | 172 | // verifica a consistencia da lista de perfis | ... | ... |
admin1/catalogo/mapas/index.php
... | ... | @@ -79,7 +79,7 @@ include "../../head.php"; |
79 | 79 | <div class="form-group form-group-lg"> |
80 | 80 | <label class="col-md-4 control-label" for="ordem_mapa">{{{ordemMapa}}}</label> |
81 | 81 | <div class="col-md-8"> |
82 | - <input title="{{{ordemMapa}}}" type="text" value="{{{ordem_mapa}}}" class="form-control" name="ordem_mapa"> | |
82 | + <input title="{{{ordemMapa}}}" type="text" value="{{{ordem_mapa}}}" class="form-control" name="ordem_mapa" required > | |
83 | 83 | </div> |
84 | 84 | </div> |
85 | 85 | <div class="form-group form-group-lg"> |
... | ... | @@ -118,7 +118,7 @@ include "../../head.php"; |
118 | 118 | <div class="form-group form-group-lg"> |
119 | 119 | <label class="col-md-4 control-label" for="publicado_mapa">{{{publicado}}}</label> |
120 | 120 | <div class="col-md-8"> |
121 | - <select title="{{{publicado}}}" name="publicado_mapa" class="form-control"> | |
121 | + <select title="{{{publicado}}}" name="publicado_mapa" class="form-control" required > | |
122 | 122 | {{{opcoesPublicado}}} |
123 | 123 | </select> |
124 | 124 | </div> |
... | ... | @@ -171,7 +171,7 @@ include "../../head.php"; |
171 | 171 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_mapa}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
172 | 172 | <i class="material-icons md-18">delete_forever</i> |
173 | 173 | </a> |
174 | - {{{nome_mapa}}} | |
174 | + {{{nome_mapa}}} | |
175 | 175 | </h3> |
176 | 176 | </div> |
177 | 177 | <div class="list-group-separator"></div> | ... | ... |
admin1/catalogo/menus/exec.php
... | ... | @@ -148,11 +148,11 @@ function adicionar($publicado_menu, $perfil_menu, $aberto, $desc_menu, $nome_men |
148 | 148 | function alterar($id_menu, $publicado_menu, $perfil_menu, $aberto, $desc_menu, $nome_menu, $es, $en,$dbhw) { |
149 | 149 | global $convUTF, $esquemaadmin; |
150 | 150 | if ($convUTF != true){ |
151 | - $nome_menu = utf8_encode($nome_menu); | |
152 | - $desc_menu = utf8_encode($desc_menu); | |
153 | - $en = utf8_encode($en); | |
154 | - $es = utf8_encode($es); | |
155 | - $perfil_menu = utf8_encode($perfil_menu); | |
151 | + $nome_menu = utf8_decode($nome_menu); | |
152 | + $desc_menu = utf8_decode($desc_menu); | |
153 | + $en = utf8_decode($en); | |
154 | + $es = utf8_decode($es); | |
155 | + $perfil_menu = utf8_decode($perfil_menu); | |
156 | 156 | } |
157 | 157 | $perfil_menu = str_replace(","," ",trim($perfil_menu)); |
158 | 158 | //verifica a consistencia da lista de perfis | ... | ... |
admin1/catalogo/menus/grupos/index.js
... | ... | @@ -122,6 +122,7 @@ i3GEOadmin.grupos = { |
122 | 122 | { |
123 | 123 | "id_raiz": "modal", |
124 | 124 | "escondido": "", |
125 | + "ordem": 0, | |
125 | 126 | "opcoesPerfil": i3GEOadmin.grupos.opcoesPerfil, |
126 | 127 | "excluir": i3GEOadmin.grupos.dicionario.cancelar, |
127 | 128 | "onExcluir": "i3GEOadmin.core.fechaModalGeral",//funcao |
... | ... | @@ -323,6 +324,7 @@ i3GEOadmin.grupos = { |
323 | 324 | { |
324 | 325 | "id_n1": "modal", |
325 | 326 | "escondido": "hidden", |
327 | + "ordem": 0, | |
326 | 328 | "excluir": i3GEOadmin.grupos.dicionario.cancelar, |
327 | 329 | "opcoesPerfil": i3GEOadmin.grupos.opcoesPerfil, |
328 | 330 | "onExcluir": "i3GEOadmin.core.fechaModalGeral",//funcao | ... | ... |
admin1/catalogo/menus/grupos/index.php
... | ... | @@ -35,7 +35,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
35 | 35 | class="btn btn-primary btn-fab btn-fab-mini pull-right"> |
36 | 36 | <i class="material-icons">search</i> |
37 | 37 | </button> |
38 | - <h4><small>{{{menu}}}:</small> <?php echo $nome_menu; ?></h4> | |
38 | + <h4><?php echo $nome_menu; ?></h4> | |
39 | 39 | <blockquote>{{{txtDesc}}}</blockquote> |
40 | 40 | |
41 | 41 | <div id="ajudaPrincipal" class="modal fade" tabindex="-1"> |
... | ... | @@ -53,13 +53,13 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
53 | 53 | <div class="row center-block"> |
54 | 54 | <div class="col-md-6"> |
55 | 55 | <div class="well hidden"> |
56 | - <!-- painel para mostrar os temas na raiz --> | |
57 | - <h4 class="pull-left"> | |
58 | - {{{temasRaizMenu}}} | |
59 | - </h4> | |
60 | - <a onclick="i3GEOadmin.grupos.adicionaTemaDialogo();" href="javascript:void(0)" | |
61 | - class="btn btn-primary pull-right" role="button" style="color:#008579;">{{{adicionar}}}</a> | |
62 | - | |
56 | + <div class="panel-heading"> | |
57 | + <p class="lead" style="margin:0px;">{{temasRaizMenu}} | |
58 | + <a title="{{{adicionar}}}" onclick="i3GEOadmin.grupos.adicionaTemaDialogo();" href="javascript:void(0)" | |
59 | + class="pull-right btn btn-danger btn-fab btn-fab-mini" role="button" ><i class="material-icons ">add</i> | |
60 | + </a> | |
61 | + </p> | |
62 | + </div> | |
63 | 63 | <div class="clearfix"></div> |
64 | 64 | <div id="raiz" class="panel-body"></div> |
65 | 65 | </div> |
... | ... | @@ -67,14 +67,15 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
67 | 67 | <div class="col-md-6"> |
68 | 68 | <!-- nos --> |
69 | 69 | <div class="well hidden"> |
70 | - <h4 class="pull-left"> | |
71 | - {{{txtGrupos}}} | |
72 | - </h4> | |
73 | - <a onclick="i3GEOadmin.grupos.adicionaNoDialogo();" href="javascript:void(0)" | |
74 | - class="btn btn-primary pull-right" role="button" style="color:#008579;">{{{adicionar}}}</a> | |
70 | + <div class="panel-heading"> | |
71 | + <p class="lead" style="margin:0px;">{{txtGrupos}} | |
72 | + <a title="{{{adicionar}}}" onclick="i3GEOadmin.grupos.adicionaNoDialogo();" href="javascript:void(0)" | |
73 | + class="pull-right btn btn-danger btn-fab btn-fab-mini" role="button" ><i class="material-icons ">add</i> | |
74 | + </a> | |
75 | + </p> | |
76 | + </div> | |
75 | 77 | <div class="clearfix"></div> |
76 | 78 | <div id="corpo" class="panel-body"></div> |
77 | - | |
78 | 79 | </div> |
79 | 80 | </div> |
80 | 81 | </div> |
... | ... | @@ -85,7 +86,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
85 | 86 | <script id="templateRaiz" type="x-tmpl-mustache"> |
86 | 87 | <div class="list-group-item" data-id="{{id_raiz}}" id="formRaiz-{{id_raiz}}"> |
87 | 88 | <div class="row-content"> |
88 | - <h3 class="list-group-item-heading {{escondido}}"> | |
89 | + <h4 class="list-group-item-heading {{escondido}}"> | |
89 | 90 | <span class="pull-right"> </span> |
90 | 91 | <a href="javascript:void(0)" onclick="{{onEditar}}('{{id_raiz}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
91 | 92 | <i class="material-icons md-18">edit</i> |
... | ... | @@ -98,7 +99,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
98 | 99 | <i class="material-icons move" style="color: gray; display:none;position:absolute;left:-5px;">swap_vert</i> |
99 | 100 | {{{nome_tema}}} |
100 | 101 | </span> |
101 | - </h3> | |
102 | + </h4> | |
102 | 103 | </div> |
103 | 104 | <div class="list-group-separator"></div> |
104 | 105 | </div> |
... | ... | @@ -118,7 +119,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
118 | 119 | <div class="form-group form-group-lg"> |
119 | 120 | <label class="col-md-4 control-label" for="ordem">{{{ordemTxt}}}</label> |
120 | 121 | <div class="col-md-8"> |
121 | - <input title="{{{ordemTxt}}}" type="text" value="{{{ordem}}}" class="form-control" name="ordem"> | |
122 | + <input title="{{{ordemTxt}}}" type="text" value="{{{ordem}}}" class="form-control" name="ordem" required > | |
122 | 123 | </div> |
123 | 124 | </div> |
124 | 125 | <div class="form-group form-group-lg"> |
... | ... | @@ -143,7 +144,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
143 | 144 | <script id="templateNos" type="x-tmpl-mustache"> |
144 | 145 | <div class="list-group-item" data-id="{{id_n1}}" id="formNo-{{id_n1}}"> |
145 | 146 | <div class="row-content"> |
146 | - <h3 class="list-group-item-heading {{escondido}}"> | |
147 | + <h4 class="list-group-item-heading {{escondido}}"> | |
147 | 148 | <div class="pull-right"> |
148 | 149 | <a role="button" class="btn btn-danger btn-fab btn-fab-mini pull-left" onclick="i3GEOadmin.grupos.editarSubGrupos('{{id_n1}}','{{{nome_grupo}}}')" href="javascript:void(0)"> |
149 | 150 | <i class="material-icons md-18">folder_open</i> |
... | ... | @@ -162,7 +163,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
162 | 163 | <i class="material-icons move" style="color: gray; display:none;position:absolute;left:-5px;">swap_vert</i> |
163 | 164 | {{{nome_grupo}}} |
164 | 165 | </span> |
165 | - </h3> | |
166 | + </h4> | |
166 | 167 | </div> |
167 | 168 | <div class="list-group-separator"></div> |
168 | 169 | </div> |
... | ... | @@ -187,13 +188,13 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
187 | 188 | <div class="form-group form-group-lg"> |
188 | 189 | <label class="col-md-4 control-label" for="ordem">{{{ordemTxt}}}</label> |
189 | 190 | <div class="col-md-8"> |
190 | - <input title="{{{ordemTxt}}}" type="text" value="{{{ordem}}}" class="form-control" name="ordem"> | |
191 | + <input title="{{{ordemTxt}}}" type="text" value="{{{ordem}}}" class="form-control" name="ordem" required > | |
191 | 192 | </div> |
192 | 193 | </div> |
193 | 194 | <div class="form-group form-group-lg"> |
194 | 195 | <label class="col-md-4 control-label" for="publicado">{{{publicadoTxt}}}</label> |
195 | 196 | <div class="col-md-8"> |
196 | - <select title="{{{publicadoTxt}}}" name="publicado" class="form-control"> | |
197 | + <select title="{{{publicadoTxt}}}" name="publicado" class="form-control" required > | |
197 | 198 | {{{opcoesPublicado}}} |
198 | 199 | </select> |
199 | 200 | </div> | ... | ... |
admin1/catalogo/menus/grupos/listadegrupos/exec.php
... | ... | @@ -140,10 +140,10 @@ function adicionar($nome_grupo, $desc_grupo, $en, $es, $dbhw) { |
140 | 140 | function alterar($id_grupo, $nome_grupo, $desc_grupo, $en, $es, $dbhw) { |
141 | 141 | global $convUTF, $esquemaadmin; |
142 | 142 | if ($convUTF != true){ |
143 | - $nome_grupo = utf8_encode($nome_grupo); | |
144 | - $desc_grupo = utf8_encode($desc_grupo); | |
145 | - $en = utf8_encode($en); | |
146 | - $es = utf8_encode($es); | |
143 | + $nome_grupo = utf8_decode($nome_grupo); | |
144 | + $desc_grupo = utf8_decode($desc_grupo); | |
145 | + $en = utf8_decode($en); | |
146 | + $es = utf8_decode($es); | |
147 | 147 | } |
148 | 148 | $dataCol = array( |
149 | 149 | "en" => $en, | ... | ... |
admin1/catalogo/menus/grupos/listadegrupos/index.js
admin1/catalogo/menus/grupos/listadegrupos/index.php
... | ... | @@ -31,13 +31,17 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
31 | 31 | </button> |
32 | 32 | <h2><small>{{{txtListaDeGrupos}}}</small></h2> |
33 | 33 | <blockquote>{{{descListaDeGrupos}}}</blockquote> |
34 | - <div class="row pull-right"> | |
35 | - <a onclick="i3GEOadmin.grupos.adicionaDialogo();" href="javascript:void(0)" | |
36 | - class="btn btn-primary" role="button" style="color:#008579;">{{{adicionar}}}</a> | |
37 | - </div> | |
38 | - <div class="clearfix"></div> | |
34 | + | |
39 | 35 | </div> |
40 | 36 | <div class="well hidden"> |
37 | + <div class="panel-heading"> | |
38 | + <p class="lead" style="margin:0px;"> | |
39 | + <a title="{{{adicionar}}}" onclick="i3GEOadmin.grupos.adicionaDialogo();" href="javascript:void(0)" | |
40 | + class="pull-right btn btn-danger btn-fab btn-fab-mini" role="button" ><i class="material-icons ">add</i> | |
41 | + </a> | |
42 | + </p> | |
43 | + </div> | |
44 | + <div class="clearfix"></div> | |
41 | 45 | <div id="corpo"></div> |
42 | 46 | </div> |
43 | 47 | </div> |
... | ... | @@ -86,7 +90,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
86 | 90 | <script id="templateLista" type="x-tmpl-mustache"> |
87 | 91 | <div class="list-group-item" id="form-{{id_grupo}}"> |
88 | 92 | <div class="row-content"> |
89 | - <h3 class="list-group-item-heading {{escondido}}"> | |
93 | + <h4 class="list-group-item-heading {{escondido}}"> | |
90 | 94 | <span class="pull-right"> </span> |
91 | 95 | <a href="javascript:void(0)" onclick="{{onEditar}}('{{id_grupo}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
92 | 96 | <i class="material-icons md-18">edit</i> |
... | ... | @@ -97,9 +101,9 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
97 | 101 | </a> |
98 | 102 | <span class="nomeitem"> |
99 | 103 | <i class="material-icons move" style="color: gray; display:none;position:absolute;left:-5px;">swap_vert</i> |
100 | - {{{nome_grupo}}} | |
104 | + {{{nome_grupo}}} | |
101 | 105 | </span> |
102 | - </h3> | |
106 | + </h4> | |
103 | 107 | </div> |
104 | 108 | <div class="list-group-separator"></div> |
105 | 109 | </div> | ... | ... |
admin1/catalogo/menus/grupos/subgrupos/index.js
... | ... | @@ -325,6 +325,7 @@ i3GEOadmin.subgrupos = { |
325 | 325 | { |
326 | 326 | "id_n2": "modal", |
327 | 327 | "escondido": "hidden", |
328 | + "ordem": 0, | |
328 | 329 | "excluir": i3GEOadmin.subgrupos.dicionario.cancelar, |
329 | 330 | "opcoesPerfil": i3GEOadmin.subgrupos.opcoesPerfil, |
330 | 331 | "onExcluir": "i3GEOadmin.core.fechaModalGeral",//funcao | ... | ... |
admin1/catalogo/menus/grupos/subgrupos/index.php
... | ... | @@ -39,7 +39,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
39 | 39 | <i class="material-icons">search</i> |
40 | 40 | </button> |
41 | 41 | |
42 | - <h4><small>{{{menu}}}: </small><?php echo "$nome_menu <small>{{{txtTitulo}}}:</small> $nome_grupo "; ?></h4> | |
42 | + <h4><?php echo "$nome_menu / $nome_grupo "; ?></h4> | |
43 | 43 | <blockquote>{{{txtDesc}}}</blockquote> |
44 | 44 | <div id="ajudaPrincipal" class="modal fade" tabindex="-1"> |
45 | 45 | <div class="modal-dialog"> |
... | ... | @@ -56,12 +56,13 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
56 | 56 | <div class="row center-block"> |
57 | 57 | <div class="col-md-6"> |
58 | 58 | <div class="well hidden"> |
59 | - <!-- painel para mostrar os temas na raiz --> | |
60 | - <h4 class="pull-left"> | |
61 | - {{{temasRaizSubgrupo}}} | |
62 | - </h4> | |
63 | - <a onclick="i3GEOadmin.subgrupos.adicionaTemaDialogo();" href="javascript:void(0)" | |
64 | - class="btn btn-primary pull-right" role="button" style="color:#008579;">{{{adicionar}}}</a> | |
59 | + <div class="panel-heading"> | |
60 | + <p class="lead" style="margin:0px;">{{temasRaizSubgrupo}} | |
61 | + <a title="{{{adicionar}}}" onclick="i3GEOadmin.subgrupos.adicionaTemaDialogo();" href="javascript:void(0)" | |
62 | + class="pull-right btn btn-danger btn-fab btn-fab-mini" role="button" ><i class="material-icons ">add</i> | |
63 | + </a> | |
64 | + </p> | |
65 | + </div> | |
65 | 66 | <div class="clearfix"></div> |
66 | 67 | <div id="raiz" class="panel-body"></div> |
67 | 68 | </div> |
... | ... | @@ -69,12 +70,13 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
69 | 70 | <div class="col-md-6"> |
70 | 71 | <!-- nos --> |
71 | 72 | <div class="well hidden"> |
72 | - <h4 class="pull-left"> | |
73 | - {{{subgrupos}}} | |
74 | - </h4> | |
75 | - <a onclick="i3GEOadmin.subgrupos.adicionaNoDialogo();" href="javascript:void(0)" | |
76 | - class="btn btn-primary pull-right" role="button" style="color:#008579;">{{{adicionar}}}</a> | |
77 | - | |
73 | + <div class="panel-heading"> | |
74 | + <p class="lead" style="margin:0px;">{{subgrupos}} | |
75 | + <a title="{{{adicionar}}}" onclick="i3GEOadmin.subgrupos.adicionaNoDialogo();" href="javascript:void(0)" | |
76 | + class="pull-right btn btn-danger btn-fab btn-fab-mini" role="button" ><i class="material-icons ">add</i> | |
77 | + </a> | |
78 | + </p> | |
79 | + </div> | |
78 | 80 | <div class="clearfix"></div> |
79 | 81 | <div id="corpo" class="panel-body panel-collapse in"></div> |
80 | 82 | </div> |
... | ... | @@ -87,7 +89,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
87 | 89 | <script id="templateRaiz" type="x-tmpl-mustache"> |
88 | 90 | <div class="list-group-item" data-id="{{id_raiz}}" id="formRaiz-{{id_raiz}}"> |
89 | 91 | <div class="row-content"> |
90 | - <h3 class="list-group-item-heading {{escondido}}"> | |
92 | + <h4 class="list-group-item-heading {{escondido}}"> | |
91 | 93 | <span class="pull-right"> </span> |
92 | 94 | <a href="javascript:void(0)" onclick="{{onEditar}}('{{id_raiz}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
93 | 95 | <i class="material-icons md-18">edit</i> |
... | ... | @@ -100,7 +102,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
100 | 102 | <i class="material-icons move" style="color: gray; display:none;position:absolute;left:-5px;">swap_vert</i> |
101 | 103 | {{{nome_tema}}} |
102 | 104 | </span> |
103 | - </h3> | |
105 | + </h4> | |
104 | 106 | </div> |
105 | 107 | <div class="list-group-separator"></div> |
106 | 108 | </div> |
... | ... | @@ -120,7 +122,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
120 | 122 | <div class="form-group form-group-lg"> |
121 | 123 | <label class="col-md-4 control-label" for="ordem">{{{ordemTxt}}}</label> |
122 | 124 | <div class="col-md-8"> |
123 | - <input title="{{{ordemTxt}}}" type="text" value="{{{ordem}}}" class="form-control" name="ordem"> | |
125 | + <input title="{{{ordemTxt}}}" type="text" value="{{{ordem}}}" class="form-control" name="ordem" required > | |
124 | 126 | </div> |
125 | 127 | </div> |
126 | 128 | <div class="form-group form-group-lg"> |
... | ... | @@ -145,7 +147,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
145 | 147 | <script id="templateNos" type="x-tmpl-mustache"> |
146 | 148 | <div class="list-group-item" data-id="{{id_n2}}" id="formNo-{{id_n2}}"> |
147 | 149 | <div class="row-content"> |
148 | - <h3 class="list-group-item-heading {{escondido}}"> | |
150 | + <h4 class="list-group-item-heading {{escondido}}"> | |
149 | 151 | <div class="pull-right"> |
150 | 152 | <a role="button" class="btn btn-danger btn-fab btn-fab-mini pull-left" onclick="i3GEOadmin.subgrupos.editarTemasSubGrupo('{{id_n2}}','{{{nome_subgrupo}}}')" href="javascript:void(0)"> |
151 | 153 | <i class="material-icons md-18">folder_open</i> |
... | ... | @@ -164,7 +166,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
164 | 166 | <i class="material-icons move" style="color: gray; display:none;position:absolute;left:-5px;">swap_vert</i> |
165 | 167 | {{{nome_subgrupo}}} |
166 | 168 | </span> |
167 | - </h3> | |
169 | + </h4> | |
168 | 170 | </div> |
169 | 171 | <div class="list-group-separator"></div> |
170 | 172 | </div> |
... | ... | @@ -188,13 +190,13 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
188 | 190 | <div class="form-group form-group-lg"> |
189 | 191 | <label class="col-md-4 control-label" for="ordem">{{{ordemTxt}}}</label> |
190 | 192 | <div class="col-md-8"> |
191 | - <input title="{{{ordemTxt}}}" type="text" value="{{{ordem}}}" class="form-control" name="ordem"> | |
193 | + <input title="{{{ordemTxt}}}" type="text" value="{{{ordem}}}" class="form-control" name="ordem" required > | |
192 | 194 | </div> |
193 | 195 | </div> |
194 | 196 | <div class="form-group form-group-lg"> |
195 | 197 | <label class="col-md-4 control-label" for="publicado">{{{publicadoTxt}}}</label> |
196 | 198 | <div class="col-md-8"> |
197 | - <select title="{{{publicadoTxt}}}" name="publicado" class="form-control"> | |
199 | + <select title="{{{publicadoTxt}}}" name="publicado" class="form-control" required > | |
198 | 200 | {{{opcoesPublicado}}} |
199 | 201 | </select> |
200 | 202 | </div> | ... | ... |
admin1/catalogo/menus/grupos/subgrupos/listadesubgrupos/exec.php
... | ... | @@ -140,10 +140,10 @@ function adicionar($nome_subgrupo, $desc_subgrupo, $en, $es, $dbhw) { |
140 | 140 | function alterar($id_subgrupo, $nome_subgrupo, $desc_subgrupo, $en, $es, $dbhw) { |
141 | 141 | global $convUTF, $esquemaadmin; |
142 | 142 | if ($convUTF != true){ |
143 | - $nome_subgrupo = utf8_encode($nome_subgrupo); | |
144 | - $desc_subgrupo = utf8_encode($desc_subgrupo); | |
145 | - $en = utf8_encode($en); | |
146 | - $es = utf8_encode($es); | |
143 | + $nome_subgrupo = utf8_decode($nome_subgrupo); | |
144 | + $desc_subgrupo = utf8_decode($desc_subgrupo); | |
145 | + $en = utf8_decode($en); | |
146 | + $es = utf8_decode($es); | |
147 | 147 | } |
148 | 148 | $dataCol = array( |
149 | 149 | "en" => $en, | ... | ... |
admin1/catalogo/menus/grupos/subgrupos/listadesubgrupos/index.js
admin1/catalogo/menus/grupos/subgrupos/listadesubgrupos/index.php
... | ... | @@ -35,13 +35,16 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
35 | 35 | </button> |
36 | 36 | <h2><small>{{{txtListaDeSubGrupos}}}</small></h2> |
37 | 37 | <blockquote>{{{descListaDeSubGrupos}}}</blockquote> |
38 | - <div class="row pull-right"> | |
39 | - <a onclick="i3GEOadmin.subgrupos.adicionaDialogo();" href="javascript:void(0)" | |
40 | - class="btn btn-primary" role="button" style="color:#008579;">{{{adicionar}}}</a> | |
41 | - </div> | |
42 | - <div class="clearfix"></div> | |
43 | 38 | </div> |
44 | 39 | <div class="well hidden"> |
40 | + <div class="panel-heading"> | |
41 | + <p class="lead" style="margin:0px;"> | |
42 | + <a title="{{{adicionar}}}" onclick="i3GEOadmin.subgrupos.adicionaDialogo();" href="javascript:void(0)" | |
43 | + class="pull-right btn btn-danger btn-fab btn-fab-mini" role="button" ><i class="material-icons ">add</i> | |
44 | + </a> | |
45 | + </p> | |
46 | + </div> | |
47 | + <div class="clearfix"></div> | |
45 | 48 | <div id="corpo"></div> |
46 | 49 | </div> |
47 | 50 | </div> |
... | ... | @@ -90,7 +93,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
90 | 93 | <script id="templateLista" type="x-tmpl-mustache"> |
91 | 94 | <div class="list-group-item" id="form-{{id_subgrupo}}"> |
92 | 95 | <div class="row-content"> |
93 | - <h3 class="list-group-item-heading {{escondido}}"> | |
96 | + <h4 class="list-group-item-heading {{escondido}}"> | |
94 | 97 | <span class="pull-right"> </span> |
95 | 98 | <a href="javascript:void(0)" onclick="{{onEditar}}('{{id_subgrupo}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
96 | 99 | <i class="material-icons md-18">edit</i> |
... | ... | @@ -101,9 +104,9 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
101 | 104 | </a> |
102 | 105 | <span class="nomeitem"> |
103 | 106 | <i class="material-icons move" style="color: gray; display:none;position:absolute;left:-5px;">swap_vert</i> |
104 | - {{{nome_subgrupo}}} | |
107 | + {{{nome_subgrupo}}} | |
105 | 108 | </span> |
106 | - </h3> | |
109 | + </h4> | |
107 | 110 | </div> |
108 | 111 | <div class="list-group-separator"></div> |
109 | 112 | </div> | ... | ... |
admin1/catalogo/menus/grupos/subgrupos/temas/index.js
... | ... | @@ -125,10 +125,20 @@ i3GEOadmin.temas = { |
125 | 125 | { |
126 | 126 | "id_n3": "modal", |
127 | 127 | "escondido": "hidden", |
128 | + "ordem": 0, | |
128 | 129 | "opcoesPerfil": i3GEOadmin.temas.opcoesPerfil, |
129 | 130 | "excluir": i3GEOadmin.temas.dicionario.cancelar, |
130 | 131 | "onExcluir": "i3GEOadmin.core.fechaModalGeral",//funcao |
131 | 132 | "onSalvar": "i3GEOadmin.temas.adicionaTema",//funcao |
133 | + "opcoesPublicado": function(){ | |
134 | + var hash = {}; | |
135 | + hash["sim"] = i3GEOadmin.temas.dicionario.sim; | |
136 | + hash["nao"] = i3GEOadmin.temas.dicionario.nao; | |
137 | + return Mustache.to_html( | |
138 | + $("#templateOpcoesPublicado").html(), | |
139 | + hash | |
140 | + ); | |
141 | + }, | |
132 | 142 | "opcoesTema": function(){ |
133 | 143 | var html = '<option value="">---</option>' + Mustache.to_html( |
134 | 144 | "{{#data}}" + $("#templateOpcoesTema").html() + "{{/data}}", |
... | ... | @@ -162,6 +172,15 @@ i3GEOadmin.temas = { |
162 | 172 | "opcoesPerfil": i3GEOadmin.temas.opcoesPerfil, |
163 | 173 | "onExcluir": "i3GEOadmin.temas.excluirTemaDialogo",//funcao |
164 | 174 | "onSalvar": "i3GEOadmin.temas.salvarTemaDialogo",//funcao |
175 | + "opcoesPublicado": function(){ | |
176 | + var hash = {}; | |
177 | + hash["sim"] = i3GEOadmin.temas.dicionario.sim; | |
178 | + hash["nao"] = i3GEOadmin.temas.dicionario.nao; | |
179 | + return Mustache.to_html( | |
180 | + $("#templateOpcoesPublicado").html(), | |
181 | + hash | |
182 | + ); | |
183 | + }, | |
165 | 184 | "opcoesTema": function(){ |
166 | 185 | var p = this.codigo_tema; |
167 | 186 | var id = ""; | ... | ... |
admin1/catalogo/menus/grupos/subgrupos/temas/index.php
... | ... | @@ -37,16 +37,20 @@ $nome_subgrupo = filter_var ( $_GET ["nome_subgrupo"], FILTER_SANITIZE_STRING ); |
37 | 37 | class="btn btn-primary btn-fab btn-fab-mini pull-right"> |
38 | 38 | <i class="material-icons">search</i> |
39 | 39 | </button> |
40 | - <h4><small>{{{menu}}}: </small><?php echo "$nome_menu <small>{{{grupo}}}:</small> $nome_grupo <small>{{{txtTitulo}}}:</small> $nome_subgrupo"; ?></h4> | |
40 | + <h4><?php echo "$nome_menu / $nome_grupo / $nome_subgrupo"; ?></h4> | |
41 | 41 | <blockquote>{{{txtDesc}}}</blockquote> |
42 | - <div class="row pull-right"> | |
43 | - <a onclick="i3GEOadmin.temas.adicionaTemaDialogo();" href="javascript:void(0)" | |
44 | - class="btn btn-primary" role="button" style="color:#008579;">{{{adicionar}}}</a> | |
45 | - </div> | |
46 | 42 | <div class="clearfix"></div> |
47 | 43 | </div> |
48 | 44 | <div class="well hidden"> |
49 | - <div id="corpo" class="panel-body panel-collapse in"></div> | |
45 | + <div class="panel-heading"> | |
46 | + <p class="lead" style="margin:0px;">{{txtTitulo}} | |
47 | + <a title="{{{adicionar}}}" onclick="i3GEOadmin.temas.adicionaTemaDialogo();" href="javascript:void(0)" | |
48 | + class="pull-right btn btn-danger btn-fab btn-fab-mini" role="button" ><i class="material-icons ">add</i> | |
49 | + </a> | |
50 | + </p> | |
51 | + </div> | |
52 | + <div class="clearfix"></div> | |
53 | + <div id="corpo" class="panel-body"></div> | |
50 | 54 | </div> |
51 | 55 | </div> |
52 | 56 | </div> |
... | ... | @@ -57,7 +61,7 @@ $nome_subgrupo = filter_var ( $_GET ["nome_subgrupo"], FILTER_SANITIZE_STRING ); |
57 | 61 | <script id="templateTemas" type="x-tmpl-mustache"> |
58 | 62 | <div class="list-group-item" data-id="{{id_n3}}" id="form-{{id_n3}}"> |
59 | 63 | <div class="row-content"> |
60 | - <h3 class="list-group-item-heading {{escondido}}"> | |
64 | + <h4 class="list-group-item-heading {{escondido}}"> | |
61 | 65 | <span class="pull-right"> </span> |
62 | 66 | <a href="javascript:void(0)" onclick="{{onEditar}}('{{id_n3}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
63 | 67 | <i class="material-icons md-18">edit</i> |
... | ... | @@ -70,7 +74,7 @@ $nome_subgrupo = filter_var ( $_GET ["nome_subgrupo"], FILTER_SANITIZE_STRING ); |
70 | 74 | <i class="material-icons move" style="color: gray; display:none;position:absolute;left:-5px;">swap_vert</i> |
71 | 75 | {{{nome_tema}}} |
72 | 76 | </span> |
73 | - </h3> | |
77 | + </h4> | |
74 | 78 | </div> |
75 | 79 | <div class="list-group-separator"></div> |
76 | 80 | </div> |
... | ... | @@ -90,7 +94,15 @@ $nome_subgrupo = filter_var ( $_GET ["nome_subgrupo"], FILTER_SANITIZE_STRING ); |
90 | 94 | <div class="form-group form-group-lg"> |
91 | 95 | <label class="col-md-4 control-label" for="ordem">{{{ordemTxt}}}</label> |
92 | 96 | <div class="col-md-8"> |
93 | - <input title="{{{ordemTxt}}}" type="text" value="{{{ordem}}}" class="form-control" name="ordem"> | |
97 | + <input title="{{{ordemTxt}}}" type="text" value="{{{ordem}}}" class="form-control" name="ordem" required > | |
98 | + </div> | |
99 | + </div> | |
100 | + <div class="form-group form-group-lg"> | |
101 | + <label class="col-md-4 control-label" for="publicado">{{{publicadoTxt}}}</label> | |
102 | + <div class="col-md-8"> | |
103 | + <select title="{{{publicadoTxt}}}" name="publicado" class="form-control" required > | |
104 | + {{{opcoesPublicado}}} | |
105 | + </select> | |
94 | 106 | </div> |
95 | 107 | </div> |
96 | 108 | <div class="form-group form-group-lg"> | ... | ... |
admin1/catalogo/menus/index.php
... | ... | @@ -16,8 +16,8 @@ include "../../head.php"; |
16 | 16 | </div> |
17 | 17 | <div class="container"> |
18 | 18 | <div class="row center-block"> |
19 | - <div class="col-md-12"> | |
20 | - <div class="well hidden" id="titulo"> | |
19 | + <div class="col-md-12" id="titulo"> | |
20 | + <div class="well hidden" > | |
21 | 21 | <button title="preview" data-toggle="modal" data-target="#previewArvore" |
22 | 22 | class="btn btn-primary btn-fab btn-fab-mini pull-right" style="left:10px"> |
23 | 23 | <i class="material-icons">play_circle_outline</i> |
... | ... | @@ -32,13 +32,9 @@ include "../../head.php"; |
32 | 32 | <i class="material-icons">search</i> |
33 | 33 | </button> |
34 | 34 | <h2> |
35 | - <small>{{{txtTitulo}}}</small> | |
35 | + <small>{{{menus}}}</small> | |
36 | 36 | </h2> |
37 | 37 | <blockquote>{{{txtDesc}}}</blockquote> |
38 | - <div class="row pull-right"> | |
39 | - <a onclick="i3GEOadmin.menus.adicionaDialogo();" href="javascript:void(0)" | |
40 | - class="btn btn-primary" role="button" style="color: #008579;">{{{adicionar}}}</a> | |
41 | - </div> | |
42 | 38 | <div class="clearfix"></div> |
43 | 39 | <div id="ajudaPrincipal" class="modal fade" tabindex="-1"> |
44 | 40 | <div class="modal-dialog"> |
... | ... | @@ -51,6 +47,14 @@ include "../../head.php"; |
51 | 47 | </div> |
52 | 48 | </div> |
53 | 49 | <div class="well hidden"> |
50 | + <div class="panel-heading"> | |
51 | + <p class="lead" style="margin:0px;">{{{txtTitulo}}} | |
52 | + <a title="{{{adicionar}}}" onclick="i3GEOadmin.menus.adicionaDialogo();" href="javascript:void(0)" | |
53 | + class="pull-right btn btn-danger btn-fab btn-fab-mini" role="button" ><i class="material-icons ">add</i> | |
54 | + </a> | |
55 | + </p> | |
56 | + </div> | |
57 | + <div class="clearfix"></div> | |
54 | 58 | <div id="corpo"></div> |
55 | 59 | </div> |
56 | 60 | </div> |
... | ... | @@ -104,7 +108,7 @@ include "../../head.php"; |
104 | 108 | <div class="form-group form-group-lg"> |
105 | 109 | <label class="col-md-3 control-label" for="publicado_menu">{{{publicadoTxt}}}</label> |
106 | 110 | <div class="col-md-9"> |
107 | - <select title="{{{publicadoTxt}}}" name="publicado_menu" class="form-control"> {{{opcoesPublicado}}} | |
111 | + <select title="{{{publicadoTxt}}}" name="publicado_menu" class="form-control" required > {{{opcoesPublicado}}} | |
108 | 112 | </select> |
109 | 113 | </div> |
110 | 114 | </div> |
... | ... | @@ -126,7 +130,7 @@ include "../../head.php"; |
126 | 130 | <script id="templateLista" type="x-tmpl-mustache"> |
127 | 131 | <div class="list-group-item" id="form-{{id_menu}}"> |
128 | 132 | <div class="row-content"> |
129 | - <h3 class="list-group-item-heading {{escondido}}"> | |
133 | + <h4 class="list-group-item-heading {{escondido}}"> | |
130 | 134 | <div class="pull-right"> |
131 | 135 | <a role="button" class="btn btn-danger btn-fab btn-fab-mini pull-left" onclick="i3GEOadmin.menus.editarGrupos('{{id_menu}}','{{{nome_menu}}}')" href="javascript:void(0)"> |
132 | 136 | <i class="material-icons md-18">folder_open</i> |
... | ... | @@ -141,8 +145,8 @@ include "../../head.php"; |
141 | 145 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_menu}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
142 | 146 | <i class="material-icons md-18">delete_forever</i> |
143 | 147 | </a> |
144 | - {{{nome_menu}}} | |
145 | - </h3> | |
148 | + {{{nome_menu}}} | |
149 | + </h4> | |
146 | 150 | </div> |
147 | 151 | <div class="list-group-separator"></div> |
148 | 152 | </div> | ... | ... |
admin1/head.php
... | ... | @@ -385,12 +385,9 @@ h2 small { |
385 | 385 | <ul class="nav navbar-nav" id="menuPrincipalTpl"> |
386 | 386 | </ul> |
387 | 387 | <ul class="nav navbar-nav"> |
388 | - <li class="dropdown"><a | |
389 | - onclick="i3GEO.login.recarrega = true; i3GEO.login.dialogo.abreLogin('<?php echo ONDEI3GEO; ?>/','template_mst_bt.html');" | |
390 | - href="#" class="dropdown-toggle" data-toggle="dropdown">Login <span class="caret"></span></a> | |
391 | - <ul id="i3GEOF_loginusuario" class="dropdown-menu" | |
392 | - style="min-width: 280px; padding: 10px; background-color: white;"> | |
393 | - </ul></li> | |
388 | + <li class="dropdown"><a role="button" onclick="i3GEO.login.recarrega = true; i3GEO.login.dialogo.abreLogin('<?php echo ONDEI3GEO; ?>','template_mst_bt.html');" | |
389 | + href="#topo" data-toggle="modal" data-target="#modalLogin">Login</a> | |
390 | + </li> | |
394 | 391 | </ul> |
395 | 392 | </div> |
396 | 393 | </div> |
... | ... | @@ -442,6 +439,20 @@ h2 small { |
442 | 439 | </div> |
443 | 440 | </div> |
444 | 441 | </div> |
442 | + <div id="modalLogin" class="modal fade" tabindex="-1"> | |
443 | + <div class="modal-dialog"> | |
444 | + <div class="modal-content"> | |
445 | + <div class="modal-header"> | |
446 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
447 | + <span aria-hidden="true">×</span> | |
448 | + </button> | |
449 | + </div> | |
450 | + <div class="modal-body" id="i3GEOF_loginusuario"> | |
451 | + | |
452 | + </div> | |
453 | + </div> | |
454 | + </div> | |
455 | + </div> | |
445 | 456 | <nav class="navbar-fixed-bottom"> |
446 | 457 | <div class="container"></div> |
447 | 458 | </nav> | ... | ... |
admin1/usuarios/cadastro/index.php
... | ... | @@ -130,7 +130,7 @@ include "../../head.php"; |
130 | 130 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_usuario}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
131 | 131 | <i class="material-icons md-18">delete_forever</i> |
132 | 132 | </a> |
133 | - {{{nome_usuario}}} | |
133 | + {{{nome_usuario}}} | |
134 | 134 | </h3> |
135 | 135 | </div> |
136 | 136 | <div class="list-group-separator"></div> | ... | ... |
admin1/usuarios/grupos/index.php
... | ... | @@ -92,7 +92,7 @@ include "../../head.php"; |
92 | 92 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_grupo}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
93 | 93 | <i class="material-icons md-18">delete_forever</i> |
94 | 94 | </a> |
95 | - {{{nome}}} | |
95 | + {{{nome}}} | |
96 | 96 | </h3> |
97 | 97 | </div> |
98 | 98 | <div class="panel-body panel-collapse collapse" id="body-form-{{id_grupo}}"> | ... | ... |
admin1/usuarios/operacoes/exec.php
... | ... | @@ -171,7 +171,7 @@ function adicionar($codigo,$descricao,$papeis,$dbhw){ |
171 | 171 | function alterar($id_operacao,$codigo,$descricao,$papeis,$dbhw){ |
172 | 172 | global $convUTF, $esquemaadmin; |
173 | 173 | if ($convUTF != true){ |
174 | - $descricao = utf8_encode($descricao); | |
174 | + $descricao = utf8_decode($descricao); | |
175 | 175 | } |
176 | 176 | $dataCol = array( |
177 | 177 | "codigo" => $codigo, | ... | ... |
admin1/usuarios/operacoes/index.php
... | ... | @@ -96,7 +96,7 @@ include "../../head.php"; |
96 | 96 | <a href="javascript:void(0)" onclick="{{onExcluir}}('{{id_operacao}}')" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> |
97 | 97 | <i class="material-icons md-18">delete_forever</i> |
98 | 98 | </a> |
99 | - {{{codigo}}} | |
99 | + {{{codigo}}} | |
100 | 100 | </h3> |
101 | 101 | </div> |
102 | 102 | <div class="list-group-separator"></div> | ... | ... |
ferramentas/loginusuario/template_mst_bt.html
... | ... | @@ -18,10 +18,10 @@ |
18 | 18 | </div> |
19 | 19 | <div class="row"> |
20 | 20 | <div class="col-md-6"> |
21 | - <button onclick="i3GEOF.loginusuario.enviar()" class="btn btn-primary">{{{enviar}}}</button> | |
21 | + <button onclick="i3GEO.login.dialogo.abreLogout()" class="btn btn-primary">Logout</button> | |
22 | 22 | </div> |
23 | 23 | <div class="col-md-6"> |
24 | - <button onclick="i3GEO.login.dialogo.abreLogout()" class="btn btn-primary">Logout</button> | |
24 | + <button onclick="i3GEOF.loginusuario.enviar()" class="btn btn-primary">{{{enviar}}}</button> | |
25 | 25 | </div> |
26 | 26 | </div> |
27 | 27 | <div class="row"> | ... | ... |
init/head.php
ogc/dicionario.js
... | ... | @@ -0,0 +1,83 @@ |
1 | +<?php | |
2 | +/* | |
3 | + * Licenca: | |
4 | + * | |
5 | + * GPL2 | |
6 | + * | |
7 | + * i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
8 | + * | |
9 | + * Direitos Autorais Reservados (c) 2006 Edmar Moretti | |
10 | + * Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | |
11 | + * | |
12 | + * Este programa é software livre; você pode redistribuí-lo | |
13 | + * e/ou modificá-lo sob os termos da Licença Pública Geral | |
14 | + * GNU conforme publicada pela Free Software Foundation; | |
15 | + * | |
16 | + * Este programa é distribuído na expectativa de que seja útil, | |
17 | + * porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
18 | + * de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
19 | + * Consulte a Licença Pública Geral do GNU para mais detalhes. | |
20 | + * Você deve ter recebido uma copia da Licença Pública Geral do | |
21 | + * GNU junto com este programa; se não, escreva para a | |
22 | + * Free Software Foundation, Inc., no endereço | |
23 | + * 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
24 | + */ | |
25 | +error_reporting ( 0 ); | |
26 | +include (dirname(__FILE__)."/../classesphp/sani_request.php"); | |
27 | +include (dirname(__FILE__)."/../admin/php/admin.php"); | |
28 | + | |
29 | +if(!isset($idioma) || $idioma == ""){ | |
30 | + $idioma = "pt"; | |
31 | +} | |
32 | +$funcao = strtoupper ( $_POST["funcao"] ); | |
33 | +switch ($funcao) { | |
34 | + case "LISTA" : | |
35 | + $sql = " | |
36 | +SELECT n0.nome_menu AS nome,n0.id_menu AS id FROM {$esquemaadmin}i3geoadmin_menus AS n0 | |
37 | +JOIN ( | |
38 | + SELECT r.id_menu AS id_menu, 0 AS id_n1 | |
39 | + FROM {$esquemaadmin}i3geoadmin_raiz AS r, {$esquemaadmin}i3geoadmin_temas AS t | |
40 | + WHERE nivel = 0 AND r.id_tema = t.id_tema AND (t.ogc_tema != 'NAO' OR t.download_tema != 'NAO') | |
41 | + AND (r.perfil = '' OR r.perfil isnull ) | |
42 | + GROUP BY id_menu,id_n1 | |
43 | + UNION | |
44 | + SELECT id_menu, id_n1 FROM {$esquemaadmin}i3geoadmin_n1 WHERE publicado != 'NAO' | |
45 | + AND (n1_perfil = '' OR n1_perfil isnull ) | |
46 | + GROUP BY id_menu, id_n1 | |
47 | + ) | |
48 | + AS n1 ON n1.id_menu = n0.id_menu | |
49 | +JOIN ( | |
50 | + SELECT id_nivel AS id_n1, 0 AS id_n2 | |
51 | + FROM {$esquemaadmin}i3geoadmin_raiz AS r, {$esquemaadmin}i3geoadmin_temas AS t | |
52 | + WHERE r.nivel = 1 AND r.id_tema = t.id_tema AND (t.ogc_tema != 'NAO' OR t.download_tema != 'NAO') | |
53 | + AND (r.perfil = '' OR r.perfil isnull ) | |
54 | + GROUP BY id_n1,id_n2 | |
55 | + UNION | |
56 | + SELECT id_n1,id_n2 FROM {$esquemaadmin}i3geoadmin_n2 WHERE | |
57 | + publicado != 'NAO' | |
58 | + AND (n2_perfil = '' OR n2_perfil isnull ) | |
59 | + GROUP BY id_n1,id_n2 | |
60 | + ) | |
61 | + AS n2 ON n2.id_n1 = n1.id_n1 OR n1.id_n1 = 0 | |
62 | +JOIN ( | |
63 | + SELECT r.id_n2 | |
64 | + FROM {$esquemaadmin}i3geoadmin_n3 AS r, {$esquemaadmin}i3geoadmin_temas AS t | |
65 | + WHERE r.id_tema = t.id_tema AND t.ogc_tema != 'NAO' AND r.publicado != 'NAO' AND (n3_perfil = '' OR n3_perfil isnull ) | |
66 | + ) AS n3 ON (n3.id_n2 = n2.id_n2 OR n2.id_n2 = 0 ) | |
67 | + | |
68 | +WHERE n0.publicado_menu != 'NAO' AND (n0.perfil_menu = '' OR n0.perfil_menu isnull ) | |
69 | +GROUP BY n0.nome_menu,n0.id_menu | |
70 | +ORDER BY lower(n0.nome_menu) | |
71 | +"; | |
72 | + $dados = pegaDados ( $sql, "", false ); | |
73 | + $dbhw = null; | |
74 | + $dbh = null; | |
75 | + if ($dados === false) { | |
76 | + header ( "HTTP/1.1 500 erro ao consultar banco de dados" ); | |
77 | + exit (); | |
78 | + } | |
79 | + retornaJSON ( array("dados"=>$dados) ); | |
80 | + break; | |
81 | +} | |
82 | +cpjson ( $retorno ); | |
83 | +?> | ... | ... |
... | ... | @@ -0,0 +1,25 @@ |
1 | +<?php | |
2 | +define ( ONDEI3GEO, dirname ( dirname ( __FILE__ ) ) ); | |
3 | +if (extension_loaded ( 'zlib' )) { | |
4 | + ob_start ( 'ob_gzhandler' ); | |
5 | +} | |
6 | +header ( "Content-type: text/javascript" ); | |
7 | +include (ONDEI3GEO . "/pacotes/cpaint/cpaint2_compacto.inc.js"); | |
8 | +echo "\n"; | |
9 | +include (ONDEI3GEO . "/classesjs/compactados/dicionario_compacto.js"); | |
10 | +echo "\n"; | |
11 | +include (ONDEI3GEO . "/classesjs/compactados/classe_util_compacto.js"); | |
12 | +echo "\n"; | |
13 | +include (ONDEI3GEO . "/classesjs/compactados/classe_idioma_compacto.js"); | |
14 | +echo "\n"; | |
15 | +include (ONDEI3GEO . "/classesjs/compactados/classe_php_compacto.js"); | |
16 | +echo "\n"; | |
17 | +include (ONDEI3GEO . "/classesjs/compactados/classe_arvoredetemas_compacto.js"); | |
18 | +echo "\n"; | |
19 | +include (ONDEI3GEO . "/classesjs/compactados/mustache.js"); | |
20 | +echo "\n"; | |
21 | + | |
22 | +if (extension_loaded ( 'zlib' )) { | |
23 | + ob_end_flush (); | |
24 | +} | |
25 | +?> | |
0 | 26 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,27 @@ |
1 | +<style> | |
2 | +.panel-heading [data-toggle="collapse"]:after { | |
3 | + font-family: 'FontAwesome'; | |
4 | + content: "\f054"; | |
5 | + float: right; | |
6 | + margin-right: 5px; | |
7 | + color: #fffff; | |
8 | + font-size: 12px; | |
9 | + line-height: 16px; | |
10 | + -webkit-transform: rotate(-90deg); | |
11 | + -moz-transform: rotate(-90deg); | |
12 | + -ms-transform: rotate(-90deg); | |
13 | + -o-transform: rotate(-90deg); | |
14 | + transform: rotate(-90deg); | |
15 | +} | |
16 | + | |
17 | +.panel-heading [data-toggle="collapse"].collapsed:after { | |
18 | + -webkit-transform: rotate(90deg); | |
19 | + -moz-transform: rotate(90deg); | |
20 | + -ms-transform: rotate(90deg); | |
21 | + -o-transform: rotate(90deg); | |
22 | + transform: rotate(90deg); | |
23 | +} | |
24 | +.list-group-separator{ | |
25 | + width: 100%; | |
26 | +} | |
27 | +</style> | |
0 | 28 | \ No newline at end of file | ... | ... |
ogc/index.js
1 | -function listaDoNivelMenu(templateMenus,templateGrupos,templateSubGrupos,templateCamadas){ | |
2 | - var r = function(retorno) { | |
3 | - var menus = retorno.data, | |
4 | - nmenus = menus.length, i = 0, s = [], camadasRaiz, dataMenu, htmlMenus, grupos, temp; | |
5 | - for(i=0; i<nmenus; i++){ | |
6 | - camadasRaiz = ""; | |
7 | - dataMenu = menus[i]; | |
8 | - if(dataMenu.temas){ | |
9 | - camadasRaiz = ckCamada(dataMenu.temas,templateCamadas,"tema"); | |
10 | - dataMenu["camadas"] = camadasRaiz; | |
11 | - } | |
12 | - dataMenu["filtro"] = $trad("filtro",g_traducao_ogc); | |
13 | - htmlMenus = Mustache.to_html( | |
14 | - templateMenus, | |
15 | - dataMenu | |
16 | - ); | |
17 | - s.push(htmlMenus); | |
18 | - } | |
19 | - $("#arvore").html(s.join("")); | |
20 | - //pega os grupos do menu | |
21 | - for(i=0; i<nmenus; i++){ | |
22 | - grupos = function(retorno){ | |
23 | - if(retorno.data){ | |
24 | - var gr = retorno.data.grupos, | |
25 | - c, i = 0, g = [], camadas, htmlGrupos, subgrupos, nsubgrupos, j, htmlSubGrupos; | |
26 | - //verifica se existem dados na raiz e grupos | |
27 | - if(gr[0].length == 0 && gr[1].temasraiz.length == 0){ | |
28 | - $("#gruposMenu"+retorno.data.idmenu).html(""); | |
29 | - return; | |
30 | - } | |
31 | - c = gr.length - 3; | |
32 | - g = []; | |
33 | - i = 0; | |
34 | - //camadas na raiz do grupo | |
35 | - //inclui no array com os grupos os temas | |
36 | - //monta o array g que contem os grupos e camadas | |
37 | - for (i = 0; i < c; i++) { | |
38 | - if(gr[i].temasgrupo){ | |
39 | - camadas = ckCamada( | |
40 | - gr[i].temasgrupo, | |
41 | - templateCamadas, | |
42 | - "tema" | |
43 | - ); | |
44 | - gr[i]["camadas"] = camadas; | |
45 | - } else { | |
46 | - gr[i]["camadas"] = ""; | |
47 | - } | |
48 | - g.push(gr[i]); | |
49 | - } | |
50 | - //monta o combo para o filtro | |
51 | - $('[data-grupoFiltro="'+retorno.data.idmenu+'"]').html( | |
52 | - "<option value=''>---</option>" + | |
53 | - Mustache.to_html( | |
54 | - "{{#grupos}}" + $("#templateFiltroGrupo").html() + "{{/grupos}}", | |
55 | - {"grupos":g} | |
56 | - ) | |
57 | - ); | |
58 | - //monta a lista de grupos | |
59 | - if(g){ | |
60 | - htmlGrupos = Mustache.to_html( | |
61 | - "{{#grupos}}" + templateGrupos + "{{/grupos}}", | |
62 | - {"grupos":g} | |
63 | - ); | |
1 | +/* | |
2 | +Licenca: | |
64 | 3 | |
65 | - } | |
66 | - $("#gruposMenu"+retorno.data.idmenu).html(htmlGrupos); | |
67 | - //monta os subgrupos | |
68 | - for (i = 0; i < c; i++) { | |
69 | - subgrupos = gr[i].subgrupos; | |
70 | - id_n1 = gr[i]["id_n1"]; | |
71 | - nsubgrupos = subgrupos.length; | |
72 | - j = 0; | |
73 | - for( j = 0; j < nsubgrupos; j++){ | |
74 | - subgrupos[j]["id_n1"] = id_n1; | |
75 | - subgrupos[j]["idmenu"] = retorno.data.idmenu; | |
76 | - } | |
77 | - htmlSubGrupos = Mustache.to_html( | |
78 | - "{{#s}}" + templateSubGrupos + "{{/s}}", | |
79 | - {"s":subgrupos} | |
80 | - ); | |
81 | - if(id_n1){ | |
82 | - $("#subGruposGrupo"+id_n1).html(htmlSubGrupos); | |
83 | - } | |
84 | - } | |
85 | - } | |
86 | - }; | |
87 | - i3GEO.php.pegalistadegrupos(grupos, menus[i]["idmenu"], "sim", "sim", "sim", "sim"); | |
88 | - } | |
89 | - }; | |
90 | - i3GEO.php.pegalistademenus(r,"sim","sim"); | |
91 | -} | |
92 | -function listaCamadasSubgrupo(idmenu,id_n1,id_n2){ | |
93 | - //console.info(id_n2) | |
94 | - var corpo = $("#corpoSubGrupo"+id_n2), | |
95 | - camadas; | |
96 | - if(corpo.html().trim()+"x" == "x"){ | |
97 | - corpo.html('<div class="panel-body"><i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span></div>'); | |
4 | +GPL2 | |
98 | 5 | |
99 | - } | |
100 | - var r = function(retorno){ | |
101 | - camadas = ckCamada(retorno.data.temas,$("#templateCamadas").html(),"tema"); | |
102 | - corpo.html('<div class="panel-body">' + camadas + "</div>"); | |
103 | - } | |
104 | - i3GEO.php.pegalistadetemas(r, idmenu, id_n1, id_n2); | |
105 | -} | |
106 | -function listaMetaestat (onde,templateCamadas){ | |
107 | - if(onde.html()){ | |
108 | - var r, p; | |
109 | - r = function(d){ | |
110 | - var html = "", n, camadas = [], i, t; | |
111 | - n = d.length; | |
112 | - if(n > 0){ | |
113 | - for(i=0; i<n; i++){ | |
114 | - t = d[i]; | |
115 | - camadas.push({ | |
116 | - "nome": t.nomemedida, | |
117 | - "hidden": "", | |
118 | - "codigo_tema": t.id_medida_variavel | |
119 | - }); | |
120 | - } | |
121 | - html = Mustache.to_html( | |
122 | - onde.html(), | |
123 | - { | |
124 | - "nomemeta":$trad("nomemeta",g_traducao_ogc), | |
125 | - "camadasmeta": ckCamada(camadas,templateCamadas,"meta"), | |
126 | - "hidden": "hidden" | |
127 | - } | |
128 | - ); | |
129 | - } | |
130 | - onde.html(html); | |
131 | - }; | |
132 | - //cpJSON vem de class_php.js | |
133 | - cpJSON.call("../admin/php/metaestat.php?funcao=listaMedidaVariavel&codigo_variavel=&g_sid=", "foo", r); | |
134 | - } | |
135 | -} | |
136 | -function listaMapasSalvos(onde,templateCamadas){ | |
137 | - if(onde.html()){ | |
138 | - var r, p; | |
139 | - r = function(d){ | |
140 | - d = d.data.mapas; | |
141 | - var html = "", n, camadas = [], i, t; | |
142 | - n = d.length; | |
143 | - if(n > 0){ | |
144 | - for(i=0; i<n; i++){ | |
145 | - t = d[i]; | |
146 | - camadas.push({ | |
147 | - "nome": t.NOME, | |
148 | - "hidden": "", | |
149 | - "codigo_tema": t.ID_MAPA, | |
150 | - "download": "nao" | |
151 | - }); | |
152 | - } | |
6 | +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
153 | 7 | |
154 | - html = Mustache.to_html( | |
155 | - onde.html(), | |
156 | - { | |
157 | - "nomeMapasSalvos":$trad("nomeMapasSalvos",g_traducao_ogc), | |
158 | - "mapasSalvos": ckCamada(camadas,templateCamadas,"mapa"), | |
159 | - "hidden": "hidden" | |
160 | - } | |
161 | - ); | |
162 | - } | |
163 | - onde.html(html); | |
164 | - }; | |
165 | - //cpJSON vem de class_php.js | |
166 | - cpJSON.call("../classesphp/mapa_controle.php?map_file=&funcao=pegaMapas&g_sid=", "foo", r); | |
167 | - } | |
168 | -} | |
169 | -function ckCamada(camadas,templateCamadas,tipo){ | |
170 | - var ncamadas = [], | |
171 | - html; | |
172 | - //marca as camadas que nao sao ogc | |
173 | - $(camadas).each(function() { | |
174 | - if(tipo == "tema"){ | |
175 | - if(this.link_tema == ""){ | |
176 | - this.hidden = "hidden"; | |
177 | - } | |
178 | - this.tipo = tipo; | |
179 | - //para compatibilizar entre as diferencas de respostas JSON | |
180 | - if(this.ogc){ | |
181 | - this.ogc_tema = this.ogc; | |
182 | - } | |
183 | - if(this.download){ | |
184 | - this.download_tema = this.download; | |
185 | - } | |
186 | - //nao mostra se nenhum permitir acao | |
187 | - if(!(this.ogc_tema.toLowerCase() == "nao" && this.download_tema.toLowerCase() == "nao")){ | |
188 | - if(this.ogc_tema.toLowerCase() == "nao"){ | |
189 | - this.disabledogc = "disabled"; | |
190 | - } | |
191 | - if(this.download_tema.toLowerCase() == "nao"){ | |
192 | - this.disableddown = "disabled"; | |
193 | - } | |
194 | - ncamadas.push(this); | |
195 | - } | |
8 | +Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
9 | +Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | |
196 | 10 | |
197 | - } | |
198 | - if(tipo == "meta"){ | |
199 | - this.hidden = "hidden"; | |
200 | - this.tipo = tipo; | |
201 | - ncamadas.push(this); | |
202 | - } | |
203 | - if(tipo == "mapa"){ | |
204 | - this.hidden = "hidden"; | |
205 | - this.tipo = tipo; | |
206 | - this.disableddown = "disabled"; | |
207 | - ncamadas.push(this); | |
208 | - } | |
209 | - }); | |
210 | - html = Mustache.to_html( | |
211 | - "{{#data}}" + templateCamadas + "{{/data}}", | |
212 | - {"data":ncamadas} | |
213 | - ); | |
214 | - if(html != ""){ | |
215 | - return '<div class="list-group">'+html+'</div>'; | |
216 | - } | |
217 | - else{ | |
218 | - return ""; | |
219 | - } | |
220 | -} | |
221 | -function mostraLinksServico(tema,tipo,disabled){ | |
222 | - $(".modal-body").html('<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span>'); | |
223 | - var html; | |
224 | - if(disabled != ""){ | |
225 | - $(".modal-body").html = ""; | |
226 | - return; | |
227 | - } | |
228 | - else{ | |
229 | - if(tipo == "meta"){ | |
230 | - tradLinks["tema"] = "metaestat_"+tema; | |
231 | - tradLinks["id_medida_variavel"] = "&id_medida_variavel="+tema; | |
232 | - } | |
233 | - if(tipo == "mapa"){ | |
234 | - tradLinks["tema"] = "mapa_cadastrado_"+tema; | |
235 | - tradLinks["id_medida_variavel"] = "&mapa_cadastrado="+tema; | |
236 | - } | |
237 | - if(tipo == "tema"){ | |
238 | - tradLinks["tema"] = tema; | |
239 | - } | |
240 | - html = Mustache.to_html( | |
241 | - $("#templateLinksOgc").html(), | |
242 | - tradLinks | |
243 | - ); | |
244 | - $(".modal-body").html(html); | |
245 | - } | |
11 | +Este programa é software livre; você pode redistribuí-lo | |
12 | +e/ou modificá-lo sob os termos da Licença Pública Geral | |
13 | +GNU conforme publicada pela Free Software Foundation; | |
246 | 14 | |
247 | -} | |
248 | -function mostraLinksDownload(tema,tipo,disabled){ | |
249 | - $(".modal-body").html('<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span>'); | |
250 | - var html, r, p; | |
251 | - if(disabled != ""){ | |
252 | - return; | |
253 | - } | |
254 | - else{ | |
255 | - r = function(retorno){ | |
256 | - var html,arqs,i,n,ins = ""; | |
257 | - retorno = retorno.data; | |
258 | - //adiciona no hash os dados necessarios | |
259 | - if(tipo == "meta"){ | |
260 | - tradLinks["tema"] = "metaestat_" + tema; | |
261 | - tradLinks["id_medida_variavel"] = "&id_medida_variavel=" + tema; | |
262 | - } | |
263 | - if(tipo == "tema"){ | |
264 | - tradLinks["tema"] = tema; | |
265 | - } | |
266 | - tradLinks["mapfile"] = window.location.protocol + "//" + window.location.host + "/" + retorno.mapfileurl; | |
267 | - tradLinks["sldurl"] = tradLinks["urli3geo"] + "/ferramentas/legenda/exec.php?funcao=TEMA2SLD&tema=" + retorno.tema + "&map_file=" + retorno.mapfile; | |
15 | +Este programa é distribuído na expectativa de que seja útil, | |
16 | +porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
17 | +de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
18 | +Consulte a Licença Pública Geral do GNU para mais detalhes. | |
19 | +Você deve ter recebido uma cópia da Licença Pública Geral do | |
20 | +GNU junto com este programa; se não, escreva para a | |
21 | +Free Software Foundation, Inc., no endereço | |
22 | +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
268 | 23 | |
269 | - arqs = retorno.arquivos.split(","); | |
270 | - n = arqs.length; | |
271 | - for (i=0; i<n; i++){ | |
272 | - ins += "<p><a href='"+window.location.protocol+"//"+window.location.host+"/"+arqs[i]+"'>"+arqs[i]+"</a></p>"; | |
273 | - } | |
274 | - tradLinks["shp"] = ins; | |
24 | + */ | |
25 | +ogc = {}; | |
26 | +ogc.menus = { | |
27 | + //variavel global indicando o elemento que recebera a lista de menus | |
28 | + ondeLista: "", | |
29 | + init: function(onde){ | |
30 | + ogc.menus.ondeLista = onde; | |
31 | + ogc.menus.lista(); | |
32 | + }, | |
33 | + /* | |
34 | +Function: lista | |
275 | 35 | |
276 | - html = Mustache.to_html( | |
277 | - $("#templateLinksDownload").html(), | |
278 | - tradLinks | |
279 | - ); | |
280 | - tradLinks["shp"] = ""; | |
281 | - tradLinks["mapfile"] = ""; | |
282 | - tradLinks["sldurl"] = ""; | |
283 | - | |
284 | - $(".modal-body").html(html); | |
285 | - } | |
286 | - //obtem o shapefile e outros dados | |
287 | - p = "../classesphp/mapa_controle.php?map_file=&funcao=download3&tema="+tema; | |
288 | - //caso a camada venha do sistema de metadados estatisticos e seja uma variavel | |
289 | - if(tipo == "meta"){ | |
290 | - p = "../classesphp/mapa_controle.php?map_file=&funcao=download3&id_medida_variavel="+tema; | |
291 | - } | |
292 | - cpJSON.call(p, "foo", r); | |
293 | - } | |
294 | -} | |
295 | -function listaCompleta(onde){ | |
296 | - var r, p; | |
297 | - r = function(retorno){ | |
298 | - var d, html = "", n, camadas = [], i, t; | |
299 | - d = retorno.data.temas; | |
300 | - n = d.length; | |
301 | - if(n > 0){ | |
302 | - for(i=0; i<n; i++){ | |
303 | - t = d[i]; | |
304 | - camadas.push({ | |
305 | - "nome": t.nome_tema, | |
306 | - "link_tema": t.link_tema, | |
307 | - "codigo_tema": t.codigo_tema, | |
308 | - "ogc_tema": t.ogc_tema, | |
309 | - "download_tema": t.download_tema | |
310 | - }); | |
311 | - } | |
312 | - html = ckCamada(camadas,$("#templateCamadas").html(),"tema"); | |
313 | - } | |
314 | - if($("#corpoMetaestat").html()){ | |
315 | - onde.html(html + $("#corpoMetaestat").html()); | |
316 | - } | |
317 | - else{ | |
318 | - onde.html(html); | |
36 | +Lista de menus | |
37 | + */ | |
38 | + lista: function(){ | |
39 | + $.post( | |
40 | + "exec.php", | |
41 | + "funcao=lista" | |
42 | + ) | |
43 | + .done( | |
44 | + function(data, status){ | |
45 | + var json = jQuery.parseJSON(data); | |
46 | + var html = Mustache.to_html( | |
47 | + "{{#data}}" + $("#templateLista").html() + "{{/data}}", | |
48 | + $.extend( | |
49 | + {}, | |
50 | + ogc.menus.dicionario, | |
51 | + { | |
52 | + "data": json["dados"], | |
53 | + "onclick": "ogc.menus.proximoNivel" | |
54 | + } | |
55 | + ) | |
56 | + ); | |
57 | + ogc.menus.ondeLista.html(html); | |
58 | + $.material.init(); | |
59 | + } | |
60 | + ) | |
61 | + .fail(function(data){ | |
62 | + ogc.menus.ondeLista.html('<div class="alert alert-danger alert-dismissible" role="alert">' + data.status + " " +data.statusText + '</div>'); | |
63 | + }); | |
64 | + }, | |
65 | + proximoNivel: function(id,nome){ | |
66 | + window.location.href = "menu/index.php?id_menu=" + id + "&nome_menu=" + nome; | |
319 | 67 | } |
320 | - }; | |
321 | - //cpJSON vem de class_php.js | |
322 | - cpJSON.call("../classesphp/mapa_controle.php?map_file=&funcao=pegaTodosTemas&g_sid=&idioma=pt", "foo", r); | |
323 | -} | |
324 | -function filtraGrupo(obj,idPainel){ | |
325 | - $("#" + idPainel + " .grupo").each( | |
326 | - function(i,el){ | |
327 | - if(obj.value == ""){ | |
328 | - $(el).show(); | |
329 | - } | |
330 | - else { | |
331 | - $(el).hide(); | |
332 | - } | |
333 | - } | |
334 | - ); | |
335 | - if(obj.value != ""){ | |
336 | - $("#"+obj.value).show(); | |
337 | - } | |
338 | -} | |
339 | 68 | \ No newline at end of file |
69 | +}; | |
340 | 70 | \ No newline at end of file | ... | ... |
ogc/index.php
... | ... | @@ -2,147 +2,10 @@ |
2 | 2 | define ( ONDEI3GEO, ".." ); |
3 | 3 | include (dirname ( __FILE__ ) . "/../ms_configura.php"); |
4 | 4 | include_once (dirname(__FILE__)."/../classesphp/sani_request.php"); |
5 | -// pega a extensao geografica | |
6 | -if ($ogcwsmap == "") { | |
7 | - $ogcwsmap = $locaplic . "/aplicmap/ogcws.map"; | |
8 | -} | |
9 | -$map = ms_newMapObj ( $ogcwsmap ); | |
10 | -$mapext = $map->extent->minx . "," . $map->extent->miny . "," . $map->extent->maxx . "," . $map->extent->maxy; | |
11 | 5 | error_reporting ( 0 ); |
12 | -include "../init/head.php"; | |
6 | +include (ONDEI3GEO."/init/head.php"); | |
13 | 7 | ?> |
14 | -<style> | |
15 | -.panel-heading [data-toggle="collapse"]:after { | |
16 | - font-family: 'FontAwesome'; | |
17 | - content: "\f054"; | |
18 | - float: right; | |
19 | - margin-right: 5px; | |
20 | - color: #fffff; | |
21 | - font-size: 12px; | |
22 | - line-height: 16px; | |
23 | - -webkit-transform: rotate(-90deg); | |
24 | - -moz-transform: rotate(-90deg); | |
25 | - -ms-transform: rotate(-90deg); | |
26 | - -o-transform: rotate(-90deg); | |
27 | - transform: rotate(-90deg); | |
28 | -} | |
29 | - | |
30 | -.panel-heading [data-toggle="collapse"].collapsed:after { | |
31 | - -webkit-transform: rotate(90deg); | |
32 | - -moz-transform: rotate(90deg); | |
33 | - -ms-transform: rotate(90deg); | |
34 | - -o-transform: rotate(90deg); | |
35 | - transform: rotate(90deg); | |
36 | -} | |
37 | -.list-group-separator{ | |
38 | - width: 100%; | |
39 | -} | |
40 | -</style> | |
41 | -<script id="templateLinksOgc" type="x-tmpl-mustache"> | |
42 | -<h3>OGC</h3> | |
43 | -<p>{{{linkpagina}}}: <a href="{{{url}}}?temaOgc={{{tema}}}">{{{url}}}?temaOgc={{{tema}}}</a> | |
44 | -<p>{{{wstodas}}}: <a href="{{{servico}}}" target="_blank" >{{{servico}}}</a> | |
45 | -<p>{{{wscamada}}}: <a href="{{{servico}}}tema={{{tema}}}{{{id_medida_variavel}}}&" target="_blank" >{{{servico}}}tema={{{tema}}}{{{id_medida_variavel}}}&</a> | |
46 | -<p><a href="{{{urli3geo}}}/fontetema.php?tema={{{tema}}}" target="_blank" >Metadata</a></p> | |
47 | -<p><a target=blank href="{{{servico}}}service=wms&version=1.1.1&request=getcapabilities&layers={{{tema}}}{{{id_medida_variavel}}}" >GetCapabilities</a> | |
48 | -<p><a target=blank href="{{{servico}}}SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX=<?php echo $mapext;?>&FORMAT=image/png&service=wms&version=1.1.0&request=getmap&layers={{{tema}}}{{{id_medida_variavel}}}" >{{{getmap}}}</a> | |
49 | -<p><a target=blank href="{{{servico}}}SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX=<?php echo $mapext;?>&FORMAT=image/png&service=wms&version=1.1.0&request=getlegendgraphic&layers={{{tema}}}{{{id_medida_variavel}}}" >{{{legenda}}}</a> | |
50 | -<p><a target=blank href="{{{servico}}}format=application/openlayers&bbox=<?php echo $mapext;?>&layers={{{tema}}}" >{{{vOl}}}</a> | |
51 | -</script> | |
52 | -<script id="templateLinksDownload" type="x-tmpl-mustache"> | |
53 | -<h3>Download</h3> | |
54 | -<p>{{{linkpagina}}}: <a href="{{{url}}}?temaDownload={{{tema}}}">{{{url}}}?temaDownload={{{tema}}}</a> | |
55 | -<p>{{{sld}}}: <a href="{{{sldurl}}}" target="_blank" >{{{sldurl}}}</a> | |
56 | -<p><a href="{{{urli3geo}}}/fontetema.php?tema={{{tema}}}" target="_blank" >Metadata</a></p> | |
57 | -<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=shape-zip&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}&typeName={{{tema}}}{{{id_medida_variavel}}}" >{{{downwfs}}}</a> | |
58 | -<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=csv&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}&ows_geomtype=AS_WKT" >{{{downCgeo}}}</a> | |
59 | -<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=csv&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}&ows_geomtype=none" >{{{downSgeo}}}</a> | |
60 | -<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=kmz&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}" >{{{kmz}}}</a> | |
61 | -<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=kml&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}" >{{{kml}}}</a> | |
62 | -<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=geojson&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}" >GeoJson</a> | |
63 | -<p><a target=blank href="../ferramentas/recline/default.php?tema={{{tema}}}{{{id_medida_variavel}}}" >{{{explore}}}</a> | |
64 | -<h4>Shape file</h4> | |
65 | -{{{shp}}} | |
66 | -</script> | |
67 | -<script id="templateCamadas" type="x-tmpl-mustache"> | |
68 | -<div class="list-group-item"> | |
69 | - <div class="bs-component btn-group-sm pull-left" data-toggle="modal" data-target="#modalCamada" > | |
70 | - <a title="links OWS" onclick="mostraLinksServico('{{codigo_tema}}','{{tipo}}','{{disabledogc}}')" class="btn btn-primary btn-fab {{disabledogc}}" href="#"> | |
71 | - <i class="material-icons">launch</i> | |
72 | - </a> | |
73 | - <a title="download" onclick="mostraLinksDownload('{{codigo_tema}}','{{tipo}}','{{disableddown}}')" class="btn btn-primary btn-fab {{disableddown}}" href="#"> | |
74 | - <i class="material-icons">file_download</i> | |
75 | - </a> | |
76 | - </div> | |
77 | - <h4> | |
78 | - <a onclick="mostraLinksServico('{{codigo_tema}}','{{tipo}}','{{disabledogc}}');$('#modalCamada').modal('show');" href="#"> | |
79 | - {{{nome_tema}}}{{{nome}}}</a> | |
80 | - <a title="metadata" class="{{hidden}}" href="{{link_tema}}{{link}}" target="_blank"><i class="fa fa-link"></i></a> | |
81 | - </h4> | |
82 | -</div> | |
83 | -<div class="list-group-separator"></div> | |
84 | -</script> | |
85 | -<script id="templateMenu" type="x-tmpl-mustache"> | |
86 | -<div class="panel-group" id="menu{{idmenu}}" role="tablist" aria-multiselectable="true"> | |
87 | - <div class="panel panel-default" > | |
88 | - <div class="panel-heading" style="background-color:#80cbc4;" role="tab" id="tituloMenu{{idmenu}}"> | |
89 | - <h3 class="panel-title"> | |
90 | - <a class="collapsed in" role="button" data-toggle="collapse" data-parent="#menu{{idmenu}}" href="#corpoMenu{{idmenu}}" aria-expanded="false" aria-controls="#corpoMenu{{idmenu}}"> {{{nomemenu}}} </a> | |
91 | - </h3> | |
92 | - </div> | |
93 | - <div class="panel-body"> | |
94 | - <div id="corpoMenu{{idmenu}}" class="panel-collapse collapse" role="tabpanel" aria-multiselectable="true"> | |
95 | - {{{camadas}}} | |
96 | - <!-- aqui entra o filtro --> | |
97 | - <div class="form-group"> | |
98 | - | |
99 | - <select onchange="filtraGrupo(this,'menu{{idmenu}}')" data-grupoFiltro="{{idmenu}}" class="form-control input-lg"> | |
100 | - </select> | |
101 | - </div> | |
102 | - | |
103 | - <div id="gruposMenu{{idmenu}}"> | |
104 | - <i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span> | |
105 | - </div> | |
106 | - </div> | |
107 | - </div> | |
108 | - </div> | |
109 | -</div> | |
110 | -</script> | |
111 | -<script id="templateFiltroGrupo" type="x-tmpl-mustache"> | |
112 | -<option value="painelGrupo{{id_n1}}">{{{nome}}}</option> | |
113 | -</script> | |
114 | -<script id="templateGrupos" type="x-tmpl-mustache"> | |
115 | -<div class="list-group grupo" id="painelGrupo{{id_n1}}"> | |
116 | - <div class="panel panel-default"> | |
117 | - <div class="panel-heading" style="background-color: #b2dfdb;" role="tab" > | |
118 | - <h4 class="panel-title"> | |
119 | - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#corpoMenu{{idmenu}}" href="#corpoGrupo{{id_n1}}" aria-expanded="false" aria-controls="corpoGrupo{{id_n1}}"> {{{nome}}} </a> | |
120 | - </h4> | |
121 | - </div> | |
122 | - <div class="panel-body"> | |
123 | - <div id="corpoGrupo{{id_n1}}" class="panel-collapse collapse" role="tabpanel" aria-multiselectable="true"> | |
124 | - {{{camadas}}} | |
125 | - <div id="subGruposGrupo{{id_n1}}">{{grupos}}</div> | |
126 | - </div> | |
127 | - </div> | |
128 | - </div> | |
129 | -</div> | |
130 | -</script> | |
131 | -<script id="templateSubGrupos" type="x-tmpl-mustache"> | |
132 | -<div class="list-group"> | |
133 | -<div class="panel panel-default"> | |
134 | - <div style="background-color: #e0f2f1;" onclick="listaCamadasSubgrupo('{{idmenu}}','{{id_n1}}','{{id_n2}}')" class="panel-heading" role="tab" id="tituloSubGrupo{{id_n2}}"> | |
135 | - <h4 class="panel-title"> | |
136 | - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#corpoGrupo{{id_n1}}" href="#corpoSubGrupo{{id_n2}}" aria-expanded="false" aria-controls="corpoSubGrupo{{id_n2}}"> {{{nome}}} </a> | |
137 | - </h4> | |
138 | - </div> | |
139 | - <div class="panel-body"> | |
140 | - <div id="corpoSubGrupo{{id_n2}}" class="panel-collapse collapse" role="tabpanel" aria-multiselectable="true"> | |
141 | - </div> | |
142 | - </div> | |
143 | -</div> | |
144 | -</div> | |
145 | -</script> | |
8 | +<link rel='stylesheet' type='text/css' href='index.css'> | |
146 | 9 | <body style="padding-top: 55px;" id="topo"> |
147 | 10 | <nav class="navbar navbar-default navbar-fixed-top"> |
148 | 11 | <div class="container-fluid"> |
... | ... | @@ -178,160 +41,33 @@ include "../init/head.php"; |
178 | 41 | </div> |
179 | 42 | |
180 | 43 | <div class="container"> |
181 | - <!-- lista completa --> | |
182 | - <div class="row center-block hidden" id="listaCompleta"> | |
183 | - <div class="col-sm-12"> | |
184 | - <div class="panel panel-default"> | |
185 | - <div class="panel-body" id="corpolistaCompleta"> | |
186 | - <i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span> | |
187 | - </div> | |
188 | - </div> | |
189 | - </div> | |
190 | - </div> | |
191 | - <!-- Camadas oriundas do sistema de metadados estatisticos e mapas salvos | |
192 | - <div class="row center-block escondido hidden"> | |
193 | - <div class="col-sm-6" id="metaestat"> | |
194 | - <div class="panel-group" role="tablist" aria-multiselectable="true"> | |
195 | - <div class="panel panel-default"> | |
196 | - <div class="panel-heading" style="background-color: #00BCD4;" role="tab"> | |
197 | - <h3 class="panel-title"> | |
198 | - <a class="collapsed in" role="button" data-toggle="collapse" href="#corpoMetaestat" | |
199 | - aria-expanded="false" aria-controls="#corpoMetaestat"> {{{nomemeta}}} </a> | |
200 | - </h3> | |
201 | - </div> | |
202 | - <div class="panel-body"> | |
203 | - <div id="corpoMetaestat" class="panel-collapse collapse" role="tabpanel" | |
204 | - aria-multiselectable="true"> | |
205 | - {{{camadasmeta}}} | |
206 | - </div> | |
207 | - </div> | |
208 | - </div> | |
209 | - </div> | |
210 | - </div> | |
211 | - <div class="col-sm-6" id="mapasSalvos"> | |
212 | - <div class="panel-group" role="tablist" aria-multiselectable="true"> | |
213 | - <div class="panel panel-default"> | |
214 | - <div class="panel-heading" style="background-color: #00BCD4;" role="tab"> | |
215 | - <h3 class="panel-title"> | |
216 | - <a class="collapsed in" role="button" data-toggle="collapse" href="#corpomapasSalvos" | |
217 | - aria-expanded="false" aria-controls="#corpomapasSalvos"> {{{nomeMapasSalvos}}} </a> | |
218 | - </h3> | |
219 | - </div> | |
220 | - <div class="panel-body"> | |
221 | - <div id="corpomapasSalvos" class="panel-collapse collapse" role="tabpanel" | |
222 | - aria-multiselectable="true"> | |
223 | - {{{mapasSalvos}}} | |
224 | - </div> | |
225 | - </div> | |
226 | - </div> | |
227 | - </div> | |
228 | - </div> | |
229 | - </div> | |
230 | - --> | |
231 | 44 | <div class="row center-block"> |
232 | - <div class="col-sm-12" id="arvore"> | |
233 | - <i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span> | |
234 | - </div> | |
235 | - </div> | |
236 | - </div> | |
237 | - <nav class="navbar-fixed-bottom"> | |
238 | - <div class="container-fluid"> | |
239 | - <div class="jumbotron"></div> | |
240 | - </div> | |
241 | - </nav> | |
242 | - <div id="modalCamada" class="modal fade" tabindex="-1" role="dialog"> | |
243 | - <div class="modal-dialog"> | |
244 | - <div class="modal-content"> | |
245 | - <div class="modal-body"></div> | |
246 | - <div class="modal-footer" | |
247 | - style="padding: 0px; padding-right: 15px; border: 0px; background-color: white;"> | |
248 | - <a class="btn btn-primary" href="#" role="button" data-dismiss="modal" aria-label="Close"> OK </a> | |
45 | + <div class="col-md-12"> | |
46 | + <div class="well" id="corpo"> | |
47 | + <i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i> <span class="sr-only">Loading...</span> | |
249 | 48 | </div> |
250 | 49 | </div> |
251 | 50 | </div> |
252 | 51 | </div> |
253 | - <script src='../pacotes/cpaint/cpaint2_compacto.inc.js'></script> | |
254 | - <script src='../classesjs/compactados/dicionario_compacto.js'></script> | |
255 | - <script src='../classesjs/compactados/classe_util_compacto.js'></script> | |
256 | - <script src='../classesjs/compactados/classe_idioma_compacto.js'></script> | |
257 | - <script src='../classesjs/compactados/classe_php_compacto.js'></script> | |
258 | - <script src='../classesjs/compactados/classe_arvoredetemas_compacto.js'></script> | |
259 | - <script src='../classesjs/compactados/mustache.js'></script> | |
260 | - <script src='dicionario.js'></script> | |
261 | - <script src='index.js'></script> | |
262 | - <script> | |
52 | +</div> | |
53 | + | |
54 | +<?php include (ONDEI3GEO."/ogc/templates/templatelista.php");?> | |
55 | + | |
56 | +<script src='headjs.php'></script> | |
57 | +<script src='index.js'></script> | |
58 | +<script src='dicionario.js'></script> | |
59 | +<script> | |
263 | 60 | $(document).ready(function(){ |
264 | - $(".jumbotron").html($trad("jumbotron",g_traducao_ogc)); | |
265 | 61 | i3GEO.configura = {"locaplic" : "..","sid": ""}; |
266 | - | |
267 | - var servico = window.location.href.split("/ogc")[0]+"/ogc.php?"; | |
268 | - //g_traducao_ogc vem de dicionario.js | |
269 | - tradLinks = i3GEO.idioma.objetoIdioma(g_traducao_ogc); | |
270 | - tradLinks["servico"] = servico; | |
271 | - tradLinks["url"] = window.location.href.split("#")[0]; | |
272 | - tradLinks["url"] = tradLinks["url"].split("?")[0]; | |
273 | - tradLinks["urli3geo"] = window.location.href.split("/ogc")[0]; | |
274 | - //traducao do menu nav | |
275 | - html = Mustache.to_html( | |
62 | + tradLinks = i3GEO.idioma.objetoIdioma(ogc.dicionario); | |
63 | + var html = Mustache.to_html( | |
276 | 64 | $("#menuTpl").html(), |
277 | 65 | tradLinks |
278 | 66 | ); |
279 | 67 | $("#menuTpl").html(html); |
280 | - //inicia arvore | |
281 | - listaDoNivelMenu( | |
282 | - $("#templateMenu").html(), | |
283 | - $("#templateGrupos").html(), | |
284 | - $("#templateSubGrupos").html(), | |
285 | - $("#templateCamadas").html() | |
286 | - ); | |
287 | - listaMetaestat($("#metaestat"),$("#templateCamadas").html()); | |
288 | - listaMapasSalvos($("#mapasSalvos"),$("#templateCamadas").html()); | |
289 | 68 | $('.escondido').removeClass('hidden'); |
290 | - $(window).on("scroll click", | |
291 | - function(){ | |
292 | - $(".jumbotron").fadeOut(300); | |
293 | - } | |
294 | - ); | |
295 | - //container para a lista completa | |
296 | - $('#listaCompleta').on('show.bs.collapse', function () { | |
297 | - listaCompleta($('#corpolistaCompleta')); | |
298 | - $('#listaCompleta').removeClass('hidden'); | |
299 | - }) | |
300 | - $('#listaCompleta').on('hide.bs.collapse', function () { | |
301 | - $('#listaCompleta').addClass('hidden'); | |
302 | - }) | |
303 | - | |
304 | - $.material.init(); | |
305 | - //verifica se deve abrir de imediato a janela de links | |
306 | - var temp = window.location.href.split("temaOgc="); | |
307 | - if(temp[1]){ | |
308 | - var temaOgc = temp[1]; | |
309 | - temaOgc = temaOgc.split("&"); | |
310 | - temaOgc = temaOgc[0]; | |
311 | - //verifica se eh metaestat | |
312 | - if(temaOgc.split("_")[0] == "metaestat"){ | |
313 | - mostraLinksServico(temaOgc.split("_")[1],"meta") | |
314 | - } | |
315 | - else{ | |
316 | - mostraLinksServico(temaOgc,"tema",'') | |
317 | - } | |
318 | - $("#modalCamada").modal('show'); | |
319 | - } | |
320 | - var temp = window.location.href.split("temaDownload="); | |
321 | - if(temp[1]){ | |
322 | - var temaDownload = temp[1]; | |
323 | - temaDownload = temaDownload.split("&"); | |
324 | - temaDownload = temaDownload[0]; | |
325 | - //verifica se eh metaestat | |
326 | - if(temaDownload.split("_")[0] == "metaestat"){ | |
327 | - mostraLinksDownload(temaDownload.split("_")[1],"meta") | |
328 | - } | |
329 | - else{ | |
330 | - mostraLinksDownload(temaDownload,"tema",'') | |
331 | - } | |
332 | - $("#modalCamada").modal('show'); | |
333 | - } | |
69 | + ogc.menus.init($("#corpo")); | |
334 | 70 | }); |
335 | - </script> | |
71 | +</script> | |
336 | 72 | </body> |
337 | 73 | </html> | ... | ... |
... | ... | @@ -0,0 +1,82 @@ |
1 | +<?php | |
2 | +/* | |
3 | + * Licenca: | |
4 | + * | |
5 | + * GPL2 | |
6 | + * | |
7 | + * i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
8 | + * | |
9 | + * Direitos Autorais Reservados (c) 2006 Edmar Moretti | |
10 | + * Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | |
11 | + * | |
12 | + * Este programa é software livre; você pode redistribuí-lo | |
13 | + * e/ou modificá-lo sob os termos da Licença Pública Geral | |
14 | + * GNU conforme publicada pela Free Software Foundation; | |
15 | + * | |
16 | + * Este programa é distribuído na expectativa de que seja útil, | |
17 | + * porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
18 | + * de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
19 | + * Consulte a Licença Pública Geral do GNU para mais detalhes. | |
20 | + * Você deve ter recebido uma copia da Licença Pública Geral do | |
21 | + * GNU junto com este programa; se não, escreva para a | |
22 | + * Free Software Foundation, Inc., no endereço | |
23 | + * 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
24 | + */ | |
25 | +error_reporting ( 0 ); | |
26 | +include (dirname(__FILE__)."/../../classesphp/sani_request.php"); | |
27 | +include (dirname(__FILE__)."/../../admin/php/admin.php"); | |
28 | + | |
29 | +if(!isset($idioma) || $idioma == ""){ | |
30 | + $idioma = "pt"; | |
31 | +} | |
32 | +$id_menu = (int)$_POST["id_menu"]; | |
33 | + | |
34 | +$funcao = strtoupper ( $_POST["funcao"] ); | |
35 | +switch ($funcao) { | |
36 | + case "LISTA" : | |
37 | + $sql = " | |
38 | +SELECT grupo.nome_grupo AS nome,n1.id_n1 AS id FROM {$esquemaadmin}i3geoadmin_n1 AS n1 | |
39 | +JOIN {$esquemaadmin}i3geoadmin_grupos AS grupo ON n1.id_grupo = grupo.id_grupo AND n1.id_menu = $id_menu | |
40 | +JOIN ( | |
41 | + SELECT id_nivel AS id_n1, 0 AS id_n2 | |
42 | + FROM {$esquemaadmin}i3geoadmin_raiz AS r, {$esquemaadmin}i3geoadmin_temas AS t | |
43 | + WHERE r.nivel = 1 AND r.id_tema = t.id_tema AND (t.ogc_tema != 'NAO' OR t.download_tema != 'NAO') | |
44 | + AND (r.perfil = '' OR r.perfil isnull ) | |
45 | + GROUP BY id_n1,id_n2 | |
46 | + UNION | |
47 | + SELECT id_n1,id_n2 FROM {$esquemaadmin}i3geoadmin_n2 WHERE | |
48 | + publicado != 'NAO' | |
49 | + AND (n2_perfil = '' OR n2_perfil isnull ) | |
50 | + GROUP BY id_n1,id_n2 | |
51 | + ) | |
52 | + AS n2 ON n2.id_n1 = n1.id_n1 OR n1.id_n1 = 0 | |
53 | +JOIN ( | |
54 | + SELECT r.id_n2 | |
55 | + FROM {$esquemaadmin}i3geoadmin_n3 AS r, {$esquemaadmin}i3geoadmin_temas AS t | |
56 | + WHERE r.id_tema = t.id_tema AND t.ogc_tema != 'NAO' AND r.publicado != 'NAO' AND (n3_perfil = '' OR n3_perfil isnull ) | |
57 | + ) AS n3 ON (n3.id_n2 = n2.id_n2 OR n2.id_n2 = 0 ) | |
58 | + | |
59 | +WHERE n1.publicado != 'NAO' AND (n1.n1_perfil = '' OR n1.n1_perfil isnull ) | |
60 | +GROUP BY grupo.nome_grupo,n1.id_n1 | |
61 | +ORDER BY lower(grupo.nome_grupo) | |
62 | +"; | |
63 | + $dados = pegaDados ( $sql, "", false ); | |
64 | + if ($dados === false) { | |
65 | + header ( "HTTP/1.1 500 erro ao consultar banco de dados" ); | |
66 | + exit (); | |
67 | + } | |
68 | + $sqlCamadas = " | |
69 | + SELECT r.id_tema,t.codigo_tema,t.nome_tema,t.link_tema,lower(t.ogc_tema) AS ogc_tema,lower(t.download_tema) AS download_tema | |
70 | + FROM {$esquemaadmin}i3geoadmin_raiz AS r, {$esquemaadmin}i3geoadmin_temas AS t | |
71 | + WHERE r.nivel = 0 AND r.id_tema = t.id_tema AND (t.ogc_tema != 'NAO' OR t.download_tema != 'NAO') AND r.id_menu = $id_menu AND | |
72 | + (r.perfil = '' OR r.perfil isnull ) | |
73 | + ORDER BY lower(t.nome_tema) | |
74 | + "; | |
75 | + $camadas = pegaDados ( $sqlCamadas, "", false ); | |
76 | + $dbhw = null; | |
77 | + $dbh = null; | |
78 | + retornaJSON ( array("dados"=>$dados,"camadas"=>$camadas) ); | |
79 | + break; | |
80 | +} | |
81 | +cpjson ( $retorno ); | |
82 | +?> | ... | ... |
... | ... | @@ -0,0 +1,69 @@ |
1 | +<?php | |
2 | +/* | |
3 | + * Licenca: | |
4 | + * | |
5 | + * GPL2 | |
6 | + * | |
7 | + * i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
8 | + * | |
9 | + * Direitos Autorais Reservados (c) 2006 Edmar Moretti | |
10 | + * Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | |
11 | + * | |
12 | + * Este programa é software livre; você pode redistribuí-lo | |
13 | + * e/ou modificá-lo sob os termos da Licença Pública Geral | |
14 | + * GNU conforme publicada pela Free Software Foundation; | |
15 | + * | |
16 | + * Este programa é distribuído na expectativa de que seja útil, | |
17 | + * porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
18 | + * de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
19 | + * Consulte a Licença Pública Geral do GNU para mais detalhes. | |
20 | + * Você deve ter recebido uma copia da Licença Pública Geral do | |
21 | + * GNU junto com este programa; se não, escreva para a | |
22 | + * Free Software Foundation, Inc., no endereço | |
23 | + * 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
24 | + */ | |
25 | +error_reporting ( 0 ); | |
26 | +include (dirname(__FILE__)."/../../../classesphp/sani_request.php"); | |
27 | +include (dirname(__FILE__)."/../../../admin/php/admin.php"); | |
28 | + | |
29 | +if(!isset($idioma) || $idioma == ""){ | |
30 | + $idioma = "pt"; | |
31 | +} | |
32 | +$id_n1 = (int)$_POST["id_grupo"]; | |
33 | + | |
34 | +$funcao = strtoupper ( $_POST["funcao"] ); | |
35 | +switch ($funcao) { | |
36 | + case "LISTA" : | |
37 | + $sql = " | |
38 | +SELECT subgrupo.nome_subgrupo AS nome,n2.id_n2 AS id FROM {$esquemaadmin}i3geoadmin_n2 AS n2 | |
39 | +JOIN {$esquemaadmin}i3geoadmin_subgrupos AS subgrupo ON n2.id_subgrupo = subgrupo.id_subgrupo AND n2.id_n1 = $id_n1 | |
40 | +JOIN ( | |
41 | + SELECT r.id_n2 | |
42 | + FROM {$esquemaadmin}i3geoadmin_n3 AS r, {$esquemaadmin}i3geoadmin_temas AS t | |
43 | + WHERE r.id_tema = t.id_tema AND t.ogc_tema != 'NAO' AND r.publicado != 'NAO' AND (n3_perfil = '' OR n3_perfil isnull ) | |
44 | + ) AS n3 ON (n3.id_n2 = n2.id_n2 OR n2.id_n2 = 0 ) | |
45 | + | |
46 | +WHERE n2.publicado != 'NAO' AND (n2.n2_perfil = '' OR n2.n2_perfil isnull ) | |
47 | +GROUP BY subgrupo.nome_subgrupo,n2.id_n2 | |
48 | +ORDER BY lower(subgrupo.nome_subgrupo) | |
49 | +"; | |
50 | + $dados = pegaDados ( $sql, "", false ); | |
51 | + if ($dados === false) { | |
52 | + header ( "HTTP/1.1 500 erro ao consultar banco de dados" ); | |
53 | + exit (); | |
54 | + } | |
55 | + $sqlCamadas = " | |
56 | + SELECT r.id_tema,t.codigo_tema,t.nome_tema,t.link_tema,lower(t.ogc_tema) AS ogc_tema,lower(t.download_tema) AS download_tema | |
57 | + FROM {$esquemaadmin}i3geoadmin_raiz AS r, {$esquemaadmin}i3geoadmin_temas AS t | |
58 | + WHERE r.nivel = 1 AND r.id_tema = t.id_tema AND (t.ogc_tema != 'NAO' OR t.download_tema != 'NAO') AND r.id_nivel = $id_n1 AND | |
59 | + (r.perfil = '' OR r.perfil isnull ) | |
60 | + ORDER BY lower(t.nome_tema) | |
61 | + "; | |
62 | + $camadas = pegaDados ( $sqlCamadas, "", false ); | |
63 | + $dbhw = null; | |
64 | + $dbh = null; | |
65 | + retornaJSON ( array("dados"=>$dados,"camadas"=>$camadas) ); | |
66 | + break; | |
67 | +} | |
68 | +cpjson ( $retorno ); | |
69 | +?> | ... | ... |
... | ... | @@ -0,0 +1,157 @@ |
1 | +/* | |
2 | +Licenca: | |
3 | + | |
4 | +GPL2 | |
5 | + | |
6 | +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
7 | + | |
8 | +Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
9 | +Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | |
10 | + | |
11 | +Este programa é software livre; você pode redistribuí-lo | |
12 | +e/ou modificá-lo sob os termos da Licença Pública Geral | |
13 | +GNU conforme publicada pela Free Software Foundation; | |
14 | + | |
15 | +Este programa é distribuído na expectativa de que seja útil, | |
16 | +porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
17 | +de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
18 | +Consulte a Licença Pública Geral do GNU para mais detalhes. | |
19 | +Você deve ter recebido uma cópia da Licença Pública Geral do | |
20 | +GNU junto com este programa; se não, escreva para a | |
21 | +Free Software Foundation, Inc., no endereço | |
22 | +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
23 | + | |
24 | + */ | |
25 | +ogc = {}; | |
26 | +ogc.grupo = { | |
27 | + //variavel global indicando o elemento que recebera a lista de menus | |
28 | + ondeLista: "", | |
29 | + id_menu: "", | |
30 | + nome_menu: "", | |
31 | + id_grupo: "", | |
32 | + nome_grupo: "", | |
33 | + init: function(onde){ | |
34 | + ogc.grupo.ondeLista = onde; | |
35 | + ogc.grupo.lista(); | |
36 | + }, | |
37 | + /* | |
38 | +Function: lista | |
39 | + | |
40 | +Obtém a lista de menus | |
41 | + */ | |
42 | + lista: function(){ | |
43 | + $.post( | |
44 | + "exec.php", | |
45 | + "funcao=lista&id_grupo=" + ogc.grupo.id_grupo | |
46 | + ) | |
47 | + .done( | |
48 | + function(data, status){ | |
49 | + var json = jQuery.parseJSON(data); | |
50 | + // | |
51 | + //monta a lista de camadas | |
52 | + // | |
53 | + var htmlcamadas = Mustache.to_html( | |
54 | + "{{#data}}" + $("#templateCamadas").html() + "{{/data}}", | |
55 | + $.extend( | |
56 | + {}, | |
57 | + ogc.grupo.dicionario, | |
58 | + { | |
59 | + "data": json["camadas"], | |
60 | + "dominio": "ogc.grupo", | |
61 | + "disabledlink": function(){ | |
62 | + if(this.link_tema == ""){ | |
63 | + return "hidden"; | |
64 | + } | |
65 | + else { | |
66 | + return ""; | |
67 | + } | |
68 | + }, | |
69 | + "disableddown": function(){ | |
70 | + if(this.download_tema != "nao"){ | |
71 | + return ""; | |
72 | + } | |
73 | + else { | |
74 | + return "hidden"; | |
75 | + } | |
76 | + }, | |
77 | + "disabledogc": function(){ | |
78 | + if(this.ogc_tema != "nao"){ | |
79 | + return ""; | |
80 | + } | |
81 | + else { | |
82 | + return "hidden"; | |
83 | + } | |
84 | + } | |
85 | + } | |
86 | + ) | |
87 | + ); | |
88 | + // | |
89 | + //monta a lista de pastas | |
90 | + // | |
91 | + //template do form de cada operacao | |
92 | + var htmlpastas = Mustache.to_html( | |
93 | + "{{#data}}" + $("#templateLista").html() + "{{/data}}", | |
94 | + $.extend( | |
95 | + {}, | |
96 | + ogc.grupo.dicionario, | |
97 | + { | |
98 | + "data": json["dados"], | |
99 | + "onclick": "ogc.grupo.proximoNivel", | |
100 | + } | |
101 | + ) | |
102 | + ); | |
103 | + ogc.grupo.ondeLista.html(htmlcamadas + htmlpastas); | |
104 | + $.material.init(); | |
105 | + } | |
106 | + ) | |
107 | + .fail(function(data){ | |
108 | + ogc.grupo.ondeLista.html('<div class="alert alert-danger alert-dismissible" role="alert">' + data.status + " " +data.statusText + '</div>'); | |
109 | + }); | |
110 | + }, | |
111 | + mostraLinksServico: function(codigo_tema){ | |
112 | + $(".modal-body").html('<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span>'); | |
113 | + var html; | |
114 | + tradLinks["tema"] = codigo_tema; | |
115 | + html = Mustache.to_html( | |
116 | + $("#templateLinksOgc").html(), | |
117 | + tradLinks | |
118 | + ); | |
119 | + $(".modal-body").html(html); | |
120 | + }, | |
121 | + mostraLinksDownload: function(codigo_tema){ | |
122 | + $(".modal-body").html('<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span>'); | |
123 | + tradLinks["tema"] = codigo_tema; | |
124 | + $.post( | |
125 | + "../../../classesphp/mapa_controle.php", | |
126 | + "map_file=&funcao=download3&tema="+codigo_tema | |
127 | + ) | |
128 | + .done( | |
129 | + function(data, status){ | |
130 | + var retorno = jQuery.parseJSON(data).data; | |
131 | + var html,arqs,i,n,ins = ""; | |
132 | + tradLinks["mapfile"] = window.location.protocol + "//" + window.location.host + "/" + retorno.mapfileurl; | |
133 | + tradLinks["sldurl"] = tradLinks["urli3geo"] + "/ferramentas/legenda/exec.php?funcao=TEMA2SLD&tema=" + retorno.tema + "&map_file=" + retorno.mapfile; | |
134 | + arqs = retorno.arquivos.split(","); | |
135 | + n = arqs.length; | |
136 | + for (i=0; i<n; i++){ | |
137 | + ins += "<p><a href='"+window.location.protocol+"//"+window.location.host+"/"+arqs[i]+"'>"+arqs[i]+"</a></p>"; | |
138 | + } | |
139 | + tradLinks["shp"] = ins; | |
140 | + html = Mustache.to_html( | |
141 | + $("#templateLinksDownload").html(), | |
142 | + tradLinks | |
143 | + ); | |
144 | + tradLinks["shp"] = ""; | |
145 | + tradLinks["mapfile"] = ""; | |
146 | + tradLinks["sldurl"] = ""; | |
147 | + $(".modal-body").html(html); | |
148 | + } | |
149 | + ) | |
150 | + .fail(function(data){ | |
151 | + ogc.grupo.ondeLista.html('<div class="alert alert-danger alert-dismissible" role="alert">' + data.status + " " +data.statusText + '</div>'); | |
152 | + }); | |
153 | + }, | |
154 | + proximoNivel: function(id,nome){ | |
155 | + window.location.href = "subgrupo/index.php?id_subgrupo=" + id + "&nome_subgrupo=" + nome + "&id_menu=" + ogc.grupo.id_menu+ "&nome_menu=" + ogc.grupo.nome_menu + "&id_grupo=" + ogc.grupo.id_grupo+ "&nome_grupo=" + ogc.grupo.nome_grupo; | |
156 | + } | |
157 | +}; | |
0 | 158 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,81 @@ |
1 | +<?php | |
2 | +define ( ONDEI3GEO, "../../.." ); | |
3 | +include (dirname ( __FILE__ ) . "/../../../ms_configura.php"); | |
4 | +include_once (dirname(__FILE__)."/../../../classesphp/sani_request.php"); | |
5 | +$id_menu = filter_var ( $_GET ["id_menu"], FILTER_SANITIZE_NUMBER_INT ); | |
6 | +$nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); | |
7 | +$id_grupo = filter_var ( $_GET ["id_grupo"], FILTER_SANITIZE_NUMBER_INT ); | |
8 | +$nome_grupo = filter_var ( $_GET ["nome_grupo"], FILTER_SANITIZE_STRING ); | |
9 | +// pega a extensao geografica | |
10 | +if ($ogcwsmap == "") { | |
11 | + $ogcwsmap = $locaplic . "/aplicmap/ogcws.map"; | |
12 | +} | |
13 | +$map = ms_newMapObj ( $ogcwsmap ); | |
14 | +$mapext = $map->extent->minx . "," . $map->extent->miny . "," . $map->extent->maxx . "," . $map->extent->maxy; | |
15 | +error_reporting ( 0 ); | |
16 | +include ONDEI3GEO."/init/head.php"; | |
17 | +?> | |
18 | +<link rel='stylesheet' type='text/css' href='../../index.css'> | |
19 | +<body style="padding-top: 55px;" id="topo"> | |
20 | + <nav class="navbar navbar-default navbar-fixed-top"> | |
21 | + <div class="container-fluid"> | |
22 | + <div class="navbar-header"> | |
23 | + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" | |
24 | + data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | |
25 | + <span class="sr-only"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span | |
26 | + class="icon-bar"></span> | |
27 | + </button> | |
28 | + <a class="navbar-brand" href="../../../init/index.php"><?php echo $mensagemInicia;?> <i | |
29 | + class="fa fa-home fa-1x"></i></a> | |
30 | + </div> | |
31 | + </div> | |
32 | + </nav> | |
33 | + <div class="container-fluid"> | |
34 | + <div class="row"> | |
35 | + <ol class="breadcrumb"> | |
36 | + <li><a href="../../../init/index.php?home=">i3Geo</a></li> | |
37 | + <li><a href="../../index.php">OGC</a></li> | |
38 | + <li><a href="../index.php?id_menu=<?php echo $id_menu ; ?>&nome_menu=<?php echo $nome_menu ; ?>"><?php echo $nome_menu ; ?></a></li> | |
39 | + <li class="active"><?php echo $nome_grupo ; ?></li> | |
40 | + </ol> | |
41 | + </div> | |
42 | + </div> | |
43 | + <div class="container"> | |
44 | + <div class="row center-block"> | |
45 | + <div class="col-md-12"> | |
46 | + <div class="well" id="corpo"> | |
47 | + <i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i> <span class="sr-only">Loading...</span> | |
48 | + </div> | |
49 | + </div> | |
50 | + </div> | |
51 | + </div> | |
52 | +</div> | |
53 | +<?php include(ONDEI3GEO."/ogc/templates/modal.php");?> | |
54 | +<?php include(ONDEI3GEO."/ogc/templates/templatelista.php");?> | |
55 | +<?php include(ONDEI3GEO."/ogc/templates/templatecamadas.php");?> | |
56 | +<?php include(ONDEI3GEO."/ogc/templates/templatelinksogc.php");?> | |
57 | +<?php include(ONDEI3GEO."/ogc/templates/templatelinksdownload.php");?> | |
58 | + | |
59 | +<script src='<?php echo ONDEI3GEO; ?>/ogc/headjs.php'></script> | |
60 | +<script src='index.js'></script> | |
61 | +<script src='<?php echo ONDEI3GEO; ?>/ogc/dicionario.js'></script> | |
62 | +<script> | |
63 | + $(document).ready(function(){ | |
64 | + ogc.grupo.id_menu = "<?php echo $id_menu ?>"; | |
65 | + ogc.grupo.nome_menu = "<?php echo $nome_menu ?>"; | |
66 | + ogc.grupo.id_grupo = "<?php echo $id_grupo ?>"; | |
67 | + ogc.grupo.nome_grupo = "<?php echo $nome_grupo ?>"; | |
68 | + | |
69 | + i3GEO.configura = {"locaplic" : "../../..","sid": ""}; | |
70 | + var servico = window.location.href.split("/ogc")[0]+"/ogc.php?"; | |
71 | + tradLinks = i3GEO.idioma.objetoIdioma(ogc.dicionario); | |
72 | + tradLinks["servico"] = servico; | |
73 | + tradLinks["url"] = window.location.href.split("#")[0]; | |
74 | + tradLinks["url"] = tradLinks["url"].split("?")[0]; | |
75 | + tradLinks["urli3geo"] = window.location.href.split("/ogc")[0]; | |
76 | + tradLinks["mapext"] = "<?php echo $mapext;?>"; | |
77 | + ogc.grupo.init($("#corpo")); | |
78 | + }); | |
79 | +</script> | |
80 | +</body> | |
81 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,56 @@ |
1 | +<?php | |
2 | +/* | |
3 | + * Licenca: | |
4 | + * | |
5 | + * GPL2 | |
6 | + * | |
7 | + * i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
8 | + * | |
9 | + * Direitos Autorais Reservados (c) 2006 Edmar Moretti | |
10 | + * Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | |
11 | + * | |
12 | + * Este programa é software livre; você pode redistribuí-lo | |
13 | + * e/ou modificá-lo sob os termos da Licença Pública Geral | |
14 | + * GNU conforme publicada pela Free Software Foundation; | |
15 | + * | |
16 | + * Este programa é distribuído na expectativa de que seja útil, | |
17 | + * porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
18 | + * de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
19 | + * Consulte a Licença Pública Geral do GNU para mais detalhes. | |
20 | + * Você deve ter recebido uma copia da Licença Pública Geral do | |
21 | + * GNU junto com este programa; se não, escreva para a | |
22 | + * Free Software Foundation, Inc., no endereço | |
23 | + * 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
24 | + */ | |
25 | +error_reporting ( 0 ); | |
26 | +include (dirname(__FILE__)."/../../../../classesphp/sani_request.php"); | |
27 | +include (dirname(__FILE__)."/../../../../admin/php/admin.php"); | |
28 | + | |
29 | +if(!isset($idioma) || $idioma == ""){ | |
30 | + $idioma = "pt"; | |
31 | +} | |
32 | +$id_n2 = (int)$_POST["id_subgrupo"]; | |
33 | + | |
34 | +$funcao = strtoupper ( $_POST["funcao"] ); | |
35 | +switch ($funcao) { | |
36 | + case "LISTA" : | |
37 | + $sqlCamadas = " | |
38 | +SELECT n3.id_tema,t.codigo_tema,t.nome_tema,t.link_tema,lower(t.ogc_tema) AS ogc_tema,lower(t.download_tema) AS download_tema | |
39 | +FROM {$esquemaadmin}i3geoadmin_n3 AS n3 | |
40 | +JOIN {$esquemaadmin}i3geoadmin_temas AS t ON n3.id_tema = t.id_tema AND n3.id_n2 = $id_n2 | |
41 | +WHERE n3.publicado != 'NAO' AND (n3.n3_perfil = '' OR n3.n3_perfil isnull ) | |
42 | +AND (t.ogc_tema != 'NAO' OR t.download_tema != 'NAO') | |
43 | +ORDER BY lower(t.nome_tema) | |
44 | +"; | |
45 | + | |
46 | + $camadas = pegaDados ( $sqlCamadas, "", false ); | |
47 | + if ($camadas === false) { | |
48 | + header ( "HTTP/1.1 500 erro ao consultar banco de dados" ); | |
49 | + exit (); | |
50 | + } | |
51 | + | |
52 | + retornaJSON ( array("dados"=>"","camadas"=>$camadas) ); | |
53 | + break; | |
54 | +} | |
55 | +cpjson ( $retorno ); | |
56 | +?> | ... | ... |
... | ... | @@ -0,0 +1,141 @@ |
1 | +/* | |
2 | +Licenca: | |
3 | + | |
4 | +GPL2 | |
5 | + | |
6 | +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
7 | + | |
8 | +Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
9 | +Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | |
10 | + | |
11 | +Este programa é software livre; você pode redistribuí-lo | |
12 | +e/ou modificá-lo sob os termos da Licença Pública Geral | |
13 | +GNU conforme publicada pela Free Software Foundation; | |
14 | + | |
15 | +Este programa é distribuído na expectativa de que seja útil, | |
16 | +porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
17 | +de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
18 | +Consulte a Licença Pública Geral do GNU para mais detalhes. | |
19 | +Você deve ter recebido uma cópia da Licença Pública Geral do | |
20 | +GNU junto com este programa; se não, escreva para a | |
21 | +Free Software Foundation, Inc., no endereço | |
22 | +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
23 | + | |
24 | + */ | |
25 | +ogc = {}; | |
26 | +ogc.subgrupo = { | |
27 | + //variavel global indicando o elemento que recebera a lista de menus | |
28 | + ondeLista: "", | |
29 | + id_menu: "", | |
30 | + nome_menu: "", | |
31 | + id_grupo: "", | |
32 | + nome_grupo: "", | |
33 | + id_subgrupo: "", | |
34 | + nome_subgrupo: "", | |
35 | + init: function(onde){ | |
36 | + ogc.subgrupo.ondeLista = onde; | |
37 | + ogc.subgrupo.lista(); | |
38 | + }, | |
39 | + /* | |
40 | +Function: lista | |
41 | + | |
42 | +Obtém a lista de menus | |
43 | + */ | |
44 | + lista: function(){ | |
45 | + $.post( | |
46 | + "exec.php", | |
47 | + "funcao=lista&id_subgrupo=" + ogc.subgrupo.id_subgrupo | |
48 | + ) | |
49 | + .done( | |
50 | + function(data, status){ | |
51 | + var json = jQuery.parseJSON(data); | |
52 | + // | |
53 | + //monta a lista de camadas | |
54 | + // | |
55 | + var htmlcamadas = Mustache.to_html( | |
56 | + "{{#data}}" + $("#templateCamadas").html() + "{{/data}}", | |
57 | + $.extend( | |
58 | + {}, | |
59 | + ogc.subgrupo.dicionario, | |
60 | + { | |
61 | + "data": json["camadas"], | |
62 | + "dominio": "ogc.subgrupo", | |
63 | + "disabledlink": function(){ | |
64 | + if(this.link_tema == ""){ | |
65 | + return "hidden"; | |
66 | + } | |
67 | + else { | |
68 | + return ""; | |
69 | + } | |
70 | + }, | |
71 | + "disableddown": function(){ | |
72 | + if(this.download_tema != "nao"){ | |
73 | + return ""; | |
74 | + } | |
75 | + else { | |
76 | + return "hidden"; | |
77 | + } | |
78 | + }, | |
79 | + "disabledogc": function(){ | |
80 | + if(this.ogc_tema != "nao"){ | |
81 | + return ""; | |
82 | + } | |
83 | + else { | |
84 | + return "hidden"; | |
85 | + } | |
86 | + } | |
87 | + } | |
88 | + ) | |
89 | + ); | |
90 | + ogc.subgrupo.ondeLista.html(htmlcamadas); | |
91 | + $.material.init(); | |
92 | + } | |
93 | + ) | |
94 | + .fail(function(data){ | |
95 | + ogc.subgrupo.ondeLista.html('<div class="alert alert-danger alert-dismissible" role="alert">' + data.status + " " +data.statusText + '</div>'); | |
96 | + }); | |
97 | + }, | |
98 | + mostraLinksServico: function(codigo_tema){ | |
99 | + $(".modal-body").html('<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span>'); | |
100 | + var html; | |
101 | + tradLinks["tema"] = codigo_tema; | |
102 | + html = Mustache.to_html( | |
103 | + $("#templateLinksOgc").html(), | |
104 | + tradLinks | |
105 | + ); | |
106 | + $(".modal-body").html(html); | |
107 | + }, | |
108 | + mostraLinksDownload: function(codigo_tema){ | |
109 | + $(".modal-body").html('<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span>'); | |
110 | + tradLinks["tema"] = codigo_tema; | |
111 | + $.post( | |
112 | + "../../../../classesphp/mapa_controle.php", | |
113 | + "map_file=&funcao=download3&tema="+codigo_tema | |
114 | + ) | |
115 | + .done( | |
116 | + function(data, status){ | |
117 | + var retorno = jQuery.parseJSON(data).data; | |
118 | + var html,arqs,i,n,ins = ""; | |
119 | + tradLinks["mapfile"] = window.location.protocol + "//" + window.location.host + "/" + retorno.mapfileurl; | |
120 | + tradLinks["sldurl"] = tradLinks["urli3geo"] + "/ferramentas/legenda/exec.php?funcao=TEMA2SLD&tema=" + retorno.tema + "&map_file=" + retorno.mapfile; | |
121 | + arqs = retorno.arquivos.split(","); | |
122 | + n = arqs.length; | |
123 | + for (i=0; i<n; i++){ | |
124 | + ins += "<p><a href='"+window.location.protocol+"//"+window.location.host+"/"+arqs[i]+"'>"+arqs[i]+"</a></p>"; | |
125 | + } | |
126 | + tradLinks["shp"] = ins; | |
127 | + html = Mustache.to_html( | |
128 | + $("#templateLinksDownload").html(), | |
129 | + tradLinks | |
130 | + ); | |
131 | + tradLinks["shp"] = ""; | |
132 | + tradLinks["mapfile"] = ""; | |
133 | + tradLinks["sldurl"] = ""; | |
134 | + $(".modal-body").html(html); | |
135 | + } | |
136 | + ) | |
137 | + .fail(function(data){ | |
138 | + ogc.subgrupo.ondeLista.html('<div class="alert alert-danger alert-dismissible" role="alert">' + data.status + " " +data.statusText + '</div>'); | |
139 | + }); | |
140 | + } | |
141 | +}; | |
0 | 142 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,85 @@ |
1 | +<?php | |
2 | +define ( ONDEI3GEO, "../../../../" ); | |
3 | +include (dirname ( __FILE__ ) . "/../../../../ms_configura.php"); | |
4 | +include_once (dirname(__FILE__)."/../../../../classesphp/sani_request.php"); | |
5 | +$id_menu = filter_var ( $_GET ["id_menu"], FILTER_SANITIZE_NUMBER_INT ); | |
6 | +$nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); | |
7 | +$id_grupo = filter_var ( $_GET ["id_grupo"], FILTER_SANITIZE_NUMBER_INT ); | |
8 | +$nome_grupo = filter_var ( $_GET ["nome_grupo"], FILTER_SANITIZE_STRING ); | |
9 | +$id_subgrupo = filter_var ( $_GET ["id_subgrupo"], FILTER_SANITIZE_NUMBER_INT ); | |
10 | +$nome_subgrupo = filter_var ( $_GET ["nome_subgrupo"], FILTER_SANITIZE_STRING ); | |
11 | +// pega a extensao geografica | |
12 | +if ($ogcwsmap == "") { | |
13 | + $ogcwsmap = $locaplic . "/aplicmap/ogcws.map"; | |
14 | +} | |
15 | +$map = ms_newMapObj ( $ogcwsmap ); | |
16 | +$mapext = $map->extent->minx . "," . $map->extent->miny . "," . $map->extent->maxx . "," . $map->extent->maxy; | |
17 | +error_reporting ( 0 ); | |
18 | +include ONDEI3GEO."/init/head.php"; | |
19 | +?> | |
20 | +<link rel='stylesheet' type='text/css' href='../../../index.css'> | |
21 | +<body style="padding-top: 55px;" id="topo"> | |
22 | + <nav class="navbar navbar-default navbar-fixed-top"> | |
23 | + <div class="container-fluid"> | |
24 | + <div class="navbar-header"> | |
25 | + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" | |
26 | + data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | |
27 | + <span class="sr-only"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span | |
28 | + class="icon-bar"></span> | |
29 | + </button> | |
30 | + <a class="navbar-brand" href="../../../../init/index.php"><?php echo $mensagemInicia;?> <i | |
31 | + class="fa fa-home fa-1x"></i></a> | |
32 | + </div> | |
33 | + </div> | |
34 | + </nav> | |
35 | + <div class="container-fluid"> | |
36 | + <div class="row"> | |
37 | + <ol class="breadcrumb"> | |
38 | + <li><a href="../../../../init/index.php?home=">i3Geo</a></li> | |
39 | + <li><a href="../../../index.php">OGC</a></li> | |
40 | + <li><a href="../../index.php?id_menu=<?php echo $id_menu ; ?>&nome_menu=<?php echo $nome_menu ; ?>"><?php echo $nome_menu ; ?></a></li> | |
41 | + <li><a href="../index.php?id_menu=<?php echo $id_menu ; ?>&nome_menu=<?php echo $nome_menu ; ?>&id_grupo=<?php echo $id_grupo ; ?>&nome_grupo=<?php echo $nome_grupo ; ?>"><?php echo $nome_grupo ; ?></a></li> | |
42 | + <li class="active"><?php echo $nome_subgrupo ; ?></li> | |
43 | + </ol> | |
44 | + </div> | |
45 | + </div> | |
46 | + <div class="container"> | |
47 | + <div class="row center-block"> | |
48 | + <div class="col-md-12"> | |
49 | + <div class="well" id="corpo"> | |
50 | + <i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i> <span class="sr-only">Loading...</span> | |
51 | + </div> | |
52 | + </div> | |
53 | + </div> | |
54 | + </div> | |
55 | +</div> | |
56 | +<?php include(ONDEI3GEO."/ogc/templates/modal.php");?> | |
57 | +<?php include(ONDEI3GEO."/ogc/templates/templatelista.php");?> | |
58 | +<?php include(ONDEI3GEO."/ogc/templates/templatecamadas.php");?> | |
59 | +<?php include(ONDEI3GEO."/ogc/templates/templatelinksogc.php");?> | |
60 | +<?php include(ONDEI3GEO."/ogc/templates/templatelinksdownload.php");?> | |
61 | + | |
62 | +<script src='<?php echo ONDEI3GEO; ?>/ogc/headjs.php'></script> | |
63 | +<script src='index.js'></script> | |
64 | +<script src='<?php echo ONDEI3GEO; ?>/ogc/dicionario.js'></script> | |
65 | +<script> | |
66 | + $(document).ready(function(){ | |
67 | + ogc.subgrupo.id_menu = "<?php echo $id_menu ?>"; | |
68 | + ogc.subgrupo.nome_menu = "<?php echo $nome_menu ?>"; | |
69 | + ogc.subgrupo.id_grupo = "<?php echo $id_grupo ?>"; | |
70 | + ogc.subgrupo.nome_grupo = "<?php echo $nome_grupo ?>"; | |
71 | + ogc.subgrupo.id_subgrupo = "<?php echo $id_subgrupo ?>"; | |
72 | + ogc.subgrupo.nome_subgrupo = "<?php echo $nome_subgrupo ?>"; | |
73 | + i3GEO.configura = {"locaplic" : "../../../..","sid": ""}; | |
74 | + var servico = window.location.href.split("/ogc")[0]+"/ogc.php?"; | |
75 | + tradLinks = i3GEO.idioma.objetoIdioma(ogc.dicionario); | |
76 | + tradLinks["servico"] = servico; | |
77 | + tradLinks["url"] = window.location.href.split("#")[0]; | |
78 | + tradLinks["url"] = tradLinks["url"].split("?")[0]; | |
79 | + tradLinks["urli3geo"] = window.location.href.split("/ogc")[0]; | |
80 | + tradLinks["mapext"] = "<?php echo $mapext;?>"; | |
81 | + ogc.subgrupo.init($("#corpo")); | |
82 | + }); | |
83 | +</script> | |
84 | +</body> | |
85 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,155 @@ |
1 | +/* | |
2 | +Licenca: | |
3 | + | |
4 | +GPL2 | |
5 | + | |
6 | +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
7 | + | |
8 | +Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
9 | +Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | |
10 | + | |
11 | +Este programa é software livre; você pode redistribuí-lo | |
12 | +e/ou modificá-lo sob os termos da Licença Pública Geral | |
13 | +GNU conforme publicada pela Free Software Foundation; | |
14 | + | |
15 | +Este programa é distribuído na expectativa de que seja útil, | |
16 | +porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
17 | +de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
18 | +Consulte a Licença Pública Geral do GNU para mais detalhes. | |
19 | +Você deve ter recebido uma cópia da Licença Pública Geral do | |
20 | +GNU junto com este programa; se não, escreva para a | |
21 | +Free Software Foundation, Inc., no endereço | |
22 | +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
23 | + | |
24 | + */ | |
25 | +ogc = {}; | |
26 | +ogc.menu = { | |
27 | + //variavel global indicando o elemento que recebera a lista de menus | |
28 | + ondeLista: "", | |
29 | + id_menu: "", | |
30 | + nome_menu: "", | |
31 | + init: function(onde){ | |
32 | + ogc.menu.ondeLista = onde; | |
33 | + ogc.menu.lista(); | |
34 | + }, | |
35 | + /* | |
36 | +Function: lista | |
37 | + | |
38 | +Obtém a lista de menus | |
39 | + */ | |
40 | + lista: function(){ | |
41 | + $.post( | |
42 | + "exec.php", | |
43 | + "funcao=lista&id_menu=" + ogc.menu.id_menu | |
44 | + ) | |
45 | + .done( | |
46 | + function(data, status){ | |
47 | + var json = jQuery.parseJSON(data); | |
48 | + // | |
49 | + //monta a lista de camadas | |
50 | + // | |
51 | + var htmlcamadas = Mustache.to_html( | |
52 | + "{{#data}}" + $("#templateCamadas").html() + "{{/data}}", | |
53 | + $.extend( | |
54 | + {}, | |
55 | + ogc.menu.dicionario, | |
56 | + { | |
57 | + "data": json["camadas"], | |
58 | + "dominio": "ogc.menu", | |
59 | + "disabledlink": function(){ | |
60 | + if(this.link_tema == ""){ | |
61 | + return "hidden"; | |
62 | + } | |
63 | + else { | |
64 | + return ""; | |
65 | + } | |
66 | + }, | |
67 | + "disableddown": function(){ | |
68 | + if(this.download_tema != "nao"){ | |
69 | + return ""; | |
70 | + } | |
71 | + else { | |
72 | + return "hidden"; | |
73 | + } | |
74 | + }, | |
75 | + "disabledogc": function(){ | |
76 | + if(this.ogc_tema != "nao"){ | |
77 | + return ""; | |
78 | + } | |
79 | + else { | |
80 | + return "hidden"; | |
81 | + } | |
82 | + } | |
83 | + } | |
84 | + ) | |
85 | + ); | |
86 | + // | |
87 | + //monta a lista de pastas | |
88 | + // | |
89 | + //template do form de cada operacao | |
90 | + var htmlpastas = Mustache.to_html( | |
91 | + "{{#data}}" + $("#templateLista").html() + "{{/data}}", | |
92 | + $.extend( | |
93 | + {}, | |
94 | + ogc.menu.dicionario, | |
95 | + { | |
96 | + "data": json["dados"], | |
97 | + "onclick": "ogc.menu.proximoNivel", | |
98 | + } | |
99 | + ) | |
100 | + ); | |
101 | + ogc.menu.ondeLista.html(htmlcamadas + htmlpastas); | |
102 | + $.material.init(); | |
103 | + } | |
104 | + ) | |
105 | + .fail(function(data){ | |
106 | + ogc.menu.ondeLista.html('<div class="alert alert-danger alert-dismissible" role="alert">' + data.status + " " +data.statusText + '</div>'); | |
107 | + }); | |
108 | + }, | |
109 | + mostraLinksServico: function(codigo_tema){ | |
110 | + $(".modal-body").html('<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span>'); | |
111 | + var html; | |
112 | + tradLinks["tema"] = codigo_tema; | |
113 | + html = Mustache.to_html( | |
114 | + $("#templateLinksOgc").html(), | |
115 | + tradLinks | |
116 | + ); | |
117 | + $(".modal-body").html(html); | |
118 | + }, | |
119 | + mostraLinksDownload: function(codigo_tema){ | |
120 | + $(".modal-body").html('<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span>'); | |
121 | + tradLinks["tema"] = codigo_tema; | |
122 | + $.post( | |
123 | + "../../classesphp/mapa_controle.php", | |
124 | + "map_file=&funcao=download3&tema="+codigo_tema | |
125 | + ) | |
126 | + .done( | |
127 | + function(data, status){ | |
128 | + var retorno = jQuery.parseJSON(data).data; | |
129 | + var html,arqs,i,n,ins = ""; | |
130 | + tradLinks["mapfile"] = window.location.protocol + "//" + window.location.host + "/" + retorno.mapfileurl; | |
131 | + tradLinks["sldurl"] = tradLinks["urli3geo"] + "/ferramentas/legenda/exec.php?funcao=TEMA2SLD&tema=" + retorno.tema + "&map_file=" + retorno.mapfile; | |
132 | + arqs = retorno.arquivos.split(","); | |
133 | + n = arqs.length; | |
134 | + for (i=0; i<n; i++){ | |
135 | + ins += "<p><a href='"+window.location.protocol+"//"+window.location.host+"/"+arqs[i]+"'>"+arqs[i]+"</a></p>"; | |
136 | + } | |
137 | + tradLinks["shp"] = ins; | |
138 | + html = Mustache.to_html( | |
139 | + $("#templateLinksDownload").html(), | |
140 | + tradLinks | |
141 | + ); | |
142 | + tradLinks["shp"] = ""; | |
143 | + tradLinks["mapfile"] = ""; | |
144 | + tradLinks["sldurl"] = ""; | |
145 | + $(".modal-body").html(html); | |
146 | + } | |
147 | + ) | |
148 | + .fail(function(data){ | |
149 | + ogc.menu.ondeLista.html('<div class="alert alert-danger alert-dismissible" role="alert">' + data.status + " " +data.statusText + '</div>'); | |
150 | + }); | |
151 | + }, | |
152 | + proximoNivel: function(id,nome){ | |
153 | + window.location.href = "grupo/index.php?id_grupo=" + id + "&nome_grupo=" + nome + "&id_menu=" + ogc.menu.id_menu+ "&nome_menu=" + ogc.menu.nome_menu; | |
154 | + } | |
155 | +}; | |
0 | 156 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,76 @@ |
1 | +<?php | |
2 | +define ( ONDEI3GEO, "../.." ); | |
3 | +include (dirname ( __FILE__ ) . "/../../ms_configura.php"); | |
4 | +include_once (dirname(__FILE__)."/../../classesphp/sani_request.php"); | |
5 | +$id_menu = filter_var ( $_GET ["id_menu"], FILTER_SANITIZE_NUMBER_INT ); | |
6 | +$nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); | |
7 | +// pega a extensao geografica | |
8 | +if ($ogcwsmap == "") { | |
9 | + $ogcwsmap = $locaplic . "/aplicmap/ogcws.map"; | |
10 | +} | |
11 | +$map = ms_newMapObj ( $ogcwsmap ); | |
12 | +$mapext = $map->extent->minx . "," . $map->extent->miny . "," . $map->extent->maxx . "," . $map->extent->maxy; | |
13 | +error_reporting ( 0 ); | |
14 | +include ONDEI3GEO."/init/head.php"; | |
15 | +?> | |
16 | +<link rel='stylesheet' type='text/css' href='../index.css'> | |
17 | +<body style="padding-top: 55px;" id="topo"> | |
18 | + <nav class="navbar navbar-default navbar-fixed-top"> | |
19 | + <div class="container-fluid"> | |
20 | + <div class="navbar-header"> | |
21 | + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" | |
22 | + data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | |
23 | + <span class="sr-only"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span | |
24 | + class="icon-bar"></span> | |
25 | + </button> | |
26 | + <a class="navbar-brand" href="../init/index.php"><?php echo $mensagemInicia;?> <i | |
27 | + class="fa fa-home fa-1x"></i></a> | |
28 | + </div> | |
29 | + </div> | |
30 | + </nav> | |
31 | + <div class="container-fluid"> | |
32 | + <div class="row"> | |
33 | + <ol class="breadcrumb"> | |
34 | + <li><a href="../../init/index.php?home=">i3Geo</a></li> | |
35 | + <li><a href="../index.php">OGC</a></li> | |
36 | + <li class="active"><?php echo $nome_menu ; ?></li> | |
37 | + </ol> | |
38 | + </div> | |
39 | + </div> | |
40 | + <div class="container"> | |
41 | + <div class="row center-block"> | |
42 | + <div class="col-md-12"> | |
43 | + <div class="well" id="corpo"> | |
44 | + <i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i> <span class="sr-only">Loading...</span> | |
45 | + </div> | |
46 | + </div> | |
47 | + </div> | |
48 | + </div> | |
49 | +</div> | |
50 | +<?php include(ONDEI3GEO."/ogc/templates/modal.php");?> | |
51 | +<?php include(ONDEI3GEO."/ogc/templates/templatelista.php");?> | |
52 | +<?php include(ONDEI3GEO."/ogc/templates/templatecamadas.php");?> | |
53 | +<?php include(ONDEI3GEO."/ogc/templates/templatelinksogc.php");?> | |
54 | +<?php include(ONDEI3GEO."/ogc/templates/templatelinksdownload.php");?> | |
55 | + | |
56 | +<script src='<?php echo ONDEI3GEO; ?>/ogc/headjs.php'></script> | |
57 | +<script src='index.js'></script> | |
58 | +<script src='<?php echo ONDEI3GEO; ?>/ogc/dicionario.js'></script> | |
59 | +<script> | |
60 | + $(document).ready(function(){ | |
61 | + ogc.menu.id_menu = "<?php echo $id_menu ?>"; | |
62 | + ogc.menu.nome_menu = "<?php echo $nome_menu ?>"; | |
63 | + | |
64 | + i3GEO.configura = {"locaplic" : "../..","sid": ""}; | |
65 | + var servico = window.location.href.split("/ogc")[0]+"/ogc.php?"; | |
66 | + tradLinks = i3GEO.idioma.objetoIdioma(ogc.dicionario); | |
67 | + tradLinks["servico"] = servico; | |
68 | + tradLinks["url"] = window.location.href.split("#")[0]; | |
69 | + tradLinks["url"] = tradLinks["url"].split("?")[0]; | |
70 | + tradLinks["urli3geo"] = window.location.href.split("/ogc")[0]; | |
71 | + tradLinks["mapext"] = "<?php echo $mapext;?>"; | |
72 | + ogc.menu.init($("#corpo")); | |
73 | + }); | |
74 | +</script> | |
75 | +</body> | |
76 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,338 @@ |
1 | +function listaDoNivelMenu(templateMenus,templateGrupos,templateSubGrupos,templateCamadas){ | |
2 | + var r = function(retorno) { | |
3 | + var menus = retorno.data, | |
4 | + nmenus = menus.length, i = 0, s = [], camadasRaiz, dataMenu, htmlMenus, grupos, temp; | |
5 | + for(i=0; i<nmenus; i++){ | |
6 | + camadasRaiz = ""; | |
7 | + dataMenu = menus[i]; | |
8 | + if(dataMenu.temas){ | |
9 | + camadasRaiz = ckCamada(dataMenu.temas,templateCamadas,"tema"); | |
10 | + dataMenu["camadas"] = camadasRaiz; | |
11 | + } | |
12 | + dataMenu["filtro"] = $trad("filtro",g_traducao_ogc); | |
13 | + htmlMenus = Mustache.to_html( | |
14 | + templateMenus, | |
15 | + dataMenu | |
16 | + ); | |
17 | + s.push(htmlMenus); | |
18 | + } | |
19 | + $("#arvore").html(s.join("")); | |
20 | + //pega os grupos do menu | |
21 | + for(i=0; i<nmenus; i++){ | |
22 | + grupos = function(retorno){ | |
23 | + if(retorno.data){ | |
24 | + var gr = retorno.data.grupos, | |
25 | + c, i = 0, g = [], camadas, htmlGrupos, subgrupos, nsubgrupos, j, htmlSubGrupos; | |
26 | + //verifica se existem dados na raiz e grupos | |
27 | + if(gr[0].length == 0 && gr[1].temasraiz.length == 0){ | |
28 | + $("#gruposMenu"+retorno.data.idmenu).html(""); | |
29 | + return; | |
30 | + } | |
31 | + c = gr.length - 3; | |
32 | + g = []; | |
33 | + i = 0; | |
34 | + //camadas na raiz do grupo | |
35 | + //inclui no array com os grupos os temas | |
36 | + //monta o array g que contem os grupos e camadas | |
37 | + for (i = 0; i < c; i++) { | |
38 | + if(gr[i].temasgrupo){ | |
39 | + camadas = ckCamada( | |
40 | + gr[i].temasgrupo, | |
41 | + templateCamadas, | |
42 | + "tema" | |
43 | + ); | |
44 | + gr[i]["camadas"] = camadas; | |
45 | + } else { | |
46 | + gr[i]["camadas"] = ""; | |
47 | + } | |
48 | + g.push(gr[i]); | |
49 | + } | |
50 | + //monta o combo para o filtro | |
51 | + $('[data-grupoFiltro="'+retorno.data.idmenu+'"]').html( | |
52 | + "<option value=''>---</option>" + | |
53 | + Mustache.to_html( | |
54 | + "{{#grupos}}" + $("#templateFiltroGrupo").html() + "{{/grupos}}", | |
55 | + {"grupos":g} | |
56 | + ) | |
57 | + ); | |
58 | + //monta a lista de grupos | |
59 | + if(g){ | |
60 | + htmlGrupos = Mustache.to_html( | |
61 | + "{{#grupos}}" + templateGrupos + "{{/grupos}}", | |
62 | + {"grupos":g} | |
63 | + ); | |
64 | + | |
65 | + } | |
66 | + $("#gruposMenu"+retorno.data.idmenu).html(htmlGrupos); | |
67 | + //monta os subgrupos | |
68 | + for (i = 0; i < c; i++) { | |
69 | + subgrupos = gr[i].subgrupos; | |
70 | + id_n1 = gr[i]["id_n1"]; | |
71 | + nsubgrupos = subgrupos.length; | |
72 | + j = 0; | |
73 | + for( j = 0; j < nsubgrupos; j++){ | |
74 | + subgrupos[j]["id_n1"] = id_n1; | |
75 | + subgrupos[j]["idmenu"] = retorno.data.idmenu; | |
76 | + } | |
77 | + htmlSubGrupos = Mustache.to_html( | |
78 | + "{{#s}}" + templateSubGrupos + "{{/s}}", | |
79 | + {"s":subgrupos} | |
80 | + ); | |
81 | + if(id_n1){ | |
82 | + $("#subGruposGrupo"+id_n1).html(htmlSubGrupos); | |
83 | + } | |
84 | + } | |
85 | + } | |
86 | + }; | |
87 | + i3GEO.php.pegalistadegrupos(grupos, menus[i]["idmenu"], "sim", "sim", "sim", "sim"); | |
88 | + } | |
89 | + }; | |
90 | + i3GEO.php.pegalistademenus(r,"sim","sim"); | |
91 | +} | |
92 | +function listaCamadasSubgrupo(idmenu,id_n1,id_n2){ | |
93 | + //console.info(id_n2) | |
94 | + var corpo = $("#corpoSubGrupo"+id_n2), | |
95 | + camadas; | |
96 | + if(corpo.html().trim()+"x" == "x"){ | |
97 | + corpo.html('<div class="panel-body"><i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span></div>'); | |
98 | + | |
99 | + } | |
100 | + var r = function(retorno){ | |
101 | + camadas = ckCamada(retorno.data.temas,$("#templateCamadas").html(),"tema"); | |
102 | + corpo.html('<div class="panel-body">' + camadas + "</div>"); | |
103 | + } | |
104 | + i3GEO.php.pegalistadetemas(r, idmenu, id_n1, id_n2); | |
105 | +} | |
106 | +function listaMetaestat (onde,templateCamadas){ | |
107 | + if(onde.html()){ | |
108 | + var r, p; | |
109 | + r = function(d){ | |
110 | + var html = "", n, camadas = [], i, t; | |
111 | + n = d.length; | |
112 | + if(n > 0){ | |
113 | + for(i=0; i<n; i++){ | |
114 | + t = d[i]; | |
115 | + camadas.push({ | |
116 | + "nome": t.nomemedida, | |
117 | + "hidden": "", | |
118 | + "codigo_tema": t.id_medida_variavel | |
119 | + }); | |
120 | + } | |
121 | + html = Mustache.to_html( | |
122 | + onde.html(), | |
123 | + { | |
124 | + "nomemeta":$trad("nomemeta",g_traducao_ogc), | |
125 | + "camadasmeta": ckCamada(camadas,templateCamadas,"meta"), | |
126 | + "hidden": "hidden" | |
127 | + } | |
128 | + ); | |
129 | + } | |
130 | + onde.html(html); | |
131 | + }; | |
132 | + //cpJSON vem de class_php.js | |
133 | + cpJSON.call("../admin/php/metaestat.php?funcao=listaMedidaVariavel&codigo_variavel=&g_sid=", "foo", r); | |
134 | + } | |
135 | +} | |
136 | +function listaMapasSalvos(onde,templateCamadas){ | |
137 | + if(onde.html()){ | |
138 | + var r, p; | |
139 | + r = function(d){ | |
140 | + d = d.data.mapas; | |
141 | + var html = "", n, camadas = [], i, t; | |
142 | + n = d.length; | |
143 | + if(n > 0){ | |
144 | + for(i=0; i<n; i++){ | |
145 | + t = d[i]; | |
146 | + camadas.push({ | |
147 | + "nome": t.NOME, | |
148 | + "hidden": "", | |
149 | + "codigo_tema": t.ID_MAPA, | |
150 | + "download": "nao" | |
151 | + }); | |
152 | + } | |
153 | + | |
154 | + html = Mustache.to_html( | |
155 | + onde.html(), | |
156 | + { | |
157 | + "nomeMapasSalvos":$trad("nomeMapasSalvos",g_traducao_ogc), | |
158 | + "mapasSalvos": ckCamada(camadas,templateCamadas,"mapa"), | |
159 | + "hidden": "hidden" | |
160 | + } | |
161 | + ); | |
162 | + } | |
163 | + onde.html(html); | |
164 | + }; | |
165 | + //cpJSON vem de class_php.js | |
166 | + cpJSON.call("../classesphp/mapa_controle.php?map_file=&funcao=pegaMapas&g_sid=", "foo", r); | |
167 | + } | |
168 | +} | |
169 | +function ckCamada(camadas,templateCamadas,tipo){ | |
170 | + var ncamadas = [], | |
171 | + html; | |
172 | + //marca as camadas que nao sao ogc | |
173 | + $(camadas).each(function() { | |
174 | + if(tipo == "tema"){ | |
175 | + if(this.link_tema == ""){ | |
176 | + this.hidden = "hidden"; | |
177 | + } | |
178 | + this.tipo = tipo; | |
179 | + //para compatibilizar entre as diferencas de respostas JSON | |
180 | + if(this.ogc){ | |
181 | + this.ogc_tema = this.ogc; | |
182 | + } | |
183 | + if(this.download){ | |
184 | + this.download_tema = this.download; | |
185 | + } | |
186 | + //nao mostra se nenhum permitir acao | |
187 | + if(!(this.ogc_tema.toLowerCase() == "nao" && this.download_tema.toLowerCase() == "nao")){ | |
188 | + if(this.ogc_tema.toLowerCase() == "nao"){ | |
189 | + this.disabledogc = "disabled"; | |
190 | + } | |
191 | + if(this.download_tema.toLowerCase() == "nao"){ | |
192 | + this.disableddown = "disabled"; | |
193 | + } | |
194 | + ncamadas.push(this); | |
195 | + } | |
196 | + | |
197 | + } | |
198 | + if(tipo == "meta"){ | |
199 | + this.hidden = "hidden"; | |
200 | + this.tipo = tipo; | |
201 | + ncamadas.push(this); | |
202 | + } | |
203 | + if(tipo == "mapa"){ | |
204 | + this.hidden = "hidden"; | |
205 | + this.tipo = tipo; | |
206 | + this.disableddown = "disabled"; | |
207 | + ncamadas.push(this); | |
208 | + } | |
209 | + }); | |
210 | + html = Mustache.to_html( | |
211 | + "{{#data}}" + templateCamadas + "{{/data}}", | |
212 | + {"data":ncamadas} | |
213 | + ); | |
214 | + if(html != ""){ | |
215 | + return '<div class="list-group">'+html+'</div>'; | |
216 | + } | |
217 | + else{ | |
218 | + return ""; | |
219 | + } | |
220 | +} | |
221 | +function mostraLinksServico(tema,tipo,disabled){ | |
222 | + $(".modal-body").html('<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span>'); | |
223 | + var html; | |
224 | + if(disabled != ""){ | |
225 | + $(".modal-body").html = ""; | |
226 | + return; | |
227 | + } | |
228 | + else{ | |
229 | + if(tipo == "meta"){ | |
230 | + tradLinks["tema"] = "metaestat_"+tema; | |
231 | + tradLinks["id_medida_variavel"] = "&id_medida_variavel="+tema; | |
232 | + } | |
233 | + if(tipo == "mapa"){ | |
234 | + tradLinks["tema"] = "mapa_cadastrado_"+tema; | |
235 | + tradLinks["id_medida_variavel"] = "&mapa_cadastrado="+tema; | |
236 | + } | |
237 | + if(tipo == "tema"){ | |
238 | + tradLinks["tema"] = tema; | |
239 | + } | |
240 | + html = Mustache.to_html( | |
241 | + $("#templateLinksOgc").html(), | |
242 | + tradLinks | |
243 | + ); | |
244 | + $(".modal-body").html(html); | |
245 | + } | |
246 | + | |
247 | +} | |
248 | +function mostraLinksDownload(tema,tipo,disabled){ | |
249 | + $(".modal-body").html('<i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span>'); | |
250 | + var html, r, p; | |
251 | + if(disabled != ""){ | |
252 | + return; | |
253 | + } | |
254 | + else{ | |
255 | + r = function(retorno){ | |
256 | + var html,arqs,i,n,ins = ""; | |
257 | + retorno = retorno.data; | |
258 | + //adiciona no hash os dados necessarios | |
259 | + if(tipo == "meta"){ | |
260 | + tradLinks["tema"] = "metaestat_" + tema; | |
261 | + tradLinks["id_medida_variavel"] = "&id_medida_variavel=" + tema; | |
262 | + } | |
263 | + if(tipo == "tema"){ | |
264 | + tradLinks["tema"] = tema; | |
265 | + } | |
266 | + tradLinks["mapfile"] = window.location.protocol + "//" + window.location.host + "/" + retorno.mapfileurl; | |
267 | + tradLinks["sldurl"] = tradLinks["urli3geo"] + "/ferramentas/legenda/exec.php?funcao=TEMA2SLD&tema=" + retorno.tema + "&map_file=" + retorno.mapfile; | |
268 | + | |
269 | + arqs = retorno.arquivos.split(","); | |
270 | + n = arqs.length; | |
271 | + for (i=0; i<n; i++){ | |
272 | + ins += "<p><a href='"+window.location.protocol+"//"+window.location.host+"/"+arqs[i]+"'>"+arqs[i]+"</a></p>"; | |
273 | + } | |
274 | + tradLinks["shp"] = ins; | |
275 | + | |
276 | + html = Mustache.to_html( | |
277 | + $("#templateLinksDownload").html(), | |
278 | + tradLinks | |
279 | + ); | |
280 | + tradLinks["shp"] = ""; | |
281 | + tradLinks["mapfile"] = ""; | |
282 | + tradLinks["sldurl"] = ""; | |
283 | + | |
284 | + $(".modal-body").html(html); | |
285 | + } | |
286 | + //obtem o shapefile e outros dados | |
287 | + p = "../classesphp/mapa_controle.php?map_file=&funcao=download3&tema="+tema; | |
288 | + //caso a camada venha do sistema de metadados estatisticos e seja uma variavel | |
289 | + if(tipo == "meta"){ | |
290 | + p = "../classesphp/mapa_controle.php?map_file=&funcao=download3&id_medida_variavel="+tema; | |
291 | + } | |
292 | + cpJSON.call(p, "foo", r); | |
293 | + } | |
294 | +} | |
295 | +function listaCompleta(onde){ | |
296 | + var r, p; | |
297 | + r = function(retorno){ | |
298 | + var d, html = "", n, camadas = [], i, t; | |
299 | + d = retorno.data.temas; | |
300 | + n = d.length; | |
301 | + if(n > 0){ | |
302 | + for(i=0; i<n; i++){ | |
303 | + t = d[i]; | |
304 | + camadas.push({ | |
305 | + "nome": t.nome_tema, | |
306 | + "link_tema": t.link_tema, | |
307 | + "codigo_tema": t.codigo_tema, | |
308 | + "ogc_tema": t.ogc_tema, | |
309 | + "download_tema": t.download_tema | |
310 | + }); | |
311 | + } | |
312 | + html = ckCamada(camadas,$("#templateCamadas").html(),"tema"); | |
313 | + } | |
314 | + if($("#corpoMetaestat").html()){ | |
315 | + onde.html(html + $("#corpoMetaestat").html()); | |
316 | + } | |
317 | + else{ | |
318 | + onde.html(html); | |
319 | + } | |
320 | + }; | |
321 | + //cpJSON vem de class_php.js | |
322 | + cpJSON.call("../classesphp/mapa_controle.php?map_file=&funcao=pegaTodosTemas&g_sid=&idioma=pt", "foo", r); | |
323 | +} | |
324 | +function filtraGrupo(obj,idPainel){ | |
325 | + $("#" + idPainel + " .grupo").each( | |
326 | + function(i,el){ | |
327 | + if(obj.value == ""){ | |
328 | + $(el).show(); | |
329 | + } | |
330 | + else { | |
331 | + $(el).hide(); | |
332 | + } | |
333 | + } | |
334 | + ); | |
335 | + if(obj.value != ""){ | |
336 | + $("#"+obj.value).show(); | |
337 | + } | |
338 | +} | |
0 | 339 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,337 @@ |
1 | +<?php | |
2 | +define ( ONDEI3GEO, ".." ); | |
3 | +include (dirname ( __FILE__ ) . "/../ms_configura.php"); | |
4 | +include_once (dirname(__FILE__)."/../classesphp/sani_request.php"); | |
5 | +// pega a extensao geografica | |
6 | +if ($ogcwsmap == "") { | |
7 | + $ogcwsmap = $locaplic . "/aplicmap/ogcws.map"; | |
8 | +} | |
9 | +$map = ms_newMapObj ( $ogcwsmap ); | |
10 | +$mapext = $map->extent->minx . "," . $map->extent->miny . "," . $map->extent->maxx . "," . $map->extent->maxy; | |
11 | +error_reporting ( 0 ); | |
12 | +include "../init/head.php"; | |
13 | +?> | |
14 | +<style> | |
15 | +.panel-heading [data-toggle="collapse"]:after { | |
16 | + font-family: 'FontAwesome'; | |
17 | + content: "\f054"; | |
18 | + float: right; | |
19 | + margin-right: 5px; | |
20 | + color: #fffff; | |
21 | + font-size: 12px; | |
22 | + line-height: 16px; | |
23 | + -webkit-transform: rotate(-90deg); | |
24 | + -moz-transform: rotate(-90deg); | |
25 | + -ms-transform: rotate(-90deg); | |
26 | + -o-transform: rotate(-90deg); | |
27 | + transform: rotate(-90deg); | |
28 | +} | |
29 | + | |
30 | +.panel-heading [data-toggle="collapse"].collapsed:after { | |
31 | + -webkit-transform: rotate(90deg); | |
32 | + -moz-transform: rotate(90deg); | |
33 | + -ms-transform: rotate(90deg); | |
34 | + -o-transform: rotate(90deg); | |
35 | + transform: rotate(90deg); | |
36 | +} | |
37 | +.list-group-separator{ | |
38 | + width: 100%; | |
39 | +} | |
40 | +</style> | |
41 | +<script id="templateLinksOgc" type="x-tmpl-mustache"> | |
42 | +<h3>OGC</h3> | |
43 | +<p>{{{linkpagina}}}: <a href="{{{url}}}?temaOgc={{{tema}}}">{{{url}}}?temaOgc={{{tema}}}</a> | |
44 | +<p>{{{wstodas}}}: <a href="{{{servico}}}" target="_blank" >{{{servico}}}</a> | |
45 | +<p>{{{wscamada}}}: <a href="{{{servico}}}tema={{{tema}}}{{{id_medida_variavel}}}&" target="_blank" >{{{servico}}}tema={{{tema}}}{{{id_medida_variavel}}}&</a> | |
46 | +<p><a href="{{{urli3geo}}}/fontetema.php?tema={{{tema}}}" target="_blank" >Metadata</a></p> | |
47 | +<p><a target=blank href="{{{servico}}}service=wms&version=1.1.1&request=getcapabilities&layers={{{tema}}}{{{id_medida_variavel}}}" >GetCapabilities</a> | |
48 | +<p><a target=blank href="{{{servico}}}SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX=<?php echo $mapext;?>&FORMAT=image/png&service=wms&version=1.1.0&request=getmap&layers={{{tema}}}{{{id_medida_variavel}}}" >{{{getmap}}}</a> | |
49 | +<p><a target=blank href="{{{servico}}}SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX=<?php echo $mapext;?>&FORMAT=image/png&service=wms&version=1.1.0&request=getlegendgraphic&layers={{{tema}}}{{{id_medida_variavel}}}" >{{{legenda}}}</a> | |
50 | +<p><a target=blank href="{{{servico}}}format=application/openlayers&bbox=<?php echo $mapext;?>&layers={{{tema}}}" >{{{vOl}}}</a> | |
51 | +</script> | |
52 | +<script id="templateLinksDownload" type="x-tmpl-mustache"> | |
53 | +<h3>Download</h3> | |
54 | +<p>{{{linkpagina}}}: <a href="{{{url}}}?temaDownload={{{tema}}}">{{{url}}}?temaDownload={{{tema}}}</a> | |
55 | +<p>{{{sld}}}: <a href="{{{sldurl}}}" target="_blank" >{{{sldurl}}}</a> | |
56 | +<p><a href="{{{urli3geo}}}/fontetema.php?tema={{{tema}}}" target="_blank" >Metadata</a></p> | |
57 | +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=shape-zip&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}&typeName={{{tema}}}{{{id_medida_variavel}}}" >{{{downwfs}}}</a> | |
58 | +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=csv&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}&ows_geomtype=AS_WKT" >{{{downCgeo}}}</a> | |
59 | +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=csv&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}&ows_geomtype=none" >{{{downSgeo}}}</a> | |
60 | +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=kmz&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}" >{{{kmz}}}</a> | |
61 | +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=kml&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}" >{{{kml}}}</a> | |
62 | +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=geojson&bbox=<?php echo $mapext;?>&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}{{{id_medida_variavel}}}&typeName={{{tema}}}" >GeoJson</a> | |
63 | +<p><a target=blank href="../ferramentas/recline/default.php?tema={{{tema}}}{{{id_medida_variavel}}}" >{{{explore}}}</a> | |
64 | +<h4>Shape file</h4> | |
65 | +{{{shp}}} | |
66 | +</script> | |
67 | +<script id="templateCamadas" type="x-tmpl-mustache"> | |
68 | +<div class="list-group-item"> | |
69 | + <div class="bs-component btn-group-sm pull-left" data-toggle="modal" data-target="#modalCamada" > | |
70 | + <a title="links OWS" onclick="mostraLinksServico('{{codigo_tema}}','{{tipo}}','{{disabledogc}}')" class="btn btn-primary btn-fab {{disabledogc}}" href="#"> | |
71 | + <i class="material-icons">launch</i> | |
72 | + </a> | |
73 | + <a title="download" onclick="mostraLinksDownload('{{codigo_tema}}','{{tipo}}','{{disableddown}}')" class="btn btn-primary btn-fab {{disableddown}}" href="#"> | |
74 | + <i class="material-icons">file_download</i> | |
75 | + </a> | |
76 | + </div> | |
77 | + <h4> | |
78 | + <a onclick="mostraLinksServico('{{codigo_tema}}','{{tipo}}','{{disabledogc}}');$('#modalCamada').modal('show');" href="#"> | |
79 | + {{{nome_tema}}}{{{nome}}}</a> | |
80 | + <a title="metadata" class="{{hidden}}" href="{{link_tema}}{{link}}" target="_blank"><i class="fa fa-link"></i></a> | |
81 | + </h4> | |
82 | +</div> | |
83 | +<div class="list-group-separator"></div> | |
84 | +</script> | |
85 | +<script id="templateMenu" type="x-tmpl-mustache"> | |
86 | +<div class="panel-group" id="menu{{idmenu}}" role="tablist" aria-multiselectable="true"> | |
87 | + <div class="panel panel-default" > | |
88 | + <div class="panel-heading" style="background-color:#80cbc4;" role="tab" id="tituloMenu{{idmenu}}"> | |
89 | + <h3 class="panel-title"> | |
90 | + <a class="collapsed in" role="button" data-toggle="collapse" data-parent="#menu{{idmenu}}" href="#corpoMenu{{idmenu}}" aria-expanded="false" aria-controls="#corpoMenu{{idmenu}}"> {{{nomemenu}}} </a> | |
91 | + </h3> | |
92 | + </div> | |
93 | + <div class="panel-body"> | |
94 | + <div id="corpoMenu{{idmenu}}" class="panel-collapse collapse" role="tabpanel" aria-multiselectable="true"> | |
95 | + {{{camadas}}} | |
96 | + <!-- aqui entra o filtro --> | |
97 | + <div class="form-group"> | |
98 | + | |
99 | + <select onchange="filtraGrupo(this,'menu{{idmenu}}')" data-grupoFiltro="{{idmenu}}" class="form-control input-lg"> | |
100 | + </select> | |
101 | + </div> | |
102 | + | |
103 | + <div id="gruposMenu{{idmenu}}"> | |
104 | + <i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span> | |
105 | + </div> | |
106 | + </div> | |
107 | + </div> | |
108 | + </div> | |
109 | +</div> | |
110 | +</script> | |
111 | +<script id="templateFiltroGrupo" type="x-tmpl-mustache"> | |
112 | +<option value="painelGrupo{{id_n1}}">{{{nome}}}</option> | |
113 | +</script> | |
114 | +<script id="templateGrupos" type="x-tmpl-mustache"> | |
115 | +<div class="list-group grupo" id="painelGrupo{{id_n1}}"> | |
116 | + <div class="panel panel-default"> | |
117 | + <div class="panel-heading" style="background-color: #b2dfdb;" role="tab" > | |
118 | + <h4 class="panel-title"> | |
119 | + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#corpoMenu{{idmenu}}" href="#corpoGrupo{{id_n1}}" aria-expanded="false" aria-controls="corpoGrupo{{id_n1}}"> {{{nome}}} </a> | |
120 | + </h4> | |
121 | + </div> | |
122 | + <div class="panel-body"> | |
123 | + <div id="corpoGrupo{{id_n1}}" class="panel-collapse collapse" role="tabpanel" aria-multiselectable="true"> | |
124 | + {{{camadas}}} | |
125 | + <div id="subGruposGrupo{{id_n1}}">{{grupos}}</div> | |
126 | + </div> | |
127 | + </div> | |
128 | + </div> | |
129 | +</div> | |
130 | +</script> | |
131 | +<script id="templateSubGrupos" type="x-tmpl-mustache"> | |
132 | +<div class="list-group"> | |
133 | +<div class="panel panel-default"> | |
134 | + <div style="background-color: #e0f2f1;" onclick="listaCamadasSubgrupo('{{idmenu}}','{{id_n1}}','{{id_n2}}')" class="panel-heading" role="tab" id="tituloSubGrupo{{id_n2}}"> | |
135 | + <h4 class="panel-title"> | |
136 | + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#corpoGrupo{{id_n1}}" href="#corpoSubGrupo{{id_n2}}" aria-expanded="false" aria-controls="corpoSubGrupo{{id_n2}}"> {{{nome}}} </a> | |
137 | + </h4> | |
138 | + </div> | |
139 | + <div class="panel-body"> | |
140 | + <div id="corpoSubGrupo{{id_n2}}" class="panel-collapse collapse" role="tabpanel" aria-multiselectable="true"> | |
141 | + </div> | |
142 | + </div> | |
143 | +</div> | |
144 | +</div> | |
145 | +</script> | |
146 | +<body style="padding-top: 55px;" id="topo"> | |
147 | + <nav class="navbar navbar-default navbar-fixed-top"> | |
148 | + <div class="container-fluid"> | |
149 | + <div class="navbar-header"> | |
150 | + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" | |
151 | + data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | |
152 | + <span class="sr-only"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span | |
153 | + class="icon-bar"></span> | |
154 | + </button> | |
155 | + <a class="navbar-brand" href="../init/index.php"><?php echo $mensagemInicia;?> <i | |
156 | + class="fa fa-home fa-1x"></i></a> | |
157 | + </div> | |
158 | + <!-- template para permitir a traducao --> | |
159 | + <div id="navbar" class="collapse navbar-collapse"> | |
160 | + <div id="menuTpl" class="escondido hidden"> | |
161 | + <ul class="nav navbar-nav"> | |
162 | + <li><a href="../kml.php?tipoxml=kml" target="_blank">Kml Google Earth</a></li> | |
163 | + <li><a data-toggle="collapse" href="#listaCompleta" aria-expanded="false" | |
164 | + aria-controls="#listaCompleta">{{{lista}}}</a> | |
165 | + </li> | |
166 | + </ul> | |
167 | + </div> | |
168 | + </div> | |
169 | + </div> | |
170 | + </nav> | |
171 | + <div class="container-fluid"> | |
172 | + <div class="row"> | |
173 | + <ol class="breadcrumb"> | |
174 | + <li><a href="../init/index.php?home=">i3Geo</a></li> | |
175 | + <li class="active">OGC</li> | |
176 | + </ol> | |
177 | + </div> | |
178 | + </div> | |
179 | + | |
180 | + <div class="container"> | |
181 | + <!-- lista completa --> | |
182 | + <div class="row center-block hidden" id="listaCompleta"> | |
183 | + <div class="col-sm-12"> | |
184 | + <div class="panel panel-default"> | |
185 | + <div class="panel-body" id="corpolistaCompleta"> | |
186 | + <i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span> | |
187 | + </div> | |
188 | + </div> | |
189 | + </div> | |
190 | + </div> | |
191 | + <!-- Camadas oriundas do sistema de metadados estatisticos e mapas salvos | |
192 | + <div class="row center-block escondido hidden"> | |
193 | + <div class="col-sm-6" id="metaestat"> | |
194 | + <div class="panel-group" role="tablist" aria-multiselectable="true"> | |
195 | + <div class="panel panel-default"> | |
196 | + <div class="panel-heading" style="background-color: #00BCD4;" role="tab"> | |
197 | + <h3 class="panel-title"> | |
198 | + <a class="collapsed in" role="button" data-toggle="collapse" href="#corpoMetaestat" | |
199 | + aria-expanded="false" aria-controls="#corpoMetaestat"> {{{nomemeta}}} </a> | |
200 | + </h3> | |
201 | + </div> | |
202 | + <div class="panel-body"> | |
203 | + <div id="corpoMetaestat" class="panel-collapse collapse" role="tabpanel" | |
204 | + aria-multiselectable="true"> | |
205 | + {{{camadasmeta}}} | |
206 | + </div> | |
207 | + </div> | |
208 | + </div> | |
209 | + </div> | |
210 | + </div> | |
211 | + <div class="col-sm-6" id="mapasSalvos"> | |
212 | + <div class="panel-group" role="tablist" aria-multiselectable="true"> | |
213 | + <div class="panel panel-default"> | |
214 | + <div class="panel-heading" style="background-color: #00BCD4;" role="tab"> | |
215 | + <h3 class="panel-title"> | |
216 | + <a class="collapsed in" role="button" data-toggle="collapse" href="#corpomapasSalvos" | |
217 | + aria-expanded="false" aria-controls="#corpomapasSalvos"> {{{nomeMapasSalvos}}} </a> | |
218 | + </h3> | |
219 | + </div> | |
220 | + <div class="panel-body"> | |
221 | + <div id="corpomapasSalvos" class="panel-collapse collapse" role="tabpanel" | |
222 | + aria-multiselectable="true"> | |
223 | + {{{mapasSalvos}}} | |
224 | + </div> | |
225 | + </div> | |
226 | + </div> | |
227 | + </div> | |
228 | + </div> | |
229 | + </div> | |
230 | + --> | |
231 | + <div class="row center-block"> | |
232 | + <div class="col-sm-12" id="arvore"> | |
233 | + <i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span> | |
234 | + </div> | |
235 | + </div> | |
236 | + </div> | |
237 | + <nav class="navbar-fixed-bottom"> | |
238 | + <div class="container-fluid"> | |
239 | + <div class="jumbotron"></div> | |
240 | + </div> | |
241 | + </nav> | |
242 | + <div id="modalCamada" class="modal fade" tabindex="-1" role="dialog"> | |
243 | + <div class="modal-dialog"> | |
244 | + <div class="modal-content"> | |
245 | + <div class="modal-body"></div> | |
246 | + <div class="modal-footer" | |
247 | + style="padding: 0px; padding-right: 15px; border: 0px; background-color: white;"> | |
248 | + <a class="btn btn-primary" href="#" role="button" data-dismiss="modal" aria-label="Close"> OK </a> | |
249 | + </div> | |
250 | + </div> | |
251 | + </div> | |
252 | + </div> | |
253 | + <script src='../pacotes/cpaint/cpaint2_compacto.inc.js'></script> | |
254 | + <script src='../classesjs/compactados/dicionario_compacto.js'></script> | |
255 | + <script src='../classesjs/compactados/classe_util_compacto.js'></script> | |
256 | + <script src='../classesjs/compactados/classe_idioma_compacto.js'></script> | |
257 | + <script src='../classesjs/compactados/classe_php_compacto.js'></script> | |
258 | + <script src='../classesjs/compactados/classe_arvoredetemas_compacto.js'></script> | |
259 | + <script src='../classesjs/compactados/mustache.js'></script> | |
260 | + <script src='dicionario.js'></script> | |
261 | + <script src='index.js'></script> | |
262 | + <script> | |
263 | + $(document).ready(function(){ | |
264 | + $(".jumbotron").html($trad("jumbotron",g_traducao_ogc)); | |
265 | + i3GEO.configura = {"locaplic" : "..","sid": ""}; | |
266 | + | |
267 | + var servico = window.location.href.split("/ogc")[0]+"/ogc.php?"; | |
268 | + //g_traducao_ogc vem de dicionario.js | |
269 | + tradLinks = i3GEO.idioma.objetoIdioma(g_traducao_ogc); | |
270 | + tradLinks["servico"] = servico; | |
271 | + tradLinks["url"] = window.location.href.split("#")[0]; | |
272 | + tradLinks["url"] = tradLinks["url"].split("?")[0]; | |
273 | + tradLinks["urli3geo"] = window.location.href.split("/ogc")[0]; | |
274 | + //traducao do menu nav | |
275 | + html = Mustache.to_html( | |
276 | + $("#menuTpl").html(), | |
277 | + tradLinks | |
278 | + ); | |
279 | + $("#menuTpl").html(html); | |
280 | + //inicia arvore | |
281 | + listaDoNivelMenu( | |
282 | + $("#templateMenu").html(), | |
283 | + $("#templateGrupos").html(), | |
284 | + $("#templateSubGrupos").html(), | |
285 | + $("#templateCamadas").html() | |
286 | + ); | |
287 | + listaMetaestat($("#metaestat"),$("#templateCamadas").html()); | |
288 | + listaMapasSalvos($("#mapasSalvos"),$("#templateCamadas").html()); | |
289 | + $('.escondido').removeClass('hidden'); | |
290 | + $(window).on("scroll click", | |
291 | + function(){ | |
292 | + $(".jumbotron").fadeOut(300); | |
293 | + } | |
294 | + ); | |
295 | + //container para a lista completa | |
296 | + $('#listaCompleta').on('show.bs.collapse', function () { | |
297 | + listaCompleta($('#corpolistaCompleta')); | |
298 | + $('#listaCompleta').removeClass('hidden'); | |
299 | + }) | |
300 | + $('#listaCompleta').on('hide.bs.collapse', function () { | |
301 | + $('#listaCompleta').addClass('hidden'); | |
302 | + }) | |
303 | + | |
304 | + $.material.init(); | |
305 | + //verifica se deve abrir de imediato a janela de links | |
306 | + var temp = window.location.href.split("temaOgc="); | |
307 | + if(temp[1]){ | |
308 | + var temaOgc = temp[1]; | |
309 | + temaOgc = temaOgc.split("&"); | |
310 | + temaOgc = temaOgc[0]; | |
311 | + //verifica se eh metaestat | |
312 | + if(temaOgc.split("_")[0] == "metaestat"){ | |
313 | + mostraLinksServico(temaOgc.split("_")[1],"meta") | |
314 | + } | |
315 | + else{ | |
316 | + mostraLinksServico(temaOgc,"tema",'') | |
317 | + } | |
318 | + $("#modalCamada").modal('show'); | |
319 | + } | |
320 | + var temp = window.location.href.split("temaDownload="); | |
321 | + if(temp[1]){ | |
322 | + var temaDownload = temp[1]; | |
323 | + temaDownload = temaDownload.split("&"); | |
324 | + temaDownload = temaDownload[0]; | |
325 | + //verifica se eh metaestat | |
326 | + if(temaDownload.split("_")[0] == "metaestat"){ | |
327 | + mostraLinksDownload(temaDownload.split("_")[1],"meta") | |
328 | + } | |
329 | + else{ | |
330 | + mostraLinksDownload(temaDownload,"tema",'') | |
331 | + } | |
332 | + $("#modalCamada").modal('show'); | |
333 | + } | |
334 | + }); | |
335 | + </script> | |
336 | +</body> | |
337 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,12 @@ |
1 | +<div id="modal" class="modal fade" tabindex="-1" role="dialog"> | |
2 | + <div class="modal-dialog"> | |
3 | + <div class="modal-content"> | |
4 | + <div class="modal-header"> | |
5 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
6 | + <span aria-hidden="true">×</span> | |
7 | + </button> | |
8 | + </div> | |
9 | + <div class="modal-body"></div> | |
10 | + </div> | |
11 | + </div> | |
12 | +</div> | |
0 | 13 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,22 @@ |
1 | +<script id="templateCamadas" 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="{{disabledogc}} pull-right"> </span> | |
6 | + <a data-toggle="modal" data-target="#modal" title="links OWS" onclick="{{dominio}}.mostraLinksServico('{{codigo_tema}}')" href="javascript:void(0)" class="{{disabledogc}} btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
7 | + <i class="material-icons md-18">cloud</i> | |
8 | + </a> | |
9 | + <span class="pull-right {{disableddown}}"> </span> | |
10 | + <a data-toggle="modal" data-target="#modal" title="download" onclick="{{dominio}}.mostraLinksDownload('{{codigo_tema}}')" href="javascript:void(0)" class="{{disableddown}} btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
11 | + <i class="material-icons md-18">file_download</i> | |
12 | + </a> | |
13 | + <span class="{{disabledlink}} pull-right"> </span> | |
14 | + <a title="metadata" href="{{link_tema}}" target="_blank" class="{{disabledlink}} btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
15 | + <i class="material-icons md-18">description</i> | |
16 | + </a> | |
17 | + {{{nome_tema}}} | |
18 | + </h4> | |
19 | + </div> | |
20 | + <div class="list-group-separator"></div> | |
21 | +</div> | |
22 | +</script> | ... | ... |
... | ... | @@ -0,0 +1,15 @@ |
1 | +<script id="templateLinksDownload" type="x-tmpl-mustache"> | |
2 | +<h3>Download</h3> | |
3 | +<p>{{{linkpagina}}}: <a href="{{{url}}}?temaDownload={{{tema}}}">{{{url}}}?temaDownload={{{tema}}}</a> | |
4 | +<p>{{{sld}}}: <a href="{{{sldurl}}}" target="_blank" >{{{sldurl}}}</a> | |
5 | +<p><a href="{{{urli3geo}}}/fontetema.php?tema={{{tema}}}" target="_blank" >Metadata</a></p> | |
6 | +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=shape-zip&bbox={{mapext}}&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}&typeName={{{tema}}}" >{{{downwfs}}}</a> | |
7 | +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=csv&bbox={{mapext}}&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}&typeName={{{tema}}}&ows_geomtype=AS_WKT" >{{{downCgeo}}}</a> | |
8 | +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=csv&bbox={{mapext}}&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}&typeName={{{tema}}}&ows_geomtype=none" >{{{downSgeo}}}</a> | |
9 | +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=kmz&bbox={{mapext}}&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}&typeName={{{tema}}}" >{{{kmz}}}</a> | |
10 | +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=kml&bbox={{mapext}}&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}&typeName={{{tema}}}" >{{{kml}}}</a> | |
11 | +<p><a target=blank href="{{{servico}}}OUTPUTFORMAT=geojson&bbox={{mapext}}&service=wfs&version=1.1.0&request=getfeature&layers={{{tema}}}&typeName={{{tema}}}" >GeoJson</a> | |
12 | +<p><a target=blank href="../ferramentas/recline/default.php?tema={{{tema}}}" >{{{explore}}}</a> | |
13 | +<h4>Shape file</h4> | |
14 | +{{{shp}}} | |
15 | +</script> | |
0 | 16 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,11 @@ |
1 | +<script id="templateLinksOgc" type="x-tmpl-mustache"> | |
2 | +<h3>OGC</h3> | |
3 | +<p>{{{linkpagina}}}: <a href="{{{urli3geo}}}/ogc/index.php?temaOgc={{{tema}}}">{{{urli3geo}}}/ogc/index.php?temaOgc={{{tema}}}</a> | |
4 | +<p>{{{wstodas}}}: <a href="{{{servico}}}" target="_blank" >{{{servico}}}</a> | |
5 | +<p>{{{wscamada}}}: <a href="{{{servico}}}tema={{{tema}}}&" target="_blank" >{{{servico}}}tema={{{tema}}}&</a> | |
6 | +<p><a href="{{{urli3geo}}}/fontetema.php?tema={{{tema}}}" target="_blank" >Metadata</a></p> | |
7 | +<p><a target=blank href="{{{servico}}}service=wms&version=1.1.1&request=getcapabilities&layers={{{tema}}}{{{id_medida_variavel}}}" >GetCapabilities</a> | |
8 | +<p><a target=blank href="{{{servico}}}SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX={{mapext}}&FORMAT=image/png&service=wms&version=1.1.0&request=getmap&layers={{{tema}}}" >{{{getmap}}}</a> | |
9 | +<p><a target=blank href="{{{servico}}}SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX={{mapext}}&FORMAT=image/png&service=wms&version=1.1.0&request=getlegendgraphic&layers={{{tema}}}" >{{{legenda}}}</a> | |
10 | +<p><a target=blank href="{{{servico}}}format=application/openlayers&bbox={{mapext}}&layers={{{tema}}}" >{{{vOl}}}</a> | |
11 | +</script> | |
0 | 12 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,14 @@ |
1 | +<script id="templateLista" type="x-tmpl-mustache"> | |
2 | +<div class="list-group-item" style="background-color: #f2f2f2;"> | |
3 | + <div style="cursor:pointer;" class="row-content" onclick="{{{onclick}}}('{{id}}','{{{nome}}}')"> | |
4 | + <h4 class="list-group-item-heading"> | |
5 | + <span class="pull-right"> </span> | |
6 | + <a href="javascript:void(0)" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | |
7 | + <i class="material-icons md-18">folder_open</i> | |
8 | + </a> | |
9 | + {{{nome}}} | |
10 | + </h4> | |
11 | + </div> | |
12 | + <div class="list-group-separator"></div> | |
13 | +</div> | |
14 | +</script> | |
0 | 15 | \ No newline at end of file | ... | ... |
temas/_lbiomashp.map
temas/_lmapadecluster.map
... | ... | @@ -12,13 +12,15 @@ MAP |
12 | 12 | "CLASSE" "SIM" |
13 | 13 | "ltempoiteminicio" "" |
14 | 14 | "ltempoitemtip" "" |
15 | - "permitekmz" "nao" | |
15 | + "permitekmz" "NAO" | |
16 | 16 | "METAESTAT_CODIGO_TIPO_REGIAO" "" |
17 | - "permitedownload" "nao" | |
17 | + "permitedownload" "NAO" | |
18 | 18 | "metaestat" "" |
19 | 19 | "PLUGINI3GEO" '{"plugin":"markercluster","parametros":{"tipoEstilos":"default","gridSize":"50"}}' |
20 | - "permiteogc" "nao" | |
21 | - "permitekml" "nao" | |
20 | + "arquivodownload" "" | |
21 | + "arquivokmz" "" | |
22 | + "permiteogc" "NAO" | |
23 | + "permitekml" "SIM" | |
22 | 24 | "TEMA" "Localidades (usar com mapa de cluster)" |
23 | 25 | "cortepixels" "0" |
24 | 26 | END # METADATA | ... | ... |
temas/testecluster.map
... | ... | @@ -34,12 +34,14 @@ dbacoes_saude.tb_ubs_det.func_total = 'S' and dbacoes_saude.tb_ubs_det.ano_ubs_d |
34 | 34 | METADATA |
35 | 35 | "METAESTAT_ID_MEDIDA_VARIAVEL" "" |
36 | 36 | "CLASSE" "SIM" |
37 | - "permitekmz" "nao" | |
37 | + "permitekmz" "NAO" | |
38 | 38 | "METAESTAT_CODIGO_TIPO_REGIAO" "" |
39 | - "permitedownload" "nao" | |
39 | + "permitedownload" "NAO" | |
40 | 40 | "metaestat" "" |
41 | - "permiteogc" "nao" | |
42 | - "permitekml" "nao" | |
41 | + "arquivokmz" "" | |
42 | + "arquivodownload" "" | |
43 | + "permitekml" "SIM" | |
44 | + "permiteogc" "SIM" | |
43 | 45 | "TEMA" "Cluster" |
44 | 46 | "IDENTIFICA" "SIM" |
45 | 47 | END # METADATA | ... | ... |