Skip to content
Snippets Groups Projects
Commit 6880a956 authored by Thomas Hackl's avatar Thomas Hackl
Browse files

Arbeitsplatz/Dateiansicht: Übersichtsseite fehlen Ansichten

parent 6a027592
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ const Files = { ...@@ -39,7 +39,7 @@ const Files = {
//tables are displayed in one page. //tables are displayed in one page.
var tables = jQuery('.vue-file-table'); var tables = jQuery('.vue-file-table');
if (tables.length) { if (tables.length) {
for (var table of tables) { for (let table of tables) {
STUDIP.Vue.load().then(({createApp}) => { STUDIP.Vue.load().then(({createApp}) => {
createApp({ createApp({
el: table, el: table,
...@@ -342,4 +342,4 @@ const Files = { ...@@ -342,4 +342,4 @@ const Files = {
} }
}; };
export default Files; export default Files;
\ No newline at end of file
...@@ -369,19 +369,21 @@ export default { ...@@ -369,19 +369,21 @@ export default {
watch: { watch: {
selectedIds (current) { selectedIds (current) {
const activated = current.length > 0; const activated = current.length > 0;
this.$nextTick(() => { // needs to be wrapped since we check the dom if (this.$refs.buttons) {
this.$refs.buttons.querySelectorAll('.multibuttons .button').forEach(element => { this.$nextTick(() => { // needs to be wrapped since we check the dom
let condition = element.dataset.activatesCondition; this.$refs.buttons.querySelectorAll('.multibuttons .button').forEach(element => {
if (!condition || !activated) { let condition = element.dataset.activatesCondition;
element.disabled = !activated; if (!condition || !activated) {
} else { element.disabled = !activated;
condition = condition.replace(/:has\((.*?)\)/g, ' $1'); } else {
condition = condition.replace(':checkbox', 'input[type="checkbox"]'); condition = condition.replace(/:has\((.*?)\)/g, ' $1');
condition = condition.replace(':checkbox', 'input[type="checkbox"]');
element.disabled = this.$el.querySelector(condition) === null; element.disabled = this.$el.querySelector(condition) === null;
} }
});
}); });
}); }
}, },
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment