Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • advertisement
  • automagic
  • dbp-translation-component
  • demo
  • demo-file-handling
  • favorites-and-recent-files
  • icon-set-mapping
  • lit2
  • main
  • person-select-custom
  • port-i18next-parser
  • publish
  • remove-sentry
  • renovate/lock-file-maintenance
  • revert-6c632dc6
  • wc-part
  • wip-cleanup
17 results

Target

Select target project
  • 987FCF504483CBC8/toolkit
1 result
Select Git revision
  • advertisement
  • automagic
  • dbp-translation-component
  • demo
  • demo-file-handling
  • favorites-and-recent-files
  • icon-set-mapping
  • lit2
  • main
  • person-select-custom
  • port-i18next-parser
  • publish
  • remove-sentry
  • renovate/lock-file-maintenance
  • revert-6c632dc6
  • wc-part
  • wip-cleanup
17 results
Show changes
Commits on Source (10)
......@@ -70,9 +70,11 @@ export function createInstance(languages, lng, fallback, namespace) {
}
let overrideNamespace = getOverrideNamespace(namespace);
var fallbackLng = [fallback, lng, ...Object.keys(languages)];
var options = {
lng: lng,
fallbackLng: fallback,
fallbackLng: fallbackLng,
debug: false,
ns: [overrideNamespace, namespace],
defaultNS: namespace,
......
......@@ -15,11 +15,11 @@ suite('i18next', () => {
assert.equal( inst.t('nope'), 'nope');
assert.equal( inst.t('extra'), 'quux');
inst.changeLanguage('en');
assert.deepEqual(inst.languages, ['en']);
assert.deepEqual(inst.languages, ['en', 'de']);
assert.equal( inst.t('foo'), 'baz');
assert.equal( inst.t('nope'), 'nope');
inst.changeLanguage('nope');
assert.deepEqual(inst.languages, ['nope', 'en']);
assert.deepEqual(inst.languages, ['nope', 'en', 'de']);
assert.equal( inst.t('foo'), 'baz');
assert.equal( inst.t('nope'), 'nope');
});
......
......@@ -17,7 +17,7 @@ let nextcloudFileURL = nextcloudBaseURL + '/apps/files/?dir=';
export default (async () => {
return {
input: (build !== 'test') ? ['src/demo.js', 'src/dbp-file-source.js', 'src/dbp-file-sink.js', 'src/dbp-clipboard.js'] : glob.sync('test/**/*.js'),
input: (build !== 'test') ? ['src/demo.js', 'src/dbp-file-source.js', 'src/dbp-file-sink.js', 'src/dbp-clipboard.js', 'src/dbp-nextcloud-file-picker.js'] : glob.sync('test/**/*.js'),
output: {
dir: 'dist',
entryFileNames: '[name].js',
......
......@@ -103,13 +103,16 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
}
connectedCallback() {
super.connectedCallback();
const that = this;
this.updateComplete.then(() => {
// see: http://tabulator.info/docs/4.7
this.tabulatorTable = new Tabulator(this._("#clipboard-content-table"), {
this.tabulatorTable = new Tabulator(this._("#clipboard-content-table"), {//if you delete the wrapper around the table you need to set a heigh here
maxHeight:"100%",
height:"100%",
layout: "fitColumns",
selectable: true,
selectableRangeMode: "drag",
......@@ -323,6 +326,9 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
this.tabulatorTable.setData(data);
}
}
if (this._("#select_all")) {
this._("#select_all").checked = false;
}
}
/**
......
......@@ -5,7 +5,7 @@ import DBPLitElement from '@dbp-toolkit/common/dbp-lit-element';
import * as commonUtils from "@dbp-toolkit/common/utils";
import {Icon, MiniSpinner} from '@dbp-toolkit/common';
import * as commonStyles from '@dbp-toolkit/common/styles';
import {NextcloudFilePicker} from "./dbp-nextcloud-file-picker";
import {NextcloudFilePicker} from "./nextcloud-file-picker";
import {classMap} from 'lit-html/directives/class-map.js';
import FileSaver from 'file-saver';
import MicroModal from "./micromodal.es";
......@@ -197,8 +197,12 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) {
const filePicker = this._('#nextcloud-file-picker');
if (filePicker && filePicker.webDavClient !== null) {
filePicker.loadDirectory(filePicker.directoryPath);
if (filePicker) {
filePicker.checkSessionStorage().then(contents => {
if (filePicker.webDavClient !== null) {
filePicker.loadDirectory(filePicker.directoryPath);
}
});
}
}
......@@ -206,6 +210,11 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) {
if (this.enabledTargets.includes('nextcloud')) {
this.loadWebdavDirectory();
}
if (this.enabledTargets.includes('clipboard')) {
if (this._('#clipboard-file-picker')._("#select_all")) {
this._('#clipboard-file-picker')._("#select_all").checked = false;
}
}
const filePicker = this._('#modal-picker');
if (filePicker) {
MicroModal.show(filePicker, {
......
......@@ -6,7 +6,7 @@ import * as commonUtils from "@dbp-toolkit/common/utils";
import {Icon, MiniSpinner} from '@dbp-toolkit/common';
import {send as notify} from '@dbp-toolkit/common/notification';
import * as commonStyles from '@dbp-toolkit/common/styles';
import {NextcloudFilePicker} from "./dbp-nextcloud-file-picker";
import {NextcloudFilePicker} from "./nextcloud-file-picker";
import {classMap} from 'lit-html/directives/class-map.js';
import MicroModal from './micromodal.es';
import * as fileHandlingStyles from './styles';
......@@ -363,9 +363,14 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) {
loadWebdavDirectory() {
const filePicker = this._('#nextcloud-file-picker');
// check if element is already in the dom (for example if "dialog-open" attribute is set)
if (filePicker && filePicker.webDavClient !== null) {
filePicker.loadDirectory(filePicker.directoryPath);
if (filePicker) {
filePicker.checkSessionStorage().then(contents => {
if (filePicker.webDavClient !== null) {
filePicker.loadDirectory(filePicker.directoryPath);
}
});
}
}
openDialog() {
......
This diff is collapsed.
......@@ -211,7 +211,7 @@ export function getFileHandlingCss() {
}
.tabulator .tabulator-tableHolder {
height: unset !important; //TODO find a better way to do this
height: unset !important; /*TODO find a better way to do this*/
}
.tabulator-row .tabulator-responsive-collapse{
......