From cf9a51847405a117a66392c8543e38921cf372b0 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 15 Aug 2011 16:21:31 +0200 Subject: [PATCH] SONAR-2556 Adding new widgets to a dashboard re-organizes the first column --- .../main/webapp/WEB-INF/app/controllers/dashboard_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb index 40981b63a1c..f7245aefa82 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb @@ -95,7 +95,7 @@ class DashboardController < ApplicationController if dashboard.editable_by?(current_user) definition=java_facade.getWidget(params[:widget]) if definition - first_column_widgets=dashboard.widgets.select{|w| w.column_index==1} + first_column_widgets=dashboard.widgets.select{|w| w.column_index==1}.sort_by{|w| w.row_index} new_widget=dashboard.widgets.create(:widget_key => definition.getId(), :name => definition.getTitle(), :column_index => 1, -- 2.39.5