From 6c947fa5bdfe63c58642e551abbae45d5f94de7d Mon Sep 17 00:00:00 2001
From: sgiehl <stefangiehl@gmail.com>
Date: Mon, 7 May 2012 20:12:56 +0000
Subject: [PATCH] refs #3065 fixes UX regression

git-svn-id: http://dev.piwik.org/svn/trunk@6254 59fd770c-687e-43c8-a1e3-f5a4ff64c105
---
 plugins/Dashboard/templates/dashboard.css | 2 +-
 plugins/Dashboard/templates/dashboard.js  | 4 +++-
 plugins/Dashboard/templates/widgetMenu.js | 3 +--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/plugins/Dashboard/templates/dashboard.css b/plugins/Dashboard/templates/dashboard.css
index 72cf88d082..b09621e344 100644
--- a/plugins/Dashboard/templates/dashboard.css
+++ b/plugins/Dashboard/templates/dashboard.css
@@ -338,7 +338,7 @@ div.widgetpreview-preview {
     width: 500px;
 }
 
-#dashboardSettings.widgetpreview-base {
+#dashboardSettings {
     min-height: 0;
     height: auto;
     margin-left: 10px;
diff --git a/plugins/Dashboard/templates/dashboard.js b/plugins/Dashboard/templates/dashboard.js
index d649a92256..7bc4555522 100644
--- a/plugins/Dashboard/templates/dashboard.js
+++ b/plugins/Dashboard/templates/dashboard.js
@@ -11,7 +11,7 @@ function initDashboard(dashboardId, dashboardLayout) {
     if($('#periodString').length)
     {
         $('#periodString').after($('#dashboardSettings'));
-        $('#dashboardSettings').css({left:$('#periodString')[0].offsetWidth+10});
+        $('#dashboardSettings').css({left:$('#periodString')[0].offsetWidth});
     }
     // Embed dashboard
     if(!$('#topBars').length)
@@ -42,6 +42,8 @@ function initDashboard(dashboardId, dashboardLayout) {
         }
     });
 
+    widgetsHelper.getAvailableWidgets();
+
     $('#dashboardWidgetsArea').on('dashboardempty', showEmptyDashboardNotification);
 
     $('#dashboardWidgetsArea').dashboard({
diff --git a/plugins/Dashboard/templates/widgetMenu.js b/plugins/Dashboard/templates/widgetMenu.js
index 0a717ba18b..b28aa9d2f3 100644
--- a/plugins/Dashboard/templates/widgetMenu.js
+++ b/plugins/Dashboard/templates/widgetMenu.js
@@ -32,8 +32,7 @@ widgetsHelper.getAvailableWidgets = function ()
     }
     
     return widgetsHelper.availableWidgets;
-
-}
+};
 
 /**
  * Returns the complete widget object by its unique id
-- 
GitLab