Skip to content

Commit

Permalink
Removing displayMetricsWell flag from the metrics display view
Browse files Browse the repository at this point in the history
Removing displayMetricsWell flag from the metrics display view.
- Now the metrics display can be turned on only with a single flag - displayDatasetMetrics
  • Loading branch information
rushirajnenuji committed Aug 6, 2018
1 parent eb105c1 commit 0c3bf09
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 21 deletions.
6 changes: 2 additions & 4 deletions src/js/models/AppModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 2 additions & 4 deletions src/js/themes/arctic/models/AppModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 2 additions & 4 deletions src/js/themes/dataone/models/AppModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 2 additions & 4 deletions src/js/themes/knb/models/AppModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 1 addition & 5 deletions src/js/views/MetadataView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 0c3bf09

Please sign in to comment.