fix javascript for item edition