changeset 248:fcb7876178d1

Reload-Button
author fknauft
date Fri, 16 Sep 2011 10:59:10 +0200
parents 47bba001d718
children bba7dd7b6b4c
files gis_gui/blocks/map.html.pt gis_gui/blocks/template.pt gis_gui/icons/reload.jpg gis_gui/icons/reload.png gis_gui/lib/blocks.css gis_gui/lib/blocks.js gis_gui/lib/clickmenu.css
diffstat 7 files changed, 55 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/gis_gui/blocks/map.html.pt	Wed Sep 14 10:56:00 2011 +0200
+++ b/gis_gui/blocks/map.html.pt	Fri Sep 16 10:59:10 2011 +0200
@@ -3,14 +3,13 @@
 
 
     <tal:block metal:fill-slot="icon"> M </tal:block>
-    <tal:block metal:fill-slot="title"> Map </tal:block>
+    <tal:block metal:fill-slot="title"> Multi-layer Map </tal:block>
 
 
     <tal:block metal:fill-slot="menu">
-      <ul id="account_menu">
-        <li>Save</li>
-        <li>Open</li>
-      </ul>
+       <ul id="account_menu">
+        <li onclick="">Save</li>
+        <li onclick="">Open</li>
     </tal:block>
 
     <tal:block metal:fill-slot="content">
@@ -36,15 +35,16 @@
       <div class="map_box">[loading...]</div>
 
       <div class="mapping_info">
-      <h3>Map</h3>
       <table>
         <tr>
           <th>Map name</th>
           <td><input type="text" class="map_name" tal:attributes="value string:${layer}_map1" /></td>
         </tr>
       </table>
-
-      <h3>Layers</h3>
+      <p><input type="button" class="map_save_button" value="Save map" /></p>
+      <br>
+      
+      <h4>Layers</h4>
       <table width="100%" class="map_layer_table">
         <tr class="map_layer_header">
           <th>show</th>
@@ -54,10 +54,8 @@
       <p><input type="button" class="layer_add_button" value="Add layer" /></p>
       
       <p><input type="button" class="map_update_button" value="Update map" /><br />
-         <input type="button" class="map_reload_button" value="Reload map" /><br /> </p>
        <!--    <input type="button" class="map_newwindow_button" value="Open map in new Window" /></p>
         --> 
-      <p><input type="button" class="map_save_button" value="Save map" /></p>
       </div>
 
       </div>
--- a/gis_gui/blocks/template.pt	Wed Sep 14 10:56:00 2011 +0200
+++ b/gis_gui/blocks/template.pt	Fri Sep 16 10:59:10 2011 +0200
@@ -9,6 +9,8 @@
       </h1>
       <tal:block tal:condition="python:impermanent=='true'">
       	<div class="close_button"> x </div>
+      	<!-- FJK: das soll ein Reload-Button werden -->
+      	<!--  <div class="reload_button" ><img src="./icons/reload.png" alt="Reload" style="width: 20px;"></div> -->
       </tal:block>
       <div class="type_icon"> <tal:block metal:define-slot="icon"></tal:block> </div>
     </div>
Binary file gis_gui/icons/reload.jpg has changed
Binary file gis_gui/icons/reload.png has changed
--- a/gis_gui/lib/blocks.css	Wed Sep 14 10:56:00 2011 +0200
+++ b/gis_gui/lib/blocks.css	Fri Sep 16 10:59:10 2011 +0200
@@ -32,7 +32,7 @@
     padding: 2px;
 
     /*width: 800px;*/
-    height: 40px;
+    height: 30px;
     
     background-color:#bbbbff;
     text-align: center;
@@ -55,7 +55,7 @@
     margin-bottom:15px;
     padding:0px;
     background-color: #ccccff;
-    height:20px;
+    height:25px;
 }
 
 div.block div.body div.content {
@@ -98,7 +98,18 @@
     float:right;
     
     position:relative;
-    top:-40px;
+    top:-35px;
+    left:-20px;
+}
+
+div.reload_button {
+    border: 3px solid black;
+    width: 20px;
+    height:20px;
+    float:right;
+    
+    position:relative;
+    top:-35px;
     left:-20px;
 }
 
@@ -110,7 +121,7 @@
     float:left;
     
     position:relative;
-    top:-40px;
+    top:-35px;
     left:20px;
 }
 
--- 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
--- a/gis_gui/lib/clickmenu.css	Wed Sep 14 10:56:00 2011 +0200
+++ b/gis_gui/lib/clickmenu.css	Fri Sep 16 10:59:10 2011 +0200
@@ -28,7 +28,7 @@
 .clickMenu div.outerbox
 {
 	display: none;
-	min-width: 106px; /* firefox produces animation-flickering when the box is bigger than this :/ */
+	min-width: 106px; /* firefox produces animation-flickering when the box is bigger than 106px :/ */
 }
 .clickMenu div.inner
 {
@@ -90,7 +90,8 @@
 	bottom: 5px;
 	width: 5px;
 	height: 100%;
-	background: url(myshadow.png) no-repeat right top;
+	background-color: #aad;
+	/* background: url(myshadow.png) no-repeat right top; */
 }
 html>body div.shadowbox2
 {
@@ -99,7 +100,8 @@
 	right: 5px;
 	height: 5px;
 	width: 100%;
-	background: url(myshadow.png) left bottom;
+	background-color: #aad;
+	/* background: url(myshadow.png) left bottom; */
 }
 html>body div.shadowbox3
 {
@@ -108,7 +110,8 @@
 	right: 0;
 	height: 5px;
 	width: 5px;
-	background: url(myshadow.png) no-repeat right bottom;
+	background-color: #aad;
+	/* background: url(myshadow.png) no-repeat right bottom; */
 }
 html>body .innerbox
 {