Added Dity close code to DetailPanel