Merge branch 'develop' of https://github.com/tainacan/tainacan into develop

This commit is contained in:
weryques 2018-02-15 09:25:07 -02:00
commit af0f981ddd
1 changed files with 4 additions and 11 deletions

View File

@ -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
});
}
});