From 0159e31f8d528aab84f6705607f79942d22669b8 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Tue, 6 Apr 2010 13:55:49 +0000 Subject: [PATCH] inclusão de opção de seleção por clique na ferramenta linha do tempo --- classesphp/graficos.php | 6 +++--- ferramentas/linhadotempo/index.php | 49 +++++++++++++++++++++++++++---------------------- menutemas/admin.db | Bin 65536 -> 0 bytes pacotes/simile/timeline_2.3.0/timeline_js/timeline-bundle.js | 41 ++++++++++++++++++++++++++++++----------- 4 files changed, 60 insertions(+), 36 deletions(-) diff --git a/classesphp/graficos.php b/classesphp/graficos.php index e53b033..04e20f9 100644 --- a/classesphp/graficos.php +++ b/classesphp/graficos.php @@ -514,7 +514,7 @@ function dadosLinhaDoTempo($map_file,$tema) $eventos[] = array( 'start'=>$dado[$iteminicio], 'end'=>$fim, - 'title'=>"".$titulo."", + 'title'=>"".$titulo."", 'description'=>$dado[$iteminicio]." ".$fim."
".$desc, 'icon'=>$icone, 'image'=>$image, @@ -525,8 +525,8 @@ function dadosLinhaDoTempo($map_file,$tema) //echo "
";
 	return array(
 		"dateTimeFormat"=>$layer->getmetadata("ltempoformatodata"),
-		"wikiURL"=>"http://simile.mit.edu/shelf/",
-		"wikiSection"=>"Simile Cubism Timeline",		
+		"wikiURL"=>"",
+		"wikiSection"=>"",		
 		"events"=>$eventos
 	);
 }
diff --git a/ferramentas/linhadotempo/index.php b/ferramentas/linhadotempo/index.php
index 421eca1..e9394e7 100644
--- a/ferramentas/linhadotempo/index.php
+++ b/ferramentas/linhadotempo/index.php
@@ -122,34 +122,39 @@ function tituloover(wkt){
 		if(!window.parent.i3GEO.calculo){return;}
 	}
 	catch(e){if(typeof(console) !== 'undefined'){console.error(e);};return;}
-	var ext = i3GEO.util.wkt2ext(wkt,"point");
-	if(ext == false){alert("wkt invalido");return;}	
-	var ext = ext.split(" ");
-	var xMin = ext[0];
-	var xMax = ext[2];
-	var yMin = ext[1];
-	var yMax = ext[3];
 
-	var xyMin = window.parent.i3GEO.calculo.dd2tela(xMin,yMin,window.parent.document.getElementById("img"),window.parent.i3GEO.parametros.mapexten,window.parent.i3GEO.parametros.pixelsize)
-	var xyMax = window.parent.i3GEO.calculo.dd2tela(xMax,yMax,window.parent.document.getElementById("img"),window.parent.i3GEO.parametros.mapexten,window.parent.i3GEO.parametros.pixelsize)
+	re = new RegExp("POINT", "g");
+	wkt = wkt.replace(re,"");
+	wkt = wkt.split("(")[1].split(")")[0];
+	wkt = wkt.split(" ");
+
+	var xy = window.parent.i3GEO.calculo.dd2tela(wkt[0],wkt[1],window.parent.document.getElementById("img"),window.parent.i3GEO.parametros.mapexten,window.parent.i3GEO.parametros.pixelsize)
 
-	/*
-	window.parent.i3GEO.util.criaBox("boxg");
-	var box = window.parent.$i("boxg");
-	var w = xyMax[0]-xyMin[0];
-	var h = xyMin[1]-xyMax[1];
-	box.style.display = "block";
-	box.style.width = w;
-	box.style.height = h;
-	box.style.top = xyMax[1]+"px";
-	box.style.left = xyMin[0]+"px";
-	*/
 	window.parent.i3GEO.util.criaPin('marcaIdentifica',window.parent.i3GEO.configura.locaplic+"/imagens/marker.png","21px","25px");
 	var i = window.parent.document.getElementById('marcaIdentifica')
