new method for post update
fix some logic
add js files
complete posts view
fix an error