Commit 9afb55a5ebcda6878fc153c3268fb4495a79d609
1 parent
480e4cb6
Exists in
master
and in
7 other branches
Incluída opção de navegação em flash na nuvem de tags
Showing
2 changed files
with
34 additions
and
9 deletions
Show diff stats
ferramentas/nuvemtags/index.htm
... | ... | @@ -41,9 +41,11 @@ |
41 | 41 | <input id=botao1 size=18 class=executar type='buttom' value='Cruzar' /> |
42 | 42 | </div> |
43 | 43 | |
44 | - <div style="position:absolute;top:70px;left:5px;display:block;width:90%;text-align:justify" id="resultado" >Aguarde...</div> | |
44 | + <div style="position:absolute;top:70px;left:5px;display:block;width:90%;text-align:justify;" id="resultado" >Aguarde...</div> | |
45 | + | |
45 | 46 | <script src="../i3geo_tudo_compacto.js.php" type="text/javascript"></script> |
46 | 47 | <script language="JavaScript" type="text/javascript" src="index.js"></script> |
48 | +<script type="text/javascript" src="../../pacotes/wpcumulus/swfobject.js"></script> | |
47 | 49 | <script> |
48 | 50 | YAHOO.example.linksRSS = [ |
49 | 51 | "http://www.mma.gov.br/webservice/noticias/rss_noticias.php", | ... | ... |
ferramentas/nuvemtags/index.js
... | ... | @@ -34,13 +34,22 @@ YAHOO.example.init = function () |
34 | 34 | aguarde("block") |
35 | 35 | parametrosURL() |
36 | 36 | inicio = 0; |
37 | +var tagsFlash; | |
38 | +var palavra = ""; | |
39 | +var temp = (window.location.href).split("palavra="); | |
40 | +if (temp[1]) | |
41 | +{palavra = (temp[1].split("&"))[0];} | |
42 | +if(palavra != "") | |
43 | +procurar(palavra) | |
37 | 44 | function montaNuvem(r) |
38 | 45 | { |
39 | 46 | retorno = r; |
40 | 47 | if(retorno.data) |
41 | 48 | { |
42 | 49 | var tags ="Clique na TAG para localizar temas relacionados<br><br><span onmouseout='this.style.textDecoration=\"none\"' onmouseover='this.style.textDecoration=\"underline\"' onclick='javascript:inicio = inicio+2;montaNuvem(retorno);' style='cursor:pointer;vertical-align:middle;color:navy;font-size:'12'pt;'>menos</span><span> </span>" |
43 | - tags +="<span onmouseout='this.style.textDecoration=\"none\"' onmouseover='this.style.textDecoration=\"underline\"' onclick='javascript:inicio = inicio-2;montaNuvem(retorno);' style='cursor:pointer;vertical-align:middle;color:navy;font-size:'12'pt;'>mais</span><br><br>" | |
50 | + tags +="<span onmouseout='this.style.textDecoration=\"none\"' onmouseover='this.style.textDecoration=\"underline\"' onclick='javascript:inicio = inicio-2;montaNuvem(retorno);' style='cursor:pointer;vertical-align:middle;color:navy;font-size:'12'pt;'>mais</span><span> </span>" | |
51 | + tags +="<span onmouseout='this.style.textDecoration=\"none\"' onmouseover='this.style.textDecoration=\"underline\"' onclick='javascript:flash();' style='cursor:pointer;vertical-align:middle;color:navy;font-size:'12'pt;'>animar</span><br><br>" | |
52 | + | |
44 | 53 | if((inicio < 0) || (inicio > retorno.data.length)){return;} |
45 | 54 | for (i=0;i<retorno.data.length;i++) |
46 | 55 | { |
... | ... | @@ -57,11 +66,11 @@ function montaNuvem(r) |
57 | 66 | for (r=0;r<retorno.data[i].noticias.length;r++) |
58 | 67 | { |
59 | 68 | linkrss += "<span><a href='"+retorno.data[i].noticias[r].link+"' target=blanck ><img style=cursor:pointer src='../../imagens/mais.png' title='"+retorno.data[i].noticias[r].titulo+"'/></a></span>" ; |
60 | - } | |
61 | - | |
69 | + } | |
62 | 70 | } |
63 | - | |
64 | - tags += "<span> </span> <span onmouseout='this.style.textDecoration=\"none\"' onmouseover='this.style.textDecoration=\"underline\"' onclick='procurar(this)' style='cursor:pointer;vertical-align:middle;color:rgb("+cor+");font-size:"+h+"pt;'>"+retorno.data[i].tag+"</span>"+linkrss | |
71 | + tags += "<span> </span> <span onmouseout='this.style.textDecoration=\"none\"' onmouseover='this.style.textDecoration=\"underline\"' onclick='procurar(\""+retorno.data[i].tag+"\")' style='cursor:pointer;vertical-align:middle;color:rgb("+cor+");font-size:"+h+"pt;'>"+retorno.data[i].tag+"</span>"+linkrss | |
72 | + if(h > 10) | |
73 | + tagsFlash += "<a href='index.htm?palavra="+retorno.data[i].tag+"' target='_top' style='font-size:"+(h - 15)+"px;color:red;' >"+retorno.data[i].tag+"</a>" | |
65 | 74 | } |
66 | 75 | } |
67 | 76 | } |
... | ... | @@ -81,10 +90,10 @@ cp.call(p,"listaTags",montaNuvem); |
81 | 90 | |
82 | 91 | function procurar(texto) |
83 | 92 | { |
84 | - if(window.parent.document.getElementById("buscatema")) | |
93 | + if(window.parent.document.getElementById("i3geo_buscatema")) | |
85 | 94 | { |
86 | - window.parent.document.getElementById("buscatema").value = texto.innerHTML | |
87 | - window.parent.procurartemas() | |
95 | + window.parent.document.getElementById("i3geo_buscatema").value = texto | |
96 | + window.parent.i3GEO.arvoreDeTemas.buscaTema(texto); | |
88 | 97 | } |
89 | 98 | } |
90 | 99 | |
... | ... | @@ -99,4 +108,18 @@ function buscarss() |
99 | 108 | //cp.set_debug(2) |
100 | 109 | var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=listaTags&g_sid="+g_sid+"&rss="+rss+"&nrss="+$i("nrss").value; |
101 | 110 | cp.call(p,"listaTags",montaNuvem); |
111 | +} | |
112 | +function flash() | |
113 | +{ | |
114 | + $i("resultado").style.top = "-100px"; | |
115 | + $i("resultado").style.left = "-100px"; | |
116 | + var so = new SWFObject("../../pacotes/wpcumulus/tagcloud.swf", "tagcloud", "600", "600", "9", "#ffffff"); | |
117 | + // uncomment next line to enable transparency | |
118 | + //so.addParam("wmode", "transparent"); | |
119 | + so.addVariable("tcolor", "0x333333"); | |
120 | + so.addVariable("mode", "tags"); | |
121 | + so.addVariable("distr", "true"); | |
122 | + so.addVariable("tspeed", "100"); | |
123 | + so.addVariable("tagcloud", "<tags>"+tagsFlash+"</tags>"); | |
124 | + so.write("resultado"); | |
102 | 125 | } |
103 | 126 | \ No newline at end of file | ... | ... |