changed edit row JS to generate HTML in server side and not to reimplement type viewers in JS