From 0c3bf09d4baa0010f35c01cb27d1d0bb9e2e5ec2 Mon Sep 17 00:00:00 2001 From: Rushiraj Nenuji Date: Mon, 6 Aug 2018 15:47:56 -0700 Subject: [PATCH] Removing displayMetricsWell flag from the metrics display view Removing displayMetricsWell flag from the metrics display view. - Now the metrics display can be turned on only with a single flag - displayDatasetMetrics --- src/js/models/AppModel.js | 6 ++---- src/js/themes/arctic/models/AppModel.js | 6 ++---- src/js/themes/dataone/models/AppModel.js | 6 ++---- src/js/themes/knb/models/AppModel.js | 6 ++---- src/js/views/MetadataView.js | 6 +----- 5 files changed, 9 insertions(+), 21 deletions(-) diff --git a/src/js/models/AppModel.js b/src/js/models/AppModel.js index 3c73ca86b..f35d43511 100644 --- a/src/js/models/AppModel.js +++ b/src/js/models/AppModel.js @@ -98,15 +98,13 @@ define(['jquery', 'underscore', 'backbone'], // Metrics endpoint url metricsUrl: null, - + // Metrics flags for the Dataset Landing Page // Enable these flags to enable metrics display - displayMetricWell: true, displayDatasetMetrics: true, // Controlling individual functionality - // Only works if the parent flags: - // displayDatasetMetrics and displayMetricWell are enabled + // Only works if the parent flags displayDatasetMetrics is enabled displayDatasetMetricsTooltip: true, displayDatasetCitationMetric: true, displayDatasetDownloadMetric: true, diff --git a/src/js/themes/arctic/models/AppModel.js b/src/js/themes/arctic/models/AppModel.js index 0b3b257a5..8b54e86ae 100644 --- a/src/js/themes/arctic/models/AppModel.js +++ b/src/js/themes/arctic/models/AppModel.js @@ -104,15 +104,13 @@ define(['jquery', 'underscore', 'backbone'], // Metrics endpoint url metricsUrl: null, - + // Metrics flags for the Dataset Landing Page // Enable these flags to enable metrics display - displayMetricWell: true, displayDatasetMetrics: true, // Controlling individual functionality - // Only works if the parent flags: - // displayDatasetMetrics and displayMetricWell are enabled + // Only works if the parent flags displayDatasetMetrics is enabled displayDatasetMetricsTooltip: true, displayDatasetCitationMetric: true, displayDatasetDownloadMetric: true, diff --git a/src/js/themes/dataone/models/AppModel.js b/src/js/themes/dataone/models/AppModel.js index 9157cf59f..06c04db64 100644 --- a/src/js/themes/dataone/models/AppModel.js +++ b/src/js/themes/dataone/models/AppModel.js @@ -75,15 +75,13 @@ define(['jquery', 'underscore', 'backbone'], // Metrics endpoint url metricsUrl: null, - + // Metrics flags for the Dataset Landing Page // Enable these flags to enable metrics display - displayMetricWell: true, displayDatasetMetrics: true, // Controlling individual functionality - // Only works if the parent flags: - // displayDatasetMetrics and displayMetricWell are enabled + // Only works if the parent flags displayDatasetMetrics is enabled displayDatasetMetricsTooltip: true, displayDatasetCitationMetric: true, displayDatasetDownloadMetric: true, diff --git a/src/js/themes/knb/models/AppModel.js b/src/js/themes/knb/models/AppModel.js index cc3a816f8..6429f93c9 100644 --- a/src/js/themes/knb/models/AppModel.js +++ b/src/js/themes/knb/models/AppModel.js @@ -108,15 +108,13 @@ define(['jquery', 'underscore', 'backbone'], // Metrics endpoint url metricsUrl: null, - + // Metrics flags for the Dataset Landing Page // Enable these flags to enable metrics display - displayMetricWell: true, displayDatasetMetrics: true, // Controlling individual functionality - // Only works if the parent flags: - // displayDatasetMetrics and displayMetricWell are enabled + // Only works if the parent flags displayDatasetMetrics is enabled displayDatasetMetricsTooltip: true, displayDatasetCitationMetric: true, displayDatasetDownloadMetric: true, diff --git a/src/js/views/MetadataView.js b/src/js/views/MetadataView.js index f526a0d18..630cbcd25 100644 --- a/src/js/views/MetadataView.js +++ b/src/js/views/MetadataView.js @@ -1031,11 +1031,7 @@ define(['jquery', // Retreive the model from the server for the given PID // TODO: Create a Metric Request Object - if (MetacatUI.appModel.get("displayMetricWell")) { - var metrics = $(document.createElement("div")).addClass("metric-well well well-lg"); - } else { - var metrics = $(document.createElement("div")).addClass("metric-well"); - } + var metrics = $(document.createElement("div")).addClass("metric-well well well-lg"); if (MetacatUI.appModel.get("displayDatasetMetrics")) { var buttonToolbar = $(document.createElement("div")).addClass("metric-toolbar btn-toolbar");