diff --git a/pom.xml b/pom.xml
index c25d1a430b5..60cd6217400 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1562,7 +1562,7 @@
yyyy-MM-dd'T'HH'\:'mm'\:'ssZ
${maven.build.timestamp}
..
- 1.7.9
+ 1.10.1
true
2.7
2.1.1
diff --git a/web-ui/src/main/resources/catalog/components/admin/harvester/HarvesterDirective.js b/web-ui/src/main/resources/catalog/components/admin/harvester/HarvesterDirective.js
index 280dd130619..223dcb65645 100644
--- a/web-ui/src/main/resources/catalog/components/admin/harvester/HarvesterDirective.js
+++ b/web-ui/src/main/resources/catalog/components/admin/harvester/HarvesterDirective.js
@@ -355,12 +355,12 @@
matches = [];
// regex used to determine if a string contains the substring `q`
- substrRegex = new RegExp(q, "i");
+ substringRegex = new RegExp(q, "i");
// iterate through the pool of strings and for any string that
// contains the substring `q`, add it to the `matches` array
$.each(strs, function (i, str) {
- if (substrRegex.test(str)) {
+ if (substringRegex.test(str)) {
matches.push(str);
}
});
diff --git a/web-ui/src/main/resources/catalog/components/catalog/CatalogService.js b/web-ui/src/main/resources/catalog/components/catalog/CatalogService.js
index b2e18536f02..496b676e9a4 100644
--- a/web-ui/src/main/resources/catalog/components/catalog/CatalogService.js
+++ b/web-ui/src/main/resources/catalog/components/catalog/CatalogService.js
@@ -369,7 +369,6 @@
lang: "lang?_content_type=json&",
removeThumbnail: "md.thumbnail.remove?_content_type=json&",
removeOnlinesrc: "resource.del.and.detach", // TODO: CHANGE
- suggest: "suggest",
selectionLayers: "selection.layers",
featureindexproxy: "../../index/features",
@@ -710,12 +709,14 @@
var mlObjs = angular.isArray(multilingualObjects)
? multilingualObjects
: [multilingualObjects];
- mlObjs.forEach(function (mlObj) {
- mlObj.default =
- mlObj["lang" + gnLangs.current] ||
- mlObj.default ||
- mlObj["lang" + this.mainLanguage];
- });
+ mlObjs.forEach(
+ function (mlObj) {
+ mlObj.default =
+ mlObj["lang" + gnLangs.current] ||
+ mlObj.default ||
+ mlObj["lang" + this.mainLanguage];
+ }.bind(this)
+ );
},
translateCodelists: function (index) {
var codelists = angular.isArray(index) ? index : [index];
@@ -734,7 +735,7 @@
for (var fieldName in index) {
var field = index[fieldName];
if (fieldName.endsWith("Object")) {
- this.translateMultilingualObjects(field);
+ this.translateMultilingualObjects.call(this, field);
index[fieldName.replace(/Object$/g, "")] = angular.isArray(field)
? field.map(function (mlObj) {
return mlObj.default;
@@ -745,16 +746,16 @@
} else if (fieldName === "allKeywords") {
Object.keys(field).forEach(
function (th) {
- this.translateMultilingualObjects(field[th].keywords);
+ this.translateMultilingualObjects.call(this, field[th].keywords);
}.bind(this)
);
} else if (
fieldName.match(/th_.*$/) !== null &&
fieldName.match(/.*(_tree|Number)$/) === null
) {
- this.translateMultilingualObjects(field);
+ this.translateMultilingualObjects.call(this, field);
} else if (typeof field === "object") {
- this.translateMultingualFields(field);
+ this.translateMultingualFields.call(this, field);
}
}
},
diff --git a/web-ui/src/main/resources/catalog/components/common/map/print/PrintMapDirective.js b/web-ui/src/main/resources/catalog/components/common/map/print/PrintMapDirective.js
index 1c9deec2324..6ea1b5d2a93 100644
--- a/web-ui/src/main/resources/catalog/components/common/map/print/PrintMapDirective.js
+++ b/web-ui/src/main/resources/catalog/components/common/map/print/PrintMapDirective.js
@@ -224,7 +224,7 @@
var encLegends = [];
var attributions = [];
var layers = $scope.map.getLayers();
- pdfLegendsToDownload = [];
+ var pdfLegendsToDownload = [];
var sortedZindexLayers = layers.getArray().sort(function (a, b) {
return a.getZIndex() > b.getZIndex();
diff --git a/web-ui/src/main/resources/catalog/components/common/ows/OWSService.js b/web-ui/src/main/resources/catalog/components/common/ows/OWSService.js
index d70aad5ccae..e9be099ea18 100644
--- a/web-ui/src/main/resources/catalog/components/common/ows/OWSService.js
+++ b/web-ui/src/main/resources/catalog/components/common/ows/OWSService.js
@@ -357,7 +357,7 @@
getWFSCapabilities: function (url, version) {
var defer = $q.defer();
if (url) {
- defaultVersion = "1.1.0";
+ var defaultVersion = "1.1.0";
version = version || defaultVersion;
url = mergeDefaultParams(url, {
request: "GetCapabilities",
@@ -396,7 +396,7 @@
getWCSCapabilities: function (url, version) {
var defer = $q.defer();
if (url) {
- defaultVersion = "1.1.0";
+ var defaultVersion = "1.1.0";
version = version || defaultVersion;
url = mergeDefaultParams(url, {
REQUEST: "GetCapabilities",
@@ -474,13 +474,13 @@
var layers = capObj.layers || capObj.Layer;
// Layer name may be a list of comma separated layers
- layerList = layerName.split(",");
+ var layerList = layerName.split(",");
var needles = new Array(layerList.length);
layersLoop: for (var j = 0; j < layerList.length; j++) {
var name = layerList[j];
//non namespaced lowercase name
- nameNoNamespace = this.getNameWithoutNamespace(name).toLowerCase();
+ var nameNoNamespace = this.getNameWithoutNamespace(name).toLowerCase();
capabilityLayers: for (var i = 0; i < layers.length; i++) {
//Add Info for Requests:
diff --git a/web-ui/src/main/resources/catalog/components/common/scrollspy/ScrollSpyDirective.js b/web-ui/src/main/resources/catalog/components/common/scrollspy/ScrollSpyDirective.js
index 9a40e0dfef6..3d356896f1c 100644
--- a/web-ui/src/main/resources/catalog/components/common/scrollspy/ScrollSpyDirective.js
+++ b/web-ui/src/main/resources/catalog/components/common/scrollspy/ScrollSpyDirective.js
@@ -140,7 +140,7 @@
scope.spyElems.pop();
}
- rootElement = $("#" + scope.id);
+ var rootElement = $("#" + scope.id);
// Get the number of fieldset above the current element
// to compute depth later.
diff --git a/web-ui/src/main/resources/catalog/components/edit/directoryentryselector/DirectoryEntrySelector.js b/web-ui/src/main/resources/catalog/components/edit/directoryentryselector/DirectoryEntrySelector.js
index 30e2afc2759..a872c3d2a8c 100644
--- a/web-ui/src/main/resources/catalog/components/edit/directoryentryselector/DirectoryEntrySelector.js
+++ b/web-ui/src/main/resources/catalog/components/edit/directoryentryselector/DirectoryEntrySelector.js
@@ -426,7 +426,7 @@
// $(id).tagsinput('add', keyword);
// });
- getRecordsAutocompleter = function (config) {
+ var getRecordsAutocompleter = function (config) {
var recordsAutocompleter = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.whitespace("title"),
queryTokenizer: Bloodhound.tokenizers.whitespace,
@@ -469,7 +469,7 @@
recordsAutocompleter.initialize();
return recordsAutocompleter;
};
- autocompleter = getRecordsAutocompleter({ max: 10 });
+ var autocompleter = getRecordsAutocompleter({ max: 10 });
// Init typeahead
field
@@ -558,7 +558,7 @@
urls.forEach(function (url, i) {
// local://srv/api/registries/entries/af8a36bb-ecea-4880-bf83-26b691e7570e?
// transformation=contact-from-iso19139-to-foaf-agent&lang=eng,fre&schema=dcat2
- uuid = url.replace(/.*entries\/(.*)\?.*/, "$1");
+ var uuid = url.replace(/.*entries\/(.*)\?.*/, "$1");
$http
.post(
"../api/search/records/_search",
diff --git a/web-ui/src/main/resources/catalog/components/edit/onlinesrc/OnlineSrcDirective.js b/web-ui/src/main/resources/catalog/components/edit/onlinesrc/OnlineSrcDirective.js
index 6817d94a0aa..7ced917fdfc 100644
--- a/web-ui/src/main/resources/catalog/components/edit/onlinesrc/OnlineSrcDirective.js
+++ b/web-ui/src/main/resources/catalog/components/edit/onlinesrc/OnlineSrcDirective.js
@@ -724,7 +724,7 @@
scope.generateThumbnail = function () {
//Added mandatory custom params here to avoid
//changing other printing services
- jsonSpec = angular.extend(scope.jsonSpec, {
+ var jsonSpec = angular.extend(scope.jsonSpec, {
hasNoTitle: true
});
@@ -867,8 +867,6 @@
} else {
return DEFAULT_CONFIG;
}
-
- return DEFAULT_CONFIG;
}
gnOnlinesrc.register("onlinesrc", function (linkToEditOrType) {
@@ -2124,7 +2122,7 @@
* Return the index or -1 if not present.
*/
var findObj = function (md) {
- for (i = 0; i < scope.selection.length; ++i) {
+ for (var i = 0; i < scope.selection.length; ++i) {
if (scope.selection[i].md === md) {
return i;
}
@@ -2172,7 +2170,7 @@
*/
scope.linkToResource = function () {
var uuids = [];
- for (i = 0; i < scope.selection.length; ++i) {
+ for (var i = 0; i < scope.selection.length; ++i) {
var obj = scope.selection[i],
parameter =
obj.md.uuid +
diff --git a/web-ui/src/main/resources/catalog/components/edit/suggestion/SuggestionDirective.js b/web-ui/src/main/resources/catalog/components/edit/suggestion/SuggestionDirective.js
index 1038456f560..660c2d15fac 100644
--- a/web-ui/src/main/resources/catalog/components/edit/suggestion/SuggestionDirective.js
+++ b/web-ui/src/main/resources/catalog/components/edit/suggestion/SuggestionDirective.js
@@ -158,7 +158,7 @@
scope.params = {};
scope.currentSuggestion = gnSuggestion.getCurrent();
scope.processParams = angular.fromJson(scope.currentSuggestion.params);
- for (key in scope.processParams) {
+ for (var key in scope.processParams) {
if (scope.processParams[key].type == "expression") {
scope.params[key] = $interpolate(scope.processParams[key].defaultValue)(
scope
diff --git a/web-ui/src/main/resources/catalog/components/history/GnHistoryDirective.js b/web-ui/src/main/resources/catalog/components/history/GnHistoryDirective.js
index f32931406c8..df5c81d2dbc 100644
--- a/web-ui/src/main/resources/catalog/components/history/GnHistoryDirective.js
+++ b/web-ui/src/main/resources/catalog/components/history/GnHistoryDirective.js
@@ -140,11 +140,11 @@
};
scope.restoreHistoryElement = function (statusId) {
- confirmMessage = $translate.instant("confirmRestore");
+ var confirmMessage = $translate.instant("confirmRestore");
if ($window.confirm(confirmMessage)) {
return gnRecordHistoryService.restoreHistoryElement(statusId).then(
function (r) {
- message = $translate.instant("recordRestored");
+ var message = $translate.instant("recordRestored");
scope.$emit("StatusUpdated", {
msg: message,
timeout: 0,
@@ -154,7 +154,7 @@
$window.location.reload();
},
function (response) {
- message = "";
+ var message = "";
if (response.status === 403) {
message = $translate.instant("notAllowedError");
} else if (response.status === 404) {
diff --git a/web-ui/src/main/resources/catalog/components/metadatamanager/EditorService.js b/web-ui/src/main/resources/catalog/components/metadatamanager/EditorService.js
index 90fb03c38c0..0fa3201f7d2 100644
--- a/web-ui/src/main/resources/catalog/components/metadatamanager/EditorService.js
+++ b/web-ui/src/main/resources/catalog/components/metadatamanager/EditorService.js
@@ -184,16 +184,6 @@
);
return defer.promise;
},
- /**
- * Save the metadata record currently in editing session.
- *
- * If refreshForm is true, then will also update the current form.
- * This is required while switching tab for example. Update the tab
- * value in the form and trigger save to update the view.
- */
- save: function (refreshForm, silent, terminate) {
- save(refreshForm, silent, terminate, false, false);
- },
/**
* Save the metadata record currently in editing session.
*
diff --git a/web-ui/src/main/resources/catalog/components/search/formfields/FormFieldsDirective.js b/web-ui/src/main/resources/catalog/components/search/formfields/FormFieldsDirective.js
index 299d6d1ff54..37a3e66fbdf 100644
--- a/web-ui/src/main/resources/catalog/components/search/formfields/FormFieldsDirective.js
+++ b/web-ui/src/main/resources/catalog/components/search/formfields/FormFieldsDirective.js
@@ -176,7 +176,7 @@
scope.$on("beforeSearchReset", function () {
field.typeahead("val", "");
stringValues = [];
- for (i = 0; i < prev.length; i++) {
+ for (var i = 0; i < prev.length; i++) {
$(element).tagsinput("remove", prev[i]);
}
prev = [];
diff --git a/web-ui/src/main/resources/catalog/components/search/mdview/mdviewService.js b/web-ui/src/main/resources/catalog/components/search/mdview/mdviewService.js
index 04838583f97..1e81301e08f 100644
--- a/web-ui/src/main/resources/catalog/components/search/mdview/mdviewService.js
+++ b/web-ui/src/main/resources/catalog/components/search/mdview/mdviewService.js
@@ -90,7 +90,7 @@
}
// Set the route only if not same as before
- formatter = gnSearchLocation.getFormatter();
+ var formatter = gnSearchLocation.getFormatter();
gnUtilityService.scrollTo();
@@ -341,7 +341,7 @@
var metadata = [];
metadata.push(new Metadata(r.data.hits.hits[i]));
- data = { metadata: metadata };
+ var data = { metadata: metadata };
//Keep the search results (gnMdViewObj.records)
// that.feedMd(0, undefined, data.metadata);
//and the trace of where in the search result we are
diff --git a/web-ui/src/main/resources/catalog/components/search/searchfiltertag/SearchFilterTagsDirective.js b/web-ui/src/main/resources/catalog/components/search/searchfiltertag/SearchFilterTagsDirective.js
index 7f4fcbd8d35..24fcd9e925f 100644
--- a/web-ui/src/main/resources/catalog/components/search/searchfiltertag/SearchFilterTagsDirective.js
+++ b/web-ui/src/main/resources/catalog/components/search/searchfiltertag/SearchFilterTagsDirective.js
@@ -269,7 +269,7 @@
};
scope.removeFilter = function (filter) {
- removeFacetElement = [];
+ var removeFacetElement = [];
removeFacetElement.push(filter.key);
var keys = Object.keys(filter.value);
if (angular.isObject(filter.value) && keys[0] != 0) {
diff --git a/web-ui/src/main/resources/catalog/components/search/searchmanager/SearchFormDirective.js b/web-ui/src/main/resources/catalog/components/search/searchmanager/SearchFormDirective.js
index 79a61720f57..8c34410690f 100644
--- a/web-ui/src/main/resources/catalog/components/search/searchmanager/SearchFormDirective.js
+++ b/web-ui/src/main/resources/catalog/components/search/searchmanager/SearchFormDirective.js
@@ -122,7 +122,7 @@
};
var cleanSearchParams = function (params) {
- for (v in params) {
+ for (var v in params) {
if (v !== "sortOrder" && params[v] == "") {
delete params[v];
}
diff --git a/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js b/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js
index 11330b04ca6..e9f912db0c1 100644
--- a/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js
+++ b/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js
@@ -806,6 +806,8 @@
// By default, such an attribute is identified in the form by
// the parent element id + '_' + attribute name
if (angular.isDefined(attrs.thesaurusConceptIdAttribute)) {
+ var input;
+
if (scope.templateField) {
scope.conceptIdElementName =
// In multilingual mode, the ref to the CharacterString is known using the id
diff --git a/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusService.js b/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusService.js
index fae0e4aca34..28030bcfadd 100644
--- a/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusService.js
+++ b/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusService.js
@@ -177,11 +177,11 @@
}
if (gnLangs.langs[currentUILang_3char]) {
- v = gnLangs.langs[currentUILang_3char];
+ var v = gnLangs.langs[currentUILang_3char];
if (!_.includes(result, v)) result.push(v);
}
if (currentUILang2_3char && gnLangs.langs[currentUILang2_3char]) {
- v = gnLangs.langs[currentUILang2_3char];
+ var v = gnLangs.langs[currentUILang2_3char];
if (!_.includes(result, v)) result.push(v);
}
return result;
diff --git a/web-ui/src/main/resources/catalog/components/usersearches/UserSearchesService.js b/web-ui/src/main/resources/catalog/components/usersearches/UserSearchesService.js
index 428f58115b0..dbfae5132f7 100644
--- a/web-ui/src/main/resources/catalog/components/usersearches/UserSearchesService.js
+++ b/web-ui/src/main/resources/catalog/components/usersearches/UserSearchesService.js
@@ -33,7 +33,7 @@
this.loadFeaturedUserSearches = function (type, withPortal) {
var deferred = $q.defer(),
usersearches = $http.get("../api/usersearches/featured?type=" + type);
- apiCalls = [usersearches];
+ var apiCalls = [usersearches];
if (withPortal) {
apiCalls.push($http.get("../api/sources/subportal"));
}
diff --git a/web-ui/src/main/resources/catalog/components/utility/UtilityDirective.js b/web-ui/src/main/resources/catalog/components/utility/UtilityDirective.js
index 8ad4d6483ea..c336b393038 100644
--- a/web-ui/src/main/resources/catalog/components/utility/UtilityDirective.js
+++ b/web-ui/src/main/resources/catalog/components/utility/UtilityDirective.js
@@ -484,7 +484,7 @@
function setDefault() {
var defaultThesaurus = attrs["default"];
- for (t in scope.regionTypes) {
+ for (var t in scope.regionTypes) {
if (scope.regionTypes[t].name === defaultThesaurus) {
scope.regionType = scope.regionTypes[t];
return;
@@ -729,7 +729,7 @@
link: function (scope, element, attrs) {
if (attrs["gnRegionType"]) {
gnRegionService.loadList().then(function (data) {
- for (i = 0; i < data.length; ++i) {
+ for (var i = 0; i < data.length; ++i) {
if (attrs["gnRegionType"] == data[i].name) {
scope.regionType = data[i];
}
diff --git a/web-ui/src/main/resources/catalog/components/viewer/draw/DrawDirective.js b/web-ui/src/main/resources/catalog/components/viewer/draw/DrawDirective.js
index 34eac7b47f4..c30b16f9f03 100644
--- a/web-ui/src/main/resources/catalog/components/viewer/draw/DrawDirective.js
+++ b/web-ui/src/main/resources/catalog/components/viewer/draw/DrawDirective.js
@@ -244,7 +244,7 @@
* @param {ol.Feature} feature
* @return {Object} serialized style
*/
- getStyleObjFromFeature = function (feature) {
+ var getStyleObjFromFeature = function (feature) {
var st = feature.get("_style");
var drawType = feature.get("_type");
if (angular.isFunction(st)) {
diff --git a/web-ui/src/main/resources/catalog/components/viewer/geometry/GeometryService.js b/web-ui/src/main/resources/catalog/components/viewer/geometry/GeometryService.js
index 5e0d1aa8a69..cc7d5059623 100644
--- a/web-ui/src/main/resources/catalog/components/viewer/geometry/GeometryService.js
+++ b/web-ui/src/main/resources/catalog/components/viewer/geometry/GeometryService.js
@@ -482,7 +482,7 @@
// Do not densify if shape does not appear to be an extent
if (geom.getType() !== "Polygon" || inCoords.length > 5) return;
for (var i = 0; i < inCoords.length - 1; i++) {
- var p0, p1, x0, y0, dX;
+ var p0, p1, x0, y0, dX, dY;
p0 = inCoords[i];
p1 = inCoords[i + 1];
x0 = p0[0];
diff --git a/web-ui/src/main/resources/catalog/components/viewer/gfi/FeaturesLoader.js b/web-ui/src/main/resources/catalog/components/viewer/gfi/FeaturesLoader.js
index 52f9949ffed..c9ca61926cf 100644
--- a/web-ui/src/main/resources/catalog/components/viewer/gfi/FeaturesLoader.js
+++ b/web-ui/src/main/resources/catalog/components/viewer/gfi/FeaturesLoader.js
@@ -210,8 +210,8 @@
var promises = [this.promise, this.dictionary];
return $q.all(promises).then(function (data) {
- features = data[0];
- dictionary = data[1];
+ var features = data[0];
+ var dictionary = data[1];
if (!features || features.length == 0) {
return;
diff --git a/web-ui/src/main/resources/catalog/components/viewer/layermanager/LayerManagerDirective.js b/web-ui/src/main/resources/catalog/components/viewer/layermanager/LayerManagerDirective.js
index 4d02bd7b1d5..11552ccd3dc 100644
--- a/web-ui/src/main/resources/catalog/components/viewer/layermanager/LayerManagerDirective.js
+++ b/web-ui/src/main/resources/catalog/components/viewer/layermanager/LayerManagerDirective.js
@@ -208,12 +208,12 @@
headers: new Headers(headerDict),
responseType: "blob"
};
- legendPromise = $http.get(urlGetLegend, requestOptions).then(
+ var legendPromise = $http.get(urlGetLegend, requestOptions).then(
function (response) {
var contentType = headers("content-type");
if (contentType.indexOf("image") === 0) {
// encode data to base 64 url
- fileReader = new FileReader();
+ var fileReader = new FileReader();
fileReader.onload = function () {
style.LegendURL[0].OnlineResource = fileReader.result;
layer.set("legend", fileReader.result);
@@ -296,7 +296,7 @@
var dimensionConfig = scope.layer.get(dimension);
if (dimensionConfig) {
var idx = dimensionConfig.values.length - 1;
- for (i = 0; i < dimensionConfig.values.length; i++) {
+ for (var i = 0; i < dimensionConfig.values.length; i++) {
if (dimensionConfig.values[i] === dimensionConfig.default) {
idx = i;
break;
diff --git a/web-ui/src/main/resources/catalog/components/viewer/measure/MeasureDirective.js b/web-ui/src/main/resources/catalog/components/viewer/measure/MeasureDirective.js
index b04d0d26118..ceb0209aa35 100644
--- a/web-ui/src/main/resources/catalog/components/viewer/measure/MeasureDirective.js
+++ b/web-ui/src/main/resources/catalog/components/viewer/measure/MeasureDirective.js
@@ -202,11 +202,11 @@
this.create = function (map, measureObj, scope) {
// taken from https://openlayers.org/en/v3.15.0/examples/measure.html
- getGeodesicLength = function (geometry) {
+ var getGeodesicLength = function (geometry) {
var sourceProj = map.getView().getProjection();
return formatLength(geometry, sourceProj);
};
- getGeodesicArea = function (geometry) {
+ var getGeodesicArea = function (geometry) {
var sourceProj = map.getView().getProjection();
return formatArea(geometry, sourceProj);
};
diff --git a/web-ui/src/main/resources/catalog/components/viewer/owscontext/OwsContextService.js b/web-ui/src/main/resources/catalog/components/viewer/owscontext/OwsContextService.js
index ebee3668e9f..8538da10cf5 100644
--- a/web-ui/src/main/resources/catalog/components/viewer/owscontext/OwsContextService.js
+++ b/web-ui/src/main/resources/catalog/components/viewer/owscontext/OwsContextService.js
@@ -236,7 +236,7 @@
layerAttributionArray = [];
for (var a = 0; a < layer.vendorExtension.attribution.length; a++) {
var attribution = layer.vendorExtension.attribution[a];
- layerAttribution = attribution.title;
+ var layerAttribution = attribution.title;
// If href exist then make the title a link
if (attribution.onlineResource && attribution.onlineResource[0].href) {
var link = document.createElement("a");
diff --git a/web-ui/src/main/resources/catalog/components/viewer/wfsfilter/WfsFilterDirective.js b/web-ui/src/main/resources/catalog/components/viewer/wfsfilter/WfsFilterDirective.js
index e53117490c2..742d41ae97f 100644
--- a/web-ui/src/main/resources/catalog/components/viewer/wfsfilter/WfsFilterDirective.js
+++ b/web-ui/src/main/resources/catalog/components/viewer/wfsfilter/WfsFilterDirective.js
@@ -592,7 +592,7 @@
scope.featuresInMapExtent = false;
- onMoveEnd = function (evt) {
+ var onMoveEnd = function (evt) {
var extent = scope.map.getView().calculateExtent(map.getSize());
var wgsExtent = ol.extent.applyTransform(
extent,
diff --git a/web-ui/src/main/resources/catalog/components/viewer/wps/WpsService.js b/web-ui/src/main/resources/catalog/components/viewer/wps/WpsService.js
index f9780ca4b74..9901d171f66 100644
--- a/web-ui/src/main/resources/catalog/components/viewer/wps/WpsService.js
+++ b/web-ui/src/main/resources/catalog/components/viewer/wps/WpsService.js
@@ -99,7 +99,7 @@
* requests are cancelled
*/
this.describeProcess = function (uri, processId, options) {
- url = gnOwsCapabilities.mergeDefaultParams(uri, {
+ var url = gnOwsCapabilities.mergeDefaultParams(uri, {
service: "WPS",
version: "1.0.0",
request: "DescribeProcess",
diff --git a/web-ui/src/main/resources/catalog/js/CatController.js b/web-ui/src/main/resources/catalog/js/CatController.js
index 527a6d0c6a0..1e6d4846fef 100644
--- a/web-ui/src/main/resources/catalog/js/CatController.js
+++ b/web-ui/src/main/resources/catalog/js/CatController.js
@@ -1367,7 +1367,7 @@
_.set(this.gnCfg, p, o);
}
if (runAllChecks) {
- optionInDefaultConfig = _.get(defaultConfig, p);
+ var optionInDefaultConfig = _.get(defaultConfig, p);
if (optionInDefaultConfig === undefined) {
console.warn(
"Path " +
@@ -1403,7 +1403,7 @@
option = _.get(config, p);
if (angular.isObject(option) && Object.keys(option).length === 0) {
var key = pathToken.pop();
- parent = _.get(config, pathToken.join("."));
+ var parent = _.get(config, pathToken.join("."));
delete parent[key];
}
}
@@ -1482,7 +1482,7 @@
return angular.isDefined(this.langs[lang]);
},
isValidIso2Lang: function (lang) {
- for (p in this.langs) {
+ for (var p in this.langs) {
if (this.langs[p] === lang) {
return true;
}
@@ -1493,7 +1493,7 @@
return this.langs[iso3lang] || "en";
},
getIso3Lang: function (iso2lang) {
- for (p in this.langs) {
+ for (var p in this.langs) {
if (this.langs[p] === iso2lang) {
return p;
}
@@ -1983,7 +1983,7 @@
.then(function (r) {
$scope.searchInfo = r.data;
var keys = Object.keys(gnGlobalSettings.gnCfg.mods.home.facetConfig);
- selectedFacet = keys[0];
+ var selectedFacet = keys[0];
for (var i = 0; i < keys.length; i++) {
if (
diff --git a/web-ui/src/main/resources/catalog/js/GnFormatterLib.js b/web-ui/src/main/resources/catalog/js/GnFormatterLib.js
index 08fc518ead2..417cf38096f 100644
--- a/web-ui/src/main/resources/catalog/js/GnFormatterLib.js
+++ b/web-ui/src/main/resources/catalog/js/GnFormatterLib.js
@@ -24,7 +24,7 @@
(function () {
goog.provide("gn_formatter_lib");
- gnFormatter = {};
+ var gnFormatter = {};
gnFormatter.formatterSectionTogglersEventHandler = function (e) {
var thisEl = $(e.currentTarget);
thisEl.toggleClass("closed");
@@ -198,7 +198,7 @@
};
gnFormatter.toggleTab = function (tabElementId) {
- tab = $('.view-outline [id="tab-' + tabElementId + '"] a[rel]');
+ var tab = $('.view-outline [id="tab-' + tabElementId + '"] a[rel]');
if (tab.length > 0) {
tab.click();
} else {
diff --git a/web-ui/src/main/resources/catalog/js/GnLandingPageLib.js b/web-ui/src/main/resources/catalog/js/GnLandingPageLib.js
index 6070af83a59..dcef85637e3 100644
--- a/web-ui/src/main/resources/catalog/js/GnLandingPageLib.js
+++ b/web-ui/src/main/resources/catalog/js/GnLandingPageLib.js
@@ -21,7 +21,7 @@
* Rome - Italy. email: geonetwork@osgeo.org
*/
(function () {
- gnLandingPage = {};
+ var gnLandingPage = {};
gnLandingPage.displayLanguage = function (lang, target) {
target.parentElement.parentElement.querySelectorAll("li").forEach(function (li) {
li.classList.remove("active");
diff --git a/web-ui/src/main/resources/catalog/js/GnSearchModule.js b/web-ui/src/main/resources/catalog/js/GnSearchModule.js
index 33d38ceea12..0e8e33f76d8 100644
--- a/web-ui/src/main/resources/catalog/js/GnSearchModule.js
+++ b/web-ui/src/main/resources/catalog/js/GnSearchModule.js
@@ -24,7 +24,6 @@
(function () {
goog.provide("gn_search");
- goog.require("gn_formatter_lib");
goog.require("gn_map_field_directive");
goog.require("gn_field_duration_directive");
goog.require("gn_mdactions");
diff --git a/web-ui/src/main/resources/catalog/js/admin/AdminController.js b/web-ui/src/main/resources/catalog/js/admin/AdminController.js
index 2a9580990e1..84429a89889 100644
--- a/web-ui/src/main/resources/catalog/js/admin/AdminController.js
+++ b/web-ui/src/main/resources/catalog/js/admin/AdminController.js
@@ -81,14 +81,14 @@
];
var irol = 0;
- for (i = 0; i < roles.length; i++) {
+ for (var i = 0; i < roles.length; i++) {
if (rol.toUpperCase() == roles[i].toUpperCase()) {
irol = i;
}
}
var iprofile = 0;
- for (i = 0; i < roles.length; i++) {
+ for (var i = 0; i < roles.length; i++) {
if (newProfile.toUpperCase() == roles[i].toUpperCase()) {
iprofile = i;
}
diff --git a/web-ui/src/main/resources/catalog/js/admin/AdminMetadataController.js b/web-ui/src/main/resources/catalog/js/admin/AdminMetadataController.js
index 68e2597d245..efb701b682a 100644
--- a/web-ui/src/main/resources/catalog/js/admin/AdminMetadataController.js
+++ b/web-ui/src/main/resources/catalog/js/admin/AdminMetadataController.js
@@ -140,7 +140,7 @@
}
}
- selectSchema = function (schema) {
+ var selectSchema = function (schema) {
var idx = $scope.selectedSchemas.indexOf(schema);
if (idx === -1) {
$scope.selectedSchemas.push(schema);
@@ -223,7 +223,7 @@
$scope.formatterFiles = [];
$scope.metadataId = "";
- loadFormatter = function () {
+ var loadFormatter = function () {
$scope.formatters = [];
$http.get("../api/formatters").then(
function (response) {
@@ -242,7 +242,7 @@
/**
* Callback when error uploading file.
*/
- loadFormatterError = function (e, data) {
+ var loadFormatterError = function (e, data) {
if (data.jqXHR.status === 201) {
loadFormatter();
return;
diff --git a/web-ui/src/main/resources/catalog/js/admin/HarvestSettingsController.js b/web-ui/src/main/resources/catalog/js/admin/HarvestSettingsController.js
index b7544f92efe..95a30bbf36a 100644
--- a/web-ui/src/main/resources/catalog/js/admin/HarvestSettingsController.js
+++ b/web-ui/src/main/resources/catalog/js/admin/HarvestSettingsController.js
@@ -135,7 +135,7 @@
}
}
if ($scope.harvesterSelected.bboxFilter) {
- s = $scope.harvesterSelected.bboxFilter;
+ var s = $scope.harvesterSelected.bboxFilter;
if ($scope.harvesterSelected.bboxFilter["bbox-xmin"]) {
bboxProperties.forEach(function (coordinate) {
s[coordinate] = parseFloat(s[coordinate]);
@@ -714,8 +714,8 @@
var i = 0;
var xmlDoc = $.parseXML(response.data);
var $xml = $(xmlDoc);
- $sources = $xml.find("uuid");
- $names = $xml.find("name");
+ var $sources = $xml.find("uuid");
+ var $names = $xml.find("name");
angular.forEach($sources, function (s) {
// FIXME: probably some issue on IE ?
diff --git a/web-ui/src/main/resources/catalog/js/admin/LogoSettingsController.js b/web-ui/src/main/resources/catalog/js/admin/LogoSettingsController.js
index b93b9606a48..751acede84e 100644
--- a/web-ui/src/main/resources/catalog/js/admin/LogoSettingsController.js
+++ b/web-ui/src/main/resources/catalog/js/admin/LogoSettingsController.js
@@ -45,7 +45,7 @@
/**
* Load list of logos
*/
- loadLogo = function () {
+ var loadLogo = function () {
$scope.logos = [];
$http.get("../api/logos").then(function (response) {
$scope.logos = response.data;
@@ -55,7 +55,7 @@
/**
* Callback when error uploading file.
*/
- loadLogoError = function (e, data) {
+ var loadLogoError = function (e, data) {
if (data.jqXHR.status !== 201) {
$rootScope.$broadcast("StatusUpdated", {
title: $translate.instant("logoUploadError"),
diff --git a/web-ui/src/main/resources/catalog/js/admin/ThesaurusController.js b/web-ui/src/main/resources/catalog/js/admin/ThesaurusController.js
index e3c09820d52..2897fa91b07 100644
--- a/web-ui/src/main/resources/catalog/js/admin/ThesaurusController.js
+++ b/web-ui/src/main/resources/catalog/js/admin/ThesaurusController.js
@@ -179,7 +179,7 @@
/**
* Search thesaurus keyword based on filter and max number
*/
- searchThesaurusKeyword = function () {
+ var searchThesaurusKeyword = function () {
$scope.searching = true;
if ($scope.thesaurusSelected) {
// list of ui languages; we want the keyword info in all these
@@ -445,7 +445,7 @@
* Thesaurus uploaded with success, close the modal,
* refresh the list.
*/
- uploadThesaurusDone = function (data) {
+ var uploadThesaurusDone = function (data) {
$scope.clear($scope.queue);
$scope.thesaurusUrl = "";
@@ -463,7 +463,7 @@
/**
* Thesaurus uploaded with error, broadcast it.
*/
- uploadThesaurusError = function (e, data) {
+ var uploadThesaurusError = function (e, data) {
var r = data.jqXHR || data;
if (r.status === 201) {
uploadThesaurusDone(data);
@@ -575,7 +575,7 @@
/**
* Search relation for each types for the current keyword
*/
- searchRelation = function (k) {
+ var searchRelation = function (k) {
$scope.keywordSelectedRelation = {};
$.each(relationTypes, function (index, value) {
$http
@@ -656,7 +656,7 @@
/**
* Build keyword POST body message
*/
- buildKeywordXML = function (keywordObject) {
+ var buildKeywordXML = function (keywordObject) {
var geoxml = $scope.isPlaceType()
? "" +
keywordObject.geo.west +
diff --git a/web-ui/src/main/resources/catalog/js/edit/BatchEditController.js b/web-ui/src/main/resources/catalog/js/edit/BatchEditController.js
index 9783dcc5a88..5429167526f 100644
--- a/web-ui/src/main/resources/catalog/js/edit/BatchEditController.js
+++ b/web-ui/src/main/resources/catalog/js/edit/BatchEditController.js
@@ -311,7 +311,6 @@
field: field,
insertMode: insertMode || field.insertMode,
xpath: xpath,
- condition: condition,
value: template && value !== "" ? template.replace("{{value}}", value) : value,
isXpath: isXpath || false,
condition: condition || ""
@@ -454,7 +453,6 @@
$scope.defaultCurrentXpath = {
field: "",
xpath: "",
- condition: "",
value: "",
insertMode: "gn_add",
condition: ""
diff --git a/web-ui/src/main/resources/catalog/js/edit/NewMetadataController.js b/web-ui/src/main/resources/catalog/js/edit/NewMetadataController.js
index 238337f2d93..9fe7f8ae126 100644
--- a/web-ui/src/main/resources/catalog/js/edit/NewMetadataController.js
+++ b/web-ui/src/main/resources/catalog/js/edit/NewMetadataController.js
@@ -293,7 +293,7 @@
} else {
metadataUuid = getSelectedMdIdentifierTemplate().template;
- for (key in $scope.mdIdentifierTemplateTokens) {
+ for (var key in $scope.mdIdentifierTemplateTokens) {
var labelKey = $scope.mdIdentifierTemplateTokens[key].label;
metadataUuid = metadataUuid.replace(
"{" + labelKey + "}",
@@ -359,7 +359,7 @@
$scope.updateMdIdentifierTemplateLabel = function () {
$scope.mdIdSelectedTemplateForLabel = getSelectedMdIdentifierTemplate().template;
- for (key in $scope.mdIdentifierTemplateTokens) {
+ for (var key in $scope.mdIdentifierTemplateTokens) {
if ($scope.mdIdentifierTemplateTokens[key].value) {
var labelKey = $scope.mdIdentifierTemplateTokens[key].label;
@@ -402,7 +402,7 @@
var fieldsFilled = true;
- for (key in $scope.mdIdentifierTemplateTokens) {
+ for (var key in $scope.mdIdentifierTemplateTokens) {
if (!$scope.mdIdentifierTemplateTokens[key].value) {
fieldsFilled = false;
break;
diff --git a/web/pom.xml b/web/pom.xml
index 67e4024e84a..4483f1d7991 100644
--- a/web/pom.xml
+++ b/web/pom.xml
@@ -1043,6 +1043,13 @@
ro.isdc.wro4j
wro4j-maven-plugin
${wro.version}
+
+
+ org.webjars.npm
+ glob
+ 7.1.1
+
+
wro4j-prebuild-cache
diff --git a/wro4j/pom.xml b/wro4j/pom.xml
index 44ecbd068d7..7d9ce53176a 100644
--- a/wro4j/pom.xml
+++ b/wro4j/pom.xml
@@ -60,6 +60,10 @@
org.webjars
handlebars
+
+ org.webjars.npm
+ cli
+
me.n4u.sass
sass-gems