});
};
+const showAlert = text => {
+ const alert = document.createElement('div');
+ alert.classList.add('alert', 'alert-warning');
+ alert.textContent = text;
+
+ const container = document.querySelector('.navigator-details');
+ container.insertBefore(alert, container.firstChild);
+};
+
const init = function () {
NavigatorApp.addRegions({ filtersRegion: '.navigator-filters' });
NavigatorApp.filterBarView.restoreFromQuery(window.queryParams);
}
key.setScope('list');
+
+ if (window.queryParams) {
+ const qualifiersFilter = window.queryParams.find(p => p.key === 'qualifiers[]');
+ const noQualifiers = !qualifiersFilter || !qualifiersFilter.value || !qualifiersFilter.value.length;
+
+ const baseFilter = window.queryParams.find(p => p.key === 'base');
+ const noBase = !baseFilter || !baseFilter.value || !baseFilter.value.length;
+
+ const favoritesFilter = window.queryParams.find(p => p.key === 'onFavourites');
+ const noFavorites = !favoritesFilter || !favoritesFilter.value;
+
+ if (noQualifiers && noBase && noFavorites) {
+ showAlert(translate('measures.select_components'));
+ }
+ }
};
NavigatorApp.on('start', function () {
#------------------------------------------------------------------------------
#
-# MEASURE FILTERS
+# MEASURES & MEASURE FILTERS
#
#------------------------------------------------------------------------------
+measures.select_components=Please select "Components", "Components of" or "Favorites only" filter to see results.
measure_filter.delete_column=Delete column
measure_filter.no_filters=No filters
measure_filter.display_as=Display as