Skip to content
Snippets Groups Projects
Commit ef06a552 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Jan-Hendrik Willms
Browse files

disable gallery action when no images are visible, fixes #620

Closes #620

Merge request studip/studip!1005
parent d0e5a716
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,10 @@ STUDIP.domReady(() => {
});
});
$(document).on('files-vue-app-loaded', () => {
const lightboxImages = $('.lightbox-image');
$('#sidebar-actions a[onclick*="Files.openGallery"]').attr('disabled', lightboxImages.length === 0);
});
jQuery(document).on('ajaxComplete', (event, xhr) => {
if (!xhr.getResponseHeader('X-Filesystem-Changes')) {
......
......@@ -31,6 +31,9 @@ const Files = {
}
},
components: { FilesTable, },
mounted () {
$(document).trigger('files-vue-app-loaded');
}
});
});
}
......
......@@ -143,7 +143,8 @@ div#sidebar-navigation {
box-sizing: border-box;
line-height: 16px;
}
span[disabled] {
span[disabled],
a[disabled] {
color: $dark-gray-color-80;
cursor: not-allowed;
font-weight: lighter;
......
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