Commit 24c5204e916d07d2d6f0381e028c875ec9c0d112
1 parent
d19fda6f
Exists in
master
Correção na pagina inicial para abrir tela de login em um modal
Showing
4 changed files
with
223 additions
and
58 deletions
Show diff stats
ferramentas/loginusuario/template_mst_bt.html
1 | -<li> | |
1 | + | |
2 | 2 | <div id="i3GEOF_loginusuario_imagemCabecalho" style="visibility: hidden;"> |
3 | 3 | <i class="fa fa-spinner fa-spin" aria-hidden="true"></i> |
4 | 4 | </div> |
... | ... | @@ -37,4 +37,3 @@ |
37 | 37 | <h6 class="text-info">{{{tentativas}}}</h6> |
38 | 38 | </div> |
39 | 39 | </div> |
40 | -</li> | |
41 | 40 | \ No newline at end of file | ... | ... |
init/head.php
... | ... | @@ -26,6 +26,8 @@ echo " |
26 | 26 | <!-- Custom styles for this template --> |
27 | 27 | <link href='" . ONDEI3GEO . "/pacotes/font-awesome/css/font-awesome.min.css' rel='stylesheet'> |
28 | 28 | |
29 | + <link href='" . ONDEI3GEO . "/pacotes/bootstrap-accessibility-plugin/plugins/css/bootstrap-accessibility.css' rel='stylesheet'> | |
30 | + | |
29 | 31 | <script src='" . ONDEI3GEO . "/init/headjs.php'></script>"; |
30 | 32 | ?> |
31 | 33 | <style> |
... | ... | @@ -104,5 +106,175 @@ hr { |
104 | 106 | body{ |
105 | 107 | background-color: rgb(240,240,240); |
106 | 108 | } |
109 | +/* conforme regra de acessibilidade */ | |
110 | +.navbar, .navbar.navbar-default, .btn.btn-fab.btn-primary { | |
111 | + background-color: #008579; | |
112 | +} | |
113 | +.alert.alert-danger { | |
114 | + background-color: #e13023; | |
115 | +} | |
116 | +.alert.alert-warning { | |
117 | + background-color: #de3601; | |
118 | +} | |
119 | +a, a:focus, a:hover { | |
120 | + color: #008579; | |
121 | +} | |
122 | + | |
123 | +.breadcrumb a, .breadcrumb a:focus, .breadcrumb a:hover { | |
124 | + color: #007e72; | |
125 | +} | |
126 | + | |
127 | +.breadcrumb>.active, .breadcrumb>li+li::before { | |
128 | + color: #707070; | |
129 | +} | |
130 | + | |
131 | +a, a:focus, a:hover { | |
132 | + color: #008579; | |
133 | +} | |
134 | + | |
135 | +.alert.alert-warning { | |
136 | + background-color: #de3601; | |
137 | +} | |
138 | + | |
139 | +.form-group.form-group-lg { | |
140 | + margin-top: 10px; | |
141 | +} | |
142 | + | |
143 | +.form-group.form-group-lg label.control-label { | |
144 | + color: #767676; | |
145 | +} | |
146 | + | |
147 | +.form-group.form-group-lg .checkbox label, .form-group.form-group-lg .radio label, .form-group.form-group-lg label { | |
148 | + color: #767676; | |
149 | +} | |
150 | + | |
151 | +h2 small { | |
152 | + color: #767676; | |
153 | +} | |
154 | + | |
155 | + | |
156 | +.migalha { | |
157 | + background-color: rgb(255, 255, 255); | |
158 | + border-bottom-width: 0px; | |
159 | + margin-bottom: 20px; | |
160 | + height: 32px; | |
161 | + margin-top: 0px;" | |
162 | +} | |
163 | + | |
164 | +/* Breadcrumbs from http://bootsnipp.com/snippets/featured/triangle-breadcrumbs-arrows */ | |
165 | +.btn-breadcrumb .btn:not(:last-child):after { | |
166 | + content: " "; | |
167 | + display: block; | |
168 | + width: 0; | |
169 | + height: 0; | |
170 | + border-top: 17px solid transparent; | |
171 | + border-bottom: 17px solid transparent; | |
172 | + border-left: 10px solid white; | |
173 | + position: absolute; | |
174 | + top: 50%; | |
175 | + margin-top: -17px; | |
176 | + left: 100%; | |
177 | + z-index: 3; | |
178 | +} | |
179 | +.btn-breadcrumb .btn:not(:last-child):before { | |
180 | + content: " "; | |
181 | + display: block; | |
182 | + width: 0; | |
183 | + height: 0; | |
184 | + border-top: 17px solid transparent; | |
185 | + border-bottom: 17px solid transparent; | |
186 | + border-left: 10px solid rgb(173, 173, 173); | |
187 | + position: absolute; | |
188 | + top: 50%; | |
189 | + margin-top: -17px; | |
190 | + margin-left: 1px; | |
191 | + left: 100%; | |
192 | + z-index: 3; | |
193 | +} | |
194 | + | |
195 | +.btn-breadcrumb .btn { | |
196 | + padding:6px 12px 6px 24px; | |
197 | +} | |
198 | + | |
199 | +.btn-group.btn-breadcrumb { | |
200 | + margin-bottom: 0px; | |
201 | + margin-top: 0px; | |
202 | +} | |
203 | + | |
204 | +.btn-breadcrumb .btn:first-child { | |
205 | + padding:6px 6px 6px 10px; | |
206 | +} | |
207 | +.btn-breadcrumb .btn:last-child { | |
208 | + padding:6px 18px 6px 24px; | |
209 | +} | |
210 | + | |
211 | +.material-icons.md-18 { font-size: 18px; } | |
212 | + | |
213 | +/** Default button **/ | |
214 | +.btn-breadcrumb .btn.btn-default:not(:last-child):after { | |
215 | + border-left: 10px solid rgb(255, 255, 255); | |
216 | +} | |
217 | +.btn-breadcrumb .btn.btn-default:not(:last-child):before { | |
218 | + border-left: 10px solid #ccc; | |
219 | +} | |
220 | +.btn-breadcrumb .btn.btn-default:hover:not(:last-child):after { | |
221 | + border-left: 10px solid #ebebeb; | |
222 | +} | |
223 | +.btn-breadcrumb .btn.btn-default:hover:not(:last-child):before { | |
224 | + border-left: 10px solid #adadad; | |
225 | +} | |
226 | + | |
227 | +.btn-breadcrumb a:nth-child(1) { z-index:6; } | |
228 | +.btn-breadcrumb a:nth-child(2) { z-index:7; } | |
229 | +.btn-breadcrumb a:nth-child(3) { z-index:4; } | |
230 | +.btn-breadcrumb a:nth-child(4) { z-index:3; } | |
231 | +.btn-breadcrumb a:nth-child(5) { z-index:2; } | |
232 | +.btn-breadcrumb a:nth-child(6) { z-index:1; } | |
233 | + | |
234 | + | |
235 | +/* The responsive part */ | |
236 | + | |
237 | +.btn-breadcrumb > * > div { | |
238 | + /* With less: .text-overflow(); */ | |
239 | + white-space: nowrap; | |
240 | + overflow: hidden; | |
241 | + text-overflow: ellipsis; | |
242 | + text-transform: none; | |
243 | +} | |
244 | + | |
245 | +.btn-breadcrumb > *:nth-child(n+2) { | |
246 | + display:none; | |
247 | +} | |
248 | + | |
249 | +/* === For phones =================================== */ | |
250 | +@media (max-width: 767px) { | |
251 | + .btn-breadcrumb > *:nth-last-child(-n+2) { | |
252 | + display:block; | |
253 | + } | |
254 | + .btn-breadcrumb > * div { | |
255 | + max-width: 60px; | |
256 | + } | |
257 | +} | |
258 | + | |
259 | +/* === For tablets ================================== */ | |
260 | +@media (min-width: 768px) and (max-width:991px) { | |
261 | + .btn-breadcrumb > *:nth-last-child(-n+4) { | |
262 | + display:block; | |
263 | + } | |
264 | + .btn-breadcrumb > * div { | |
265 | + max-width: 100px; | |
266 | + } | |
267 | +} | |
268 | + | |
269 | +/* === For desktops ================================== */ | |
270 | +@media (min-width: 992px) { | |
271 | + .btn-breadcrumb > *:nth-last-child(-n+6) { | |
272 | + display:block; | |
273 | + } | |
274 | + .btn-breadcrumb > * div { | |
275 | + max-width: 170px; | |
276 | + } | |
277 | +} | |
278 | + | |
107 | 279 | </style> |
108 | 280 | </head> | ... | ... |
init/index.js
init/index.php
... | ... | @@ -26,6 +26,7 @@ if (! file_exists ( $dir_tmp )) { |
26 | 26 | } |
27 | 27 | if (file_exists ( $dir_tmp )) { |
28 | 28 | @mkdir ( $dir_tmp . "/comum", 0744 ); |
29 | + chmod ( $dir_tmp . "/comum", 0744 ); | |
29 | 30 | @mkdir ( $dir_tmp . "/saiku-datasources", 0744 ); |
30 | 31 | chmod ( $dir_tmp . "/saiku-datasources", 0744 ); |
31 | 32 | @mkdir ( $dir_tmp . "/cache", 0744 ); |
... | ... | @@ -43,38 +44,33 @@ include "head.php"; |
43 | 44 | } |
44 | 45 | </style> |
45 | 46 | <body style="padding-top: 90px;" id="topo"> |
47 | + <a href="#conteudoPrincipal" class="sr-only sr-only-focusable"><span class="well" style="background: white; color: #007e72;">Skip to main content</span></a> | |
46 | 48 | <nav class="navbar navbar-default navbar-fixed-top"> |
47 | 49 | <div class="container-fluid"> |
48 | 50 | <div class="navbar-header"> |
49 | - <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" | |
51 | + <button type="button" title="icon-bar" class="navbar-toggle collapsed" data-toggle="collapse" | |
50 | 52 | data-target="#navbar" aria-expanded="false" aria-controls="navbar"> |
51 | 53 | <span class="sr-only"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span |
52 | 54 | class="icon-bar"></span> |
53 | 55 | </button> |
54 | - <a class="navbar-brand" onclick="$('.cartao').fadeIn(600);" href="#"><?php echo $mensagemInicia;?> <i | |
55 | - class="fa fa-home fa-1x"></i></a> | |
56 | + <a class="navbar-brand" onclick="$('.cartao').fadeIn(600);" href="#"> | |
57 | + <?php echo $mensagemInicia;?> <i class="material-icons">home</i></a> | |
56 | 58 | </div> |
57 | 59 | <div id="navbar" class="navbar-collapse collapse navbar-responsive-collapse"> |
58 | - <ul class="nav navbar-nav"> | |
59 | - <li class="fa"><a href="#"><span id="bandeiras"></span></a></li> | |
60 | - </ul> | |
61 | - <ul class="nav navbar-nav navbar-right"> | |
62 | - <li class="dropdown" <?php if(isset($i3geoPermiteLogin) && $i3geoPermiteLogin == false) { echo "style=display:none "; }?> ><a | |
63 | - onclick="i3GEO.login.recarrega = true; i3GEO.login.dialogo.abreLogin('../','template_mst_bt.html');" | |
64 | - href="#" class="dropdown-toggle" data-toggle="dropdown">Login <span class="caret"></span></a> | |
65 | - <ul id="i3GEOF_loginusuario" class="dropdown-menu" | |
66 | - style="min-width: 280px; padding: 10px; background-color: white;"> | |
67 | - </ul></li> | |
68 | - </ul> | |
69 | 60 | <!-- template para permitir a traducao --> |
70 | 61 | <div id="menuTpl" class="hidden"> |
71 | 62 | <ul class="nav navbar-nav"> |
72 | - <li><a href="#topo" onclick="$('.cartao').hide();$('.map-o').fadeIn(600);">{{{mapas}}}</a></li> | |
73 | - <li><a href="#topo" onclick="$('.cartao').hide();$('.download').fadeIn(600);">OGC/Download</a></li> | |
74 | - <li><a href="#topo" onclick="$('.cartao').hide();$('.cogs').fadeIn(600);">{{{admin}}}</a></li> | |
75 | - <li><a href="#topo" onclick="$('.cartao').hide();$('.book').fadeIn(600);">{{{docs}}}</a></li> | |
76 | - <li><a href="#topo" onclick="$('.cartao').hide();$('.group').fadeIn(600);">{{{comunidade}}}</a></li> | |
63 | + <li class="fa"><a href="#" tabindex='-1' ><span id="bandeiras"></span></a></li> | |
64 | + <li><a data-toggle="collapse" data-target=".in" role="button" href="#topo" onclick="$('.cartao').hide();$('.map-o').fadeIn(600);">{{{mapas}}}</a></li> | |
65 | + <li><a data-toggle="collapse" data-target=".in" role="button" href="#topo" onclick="$('.cartao').hide();$('.download').fadeIn(600);">OGC/Download</a></li> | |
66 | + <li><a data-toggle="collapse" data-target=".in" role="button" href="#topo" onclick="$('.cartao').hide();$('.cogs').fadeIn(600);">{{{admin}}}</a></li> | |
67 | + <li><a data-toggle="collapse" data-target=".in" role="button" href="#topo" onclick="$('.cartao').hide();$('.book').fadeIn(600);">{{{docs}}}</a></li> | |
68 | + <li><a data-toggle="collapse" data-target=".in" role="button" href="#topo" onclick="$('.cartao').hide();$('.group').fadeIn(600);">{{{comunidade}}}</a></li> | |
77 | 69 | <li><a role="button" href="../social/index.php" >Social</a></li> |
70 | + <li <?php if(isset($i3geoPermiteLogin) && $i3geoPermiteLogin == false) { echo "style=display:none "; }?>> | |
71 | + <a role="button" onclick="i3GEO.login.recarrega = true; i3GEO.login.dialogo.abreLogin('../','template_mst_bt.html');" | |
72 | + href="#topo" data-toggle="modal" data-target="#modalLogin">Login <i class="material-icons md-18">input</i></a> | |
73 | + </li> | |
78 | 74 | </ul> |
79 | 75 | </div> |
80 | 76 | </div> |
... | ... | @@ -87,8 +83,8 @@ include "head.php"; |
87 | 83 | style="background: rgb(255, 255, 255); background: rgba(255, 255, 255, 0.8);"> |
88 | 84 | <!-- Template para mensagem do i3Geo --> |
89 | 85 | <ul class="list-inline"> |
90 | - <li><img class="pull-left" src='../imagens/i3Geo_bigTransp.png' | |
91 | - style='width: 80px; margin: 5px;' /> <img class="pull-right hidden-xs" | |
86 | + <li><img class="pull-left" alt="i3Geo Logo" src='../imagens/i3Geo_bigTransp.png' | |
87 | + style='width: 80px; margin: 5px;' /> <img alt="qrcode site" class="pull-right hidden-xs" | |
92 | 88 | src='../pacotes/qrcode/php/qr_img.php?host={{{host}}}&d={{{href}}}' |
93 | 89 | style='width: 80px; margin: 5px;' /> |
94 | 90 | <p>{{{jumbotron}}}</p></li> |
... | ... | @@ -98,14 +94,14 @@ include "head.php"; |
98 | 94 | </div> |
99 | 95 | </nav> |
100 | 96 | |
101 | - <div class="container"> | |
97 | + <div class="container" id="conteudoPrincipal" tabindex="-1"> | |
102 | 98 | <div class="row center-block"> |
103 | 99 | <!-- Template para criacao dos quadros ver index.js --> |
104 | 100 | <div id="botoesTpl" class="hidden"> |
105 | 101 | <div class="cartao {{{fa}}} col-xs-12 center-block" |
106 | 102 | style="width: 260px; min-width: 260px; max-width: 260px;"> |
107 | 103 | <div class="panel panel-default"> |
108 | - <div class="panel-body"> | |
104 | + <div class="panel-body" tabindex="-1" > | |
109 | 105 | <!-- |
110 | 106 | <div class="thumbnail" role="button" style="height: 90px;"> |
111 | 107 | <a target="{{{target}}}" href="{{{href}}}"> <img class="img-rounded" |
... | ... | @@ -114,40 +110,39 @@ include "head.php"; |
114 | 110 | </div> |
115 | 111 | --> |
116 | 112 | <div class="thumbnail" role="button" style="height: 90px;"> |
117 | - <a target="{{{target}}}" href="{{{href}}}"> <img class="img-rounded {{{img}}}" | |
113 | + <a tabindex="-1" target="{{{target}}}" href="{{{href}}}"> <img alt="{{{titulo}}}" tabindex="-1" class="img-rounded {{{img}}}" | |
118 | 114 | style="height: 100%; width: 100%" src="../imagens/branco.gif" /> |
119 | 115 | </a> |
120 | 116 | </div> |
121 | 117 | |
122 | 118 | <h4 style="height: 40px;">{{{titulo}}}</h4> |
123 | - <h5 class="hidden-xs" style="height: 100px;">{{{subtitulo}}}</h5> | |
119 | + <h5 tabindex="-1" class="hidden-xs" style="height: 100px;">{{{subtitulo}}}</h5> | |
124 | 120 | |
125 | 121 | </div> |
126 | 122 | <div class="panel-footer text-right" |
127 | 123 | style="padding: 0px; padding-right: 15px; border: 0px; background-color: white;"> |
128 | 124 | <div class="row center-block"> |
129 | 125 | <div class="col-xs-6" style="line-height: 3.5; text-align: left;"> |
130 | - <a role="button" data-toggle="quadroQrcode" data-url="{{{href}}}" | |
131 | - class="btn btn-primary btn-fab btn-fab-mini" href="#"> <span | |
132 | - class="glyphicon glyphicon-qrcode" aria-hidden="true"></span> | |
133 | - </a> | |
126 | + <!-- o texto no span e para acessibilidade--> | |
127 | + <button tabindex="-1" role="button" data-toggle="quadroQrcode" data-url="{{{href}}}" | |
128 | + class="btn btn-primary btn-fab btn-fab-mini" > <span | |
129 | + class="glyphicon glyphicon-qrcode" aria-hidden="true"> qrcode</span> | |
130 | + </button> | |
134 | 131 | |
135 | - <button onclick="favorita(this);return false;" class="btn btn-primary btn-fab btn-fab-mini"> | |
136 | - <span data-cookie="{{{img}}}" class="glyphicon glyphicon-star" aria-hidden="true"></span> | |
132 | + <button tabindex="-1" role="button" onclick="favorita(this);return false;" class="btn btn-primary btn-fab btn-fab-mini"> | |
133 | + <span data-cookie="{{{img}}}" ><i class="material-icons">grade</i></span> | |
137 | 134 | </button> |
138 | 135 | </div> |
139 | 136 | <div class="col-xs-6"> |
140 | - <a class="btn btn-primary" href="{{{href}}}" role="button" target="{{{target}}}"> | |
137 | + <a class="btn btn-primary" style="color:#008579;" href="{{{href}}}" role="button" target="{{{target}}}"> | |
141 | 138 | {{{abrir}}} </a> |
142 | 139 | </div> |
143 | - | |
144 | 140 | </div> |
145 | 141 | </div> |
146 | 142 | </div> |
147 | 143 | </div> |
148 | 144 | </div> |
149 | 145 | </div> |
150 | - | |
151 | 146 | </div> |
152 | 147 | <div tabindex="-1" class="container-fluid" |
153 | 148 | style="background-color: #fff; margin-top: 10px; padding-top: 10px;"> |
... | ... | @@ -162,7 +157,20 @@ include "head.php"; |
162 | 157 | </div> |
163 | 158 | </div> |
164 | 159 | </div> |
160 | + <div id="modalLogin" class="modal fade" tabindex="-1"> | |
161 | + <div class="modal-dialog"> | |
162 | + <div class="modal-content"> | |
163 | + <div class="modal-header"> | |
164 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
165 | + <span aria-hidden="true">×</span> | |
166 | + </button> | |
167 | + </div> | |
168 | + <div class="modal-body" id="i3GEOF_loginusuario"> | |
165 | 169 | |
170 | + </div> | |
171 | + </div> | |
172 | + </div> | |
173 | + </div> | |
166 | 174 | <script> |
167 | 175 | //utilizado em ms_configura.php para customizar o local da pasta de inicializacao |
168 | 176 | var customDir = "<?php echo $customDir; ?>"; |
... | ... | @@ -185,28 +193,14 @@ include "head.php"; |
185 | 193 | $("#jumbotron").fadeOut(300) |
186 | 194 | } |
187 | 195 | ); |
188 | - var tamanho = findBootstrapDeviceSize(); | |
189 | - if(tamanho != "xs"){ | |
190 | - $(".tline").attr("src","https://twitter.com/i3geo"); | |
191 | - $(".tline").attr("src","https://twitter.com/hashtag/i3geo"); | |
192 | - | |
193 | - window.twttr = (function(d, s, id) { | |
194 | - var js, fjs = d.getElementsByTagName(s)[0], | |
195 | - t = window.twttr || {}; | |
196 | - if (d.getElementById(id)) return t; | |
197 | - js = d.createElement(s); | |
198 | - js.id = id; | |
199 | - js.src = "https://platform.twitter.com/widgets.js"; | |
200 | - fjs.parentNode.insertBefore(js, fjs); | |
201 | - | |
202 | - t._e = []; | |
203 | - t.ready = function(f) { | |
204 | - t._e.push(f); | |
205 | - }; | |
206 | - | |
207 | - return t; | |
208 | - }(document, "script", "twitter-wjs")); | |
196 | + //verifica se deve ou nao esconder a mensagem de boas vindas verificando o parametro enviado pela url | |
197 | + if("<?php echo isset($_GET["home"]) ? "ok" : ""; ?>" == "ok"){ | |
198 | + $("#jumbotron").hide(); | |
209 | 199 | } |
200 | + //modifica a url para que ao voltar a pagina a mensagem de boas vindas nao seja mostrada | |
201 | + var u = window.location.origin + window.location.pathname + "?home="; | |
202 | + window.history.replaceState(null,null,u); | |
203 | + | |
210 | 204 | $('[data-toggle="quadroQrcode"]').popover({ |
211 | 205 | html: true, |
212 | 206 | placement: "auto", | ... | ... |