Skip to content
Snippets Groups Projects
Commit 0f1f137e authored by Marcus Eibrink-Lunzenauer's avatar Marcus Eibrink-Lunzenauer
Browse files

Rename ImageCard to SelectableImageCard.

parent 1028186a
Branches
No related tags found
No related merge requests found
Pipeline #12602 failed
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
/> />
</label> </label>
<label v-if="selectedStockImage"> <label v-if="selectedStockImage">
<StockImageCard :stock-image="selectedStockImage" /> <StockImageSelectableImageCard :stock-image="selectedStockImage" />
<button class="button" type="button" @click="selectedStockImage = null"> <button class="button" type="button" @click="selectedStockImage = null">
{{ $gettext('Entfernen') }} {{ $gettext('Entfernen') }}
</button> </button>
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
</template> </template>
<script> <script>
import StockImageCard from '../stock-images/ImageCard.vue'; import StockImageSelectableImageCard from '../stock-images/SelectableImageCard.vue';
import StockImageChooser from '../stock-images/ChooserDialog.vue'; import StockImageChooser from '../stock-images/ChooserDialog.vue';
import StudipSelect from './../StudipSelect.vue'; import StudipSelect from './../StudipSelect.vue';
import StudipWizardDialog from './../StudipWizardDialog.vue'; import StudipWizardDialog from './../StudipWizardDialog.vue';
...@@ -141,7 +141,7 @@ export default { ...@@ -141,7 +141,7 @@ export default {
name: 'courseware-shelf-dialog-add', name: 'courseware-shelf-dialog-add',
mixins: [colorMixin], mixins: [colorMixin],
components: { components: {
StockImageCard, StockImageSelectableImageCard,
StockImageChooser, StockImageChooser,
StudipWizardDialog, StudipWizardDialog,
StudipSelect, StudipSelect,
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
<ul> <ul>
<li v-for="stockImage in filteredStockImages" :key="stockImage.id"> <li v-for="stockImage in filteredStockImages" :key="stockImage.id">
<ImageCard :stock-image="stockImage" @click.native="onSelectImage(stockImage)" /> <SelectableImageCard :stock-image="stockImage" @click.native="onSelectImage(stockImage)" />
</li> </li>
</ul> </ul>
</div> </div>
...@@ -18,11 +18,10 @@ ...@@ -18,11 +18,10 @@
<script> <script>
import ChooserSearch from './ChooserSearch.vue'; import ChooserSearch from './ChooserSearch.vue';
import ImageCard from './ImageCard.vue'; import SelectableImageCard from './SelectableImageCard.vue';
import { orientations, similarColors } from './filters.js'; import { orientations, similarColors } from './filters.js';
const filter = (stockImages, filters) => { const filter = (stockImages, filters) => {
console.debug('filtering with filters', filters);
const orientation = orientations[filters.orientation] ?? orientations.any; const orientation = orientations[filters.orientation] ?? orientations.any;
const colors = similarColors(filters.colors ?? []); const colors = similarColors(filters.colors ?? []);
...@@ -56,7 +55,7 @@ export default { ...@@ -56,7 +55,7 @@ export default {
}, },
query: '', query: '',
}), }),
components: { ChooserSearch, ImageCard }, components: { ChooserSearch, SelectableImageCard },
computed: { computed: {
filteredStockImages() { filteredStockImages() {
return sort(filter(search(this.stockImages, this.query), this.activeFilters)); return sort(filter(search(this.stockImages, this.query), this.activeFilters));
...@@ -64,7 +63,6 @@ export default { ...@@ -64,7 +63,6 @@ export default {
}, },
methods: { methods: {
onUpdateActiveFilters(activeFilters) { onUpdateActiveFilters(activeFilters) {
console.debug('onUpdateActiveFilters', activeFilters);
this.activeFilters = activeFilters; this.activeFilters = activeFilters;
}, },
onSearch(query) { onSearch(query) {
......
...@@ -4,7 +4,7 @@ export { default as StockImagesChooser } from './Chooser.vue'; ...@@ -4,7 +4,7 @@ export { default as StockImagesChooser } from './Chooser.vue';
export { default as StockImagesChooserDialog } from './ChooserDialog.vue'; export { default as StockImagesChooserDialog } from './ChooserDialog.vue';
export { default as StockImagesChooserSearch } from './ChooserSearch.vue'; export { default as StockImagesChooserSearch } from './ChooserSearch.vue';
export { default as StockImagesEditDialog } from './EditDialog.vue'; export { default as StockImagesEditDialog } from './EditDialog.vue';
export { default as StockImagesImageCard } from './ImageCard.vue'; export { default as StockImagesSelectableImageCard } from './SelectableImageCard.vue';
export { default as StockImagesImagesFilters } from './ImagesFilters.vue'; export { default as StockImagesImagesFilters } from './ImagesFilters.vue';
export { default as StockImagesImagesList } from './ImagesList.vue'; export { default as StockImagesImagesList } from './ImagesList.vue';
export { default as StockImagesImagesListItem } from './ImagesListItem.vue'; export { default as StockImagesImagesListItem } from './ImagesListItem.vue';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment