diff gis_gui/lib/blocks.js @ 248:fcb7876178d1

Reload-Button
author fknauft
date Fri, 16 Sep 2011 10:59:10 +0200
parents 825a92d0ab10
children d6c7bedf4370
line wrap: on
line diff
--- a/gis_gui/lib/blocks.js	Wed Sep 14 10:56:00 2011 +0200
+++ b/gis_gui/lib/blocks.js	Fri Sep 16 10:59:10 2011 +0200
@@ -168,4 +168,27 @@
 	segment.fadeOut(function(){ segment.remove();});
       });
 
+    // TitleBar Reload
+    $("div.block div.titlebar div.reload_button").live("click", function(e){
+	segment = $(this).parents().filter("div.block");
+	console.debug("guiBlocks_init().live(reload) segment[0].id="+ segment[0].id);
+	//FJK: funktioniert leider noch nicht!
+//	var blockid=$(this).parents().firstElementChild.id;
+//	var mapblock=getBlock(blockid);
+//	var params=mapblock.readMapParams();
+//	var be = mapblock.element;
+	//var mapblock = $(be).find(".map_box");
+//	console.debug("guiBlocks_init().live(reload) params="+ new String(params));
+//	mapblock.updateMap(be,params);
+      });
+
 }
+
+function getBlock(id){
+    for (b in this.blocks) {
+		if (b.id == id) {
+		    return b;
+		}
+	    }
+	    return null;	
+}
\ No newline at end of file