File tree Expand file tree Collapse file tree 5 files changed +18
-30
lines changed
contentcuration/contentcuration/frontend
channelEdit/views/ImportFromChannels
channelList/views/Channel Expand file tree Collapse file tree 5 files changed +18
-30
lines changed Original file line number Diff line number Diff line change 2525 v-model =" channel_id__in"
2626 :label =" $tr('channelSourceLabel')"
2727 :items =" channelOptions"
28- item-text =" name"
29- item-value =" id"
3028 :disabled =" loadingChannels"
3129 notranslate
3230 useEllipsis
6462 v-model =" kinds"
6563 :items =" kindFilterOptions"
6664 :label =" $tr('kindLabel')"
67- item-text =" text"
6865 />
6966
7067 <!-- Language -->
7875 v-model =" licenses"
7976 :items =" licenseOptions"
8077 :label =" $tr('licensesLabel')"
81- item-text =" text"
8278 />
8379
8480 <!-- Created after -->
210206 this .channel_id__in = [];
211207 }
212208
213- this .channelOptions = channels .filter (c => c .id !== this .currentChannelId );
209+ const filteredChannels = channels .filter (c => c .id !== this .currentChannelId );
210+ this .channelOptions = filteredChannels .map (channel => ({
211+ value: channel .id ,
212+ text: channel .name ,
213+ }));
214214 this .loadingChannels = false ;
215215 });
216216 },
Original file line number Diff line number Diff line change 6060 v-model =" licenses"
6161 :items =" licenseOptions"
6262 :label =" $tr('licenseLabel')"
63- item-text =" text"
6463 />
6564
6665 <!-- Formats (attach to self to keep in notranslate class) -->
6766 <MultiSelect
6867 v-model =" kinds"
6968 :items =" kindOptions"
7069 :label =" $tr('formatLabel')"
71- item-text =" text"
7270 />
7371
7472 <!-- Starred -->
Original file line number Diff line number Diff line change 114114 v-model =" publicChannels"
115115 :label =" $tr('selectAllThatApplyPlaceholder')"
116116 :items =" publicChannelOptions"
117- :item-value =" channelName"
118- item-text =" name"
119117 notranslate
120118 :box =" false"
121119 />
365363 ];
366364 },
367365 publicChannelOptions () {
368- return sortBy (this .channels , c => c .name .toLowerCase ()).filter (c => ! c .public );
366+ const options = sortBy (this .channels , c => c .name .toLowerCase ()).filter (c => ! c .public );
367+ return options .map (option => ({
368+ text: option .name ,
369+ value: this .channelName (option),
370+ }));
369371 },
370372 },
371373 methods: {
Original file line number Diff line number Diff line change 9898 <KTransition kind =" component-vertical-slide-out-in" >
9999 <RequestForm
100100 v-show =" showRequestForm"
101+ ref =" requestform"
101102 @submitted =" showRequestForm = false"
102103 />
103104 </KTransition >
156157 this .showRequestForm = ! this .showRequestForm ;
157158 if (this .showRequestForm ) {
158159 this .$nextTick (() => {
159- if (window .scroll ) {
160- window .scroll ({
161- top: this .$refs .requestheader .offsetTop - 24 ,
162- behavior: ' smooth' ,
163- });
164- }
160+ this .$nextTick (() => {
161+ // Wait for the form to be visible
162+ // then scroll to the top of the form
163+ this .$refs .requestform .$el .scrollIntoView ({ behavior: ' smooth' , block: ' start' });
164+ });
165165 });
166166 }
167167 },
Original file line number Diff line number Diff line change 1818 >
1919 <template #selection =" { item } " >
2020 <VChip :class =" { notranslate }" >
21- {{ getText( item) }}
21+ {{ item.text }}
2222 </VChip >
2323 </template >
2424 <template #item =" { item } " >
3333 :style =" getEllipsisStyle()"
3434 dir =" auto"
3535 >
36- {{ getText( item) }}
36+ {{ item.text }}
3737 </span >
3838 </Checkbox >
3939 </template >
6767 return [];
6868 },
6969 },
70- itemText: {
71- type: [String , Function ],
72- required: true ,
73- },
7470 notranslate: {
7571 type: Boolean ,
7672 default: false ,
109105 }
110106 : {};
111107 },
112- getText (item ) {
113- if (typeof this .itemText === ' string' ) {
114- return item[this .itemText ];
115- } else if (typeof this .itemText === ' function' ) {
116- return this .itemText (item);
117- }
118- return item .text || item;
119- },
120108 resetScroll () {
121109 const [{ value: firstItemValue } = {}] = this .items || [];
122110 if (! firstItemValue) {
You can’t perform that action at this time.
0 commit comments