From b9af7478b167f892e7baf2bf2f61aa8e5e2a1d65 Mon Sep 17 00:00:00 2001 From: Rushiraj Nenuji Date: Thu, 6 Jun 2024 12:43:30 -0700 Subject: [PATCH 1/3] Restore changes from merge conflict Restore changes from merge conflict --- src/js/views/DataPackageView.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/js/views/DataPackageView.js b/src/js/views/DataPackageView.js index 87f054acf..241ce98ec 100644 --- a/src/js/views/DataPackageView.js +++ b/src/js/views/DataPackageView.js @@ -983,12 +983,6 @@ title.slice(title.length - 75, title.length) : title; - // Set the package URL - if (MetacatUI.appModel.get("packageServiceUrl")) - packageUrl = - MetacatUI.appModel.get("packageServiceUrl") + - encodeURIComponent(dataPackage.id); - /** * The HTML content for the data package header. * @@ -999,7 +993,6 @@ title: title, titleTooltip: titleTooltip, disablePackageDownloads: false, - downloadUrl: packageUrl, }); this.$el.append(tableRow); @@ -1014,7 +1007,7 @@ this.downloadButtonView.render(); // Add the downloadButtonView el to the span - this.$el.find(".downloadAction").html(this.downloadButtonView.el); + this.$el.find(".downloadAction[data-id='" + dataPackage.id + "']").html(this.downloadButtonView.el); // Filter out the packages from the member list members = _.filter(members, function (m) { From a559a33adc0a0dfb8060f3a57669cd0f12a6fb55 Mon Sep 17 00:00:00 2001 From: Rushiraj Nenuji Date: Wed, 17 Jul 2024 10:10:27 -0700 Subject: [PATCH 2/3] Added ES Lint fixes Ref: #2435 #2424 --- src/js/views/DataItemView.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/views/DataItemView.js b/src/js/views/DataItemView.js index 2746829e0..1c1f94f80 100644 --- a/src/js/views/DataItemView.js +++ b/src/js/views/DataItemView.js @@ -601,12 +601,12 @@ define([ this.$el.attr("data-packageId", this.dataPackageId); } - //Download button + // Download button this.downloadButtonView = new DownloadButtonView({ model: this.model, view: "actionsView" }); this.downloadButtonView.render(); - let id = this.model.get("id"); - let infoLink = + const id = this.model.get("id"); + const infoLink = MetacatUI.root + "/view/" + encodeURIComponent(this.currentlyViewing) + From 8cd004705fc09d7d0b703253888ad4587c77e356 Mon Sep 17 00:00:00 2001 From: Rushiraj Nenuji Date: Thu, 18 Jul 2024 12:05:00 -0700 Subject: [PATCH 3/3] ESLint formating fix ESLint formating fix --- src/js/views/DataItemView.js | 9 ++++++--- src/js/views/DataPackageView.js | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/js/views/DataItemView.js b/src/js/views/DataItemView.js index 1c1f94f80..c72fb69f2 100644 --- a/src/js/views/DataItemView.js +++ b/src/js/views/DataItemView.js @@ -601,9 +601,12 @@ define([ this.$el.attr("data-packageId", this.dataPackageId); } - // Download button - this.downloadButtonView = new DownloadButtonView({ model: this.model, view: "actionsView" }); - this.downloadButtonView.render(); + // Download button + this.downloadButtonView = new DownloadButtonView({ + model: this.model, + view: "actionsView", + }); + this.downloadButtonView.render(); const id = this.model.get("id"); const infoLink = diff --git a/src/js/views/DataPackageView.js b/src/js/views/DataPackageView.js index ee4d9d46f..5a7cd1c99 100644 --- a/src/js/views/DataPackageView.js +++ b/src/js/views/DataPackageView.js @@ -1023,7 +1023,9 @@ this.downloadButtonView.render(); // Add the downloadButtonView el to the span - this.$el.find(".downloadAction[data-id='" + dataPackage.id + "']").html(this.downloadButtonView.el); + this.$el + .find(".downloadAction[data-id='" + dataPackage.id + "']") + .html(this.downloadButtonView.el); // Filter out the packages from the member list members = _.filter(members, function (m) {