disable multi-file aggregation creation options if the file is not at the root level
@@ -235,6 +235,17 @@ function updateSelectionMenuContext() {
var fileName = $(selected[i]).children(".fb-file-name").text();
var fileExt = fileName.substr(fileName.lastIndexOf(".") + 1, fileName.length);
var logicalFileType = $(selected[i]).children(".fb-logical-file-type").text();
+ var currentPath = $("#hs-file-browser").attr("data-current-path");
+
+ if (currentPath !== "data/contents") {
+ // multi-file aggregation can only be created by selecting a file
+ // if the file is located at the root
+ flagDisableSetNetCDFFileType = true;
+ flagDisableSetGeoRasterFileType = true;
+ flagDisableSetGeoFeatureFileType = true;
+ flagDisableSetTimeseriesFileType = true;
+ }
+
if(logicalFileType != "") {
flagDisableSetGenericFileType = true;
}
