Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ if (window !== top) {
dialogHub.showAlert({
type: AlertTypes.Error,
title: LocaleService.t('exports.error.delTitle', 'Could not delete export'),
message: LocaleService.t('exports.error.genericMsg', 'Please check the console log for more information.'),
message: LocaleService.t('unknownErrorMsg', 'Please check the console log for more information.'),
});
console.error(reject);
});
Expand All @@ -230,7 +230,7 @@ if (window !== top) {
dialogHub.showAlert({
type: AlertTypes.Error,
title: LocaleService.t('exports.error.delTitle', 'Could not delete export'),
message: LocaleService.t('exports.error.genericMsg', 'Please check the console log for more information.'),
message: LocaleService.t('unknownErrorMsg', 'Please check the console log for more information.'),
});
console.error(reject);
});
Expand Down Expand Up @@ -278,7 +278,7 @@ if (window !== top) {
dialogHub.showAlert({
type: AlertTypes.Error,
title: LocaleService.t('exports.error.fetchTitle', 'Could not get export list'),
message: LocaleService.t('exports.error.genericMsg', 'Please check the console log for more information.'),
message: LocaleService.t('unknownErrorMsg', 'Please check the console log for more information.'),
});
console.error(reject);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"finished": "Експортирането е завършено",
"exporting": "Eкспортиране...",
"error": {
"genericMsg": "Моля, проверете лога на конзолата за повече информация.",
"fetchTitle": "Неуспешно получаване на списъка с експорти",
"delTitle": "Експортът не можа да бъде изтрит",
"delAllTitle": "Експортите не можаха да бъдат изтрити"
Expand Down Expand Up @@ -57,12 +56,14 @@
"search": "Търсене",
"loading": "Зареждане",
"folder": "Папка",
"file": "Файл",
"rename": "Преименуване",
"refresh": "Опресняване",
"settings": "Настройки",
"reset": "Нулиране",
"about": "Относно",
"status": "Статус",
"download": "Изтегли",
"unknownError": "Неизвестна Грешка"
"unknownError": "Неизвестна Грешка",
"unknownErrorMsg": "Моля, проверете лога на конзолата за повече информация."
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--

Copyright (c) 2010-2025 Eclipse Dirigible contributors
Copyright (c) 2010-2026 Eclipse Dirigible contributors

All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
Expand Down Expand Up @@ -105,15 +105,21 @@
</div>
</td>
<td bk-table-cell fit-content="true" style="text-align: right">
<a bk-button bk-list-button ng-if="!isFolder(single)" ng-href="{{getFileDownloadUrl(single)}}" target="_blank" rel="noopener noreferrer" state="transparent" glyph="sap-icon--download"
aria-label="{{'download' | t:'Download'}}" title="{{'download' | t:'Download'}}">
</a>
<bk-button ng-click="showRenameItemDialog(single, $event)" bk-list-button ng-disabled="!writeAccessAllowed(single)" state="transparent" glyph="sap-icon--edit" aria-label="{{'rename' | t:'Rename'}}"
title="{{'rename' | t:'Rename'}}">
</bk-button>
<bk-button ng-click="showDeleteSingleItemDialog(single, $event)" bk-list-button ng-disabled="!writeAccessAllowed(single)" state="transparent" glyph="sap-icon--delete"
aria-label="{{'delete' | t:'Delete'}}" title="{{'delete' | t:'Delete'}}">
</bk-button>
<bk-popover>
<bk-popover-control>
<bk-button glyph="sap-icon--overflow" state="transparent" aria-label="{{'documents:aria.rowMenu' | t:{ 'type': isFolder(single) ? '$t(folder)' : '$t(file)' } }}"></bk-button>
</bk-popover-control>
<bk-popover-body align="left-top" can-scroll="false">
<bk-menu aria-label="{{'documents:aria.rowPopover' | t:{ 'type': isFolder(single) ? '$t(folder)' : '$t(file)' } }}">
<bk-menu-item title="{{'documents:copyLink' | t:'Copy Link'}}" left-icon-class="sap-icon--chain-link" ng-if="!isFolder(single)" ng-click="copyLink(single)"></bk-menu-item>
<bk-menu-item title="{{'rename' | t:'Rename'}}" left-icon-class="sap-icon--edit" is-disabled="!writeAccessAllowed(single)" ng-click="showRenameItemDialog(single, $event)"></bk-menu-item>
<bk-menu-item title="{{'download' | t:'Download'}}" left-icon-class="sap-icon--download" ng-if="!isFolder(single)" has-separator="true" link="{{getFileDownloadUrl(single)}}">
</bk-menu-item>
<bk-menu-item title="{{'delete' | t:'Delete'}}" left-icon-class="sap-icon--delete" is-disabled="!writeAccessAllowed(single)" ng-click="showDeleteSingleItemDialog(single, $event)">
</bk-menu-item>
</bk-menu>
</bk-popover-body>
</bk-popover>
</td>
</tr>
<tr ng-if="filteredItems.length === 0" bk-table-row>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down Expand Up @@ -53,6 +53,7 @@ class HistoryStack {
documents.controller('DocumentsController', ($scope, $http, $timeout, $element, $document, ButtonStates, FileUploader, LocaleService) => {
const dialogHub = new DialogHub();
const notificationHub = new NotificationHub();
const statusBarHub = new StatusBarHub();
const documentsApi = '/services/js/documents/api/documents.js';
const folderApi = '/services/js/documents/api/documents.js/folder';
const zipApi = '/services/js/documents/api/documents.js/zip';
Expand Down Expand Up @@ -203,6 +204,20 @@ documents.controller('DocumentsController', ($scope, $http, $timeout, $element,
const getFilePreviewUrl = (item) => isDocument(item) ?
`${$scope.previewPath}?path=${$scope.getFullPath(item.name)}` : 'about:blank';

$scope.copyLink = (item) => {
try {
navigator.clipboard.writeText(`${window.location.origin}${$scope.previewPath}?path=${$scope.getFullPath(item.name)}`);
statusBarHub.showMessage(LocaleService.t('documents:linkCopied', 'Link copied'));
} catch (error) {
console.error(error);
dialogHub.showAlert({
title: LocaleService.t('documents:errMsg.copyLink', 'Failed to copy link'),
message: LocaleService.t('unknownErrorMsg', 'Please check the console log for more information.'),
type: AlertTypes.Error,
});
}
};

$scope.getFileDownloadUrl = (item) => isDocument(item) ?
`${$scope.downloadPath}?path=${$scope.getFullPath(item.name)}` : 'about:blank';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2010-2025 Eclipse Dirigible contributors
* Copyright (c) 2010-2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"aria": {
"rowMenu": "Контекстно меню за {{type}}",
"rowPopover": "Опции на менюто за {{type}}"
},
"documentStorage": "Съхранение на документи",
"goBack": "Върни назад",
"goForward": "Отиди напред",
"findItem": "Намери елемент",
"copyLink": "Копирай Линка",
"linkCopied": "Линка е копиран",
"newFolder": "$t(new) $t(folder)",
"enterFolName": "Въведете име на папка",
"delSelected": "$t(delete) избраното",
Expand Down Expand Up @@ -37,6 +43,7 @@
"openFolderTitle": "Неуспешно отваряне на папката",
"openFolder": "Папката не може да се отвори. Проверете конзолата за грешки.",
"uploadTitle": "Качването на елемента не бе успешно",
"upload": "Елементът не можа да бъде качен. Проверете конзолата за грешки."
"upload": "Елементът не можа да бъде качен. Проверете конзолата за грешки.",
"copyLink": "Копирането на линка не бе успешно"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"aria": {
"rowMenu": "{{type}} context menu",
"rowPopover": "{{type}} menu options"
},
"documentStorage": "Document Storage",
"goBack": "Go back",
"goForward": "Go forward",
"findItem": "Find item",
"copyLink": "Copy Link",
"linkCopied": "Link copied",
"newFolder": "$t(new) $t(folder)",
"enterFolName": "Enter folder name",
"delSelected": "$t(delete) selected",
Expand Down Expand Up @@ -37,6 +43,7 @@
"openFolderTitle": "Failed to open folder",
"openFolder": "Could not open folder. Check console for errors.",
"uploadTitle": "Failed to upload item",
"upload": "Could not upload item. Check console for errors."
"upload": "Could not upload item. Check console for errors.",
"copyLink": "Failed to copy link"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Eclipse Dirigible contributors
* Copyright (c) 2026 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"finished": "Export finished",
"exporting": "Exporting...",
"error": {
"genericMsg": "Please check the console log for more information.",
"fetchTitle": "Could not get export list",
"delTitle": "Could not delete export",
"delAllTitle": "Could not delete exports"
Expand Down Expand Up @@ -57,12 +56,14 @@
"search": "Search",
"loading": "Loading",
"folder": "Folder",
"file": "File",
"rename": "Rename",
"refresh": "Refresh",
"settings": "Settings",
"reset": "Reset",
"about": "About",
"status": "Status",
"download": "Download",
"unknownError": "Unknown Error"
"unknownError": "Unknown Error",
"unknownErrorMsg": "Please check the console log for more information."
}
Loading