editor: display error in inputs

This commit is contained in:
jean-emmanuel 2017-03-14 21:46:13 +01:00
parent 4f6fc0c868
commit 208895d525
2 changed files with 11 additions and 1 deletions

View file

@ -102,7 +102,14 @@ var editObject = function(container, data, refresh){
data[$(this).attr('title')] = v
if (v==='' && isWidget) delete data[$(this).attr('title')]
updateDom(container,data)
try {
updateDom(container,data)
input.removeClass('error')
} catch (err) {
input.addClass('error')
throw err
}
})
}

View file

@ -80,6 +80,9 @@
color: var(--color-accent)
}
}
.error {
border-left: 1rem solid rgba(red, .75);
}
.select-wrapper {
position: relative;
width:100%;