Skip to content

Commit

Permalink
Fix call to deposit create
Browse files Browse the repository at this point in the history
claravox authored and lwesterhof committed Jul 23, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent b7b055c commit 1edf827
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions vault/static/vault/js/datapackage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global browseStartDir, dpReference, dpIsRestricted, L */
/* global browseStartDir, dpReference, dpIsRestricted, group, L */
'use strict'

$(document).ajaxSend(function (e, request, settings) {
@@ -11,6 +11,7 @@ $(document).ajaxSend(function (e, request, settings) {
})

let currentFolder
let group
let bounds = [[1, 1], [1, 1]]
let mymap = null
let maplayer = null
@@ -143,6 +144,7 @@ $(function () {
currentFolder = browseStartDir
// Canonicalize path somewhat, for convenience.
currentFolder = currentFolder.replace(/\/+/g, '/').replace(/\/$/, '')
group = currentFolder.split('/')[2].split('[')[0]
}

$('.btn-copy-to-clipboard').on('click', function () {
@@ -351,7 +353,10 @@ function metadataShow () {

$('.action-confirm-copy-as-new-deposit').on('click', function () {
Yoda.call('deposit_copy_data_package',
{ reference: $(this).attr('data-yoda-reference') },
{
reference: $(this).attr('data-yoda-reference'),
deposit_group: group
},
{ rawResult: true })
.then((result) => {
if (!result || Object.keys(result.data).length === 0) {
2 changes: 1 addition & 1 deletion vault/static/vault/js/dlgSelectCollection.js
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ async function copyVaultPackageToDynamic (urlEncodedOrigin, urlEncodedTarget) {
)

if (result.status === 'ok') {
let html = 'Datapackage succesfully registered for copying to research area. Actual copying will start soon'
let html = 'Datapackage successfully registered for copying to research area. Actual copying will start soon'
html += ' <a href="/research/?dir=' + dlgCurrentFolder + '">Go to research area</a>'
dlgSelectAlertShow(html)
} else { // non api error

0 comments on commit 1edf827

Please sign in to comment.