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

Target

Select target project
  • 987FCF504483CBC8/toolkit
1 result
Select Git revision
Show changes
Commits on Source (10)
...@@ -70,9 +70,11 @@ export function createInstance(languages, lng, fallback, namespace) { ...@@ -70,9 +70,11 @@ export function createInstance(languages, lng, fallback, namespace) {
} }
let overrideNamespace = getOverrideNamespace(namespace); let overrideNamespace = getOverrideNamespace(namespace);
var fallbackLng = [fallback, lng, ...Object.keys(languages)];
var options = { var options = {
lng: lng, lng: lng,
fallbackLng: fallback, fallbackLng: fallbackLng,
debug: false, debug: false,
ns: [overrideNamespace, namespace], ns: [overrideNamespace, namespace],
defaultNS: namespace, defaultNS: namespace,
......
...@@ -15,11 +15,11 @@ suite('i18next', () => { ...@@ -15,11 +15,11 @@ suite('i18next', () => {
assert.equal( inst.t('nope'), 'nope'); assert.equal( inst.t('nope'), 'nope');
assert.equal( inst.t('extra'), 'quux'); assert.equal( inst.t('extra'), 'quux');
inst.changeLanguage('en'); inst.changeLanguage('en');
assert.deepEqual(inst.languages, ['en']); assert.deepEqual(inst.languages, ['en', 'de']);
assert.equal( inst.t('foo'), 'baz'); assert.equal( inst.t('foo'), 'baz');
assert.equal( inst.t('nope'), 'nope'); assert.equal( inst.t('nope'), 'nope');
inst.changeLanguage('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('foo'), 'baz');
assert.equal( inst.t('nope'), 'nope'); assert.equal( inst.t('nope'), 'nope');
}); });
......
...@@ -17,7 +17,7 @@ let nextcloudFileURL = nextcloudBaseURL + '/apps/files/?dir='; ...@@ -17,7 +17,7 @@ let nextcloudFileURL = nextcloudBaseURL + '/apps/files/?dir=';
export default (async () => { export default (async () => {
return { 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: { output: {
dir: 'dist', dir: 'dist',
entryFileNames: '[name].js', entryFileNames: '[name].js',
......
...@@ -103,13 +103,16 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) { ...@@ -103,13 +103,16 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
} }
connectedCallback() { connectedCallback() {
super.connectedCallback(); super.connectedCallback();
const that = this; const that = this;
this.updateComplete.then(() => { this.updateComplete.then(() => {
// see: http://tabulator.info/docs/4.7 // 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", layout: "fitColumns",
selectable: true, selectable: true,
selectableRangeMode: "drag", selectableRangeMode: "drag",
...@@ -323,6 +326,9 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) { ...@@ -323,6 +326,9 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
this.tabulatorTable.setData(data); 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'; ...@@ -5,7 +5,7 @@ import DBPLitElement from '@dbp-toolkit/common/dbp-lit-element';
import * as commonUtils from "@dbp-toolkit/common/utils"; import * as commonUtils from "@dbp-toolkit/common/utils";
import {Icon, MiniSpinner} from '@dbp-toolkit/common'; import {Icon, MiniSpinner} from '@dbp-toolkit/common';
import * as commonStyles from '@dbp-toolkit/common/styles'; 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 {classMap} from 'lit-html/directives/class-map.js';
import FileSaver from 'file-saver'; import FileSaver from 'file-saver';
import MicroModal from "./micromodal.es"; import MicroModal from "./micromodal.es";
...@@ -197,8 +197,12 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) { ...@@ -197,8 +197,12 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) {
const filePicker = this._('#nextcloud-file-picker'); const filePicker = this._('#nextcloud-file-picker');
if (filePicker && filePicker.webDavClient !== null) { if (filePicker) {
filePicker.loadDirectory(filePicker.directoryPath); filePicker.checkSessionStorage().then(contents => {
if (filePicker.webDavClient !== null) {
filePicker.loadDirectory(filePicker.directoryPath);
}
});
} }
} }
...@@ -206,6 +210,11 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) { ...@@ -206,6 +210,11 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) {
if (this.enabledTargets.includes('nextcloud')) { if (this.enabledTargets.includes('nextcloud')) {
this.loadWebdavDirectory(); 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'); const filePicker = this._('#modal-picker');
if (filePicker) { if (filePicker) {
MicroModal.show(filePicker, { MicroModal.show(filePicker, {
......
...@@ -6,7 +6,7 @@ import * as commonUtils from "@dbp-toolkit/common/utils"; ...@@ -6,7 +6,7 @@ import * as commonUtils from "@dbp-toolkit/common/utils";
import {Icon, MiniSpinner} from '@dbp-toolkit/common'; import {Icon, MiniSpinner} from '@dbp-toolkit/common';
import {send as notify} from '@dbp-toolkit/common/notification'; import {send as notify} from '@dbp-toolkit/common/notification';
import * as commonStyles from '@dbp-toolkit/common/styles'; 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 {classMap} from 'lit-html/directives/class-map.js';
import MicroModal from './micromodal.es'; import MicroModal from './micromodal.es';
import * as fileHandlingStyles from './styles'; import * as fileHandlingStyles from './styles';
...@@ -363,9 +363,14 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) { ...@@ -363,9 +363,14 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) {
loadWebdavDirectory() { loadWebdavDirectory() {
const filePicker = this._('#nextcloud-file-picker'); const filePicker = this._('#nextcloud-file-picker');
// check if element is already in the dom (for example if "dialog-open" attribute is set) // check if element is already in the dom (for example if "dialog-open" attribute is set)
if (filePicker && filePicker.webDavClient !== null) { if (filePicker) {
filePicker.loadDirectory(filePicker.directoryPath); filePicker.checkSessionStorage().then(contents => {
if (filePicker.webDavClient !== null) {
filePicker.loadDirectory(filePicker.directoryPath);
}
});
} }
} }
openDialog() { openDialog() {
......
This diff is collapsed.
...@@ -211,7 +211,7 @@ export function getFileHandlingCss() { ...@@ -211,7 +211,7 @@ export function getFileHandlingCss() {
} }
.tabulator .tabulator-tableHolder { .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{ .tabulator-row .tabulator-responsive-collapse{
......