change mapper selection from dropbox to select

This commit is contained in:
Jacson Passold 2018-06-12 16:38:46 -03:00
parent 422de8f1be
commit cf7086f11a
1 changed files with 32 additions and 29 deletions

View File

@ -156,20 +156,17 @@
</section> </section>
<section > <section >
<div class="field is-grouped form-submit"> <div class="field is-grouped form-submit">
<b-dropdown id="mappers-options-dropdown"> <b-select
<button id="mappers-options-dropdown"
class="button is-secondary" class="button is-secondary"
slot="trigger"> :placeholder="$i18n.get('mappers')">
<div>{{ $i18n.get('mappers') }}</div> <option
<b-icon icon="menu-down"/>
</button>
<b-dropdown-item
:key="metadatum_mapper.slug"
v-for="metadatum_mapper in metadatum_mappers" v-for="metadatum_mapper in metadatum_mappers"
:key="metadatum_mapper.slug"
@click="onSelectMetadataMapper(metadatum_mapper)"> @click="onSelectMetadataMapper(metadatum_mapper)">
{{ $i18n.get(metadatum_mapper.name) }} {{ $i18n.get(metadatum_mapper.name) }}
</b-dropdown-item> </option>
</b-dropdown> </b-select>
<div <div
class="control" class="control"
v-if="mapper != '' && !isLoadingMetadatumMappers"> v-if="mapper != '' && !isLoadingMetadatumMappers">
@ -430,6 +427,7 @@ export default {
this.openedMetadatumId = ''; this.openedMetadatumId = '';
}, },
onSelectMetadataMapper(metadatum_mapper) { onSelectMetadataMapper(metadatum_mapper) {
if(metadatum_mapper != '') {
this.isMapperMetadataLoading = true; this.isMapperMetadataLoading = true;
this.mapper = metadatum_mapper; this.mapper = metadatum_mapper;
for (var k in metadatum_mapper.metadata) { for (var k in metadatum_mapper.metadata) {
@ -449,6 +447,7 @@ export default {
} }
this.isMapperMetadataLoading = false; this.isMapperMetadataLoading = false;
//console.log(JSON.stringify(this.mapperMetadata)); //console.log(JSON.stringify(this.mapperMetadata));
}
}, },
isMetadatumSelected(id) { isMetadatumSelected(id) {
return this.mappedMetadata.indexOf(id) > -1; return this.mappedMetadata.indexOf(id) > -1;
@ -883,5 +882,9 @@ export default {
} }
} }
#mappers-options-dropdown {
background-color: transparent;
color: #fff;
}
</style> </style>