Added javascript to layout views.