Merge branch 'develop' of https://github.com/tainacan/tainacan into develop
This commit is contained in:
commit
af0f981ddd
|
@ -24,17 +24,10 @@ export const eventBus = new Vue({
|
|||
for (let eventElement of components){
|
||||
eventElement.addEventListener('input', (event) => {
|
||||
if (event.detail && event.detail[0] ){
|
||||
const promisse = this.$store.dispatch('item/updateMetadata',
|
||||
{ item_id: $(eventElement).attr("item_id"), field_id: $(eventElement).attr("field_id"), values: event.detail });
|
||||
|
||||
promisse.then( response => {
|
||||
// eventElement.errorsMsg = JSON.stringify( [] );
|
||||
// eventElement.value = response.value;
|
||||
$(eventElement).val(response.value);
|
||||
}, error => {
|
||||
const field = this.errors.find(error => error.field_id === event.detail[0].field_id );
|
||||
// eventElement.errorsMsg = JSON.stringify( field.error );
|
||||
// eventElement.value = event.detail[0].values;
|
||||
this.updateValue({
|
||||
item_id: $(eventElement).attr("item_id"),
|
||||
field_id: $(eventElement).attr("field_id"),
|
||||
values: event.detail
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue