[Mapbender-commits] r9062 - trunk/mapbender/http/html
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Sep 8 08:34:59 PDT 2014
Author: armin11
Date: 2014-09-08 08:34:59 -0700 (Mon, 08 Sep 2014)
New Revision: 9062
Modified:
trunk/mapbender/http/html/mod_treefolderPlain.php
Log:
First changes to show download symbols in layertree
Modified: trunk/mapbender/http/html/mod_treefolderPlain.php
===================================================================
--- trunk/mapbender/http/html/mod_treefolderPlain.php 2014-09-08 15:34:50 UTC (rev 9061)
+++ trunk/mapbender/http/html/mod_treefolderPlain.php 2014-09-08 15:34:59 UTC (rev 9062)
@@ -37,6 +37,7 @@
msgObj.tooltipMoveSelectionUp = '<?php echo _mb("Moves the selection up");?>';
msgObj.tooltipMoveSelectionDown = '<?php echo _mb("Moves the selection down");?>';
msgObj.tooltipMetadata = '<?php echo _mb("Show metadata");?>';
+msgObj.tooltipDownload = '<?php echo _mb("Download dataset");?>';
if (typeof(localizetree) === 'undefined')localizetree = 'false';
@@ -197,6 +198,8 @@
redirectToMetadataUrl = true;
}
+if (typeof(datalink) === 'undefined')datalink = 'false';
+
var defaultMetadataUrl = '../php/mod_showMetadata.php?resource=layer&layout=tabs&';
if (redirectToMetadataUrl) {
defaultMetadataUrl += 'redirectToMetadataUrl=1';
@@ -819,6 +822,7 @@
controls='';
if(switchwms=='true')controls='<INPUT type="checkbox" title="' + msgObj.tooltipHandleWms + '" onclick="handleSelectedWMS(\''+parentNode+'|wms_'+ mb_mapObj[i].wms[ii].wms_id+'\');" />';
if(wmsbuttons == 'true'&&metadatalink == 'true')controls+='<a href="'+'javascript:openwindow(\''+ defaultMetadataUrl + '&id='+temp.layer_uid+'\');'+'"><img alt="'+msgObj.tooltipMetadata+'" title="'+msgObj.tooltipMetadata+'" src="'+imagedir+'/info.png" /></a>';
+ /*if(wmsbuttons == 'true'&&datalink == 'true' && mb_mapObj[i].wms[ii].objLayer[j].layer_dataurl_href != '')controls+='<a href="'+'javascript:openwindow(\''+ mb_mapObj[i].wms[ii].objLayer[j].layer_dataurl_href +'"><img alt="'+msgObj.tooltipDownload+'" title="'+msgObj.tooltipDownload+'" src="'+imagedir+'/gnome/document-save.png" /></a>';*/
addNode(parentNode,["wms_"+ mb_mapObj[i].wms[ii].wms_id,[temp.layer_currentTitle,((metadatalink=='true'&&wmsbuttons != 'true')?('javascript:openwindow(\"'+ defaultMetadataUrl + '&id='+temp.layer_uid+'\");'):"javascript:select("+i+","+ii+","+iii+");"),,,temp.layer_currentTitle,eval(c_menu),controls,[i,ii,iii]]],false,false,reverse=="true");
parentObj = parentNode+"|wms_"+ mb_mapObj[i].wms[ii].wms_id;
}
@@ -880,6 +884,9 @@
if(wmsbuttons == 'true'&&metadatalink == 'true'){
controls.push('<a href="javascript:openwindow(\''+ defaultMetadataUrl + '&id='+temp.layer_uid+'\');"><img alt="'+msgObj.tooltipMetadata+'" title="'+msgObj.tooltipMetadata+'" src="'+imagedir+'/info.png" /></a>');
}
+ if(wmsbuttons == 'true'&&datalink == 'true' && mb_mapObj[i].wms[ii].objLayer[j].gui_layer_dataurl_href != ''){
+ controls.push('<a href="'+'javascript:openwindow(\''+ mb_mapObj[i].wms[ii].objLayer[j].layer_dataurl_href +'\');"><img width="18" height="18" alt="'+msgObj.tooltipDownload+'" title="'+msgObj.tooltipDownload+'" src="'+imagedir+'/../gnome/document-save.png" /></a>');
+ }
var groupedImageStyle ='';
if (temp.has_childs == true){
groupedImageStyle ='closed_folder.png';
More information about the Mapbender_commits
mailing list