fixed directory click event, menu for directories and files