Commit 982b9ecccc8f1300b479ce81bbfd3ebb0aff4a3a

Authored by Edmar Moretti
1 parent 5c90dbe1

alerta no botao de copiar apara a memória

init/head.php
... ... @@ -108,5 +108,16 @@ hr {
108 108 width: 24px;
109 109 }
110 110  
  111 +.btn.btn-fab.btn-fab-max {
  112 + font-size: 1.6em;
  113 + height: 40px;
  114 + min-width: 40px;
  115 + padding-bottom: 5px;
  116 + padding-left: 5px;
  117 + padding-right: 5px;
  118 + padding-top: 7px;
  119 + width: 40px;
  120 +}
  121 +
111 122 </style>
112 123 </head>
... ...
mapas/dicionario.js
... ... @@ -5,5 +5,10 @@ g_traducao_mapas =
5 5 pt : "Mapas de usu&aacute;rios",
6 6 en : "",
7 7 es : ""
  8 + }],
  9 + "copiado" : [{
  10 + pt : "Copiado",
  11 + en : "",
  12 + es : ""
8 13 }]
9 14 };
... ...
mapas/index.js
... ... @@ -68,7 +68,8 @@ function verificaMapa(mapa){
68 68 mapa.LINK = link;
69 69 links.push({
70 70 "nome": "",
71   - "link": mapa.LINK
  71 + "link": mapa.LINK,
  72 + "copiado": $trad("copiado",g_traducao_mapas)
72 73 });
73 74 }
74 75 // verifica se o mapfile esta salvo no banco
... ... @@ -77,18 +78,23 @@ function verificaMapa(mapa){
77 78 if (mapa.CONTEMMAPFILE != "nao") {
78 79 links = [
79 80 {
  81 + "copiado": $trad("copiado",g_traducao_mapas),
80 82 "nome": "Como foi salvo",
81 83 "link": mapa.LINK
82 84 },{
  85 + "copiado": $trad("copiado",g_traducao_mapas),
83 86 "nome": "Openlayers com todos os botoes",
84 87 "link": i3GEO.configura.locaplic + "/mashups/openlayers.php?numzoomlevels=18&restauramapa=" + mapa.ID_MAPA
85 88 },{
  89 + "copiado": $trad("copiado",g_traducao_mapas),
86 90 "nome": "Sem o fundo",
87 91 "link": i3GEO.configura.locaplic + "/mashups/openlayers.php?numzoomlevels=18&restauramapa=" + mapa.ID_MAPA + "&fundo=est_wms"
88 92 },{
  93 + "copiado": $trad("copiado",g_traducao_mapas),
89 94 "nome": "Com botoes principais",
90 95 "link": i3GEO.configura.locaplic + "/mashups/openlayers.php?numzoomlevels=18&restauramapa=" + mapa.ID_MAPA + "&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica"
91 96 },{
  97 + "copiado": $trad("copiado",g_traducao_mapas),
92 98 "nome": "Botoes de navegacao",
93 99 "link": i3GEO.configura.locaplic + "/mashups/openlayers.php?numzoomlevels=18&restauramapa=" + mapa.ID_MAPA
94 100 }
... ... @@ -102,4 +108,13 @@ function verificaMapa(mapa){
102 108 mapa.subtitulo = html;
103 109 return mapa;
104 110 }
  111 +function alerta(texto,d){
  112 + if(!d){
  113 + d = 500;
  114 + }
  115 + var a = $(".alert");
  116 + a.html(texto);
  117 + a.slideDown(d)
  118 + a.delay(d).slideUp(d)
  119 +}
105 120  
... ...
mapas/index.php
... ... @@ -53,12 +53,12 @@ include &quot;../init/head.php&quot;;
53 53 <a target="_blank" class="btn btn-primary btn-fab" href="{{{link}}}">
54 54 <i class="material-icons">launch</i>
55 55 </a>
56   - <a onclick="i3GEO.util.copyToClipboard('{{{link}}}')" class="btn btn-primary btn-fab" href="#">
  56 + <button onclick="i3GEO.util.copyToClipboard('{{{link}}}');alerta('{{copiado}}');" class="btn btn-primary btn-fab" >
57 57 <i class="material-icons">content_copy</i>
58   - </a>
59   - <a role="button" data-toggle="quadroQrcode" data-url="{{{link}}}" class="btn btn-primary btn-fab btn-fab-mini" href="#">
  58 + </button>
  59 + <button role="button" data-toggle="quadroQrcode" data-url="{{{link}}}" class="btn btn-primary btn-fab btn-fab-max" >
60 60 <span class="glyphicon glyphicon-qrcode" aria-hidden="true"></span>
61   - </a>
  61 + </button>
62 62 </div>
63 63 <h4>
64 64 &nbsp;{{{nome}}}
... ... @@ -84,6 +84,8 @@ include &quot;../init/head.php&quot;;
84 84 </div>
85 85 </div>
86 86 </nav>
  87 + <!--para as mensagens de alerta-->
  88 + <div class="navbar-fixed-top alert alert-success text-center" style="padding:0px;" ></div>
87 89 <div class="container-fluid">
88 90 <div class="row">
89 91 <ol class="breadcrumb">
... ... @@ -94,7 +96,7 @@ include &quot;../init/head.php&quot;;
94 96 </div>
95 97 <div class="container">
96 98 <!-- Template para criacao dos quadros ver index.js -->
97   - <div class="hidden">
  99 + <div class="escondido">
98 100 <div class="row">
99 101 <div class="col-xs-9 center-block" id="botoesTpl" >
100 102 <div class="row" id="affix-{{ID_MAPA}}" >
... ... @@ -142,7 +144,7 @@ include &quot;../init/head.php&quot;;
142 144 i3GEO.configura = {"locaplic" : window.location.href.split("/mapas")[0],"sid": ""};
143 145 $(".active").html($trad("mapas",g_traducao_mapas));
144 146 mostraBotoesBT();
145   - $('.hidden').removeClass('hidden');
  147 + $('.escondido').removeClass('hidden');
146 148 $.material.init();
147 149 });
148 150 </script>
... ...