collapse / expand dir in the grid view
organize view hierarchy and handle select image/dir event
handle window resize events