# HG changeset patch # User fknauft # Date 1296730003 -3600 # Node ID c570e374935eabf28499b3c2acbd2628316c8c65 # Parent 771e7b3af615009c5c4952f619fa5d28b3c8a24b polygon-Layers diff -r 771e7b3af615 -r c570e374935e gis_gui/blocks/layer.js --- a/gis_gui/blocks/layer.js Thu Feb 03 11:02:24 2011 +0100 +++ b/gis_gui/blocks/layer.js Thu Feb 03 11:46:43 2011 +0100 @@ -36,16 +36,37 @@ } $(this).find("option").filter(function(){return $(this).text() == params.size_field;}).attr("selected","true"); }); - $(be).find(".layer_geom_select"); - $(be).find(".layer_color_select"); - // $(be).find(".layer_color_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(''); - // if (!params.color_field) { - // params.color_field = "Default"; - // } - // $(this).find("option").filter(function(){return $(this).text() == params.color_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(''); + 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(''); + 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_color_select").load(['red','blue','black','green','violett'], + function() { + $(this).find("option:first").before(''); + 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_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('');