app: move off the view-display code into shared-js, adjust the trigger names accordingly
app: don't fire the edit event handler twice