[Mapbender-commits] r9114 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Oct 28 07:00:02 PDT 2014
Author: armin11
Date: 2014-10-28 07:00:02 -0700 (Tue, 28 Oct 2014)
New Revision: 9114
Modified:
trunk/mapbender/http/javascripts/mb_downloadFeedClient.php
Log:
Enhancement for handling transferSize of ISO19139
Modified: trunk/mapbender/http/javascripts/mb_downloadFeedClient.php
===================================================================
--- trunk/mapbender/http/javascripts/mb_downloadFeedClient.php 2014-10-28 13:58:59 UTC (rev 9113)
+++ trunk/mapbender/http/javascripts/mb_downloadFeedClient.php 2014-10-28 14:00:02 UTC (rev 9114)
@@ -257,7 +257,11 @@
//show simple link foreach part
//$("#download_link").remove();
//show Downloadlink
- downloadLink = "<li><a value='download_link_"+i+"' href='"+featureCollection.features[k].properties.link[i]['@attributes'].href+"' title='"+featureCollection.features[k].properties.link[i]['@attributes'].title+"'>"+featureCollection.features[k].properties.link[i]['@attributes'].title+"</li>";
+ if (featureCollection.features[k].properties.link[i]['@attributes'].length == '' || featureCollection.features[k].properties.link[i]['@attributes'].length === undefined) {
+ downloadLink = "<li><a value='download_link_"+i+"' href='"+featureCollection.features[k].properties.link[i]['@attributes'].href+"' title='"+featureCollection.features[k].properties.link[i]['@attributes'].title+"'>"+featureCollection.features[k].properties.link[i]['@attributes'].title+"</li>";
+ } else {
+ downloadLink = "<li><a value='download_link_"+i+"' href='"+featureCollection.features[k].properties.link[i]['@attributes'].href+"' title='"+featureCollection.features[k].properties.link[i]['@attributes'].title+"'>"+featureCollection.features[k].properties.link[i]['@attributes'].title+" - (~"+featureCollection.features[k].properties.link[i]['@attributes'].length / 1000000 +" MB)"+"</li>";
+ }
//append link
$('#download_link_list').append(downloadLink);
//selectFOptions = selectFOptions+"<option value='"+i+"' url='"+featureCollection.features[k].properties.link[i]['@attributes'].href+"' title='"+featureCollection.features[k].properties.link[i]['@attributes'].title+"' onclick='window.open(\""+featureCollection.features[k].properties.link[i]['@attributes'].href+"\");'>"+featureCollection.features[k].properties.link[i]['@attributes'].title+"</option>";
@@ -308,7 +312,11 @@
downloadLink = $(document.createElement('a')).appendTo('#section_list');
downloadLink.attr({'href':url});
downloadLink.attr({'id':'download_link'});
- downloadLink.text(feature.attributes.title);
+ if (feature.attributes.length == '' || feature.attributes.length === undefined) {
+ downloadLink.text(feature.attributes.title);
+ } else {
+ downloadLink.text(feature.attributes.title+" - (~"+feature.attributes.length / 1000000+" MB)");
+ }
//$('#section_option option').removeAttr('selected')
//$("#section_option option[value='"+id+"']").attr('selected',true);
//window.open(url,'download_window');
More information about the Mapbender_commits
mailing list