Fix minor bug in dsjs.php -- restore function endEditItem