Skip to content
Snippets Groups Projects
Commit 71681338 authored by Ron Lucke's avatar Ron Lucke
Browse files

Revert "fix #4033"

This reverts commit 8dae601a.
parent 8dae601a
Branches
No related tags found
No related merge requests found
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
} }
.cw-element-inserter-wrapper { .cw-element-inserter-wrapper {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
grid-auto-rows: auto; grid-auto-rows: auto;
grid-gap: 4px; grid-gap: 4px;
margin-bottom: 8px; margin-bottom: 8px;
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
min-height: 100%; min-height: 100%;
border: solid thin var(--content-color-40); border: solid thin var(--content-color-40);
background-color: var(--white); background-color: var(--white);
overflow: hidden; overflow-y: auto;
overflow-x: hidden;
position: relative; position: relative;
padding: 0 4px; padding: 0 4px;
top: 0; top: 0;
...@@ -32,11 +33,6 @@ ...@@ -32,11 +33,6 @@
right: 0; right: 0;
} }
.cw-toolbar-tool-content {
overflow-y: auto;
padding-right: 8px;
}
.cw-toolbar-blocks { .cw-toolbar-blocks {
.input-group.files-search { .input-group.files-search {
&.search { &.search {
...@@ -100,12 +96,6 @@ ...@@ -100,12 +96,6 @@
} }
} }
.cw-toolbar-clipboard {
.cw-collapsible {
margin-bottom: 4px;
}
}
} }
.cw-toolbar-folded-wrapper { .cw-toolbar-folded-wrapper {
display: flex; display: flex;
...@@ -134,7 +124,6 @@ ...@@ -134,7 +124,6 @@
&.cw-toolbar-button-toggle { &.cw-toolbar-button-toggle {
text-align: end; text-align: end;
flex-grow: 1;
} }
&.active { &.active {
...@@ -153,7 +142,7 @@ ...@@ -153,7 +142,7 @@
.cw-toolbar-tools.hd { .cw-toolbar-tools.hd {
.cw-toolbar-button-wrapper { .cw-toolbar-button-wrapper {
.cw-toolbar-button { .cw-toolbar-button {
min-width: 110px; width: 128px;
padding: 2px 16px 0 16px; padding: 2px 16px 0 16px;
&.cw-toolbar-button-toggle { &.cw-toolbar-button-toggle {
text-align: end; text-align: end;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="cw-toolbar-wrapper"> <div class="cw-toolbar-wrapper">
<div id="cw-toolbar" class="cw-toolbar" :style="toolbarStyle"> <div id="cw-toolbar" class="cw-toolbar" :style="toolbarStyle">
<div v-if="showTools" class="cw-toolbar-tools" :class="{ unfold: unfold, hd: isHd, wqhd: isWqhd }"> <div v-if="showTools" class="cw-toolbar-tools" :class="{ unfold: unfold, hd: isHd, wqhd: isWqhd }">
<div id="cw-toolbar-nav" class="cw-toolbar-button-wrapper"> <div class="cw-toolbar-button-wrapper">
<button <button
class="cw-toolbar-button" class="cw-toolbar-button"
:class="{ active: activeTool === 'blockAdder' }" :class="{ active: activeTool === 'blockAdder' }"
...@@ -35,19 +35,9 @@ ...@@ -35,19 +35,9 @@
<studip-icon shape="arr_2right" :size="24" /> <studip-icon shape="arr_2right" :size="24" />
</button> </button>
</div> </div>
<div class="cw-toolbar-tool-wrapper"> <courseware-toolbar-blocks v-if="activeTool === 'blockAdder'" />
<CoursewareToolbarBlocks <courseware-toolbar-containers v-if="activeTool === 'containerAdder'" />
v-if="activeTool === 'blockAdder'" <courseware-toolbar-clipboard v-if="activeTool === 'clipboard'" />
:toolbarContentHeight="toolbarContentHeight"
/>
<CoursewareToolbarContainers
v-if="activeTool === 'containerAdder'"
/>
<CoursewareToolbarClipboard
v-if="activeTool === 'clipboard'"
:toolbarContentHeight="toolbarContentHeight"
/>
</div>
</div> </div>
<div v-else class="cw-toolbar-folded-wrapper"> <div v-else class="cw-toolbar-folded-wrapper">
<button <button
...@@ -107,26 +97,20 @@ export default { ...@@ -107,26 +97,20 @@ export default {
toolbarActive: 'toolbarActive', toolbarActive: 'toolbarActive',
hideEditLayout: 'hideEditLayout', hideEditLayout: 'hideEditLayout',
}), }),
scrollTopStyles() { toolbarStyle() {
return window.getComputedStyle(document.getElementById('scroll-to-top')); const scrollTopStyles = window.getComputedStyle(document.getElementById('scroll-to-top'));
},
toolbarHeight() {
const scrollTopHeight = const scrollTopHeight =
parseInt(this.scrollTopStyles['height'], 10) + parseInt(scrollTopStyles['height'], 10) +
parseInt(this.scrollTopStyles['padding-top'], 10) + parseInt(scrollTopStyles['padding-top'], 10) +
parseInt(this.scrollTopStyles['padding-bottom'], 10) + parseInt(scrollTopStyles['padding-bottom'], 10) +
parseInt(this.scrollTopStyles['margin-bottom'], 10); parseInt(scrollTopStyles['margin-bottom'], 10);
return parseInt( let height = parseInt(
Math.min(this.windowInnerHeight * 0.9, this.windowInnerHeight - this.toolbarTop - scrollTopHeight) Math.min(this.windowInnerHeight * 0.9, this.windowInnerHeight - this.toolbarTop - scrollTopHeight)
); );
},
toolbarContentHeight() {
return this.toolbarHeight - 55;
},
toolbarStyle() {
return { return {
height: this.toolbarHeight + 'px', height: height + 'px',
minHeight: this.toolbarHeight + 'px', minHeight: height + 'px',
top: this.toolbarTop + 'px', top: this.toolbarTop + 'px',
}; };
}, },
......
<template> <template>
<div class="cw-toolbar-blocks"> <div class="cw-toolbar-blocks">
<div id="cw-toolbar-blocks-header" class="cw-toolbar-tool-header">
<form @submit.prevent="loadSearch"> <form @submit.prevent="loadSearch">
<div class="input-group files-search search cw-block-search"> <div class="input-group files-search search cw-block-search">
<input <input
...@@ -47,8 +46,7 @@ ...@@ -47,8 +46,7 @@
{{ category.title }} {{ category.title }}
</button> </button>
</div> </div>
</div>
<div class="cw-toolbar-tool-content" :style="toolContentStyle">
<div v-if="filteredBlockTypes.length > 0" class="cw-blockadder-item-list"> <div v-if="filteredBlockTypes.length > 0" class="cw-blockadder-item-list">
<draggable <draggable
v-if="filteredBlockTypes.length > 0" v-if="filteredBlockTypes.length > 0"
...@@ -83,7 +81,6 @@ ...@@ -83,7 +81,6 @@
mood="pointing" mood="pointing"
/> />
</div> </div>
</div>
</template> </template>
<script> <script>
...@@ -102,12 +99,6 @@ export default { ...@@ -102,12 +99,6 @@ export default {
CoursewareCompanionBox, CoursewareCompanionBox,
draggable, draggable,
}, },
props: {
toolbarContentHeight: {
type: Number,
required: true,
},
},
data() { data() {
return { return {
searchInput: '', searchInput: '',
...@@ -141,13 +132,6 @@ export default { ...@@ -141,13 +132,6 @@ export default {
{ title: this.$gettext('Biografie'), type: 'biography' }, { title: this.$gettext('Biografie'), type: 'biography' },
]; ];
}, },
toolContentStyle() {
const height = this.toolbarContentHeight - 115;
return {
height: height + 'px',
};
},
}, },
methods: { methods: {
...mapActions({ ...mapActions({
......
<template> <template>
<div class="cw-toolbar-clipboard cw-toolbar-tool-content" :style="toolContentStyle"> <div class="cw-toolbar-clipboard">
<courseware-collapsible-box :title="$gettext('Blöcke')" :open="clipboardBlocks.length > 0"> <courseware-collapsible-box :title="$gettext('Blöcke')" :open="clipboardBlocks.length > 0">
<template v-if="clipboardBlocks.length > 0"> <template v-if="clipboardBlocks.length > 0">
<div class="cw-element-inserter-wrapper"> <div class="cw-element-inserter-wrapper">
...@@ -101,12 +101,7 @@ export default { ...@@ -101,12 +101,7 @@ export default {
StudipDialog, StudipDialog,
draggable, draggable,
}, },
props: {
toolbarContentHeight: {
type: Number,
required: true,
},
},
data() { data() {
return { return {
showDeleteClipboardDialog: false, showDeleteClipboardDialog: false,
...@@ -148,11 +143,6 @@ export default { ...@@ -148,11 +143,6 @@ export default {
} }
return ''; return '';
}, },
toolContentStyle() {
return {
height: this.toolbarContentHeight + 'px',
};
},
}, },
methods: { methods: {
...mapActions({ ...mapActions({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment