changeset 140:c0551ecb0509

polygon-Layers
author fknauft
date Thu, 03 Feb 2011 12:14:34 +0100
parents c570e374935e
children 97cb016e29ec
files gis_gui/blocks/layer.html.pt gis_gui/blocks/layer.js
diffstat 2 files changed, 6 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/gis_gui/blocks/layer.html.pt	Thu Feb 03 11:46:43 2011 +0100
+++ b/gis_gui/blocks/layer.html.pt	Thu Feb 03 12:14:34 2011 +0100
@@ -39,7 +39,7 @@
 	    <tr> <th> Position </th> <td> <select class="layer_position_select"><option>None</option></select> </td> </tr>
         <tr> <th> Label </th> <td> <select class="layer_label_select"><option>None</option></select> </td> </tr>
 	    <tr> <th> Size </th> <td> <select class="layer_size_select"><option>None</option></select></td> </tr>
-	    <tr> <th> Color </th> <td> <select class="layer_color_select"><option>None</option><option>blue</option><option>green</option><option>black</option><option>violett</option><option>red</option></select></td> </tr>
+	    <tr> <th> Color </th> <td> <select class="layer_color_select"><option>red</option><option>green</option><option>black</option><option>violett</option><option>blue</option></select></td> </tr>
 	    <tr> <th> Geometry </th> <td> <select class="layer_geom_select"><option>point</option><option>poly</option><option>line</option></select></td> </tr>
 	    <tr> <th> Shape </th> <td> <select class="layer_shape_select"><option>None</option></select> </td> </tr>
 	    <tr> <td colspan="2"> <input class="layer_line_checkbox" type="checkbox"/> connect markers with a line </td></tr>
--- a/gis_gui/blocks/layer.js	Thu Feb 03 11:46:43 2011 +0100
+++ b/gis_gui/blocks/layer.js	Thu Feb 03 12:14:34 2011 +0100
@@ -36,37 +36,11 @@
                     } 
                     $(this).find("option").filter(function(){return $(this).text() == params.size_field;}).attr("selected","true");
                 });
-        
-        aaaatest.load("../db/RESTdb/db/public/"+tablename+"?format=HTML&type=schema_table_rows&layout=select&element_id=rows #rows *",
-                function() {
-            $(this).find("option:first").before('<option>Default</option>');
-            if (!params.size_field) {
-                params.size_field = "Default";
-            } 
-            $(this).find("option").filter(function(){return $(this).text() == params.size_field;}).attr("selected","true");
-        });
-        
-        
-        
-        
-        $(be).find(".layer_geom_select").load(['point','poly','line'],
-        		function() {
-            $(this).find("option:first").before('<option>Default</option>');
-            if (!params.geom_field) {
-                params.geom_field = "Default";
-            } 
-            $(this).find("option").filter(function(){return $(this).text() == params.geom_field;}).attr("selected","true");
-        });
+                
+        $(be).find(".layer_geom_select").attr("element","<select id='geom'><option>point</option><option>poly</option><option>line</option></select>");
 
-        $(be).find(".layer_color_select").load(['red','blue','black','green','violett'],
-                function() {
-                    $(this).find("option:first").before('<option>Default</option>');
-                    if (!params.color_field) {
-                        params.color_field = "Default";
-                    } 
-                    $(this).find("option").filter(function(){return $(this).text() == params.color_field;}).attr("selected","true");
-                });
-        
+        $(be).find(".layer_color_select").attr("element","<select id='color'><option>red</option><option>blue</option><option>black</option><option>green</option><option>violett</option></select>");
+         
         $(be).find(".layer_shape_select").load("../db/RESTdb/db/public/"+tablename+"?format=HTML&type=schema_table_rows&layout=select&element_id=rows #rows *",
                 function() {
                     $(this).find("option:first").before('<option>Default</option>');
@@ -147,7 +121,7 @@
         paramstr += "&connect_line="+params.connect_line;
     }
     var layerurl = "../db/RESTdb/db/public/" + escape(params.table) + "?" + paramstr;
-    alert(layerurl);
+    //alert(layerurl);
     jQuery.get(layerurl, function(data, textStatus, XMLHttpRequest) {
         // function after load kml url finished
         console.debug("kml url loaded! this=", this, " data=", data, " ("+typeof(data)+")");