[Mapbender-commits] r8484 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Sep 4 09:10:27 PDT 2012
Author: armin11
Date: 2012-09-04 09:10:26 -0700 (Tue, 04 Sep 2012)
New Revision: 8484
Modified:
trunk/mapbender/http/javascripts/mb_downloadFeedClient.js
Log:
small bugfix
Modified: trunk/mapbender/http/javascripts/mb_downloadFeedClient.js
===================================================================
--- trunk/mapbender/http/javascripts/mb_downloadFeedClient.js 2012-09-04 15:31:40 UTC (rev 8483)
+++ trunk/mapbender/http/javascripts/mb_downloadFeedClient.js 2012-09-04 16:10:26 UTC (rev 8484)
@@ -153,7 +153,6 @@
//iterate over all single features which can be identified with the entries of the inspire service feed
for(var i=0; i<featureCollection.features.length; ++i) {
//fill in first title, rights and abstract in fields
-//alert(featureCollection.features[i].properties.title);//$('#dataset_title').value = "";
if (i == id) {
$('#dataset_title').val(featureCollection.features[i].properties.title);
$('#dataset_rights').val(featureCollection.features[i].properties.rights);
@@ -167,9 +166,12 @@
selectOptions = selectOptions+"<option value='"+featureCollection.features[i].properties.datasetFeedLink+"' url='"+featureCollection.features[i].properties.datasetFeedLink+"' optionid='"+i+"'>"+featureCollection.features[i].properties.title+"</option>";
}
datasetSelect.append(selectOptions);
+ //preselect option
+ $("#dataset_select option[optionid='" + id + "']").attr("selected","selected");
$('#dataset_select').bind('change', function() {
var $this = $(this);
- optionSelected = $(this).find('option:selected').attr('optionid')
+ optionSelected = $(this).find('option:selected').attr('optionid');
+ //alert(optionSelected);
showDatasetList(featureCollection,optionSelected);
method = "getDatasetFeedObjectFromUrl";
data = $this.val();
@@ -197,20 +199,14 @@
//initialize options
var selectROptions = "";
//iterate over all possible representations, which are modeled as entries in the dataset feed (here features of the featureCollection)
- //alert(featureCollection.features.length);
for(var i=0; i<featureCollection.features.length; ++i) {
selectROptions = selectROptions+"<option value='"+i+"' url='"+featureCollection.features[i].properties.datasetFeedLink+"'>"+featureCollection.features[i].properties.title+"</option>";
}
datasetEntrySelect.append(selectROptions);
fillSectionList(featureCollection, id);
- //alert(id);
$('#dataset_representation_select').bind('change', function() {
var $this = $(this);
- //method = "getDatasetLinkFromUrl";
- //data = $this.val();
- //alert($this.val());
fillSectionList(featureCollection,$this.val());
- //callServer(data,method);
});
}
@@ -221,9 +217,6 @@
var selectFOptions = "";
//count number of links in representation
var numberOfLinks = featureCollection.features[k].properties.link.length;
- //alert("number of links: "+numberOfLinks+"for representation: "+k);
- //alert(featureCollection.features[0].properties.entry[0].title);
- //alert("number of links: "+numberOfLinks);
if (numberOfLinks >= 1 || numberOfLinks === undefined) {
//show list
$("#representation_select").css("display","block");
More information about the Mapbender_commits
mailing list