modify edit/view mode js