From: David Gageot Date: Fri, 21 Sep 2012 06:43:01 +0000 (+0200) Subject: SONAR-3754 Improvements X-Git-Tag: 3.3~265 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6db62fc89efd799d9a1c69c6e8c10719a26984ab;p=sonarqube.git SONAR-3754 Improvements --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/settings_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/settings_helper.rb index b6dfedd5fc5..fe7ab2ea4ee 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/settings_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/settings_helper.rb @@ -19,15 +19,19 @@ # module SettingsHelper def category_name(category) - message_or_default("property.category.#{category}", category) + message("property.category.#{category}", :default => category) end def property_name(property) - message_or_default("property.#{property.key()}.name", property.name()) + message("property.#{property.key()}.name", :default => property.name()) end def property_description(property) - message_or_default("property.#{property.key()}.description", property.description()) + message("property.#{property.key()}.description", :default => property.description()) + end + + def property_help(property) + message("property.#{property.key()}.help", :default => '') end def property_value(property) @@ -46,10 +50,6 @@ module SettingsHelper property.getType() end - def message_or_default(message_key, default) - message(message_key, :default => default) - end - def by_name(categories) categories.sort_by { |category| category_name(category) } end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb index 111a50eca07..afd4ebe9269 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb @@ -1,3 +1,8 @@ + <% form_tag({:action => 'save'}) do -%> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_iframe.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_iframe.html.erb new file mode 100644 index 00000000000..6e20677bf70 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_iframe.html.erb @@ -0,0 +1,7 @@ +
+ <% if @snapshot %>

<%= @snapshot.project.name(true) %>

<% end %> + + + + <%= yield %> +
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_multi_value.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_multi_value.html.erb index a571f937090..3bc94037b05 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_multi_value.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_multi_value.html.erb @@ -1,5 +1,5 @@ -
+
<%= render "settings/type_#{property_type(property, value)}", :property => property, :value => value -%> - + <%= message('delete') -%>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb index 3e9602d4820..7719dc2d209 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb @@ -7,7 +7,7 @@ :update => 'properties', :script => false do -%> -
+
@@ -34,14 +34,22 @@ - <%= message('settings.add') -%> - <% else -%> + +
+ <% else -%> <%= render "settings/type_#{property_type(property, value)}", :property => property, :value => value -%> <% end -%> <% default_prop_value = (@resource ? Property.value(property.key, nil, property.defaultValue) : property.defaultValue) -%> - <% unless default_prop_value.blank? %> -

Default: <%= property.type.to_s=='PASSWORD' ? '********' : h(default_prop_value) -%>

+ <% unless default_prop_value.blank? -%> +
Default: <%= property.type.to_s=='PASSWORD' ? '********' : h(default_prop_value) -%>
+ <% end -%> + + <% details = property_help(property) -%> + <% unless details.blank? -%> +
+ +
<%= details -%>
<% end -%> @@ -55,13 +63,21 @@ <% end -%> <% end -%> - \ No newline at end of file + + function enlargeTextInput(propertyKey) { + var input = $j('#' + propertyKey); + var textArea = ''; + input.replaceWith(textArea); + } + diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_settings.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_settings.html.erb index 3411c37143a..c1cb9efeb22 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_settings.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_settings.html.erb @@ -3,7 +3,7 @@
<%= h category_name(@category) -%>
- +
@@ -26,13 +26,4 @@ -
<%= message('category') -%>
- - +
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_type_STRING.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_type_STRING.html.erb index 7292d327860..07d91a2313e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_type_STRING.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_type_STRING.html.erb @@ -1,2 +1,4 @@ - -<%= link_to_function(image_tag('zoom.png'), "enlargeTextInput('#{property.key}')", :class => 'nolink') -%> \ No newline at end of file + +<% unless property.multi_values -%> + <%= link_to_function(image_tag('zoom.png'), "enlargeTextInput('input_#{property.key.parameterize}')", :class => 'nolink') -%> +<% end -%> diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css index ff58b01e301..7b6ab514660 100644 --- a/sonar-server/src/main/webapp/stylesheets/style.css +++ b/sonar-server/src/main/webapp/stylesheets/style.css @@ -2031,6 +2031,10 @@ div.break30 { margin-bottom: 10px; } +.marginbottom5 { + margin-bottom: 5px; +} + .marginright10 { margin-right: 10px; } @@ -2087,11 +2091,6 @@ table.nowrap td, td.nowrap, th.nowrap { padding: 2px 0 2px 20px; } -.delete { - background: url("../images/cross.png") no-repeat scroll left 50% transparent; - padding: 2px 0 2px 20px; -} - .restore { display: block; background: url("../images/restore.gif") no-repeat scroll left 50% transparent;