Skip to content

Commit

Permalink
CSS Changes for the metrics-well. Keeping themes consistenet
Browse files Browse the repository at this point in the history
Reference: #642

Specific Changes include:
 - Arctic theme: making width header equal to the conetnt section.
 - KNB, Arctic : Modifying button spacing.
 - All themes: Adding tootlip on the dataset landing page.
  • Loading branch information
rushirajnenuji committed Jun 22, 2018
1 parent a6fc969 commit eda2bf2
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 22 deletions.
11 changes: 0 additions & 11 deletions src/css/metacatui-common.css
Original file line number Diff line number Diff line change
Expand Up @@ -1720,17 +1720,6 @@ i.icon.metric-icon.icon-spinner.icon-spin {
margin-right: 15px;
}

#metadata-controls-container >
.metadata-controls-container >
.copy-success{
position: absolute;
display: inline-block;
z-index: 1000;
top: -24px;
left: 17px;
font-size: .9em;
}

/* Style for the toolbars that contains buttons in the well on either side. */
.metric-toolbar {
float: left;
Expand Down
2 changes: 1 addition & 1 deletion src/js/models/AppModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ define(['jquery', 'underscore', 'backbone'],
// dataset landing page
displayMetricWell: true,
displayDatasetMetrics: true,
displayDatasetMetricsTooltip: false,
displayDatasetMetricsTooltip: true,
displayDatasetCitationMetric: true,
displayDatasetDownloadMetric: true,
displayDatasetViewMetric: true,
Expand Down
12 changes: 9 additions & 3 deletions src/js/themes/arctic/css/metacatui.css
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@


.header #inner-header{
max-width: 1024px;
margin: 0 auto;
margin-left: 40px;
margin-right: 40px;
}
.header nav{
display: none;
Expand Down Expand Up @@ -2941,12 +2941,18 @@ a {
width: 138px;
}

.edit-toolbar >
#metadata-controls-container >
.metadata-controls-container {
margin-right: -25px;
}

.edit-toolbar >
#owner-controls-container >
.authority-controls {
width: auto;
height: 38px;
margin-top: -38px;
margin-right: -15px;
margin-right: -25px;
margin-left: 355px;
}
14 changes: 11 additions & 3 deletions src/js/themes/arctic/models/AppModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ define(['jquery', 'underscore', 'backbone'],
metacatServiceUrl: null,
objectServiceUrl: null,
formatsServiceUrl: null,
formatsUrl: "/formats",
formatsUrl: "/formats",
resolveServiceUrl: null,
//bioportalSearchUrl: null,
orcidBaseUrl: "https:/orcid.org",
Expand All @@ -102,11 +102,14 @@ define(['jquery', 'underscore', 'backbone'],
tokenUrl: null,
mdqUrl: "https://quality.nceas.ucsb.edu/quality/",

// Metrics endpoint url
metricsUrl: null,

// set these flags to true if the metrics contents should be published on the
// dataset landing page
displayMetricWell: true,
displayDatasetMetrics: true,
displayDatasetMetricsTooltip: false,
displayDatasetMetricsTooltip: true,
displayDatasetCitationMetric: true,
displayDatasetDownloadMetric: true,
displayDatasetViewMetric: true,
Expand Down Expand Up @@ -151,7 +154,7 @@ define(['jquery', 'underscore', 'backbone'],
this.set("accountsUrl", this.get("d1CNBaseUrl") + this.get("d1CNService") + "/accounts/");

if(typeof this.get("pendingMapsUrl") != "undefined")
this.set("pendingMapsUrl", this.get("accountsUrl") + "pendingmap/");
this.set("pendingMapsUrl", this.get("accountsUrl") + "pendingmap");

if(typeof this.get("accountsMapsUrl") != "undefined")
this.set("accountsMapsUrl", this.get("accountsUrl") + "map/");
Expand Down Expand Up @@ -193,12 +196,17 @@ define(['jquery', 'underscore', 'backbone'],
if((typeof this.get("signInUrl") !== "undefined") || (typeof this.get("signInUrlOrcid") !== "undefined"))
this.set("signOutUrl", this.get('portalUrl') + "logout");



this.set("metricsUrl", 'https://logproc-stage-ucsb-1.test.dataone.org/metrics/filters');
}

//The package service for v2 DataONE API
this.set('packageServiceUrl', this.get('baseUrl') + this.get('context') + this.get('d1Service') + '/packages/application%2Fbagit-097/');

this.on("change:pid", this.changePid);


},

changePid: function(model, name){
Expand Down
8 changes: 7 additions & 1 deletion src/js/themes/dataone/models/AppModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,14 @@ define(['jquery', 'underscore', 'backbone'],
mdqUrl: null,


// Metrics endpoint url
metricsUrl: null,

// set these flags to true if the metrics contents should be published on the
// dataset landing page
displayMetricWell: true,
displayDatasetMetrics: true,
displayDatasetMetricsTooltip: false,
displayDatasetMetricsTooltip: true,
displayDatasetCitationMetric: true,
displayDatasetDownloadMetric: true,
displayDatasetViewMetric: true,
Expand Down Expand Up @@ -154,6 +157,9 @@ define(['jquery', 'underscore', 'backbone'],
this.set("bioportalSearchUrl", "https://data.bioontology.org/search?ontologies=ECSO&apikey=" + this.get("bioportalAPIKey") + "&pagesize=1000&suggest=true&q=")

this.on("change:pid", this.changePid);


this.set("metricsUrl", 'https://logproc-stage-ucsb-1.test.dataone.org/metrics/filters');
},

changePid: function(model, name){
Expand Down
8 changes: 7 additions & 1 deletion src/js/themes/knb/css/metacatui.css
Original file line number Diff line number Diff line change
Expand Up @@ -3021,12 +3021,18 @@ a {
width: 138px;
}

.edit-toolbar >
#metadata-controls-container >
.metadata-controls-container {
margin-right: -45px;
}

.edit-toolbar >
#owner-controls-container >
.authority-controls {
width: auto;
height: 38px;
margin-top: -38px;
margin-right: -15px;
margin-right: -20px;
margin-left: 375px;
}
7 changes: 6 additions & 1 deletion src/js/themes/knb/models/AppModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,14 @@ define(['jquery', 'underscore', 'backbone'],
portalUrl: null,
mdqUrl: "https://quality.nceas.ucsb.edu/quality/",

// Metrics endpoint url
metricsUrl: null,

// set these flags to true if the metrics contents should be published on the
// dataset landing page
displayMetricWell: true,
displayDatasetMetrics: true,
displayDatasetMetricsTooltip: false,
displayDatasetMetricsTooltip: true,
displayDatasetCitationMetric: true,
displayDatasetDownloadMetric: true,
displayDatasetViewMetric: true,
Expand Down Expand Up @@ -198,6 +200,9 @@ define(['jquery', 'underscore', 'backbone'],
if(typeof this.get("d1LogServiceUrl") != "undefined")
this.set('d1LogServiceUrl', this.get('d1CNBaseUrl') + this.get('d1CNService') + '/query/logsolr/?');



this.set("metricsUrl", 'https://logproc-stage-ucsb-1.test.dataone.org/metrics/filters');
}

this.on("change:pid", this.changePid);
Expand Down
10 changes: 9 additions & 1 deletion src/js/views/MetricView.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,18 @@ define(['jquery', 'underscore', 'backbone'],
// TODO: Change to 'Show metricName', once you've the modals working.
if (MetacatUI.appModel.get("displayDatasetMetricsTooltip")) {
this.$el.addClass("tooltip-this")
.attr("data-title", "Dataset " + this.metricName)
.attr("data-placement", "top")
.attr("data-trigger", "hover")
.attr("data-container", "body");
if (this.metricName == 'Citations') {
this.$el.attr("data-title", "For all the versions of this dataset, the number of times that all or part of this dataset was cited.");
} else if (this.metricName == 'Downloads') {
this.$el.attr("data-title", "For all the versions of this dataset, the number of times that all or part of this dataset was downloaded.");
} else if (this.metricName == 'Views') {
this.$el.attr("data-title", "For all the versions of this dataset, the number of times that all or part of this dataset was viewed.");
} else {
this.$el.attr("data-title", "");
}
};

// waiting for the fetch() call to succeed.
Expand Down

0 comments on commit eda2bf2

Please sign in to comment.