summaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-10-04 22:48:29 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-10-04 22:48:58 +0200
commit4b10611e85adffe1234ce693348d87d11984b680 (patch)
treeb6be7dcfceb7fd5902ad2f0f2f1f4857b98584ae /sonar-server
parenta439f3d00760e7e2c0cd17590529ba58028eede8 (diff)
downloadsonarqube-4b10611e85adffe1234ce693348d87d11984b680.tar.gz
sonarqube-4b10611e85adffe1234ce693348d87d11984b680.zip
Add HTML IDs for integration tests
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb7
-rw-r--r--sonar-server/src/main/webapp/stylesheets/dashboard.css2
3 files changed, 6 insertions, 5 deletions
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 5c02d7a47e1..a4d9cce2c80 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
@@ -119,7 +119,7 @@ class DashboardController < ApplicationController
prop.save!
end
end
- widget.resource_id=params[:resource_id]
+ widget.resource_id=Project.by_key(params[:resource_id]).id
widget.configured=true
widget.save!
render :update do |page|
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb
index cdc03e0d892..bcac687922d 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb
@@ -1,7 +1,8 @@
<% form_remote_tag :url => {:action => :save_widget, :wid => widget.id, :id => params[:id]},
:method => :post,
:update => {:failure => "error#{widget.id}"},
- :failure => "$('error#{widget.id}').show()" do -%>
+ :failure => "$('error#{widget.id}').show()",
+ :id => "form-edit-#{widget.key.parameterize}" do -%>
<div id="error<%= widget.id -%>" class="error" style="display: none"></div>
<table class="table width100">
<tbody>
@@ -14,7 +15,7 @@
:resource_type_property => 'supportsGlobalDashboards',
:selected_resource => widget.resource,
:width => '250px',
- :html_id => "sel-prj-#{widget.id}"} -%>
+ :html_id => "widget-select-prj-#{widget.key.parameterize}"} -%>
</td>
</tr>
<% end %>
@@ -33,7 +34,7 @@
<tr>
<td colspan="2">
- <%= submit_tag message('save') %>
+ <%= submit_tag message('save'), :id => "widget-save-#{widget.key.parameterize}" -%>
<% if widget.configured %>
<a href="#" onClick="portal.cancelEditWidget(<%= widget.id -%>);return false;"><%= message('cancel') -%></a>
<% end %>
diff --git a/sonar-server/src/main/webapp/stylesheets/dashboard.css b/sonar-server/src/main/webapp/stylesheets/dashboard.css
index f7216704e12..4572c090454 100644
--- a/sonar-server/src/main/webapp/stylesheets/dashboard.css
+++ b/sonar-server/src/main/webapp/stylesheets/dashboard.css
@@ -46,7 +46,7 @@
#dashboard .widget-title {
background-color: #4B9FD5;
color: #FEFEFE;
- padding: 3px 0 3px 5px;
+ padding: 5px;
height: 16px;
line-height: 16px;
vertical-align: middle;