diff --git a/packages/file-handling/src/clipboard.js b/packages/file-handling/src/clipboard.js index 807351efa3735e23a050c27579b283723f32f1d1..dc02b6dc5b5db235267e79ae5502b9ef24c31df8 100644 --- a/packages/file-handling/src/clipboard.js +++ b/packages/file-handling/src/clipboard.js @@ -6,6 +6,7 @@ import * as commonStyles from '@dbp-toolkit/common/styles'; import * as fileHandlingStyles from '@dbp-toolkit/file-handling/src/styles'; import {Icon} from '@dbp-toolkit/common'; import {TabulatorFull as Tabulator} from 'tabulator-tables'; +import * as tabulatorStyles from './tabulator-table-styles'; import {humanFileSize} from '@dbp-toolkit/common/i18next'; import {name as pkgName} from '@dbp-toolkit/file-handling/package.json'; import {send} from '@dbp-toolkit/common/notification'; @@ -842,6 +843,8 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) { ${commonStyles.getModalDialogCSS()} ${commonStyles.getRadioAndCheckboxCss()} ${fileHandlingStyles.getFileHandlingCss()} + ${tabulatorStyles.getTabulatorStyles()} + a { border-bottom: var(--dbp-border); diff --git a/packages/file-handling/src/nextcloud-file-picker.js b/packages/file-handling/src/nextcloud-file-picker.js index cb1ca181ed671ac9242779e40524d90acf230959..024a4f4d3a8852c6729c21146a9980b3b3b1b1b1 100644 --- a/packages/file-handling/src/nextcloud-file-picker.js +++ b/packages/file-handling/src/nextcloud-file-picker.js @@ -204,6 +204,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { field: 'type', hozAlign: 'center', width: 50, + headerSort: false, responsive: 1, formatter: (cell, formatterParams, onRendered) => { const icon_tag = that.getScopedTagName('dbp-icon'); @@ -303,6 +304,10 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { row.getElement().classList.add('no-select'); row.getElement().classList.remove('tabulator-selectable'); } + + if (!this.directoriesOnly && typeof data.mime === 'undefined') { + row.getElement().classList.add('no-select-styles'); + } }, }); diff --git a/packages/file-handling/src/tabulator-table-styles.js b/packages/file-handling/src/tabulator-table-styles.js index 62bb1ffdc17be4dba1937eb7a9b987554e5fc54e..7fbf523c97ac31bd450d99256b8408553d2d8175 100644 --- a/packages/file-handling/src/tabulator-table-styles.js +++ b/packages/file-handling/src/tabulator-table-styles.js @@ -32,9 +32,10 @@ export function getTabulatorStyles() { padding-bottom: 20px; } - .tabulator-placeholder-contents { - text-align: center; - padding-top: 10px; + .tabulator .tabulator-tableholder .tabulator-placeholder .tabulator-placeholder-contents { + color: var(--dbp-muted); + font-size: 1rem; + font-weight: initial; } .tabulator-placeholder { @@ -51,10 +52,24 @@ export function getTabulatorStyles() { .tabulator-row.no-select:hover, .tabulator-row.tabulator-selectable.no-select:hover { cursor: unset; + } + + .no-select-styles, + .no-select, + .tabulator-row.tabulator-selected.no-select:hover, + .tabulator-row.no-select:hover, + .tabulator-row.tabulator-selectable.no-select:hover, + .tabulator-row.tabulator-selected.no-select-styles:hover, + .tabulator-row.no-select-styles:hover, + .tabulator-row.tabulator-selectable.no-select-styles:hover{ color: var(--dbp-content); background-color: var(--dbp-background); } + .tabulator .tabulator-tableholder{ + overflow: inherit; + } + @media only screen and (orientation: portrait) and (max-width: 768px) { }