diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchFilters.vue b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchFilters.vue index 771c7a6f43..4c32fd9011 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchFilters.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchFilters.vue @@ -25,8 +25,6 @@ v-model="channel_id__in" :label="$tr('channelSourceLabel')" :items="channelOptions" - item-text="name" - item-value="id" :disabled="loadingChannels" notranslate useEllipsis @@ -64,7 +62,6 @@ v-model="kinds" :items="kindFilterOptions" :label="$tr('kindLabel')" - item-text="text" /> @@ -78,7 +75,6 @@ v-model="licenses" :items="licenseOptions" :label="$tr('licensesLabel')" - item-text="text" /> @@ -210,7 +206,11 @@ this.channel_id__in = []; } - this.channelOptions = channels.filter(c => c.id !== this.currentChannelId); + const filteredChannels = channels.filter(c => c.id !== this.currentChannelId); + this.channelOptions = filteredChannels.map(channel => ({ + value: channel.id, + text: channel.name, + })); this.loadingChannels = false; }); }, diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue index fdedd45837..e6e83f74a2 100644 --- a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue +++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue @@ -60,7 +60,6 @@ v-model="licenses" :items="licenseOptions" :label="$tr('licenseLabel')" - item-text="text" /> @@ -68,7 +67,6 @@ v-model="kinds" :items="kindOptions" :label="$tr('formatLabel')" - item-text="text" /> diff --git a/contentcuration/contentcuration/frontend/settings/pages/Storage/RequestForm.vue b/contentcuration/contentcuration/frontend/settings/pages/Storage/RequestForm.vue index 1f8e44814f..325b26bf0e 100644 --- a/contentcuration/contentcuration/frontend/settings/pages/Storage/RequestForm.vue +++ b/contentcuration/contentcuration/frontend/settings/pages/Storage/RequestForm.vue @@ -114,8 +114,6 @@ v-model="publicChannels" :label="$tr('selectAllThatApplyPlaceholder')" :items="publicChannelOptions" - :item-value="channelName" - item-text="name" notranslate :box="false" /> @@ -365,7 +363,11 @@ ]; }, publicChannelOptions() { - return sortBy(this.channels, c => c.name.toLowerCase()).filter(c => !c.public); + const options = sortBy(this.channels, c => c.name.toLowerCase()).filter(c => !c.public); + return options.map(option => ({ + text: option.name, + value: this.channelName(option), + })); }, }, methods: { diff --git a/contentcuration/contentcuration/frontend/settings/pages/Storage/index.vue b/contentcuration/contentcuration/frontend/settings/pages/Storage/index.vue index 3d353e5dfd..b551814440 100644 --- a/contentcuration/contentcuration/frontend/settings/pages/Storage/index.vue +++ b/contentcuration/contentcuration/frontend/settings/pages/Storage/index.vue @@ -98,6 +98,7 @@ @@ -156,12 +157,11 @@ this.showRequestForm = !this.showRequestForm; if (this.showRequestForm) { this.$nextTick(() => { - if (window.scroll) { - window.scroll({ - top: this.$refs.requestheader.offsetTop - 24, - behavior: 'smooth', - }); - } + this.$nextTick(() => { + // Wait for the form to be visible + // then scroll to the top of the form + this.$refs.requestform.$el.scrollIntoView({ behavior: 'smooth', block: 'start' }); + }); }); } }, diff --git a/contentcuration/contentcuration/frontend/shared/views/form/MultiSelect.vue b/contentcuration/contentcuration/frontend/shared/views/form/MultiSelect.vue index 34e469be03..372ffe4175 100644 --- a/contentcuration/contentcuration/frontend/shared/views/form/MultiSelect.vue +++ b/contentcuration/contentcuration/frontend/shared/views/form/MultiSelect.vue @@ -18,7 +18,7 @@ > @@ -67,10 +67,6 @@ return []; }, }, - itemText: { - type: [String, Function], - required: true, - }, notranslate: { type: Boolean, default: false, @@ -109,14 +105,6 @@ } : {}; }, - getText(item) { - if (typeof this.itemText === 'string') { - return item[this.itemText]; - } else if (typeof this.itemText === 'function') { - return this.itemText(item); - } - return item.text || item; - }, resetScroll() { const [{ value: firstItemValue } = {}] = this.items || []; if (!firstItemValue) {