Skip to content
Snippets Groups Projects
Commit e6d34fbd authored by Steinwender, Tamara's avatar Steinwender, Tamara
Browse files

Add hack for collapsing columns

parent 259d5e10
Branches
No related tags found
No related merge requests found
Pipeline #51213 passed
...@@ -91,10 +91,10 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) { ...@@ -91,10 +91,10 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
break; break;
case "clipboardFiles": case "clipboardFiles":
this.generateClipboardTable(); this.generateClipboardTable();
break; break;
} }
}); });
super.update(changedProperties); super.update(changedProperties);
} }
...@@ -105,10 +105,6 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) { ...@@ -105,10 +105,6 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
let boundSelectHandler = this.selectAllFiles.bind(this); let boundSelectHandler = this.selectAllFiles.bind(this);
this._("#select_all").addEventListener('click', boundSelectHandler); this._("#select_all").addEventListener('click', boundSelectHandler);
} }
} }
toggleCollapse(e) { toggleCollapse(e) {
...@@ -339,14 +335,16 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) { ...@@ -339,14 +335,16 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
this.tabulatorTable.clearData(); this.tabulatorTable.clearData();
this.tabulatorTable.setData(data); this.tabulatorTable.setData(data);
console.log("add"); const that = this;
if (this._('.tabulator-responsive-collapse-toggle-open')) { setTimeout(function(){
this._a('.tabulator-responsive-collapse-toggle-open').forEach(element => element.addEventListener("click", this.toggleCollapse.bind(this))); if (that._('.tabulator-responsive-collapse-toggle-open')) {
that._a('.tabulator-responsive-collapse-toggle-open').forEach(element => element.addEventListener("click", that.toggleCollapse.bind(that)));
} }
if (this._('.tabulator-responsive-collapse-toggle-close')) { if (that._('.tabulator-responsive-collapse-toggle-close')) {
this._a('.tabulator-responsive-collapse-toggle-close').forEach(element => element.addEventListener("click", this.toggleCollapse.bind(this))); that._a('.tabulator-responsive-collapse-toggle-close').forEach(element => element.addEventListener("click", that.toggleCollapse.bind(that)));
} }
}, 0);
} }
} }
if (this._("#select_all")) { if (this._("#select_all")) {
...@@ -354,6 +352,20 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) { ...@@ -354,6 +352,20 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
} }
} }
async addClickEventToggleCollapse() {
console.log("add event");
if (this.tabulatorTable !== null) {
if (this._('.tabulator-responsive-collapse-toggle-open')) {
this._a('.tabulator-responsive-collapse-toggle-open').forEach(element => element.addEventListener("click", this.toggleCollapse.bind(this)));
}
if (this._('.tabulator-responsive-collapse-toggle-close')) {
this._a('.tabulator-responsive-collapse-toggle-close').forEach(element => element.addEventListener("click", this.toggleCollapse.bind(this)));
}
}
}
/** /**
* Sends the files to a provider and throws a notification * Sends the files to a provider and throws a notification
* *
...@@ -483,7 +495,6 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) { ...@@ -483,7 +495,6 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
*/ */
finishedSaveFilesToClipboard(event) { finishedSaveFilesToClipboard(event) {
const i18n = this._i18n; const i18n = this._i18n;
send({ send({
"summary": i18n.t('clipboard.saved-files-title', {count: event.detail.count}), "summary": i18n.t('clipboard.saved-files-title', {count: event.detail.count}),
"body": i18n.t('clipboard.saved-files-body', {count: event.detail.count}), "body": i18n.t('clipboard.saved-files-body', {count: event.detail.count}),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment