diff --git a/js/app.js b/js/app.js index 12505c03..eccebba4 100644 --- a/js/app.js +++ b/js/app.js @@ -365,6 +365,7 @@ OCA.Analytics.Backend = { OCA.Analytics.Navigation.buildNavigation(data); OCA.Analytics.Sidebar.Dataset.fillSidebarParentDropdown(data); if (datasetId) { + OCA.Analytics.Sidebar.hideSidebar(); document.querySelector('#navigationDatasets [data-id="' + datasetId + '"]').click(); } } diff --git a/js/sidebar.js b/js/sidebar.js index 6fe327d3..230d4ee4 100644 --- a/js/sidebar.js +++ b/js/sidebar.js @@ -389,7 +389,7 @@ OCA.Analytics.Sidebar.Share = { for (let share of data) { if (parseInt(share.type) === OCA.Analytics.SHARE_TYPE_LINK) { - let li = OCA.Analytics.Sidebar.Share.buildShareLinkRow(share.id, share.token, false, parseInt(share.pass)); + let li = OCA.Analytics.Sidebar.Share.buildShareLinkRow(share.id, share.token, false, (String(share.pass) == "true")); shareWithList.appendChild(li); } else if (parseInt(share.type) === OCA.Analytics.SHARE_TYPE_USER) { let li = OCA.Analytics.Sidebar.Share.buildShareeRow(share.id, share.uid_owner); @@ -538,6 +538,7 @@ OCA.Analytics.Sidebar.Share = { aUnshare.addEventListener('click', OCA.Analytics.Sidebar.Share.removeShare); let spanUnshare = document.createElement('span'); spanUnshare.classList.add('icon', 'icon-delete'); + spanUnshare.id = 'deleteShare'; let spanUnshareTxt = document.createElement('span'); spanUnshareTxt.innerText = t('analytics', 'Delete share link'); liUnshare.appendChild(aUnshare);