diff --git a/src/css/metacatui-common.css b/src/css/metacatui-common.css index 0856e1c4c..e0257ab00 100644 --- a/src/css/metacatui-common.css +++ b/src/css/metacatui-common.css @@ -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; diff --git a/src/js/models/AppModel.js b/src/js/models/AppModel.js index 4071138cf..21a2af300 100644 --- a/src/js/models/AppModel.js +++ b/src/js/models/AppModel.js @@ -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, diff --git a/src/js/themes/arctic/css/metacatui.css b/src/js/themes/arctic/css/metacatui.css index 3e09c9461..23964737c 100644 --- a/src/js/themes/arctic/css/metacatui.css +++ b/src/js/themes/arctic/css/metacatui.css @@ -224,8 +224,8 @@ .header #inner-header{ - max-width: 1024px; - margin: 0 auto; + margin-left: 40px; + margin-right: 40px; } .header nav{ display: none; @@ -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; } diff --git a/src/js/themes/arctic/models/AppModel.js b/src/js/themes/arctic/models/AppModel.js index 531d8fa4b..94bed89dd 100644 --- a/src/js/themes/arctic/models/AppModel.js +++ b/src/js/themes/arctic/models/AppModel.js @@ -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", @@ -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, @@ -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/"); @@ -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){ diff --git a/src/js/themes/dataone/models/AppModel.js b/src/js/themes/dataone/models/AppModel.js index 763649278..22f7a23b3 100644 --- a/src/js/themes/dataone/models/AppModel.js +++ b/src/js/themes/dataone/models/AppModel.js @@ -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, @@ -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){ diff --git a/src/js/themes/knb/css/metacatui.css b/src/js/themes/knb/css/metacatui.css index b9d3a1f56..2065ec802 100644 --- a/src/js/themes/knb/css/metacatui.css +++ b/src/js/themes/knb/css/metacatui.css @@ -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; } \ No newline at end of file diff --git a/src/js/themes/knb/models/AppModel.js b/src/js/themes/knb/models/AppModel.js index 4e9314a5e..ac133275c 100644 --- a/src/js/themes/knb/models/AppModel.js +++ b/src/js/themes/knb/models/AppModel.js @@ -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, @@ -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); diff --git a/src/js/views/MetricView.js b/src/js/views/MetricView.js index c725c2254..1817cba5c 100644 --- a/src/js/views/MetricView.js +++ b/src/js/views/MetricView.js @@ -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.