-	i.style.top = xyMax[1]-15+"px";
-	i.style.left = xyMin[0]-2+"px";
+	i.style.top = xy[1]-25+"px";
+	i.style.left = xy[0]-10+"px";
 	i.style.display = "block"
 }
+function tituloclique(wkt){
+	try{
+		if(!window.parent){return;}
+		if(!window.parent.i3GEO){return;}
+		if(!window.parent.i3GEO.calculo){return;}
+	}
+	catch(e){if(typeof(console) !== 'undefined'){console.error(e);};return;}
+	re = new RegExp("POINT", "g");
+	wkt = wkt.replace(re,"");
+	wkt = wkt.split("(")[1].split(")")[0];
+	wkt = wkt.split(" ");
+	var retorna = function(retorno)
+	{window.parent.i3GEO.atualiza(retorno);};
+	
+	window.parent.i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));
+	window.parent.i3GEO.php.selecaopt(retorna,$i("tema").value,wkt[0]+" "+wkt[1],"adiciona",0);
+
+}
+
 function tituloout(){
 	window.parent.i3GEO.util.escondePin();
 }
diff --git a/menutemas/admin.db b/menutemas/admin.db
index 52ba693..d6ad457 100644
Binary files a/menutemas/admin.db and b/menutemas/admin.db differ
diff --git a/pacotes/simile/timeline_2.3.0/timeline_js/timeline-bundle.js b/pacotes/simile/timeline_2.3.0/timeline_js/timeline-bundle.js
index a8c0ac8..56a7978 100644
--- a/pacotes/simile/timeline_2.3.0/timeline_js/timeline-bundle.js
+++ b/pacotes/simile/timeline_2.3.0/timeline_js/timeline-bundle.js
@@ -2466,6 +2466,8 @@ if(C==null||C.length==0){C=this.getText();
 }if(C==null||C.length==0){return ;
 }D.style.display="inline";
 C=C.replace(/\s/g,"_");
+/*
+modificado por edmar moretti para o i3geo
 var B=this._wikiURL+this._wikiSection.replace(/\s/g,"_")+"/"+C;
 var A=document.createElement("a");
 A.href=B;
@@ -2474,17 +2476,34 @@ A.innerHTML=Timeline.strings[Timeline.clientLocale].wikiLinkLabel;
 D.appendChild(document.createTextNode("["));
 D.appendChild(A);
 D.appendChild(document.createTextNode("]"));
-},fillTime:function(A,B){if(this._instant){if(this.isImprecise()){A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._start)));
-A.appendChild(A.ownerDocument.createElement("br"));
-A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._end)));
-}else{A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._start)));
-}}else{if(this.isImprecise()){A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._start)+" ~ "+B.labelPrecise(this._latestStart)));
-A.appendChild(A.ownerDocument.createElement("br"));
-A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._earliestEnd)+" ~ "+B.labelPrecise(this._end)));
-}else{A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._start)));
-A.appendChild(A.ownerDocument.createElement("br"));
-A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._end)));
-}}},fillInfoBubble:function(A,E,M){var K=A.ownerDocument;
+*/
+},
+fillTime:function(A,B){
+	/*
+	if(this._instant){
+		if(this.isImprecise()){
+			A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._start)));
+			A.appendChild(A.ownerDocument.createElement("br"));
+			A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._end)));
+		}
+		else{
+			A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._start)));
+		}
+	}else{
+		if(this.isImprecise()){
+			A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._start)+" ~ "+B.labelPrecise(this._latestStart)));
+			A.appendChild(A.ownerDocument.createElement("br"));
+			A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._earliestEnd)+" ~ "+B.labelPrecise(this._end)));
+		}
+		else{
+			A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._start)));
+			A.appendChild(A.ownerDocument.createElement("br"));
+			A.appendChild(A.ownerDocument.createTextNode(B.labelPrecise(this._end)));
+		}
+	}
+	*/
+},
+fillInfoBubble:function(A,E,M){var K=A.ownerDocument;
 var J=this.getText();
 var H=this.getLink();
 var B=this.getImage();
--
libgit2 0.21.2