diff options
| author | Ron Lucke <lucke@elan-ev.de> | 2025-10-17 09:40:12 +0200 |
|---|---|---|
| committer | Ron Lucke <lucke@elan-ev.de> | 2025-10-17 09:40:12 +0200 |
| commit | 3417e47e273314dabb56162b7b015d2e53bfd929 (patch) | |
| tree | 4d372fc445d8bb0213043d4a2c1aace00367e4f0 /resources | |
| parent | 4ebbfba18b0f57a3ac38d809bc2c40fe138484b0 (diff) | |
Courseware: Galerie-Block läßt sich nicht mehr speichern
Closes #5602
Merge request studip/studip!4558
Diffstat (limited to 'resources')
| -rw-r--r-- | resources/vue/components/courseware/blocks/CoursewareGalleryBlock.vue | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/resources/vue/components/courseware/blocks/CoursewareGalleryBlock.vue b/resources/vue/components/courseware/blocks/CoursewareGalleryBlock.vue index f4d72fd..28a8e33 100644 --- a/resources/vue/components/courseware/blocks/CoursewareGalleryBlock.vue +++ b/resources/vue/components/courseware/blocks/CoursewareGalleryBlock.vue @@ -188,7 +188,7 @@ export default { currentAutoplay: '', currentNav: '', currentHeight: '', - currentCols: 33, + currentCols: 25, currentShowFileNames: '', currentShowFileDescription: '', currentMouseoverFileNames: '', @@ -196,6 +196,10 @@ export default { editModeFiles: [], slideIndex: 0, editMode: false, + + DEFAULT_COLS: 25, + DEFAULT_HEIGHT: 620, + DEFAULT_AUTOPLAY_TIMER: 2, }; }, computed: { @@ -259,10 +263,10 @@ export default { this.currentFolderId = this.folderId; this.currentLayout = this.layout; this.currentAutoplay = this.autoplay; - this.currentAutoplayTimer = this.autoplayTimer; + this.currentAutoplayTimer = this.autoplayTimer ?? this.DEFAULT_AUTOPLAY_TIMER; this.currentNav = this.nav; - this.currentHeight = this.height; - this.currentCols = this.cols; + this.currentHeight = this.height ?? this.DEFAULT_HEIGHT; + this.currentCols = this.cols ?? this.DEFAULT_COLS; this.currentShowFileNames = this.showFileNames; this.currentShowFileDescription = this.showFileDescription; this.currentMouseoverFileNames = this.mouseoverFileNames; @@ -328,10 +332,10 @@ export default { attributes.payload.folder_id = this.currentFolderId; attributes.payload.layout = this.currentLayout; attributes.payload.autoplay = this.currentAutoplay; - attributes.payload.autoplay_timer = this.currentAutoplayTimer.toString(); + attributes.payload.autoplay_timer = (this.currentAutoplayTimer ?? this.DEFAULT_AUTOPLAY_TIMER).toString(); attributes.payload.nav = this.currentNav; - attributes.payload.height = this.currentHeight.toString(); - attributes.payload.cols = this.currentCols.toString(); + attributes.payload.height = (this.currentHeight ?? this.DEFAULT_HEIGHT).toString(); + attributes.payload.cols = (this.currentCols ?? this.DEFAULT_COLS).toString(); attributes.payload.show_filenames = this.currentShowFileNames; attributes.payload.show_description = this.currentShowFileDescription; attributes.payload.mouseover_filenames = this.currentMouseoverFileNames; |
