added events and implemented open function for top and bottom toolbar