diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-09-25 10:54:41 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-09-27 14:32:33 +0200 |
commit | d59f7d1b80279a16df8f97e17b78648016e45f50 (patch) | |
tree | d51f09252ce80f59d33507332f0d62e3e89276e6 | |
parent | b962250845d848e5c1f32eaee8deafc4792943a4 (diff) | |
download | sonarqube-d59f7d1b80279a16df8f97e17b78648016e45f50.tar.gz sonarqube-d59f7d1b80279a16df8f97e17b78648016e45f50.zip |
SONAR-3623 fix compatibility with IE7/8 + change button name of confirmation popups
7 files changed, 124 insertions, 22 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index abdbd4a4df6..bafe68fcfaa 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -1145,6 +1145,7 @@ quality_profiles.quality_profiles=Quality profiles quality_profiles.new_profile=New profile quality_profiles.compare_profiles=Compare profiles quality_profiles.restore_profile=Restore profile +quality_profiles.restore_submit=Restore quality_profiles.x_language_profiles= {0} profiles quality_profiles.optional_configuration_file=Optional configuration file quality_profiles.create_x_language_profile=Create {0} Profile diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb index efd21372d8c..39b9ac0f3ab 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb @@ -725,6 +725,7 @@ module ApplicationHelper # ==== Options # * <tt>:id</tt> - HTML ID of the button # * <tt>:class</tt> - Additional CSS class, generally 'red-button' for deletions + # * <tt>:button_key</tt> - Default is 'confirm' # * <tt>:title_key</tt> - # * <tt>:message_key</tt> - # * <tt>:message_params</tt> - @@ -734,6 +735,7 @@ module ApplicationHelper clazz = options[:class] id = "id='#{options[:id]}'" if options[:id] title_key = options[:title_key] + button_key = options[:button_key] message_key = options[:message_key] message_params = options[:message_params] width = options[:width]||500 @@ -744,6 +746,9 @@ module ApplicationHelper url += "&mk=#{message_key}&" url += message_params.map{|p| "mp=#{u p}"}.join('&') if message_params end + if button_key + url += "&bk=#{button_key}" + end "<a href='#{url}' modal-width='#{width}' class='open-modal button #{clazz}' #{id}>#{h label}</a>" end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb index 16a879d0ad1..63c5e59835a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb @@ -1,7 +1,8 @@ <% - title_key = params[:tk] || 'are_you_sure' + title_key = params[:tk] || 'confirm' message_key = params[:mk] || 'are_you_sure' message_params = params[:mp] || [] + button_key = params[:bk] || title_key %> <form id="confirm-form" method="post" action="<%= params[:url] -%>"> <fieldset> @@ -15,7 +16,7 @@ </div> </div> <div class="form-foot"> - <input type="submit" value="<%= h message('confirm') -%>" id="confirm-submit"/> + <input type="submit" value="<%= h message(button_key) -%>" id="confirm-submit"/> <a href="#" onclick="return closeModalWindow()" id="confirm-cancel"><%= h message('cancel') -%></a> </div> </fieldset> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_restore_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_restore_form.html.erb index a2274ec1d4f..ceb2dfcc8d5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_restore_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_restore_form.html.erb @@ -15,7 +15,7 @@ </div> <div class="form-foot"> - <input type="submit" value="<%= h message('quality_profiles.restore_profile') -%>" id="restore-profile-submit"/> + <input type="submit" value="<%= h message('quality_profiles.restore_submit') -%>" id="restore-profile-submit"/> <a href="#" onclick="return closeModalWindow()" id="restore-profile-cancel"><%= h message('cancel') -%></a> </div> </fieldset> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb index 59f703807f1..201a7718682 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb @@ -99,6 +99,7 @@ <%= button_to_action message('delete'), "profiles/delete/#{profile.id}", :class => 'red-button', :id => "delete_#{profile.key.parameterize}", + :button_key => 'delete', :title_key => 'quality_profiles.delete_confirm_title', :message_key => 'quality_profiles.are_you_sure_want_delete_profile_x', :message_params => [profile.name] diff --git a/sonar-server/src/main/webapp/stylesheets/jquery-ui.css b/sonar-server/src/main/webapp/stylesheets/jquery-ui.css index 2f131a68a02..fee2e781017 100755 --- a/sonar-server/src/main/webapp/stylesheets/jquery-ui.css +++ b/sonar-server/src/main/webapp/stylesheets/jquery-ui.css @@ -9,20 +9,114 @@ */ /* styles used by modal windows */ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } -.ui-helper-clearfix:after { clear: both; } -.ui-helper-clearfix { zoom: 1; } -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%;background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5) } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee 50% top repeat-x; color: #333333; } -.ui-widget-content a { color: #333333; } -.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 50% 50% repeat-x; color: #ffffff; font-weight: bold; } -.ui-widget-header a { color: #ffffff; } -.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; } -.ui-dialog { position: absolute; width: 300px; overflow: hidden; box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.5);background-color: #FFF} -.ui-dialog .ui-dialog-titlebar { display:none } -.ui-dialog .ui-dialog-content { position: relative; border: 0; background: none; overflow: auto; zoom: 1; }
\ No newline at end of file +.ui-helper-hidden { + display: none; +} + +.ui-helper-hidden-accessible { + position: absolute !important; + clip: rect(1px 1px 1px 1px); +} + +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} + +.ui-helper-clearfix:before, .ui-helper-clearfix:after { + content: ""; + display: table; +} + +.ui-helper-clearfix:after { + clear: both; +} + +.ui-helper-clearfix { + zoom: 1; +} + +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter: Alpha(Opacity = 0); +} + +.ui-widget-overlay { + position: absolute; + top: 0; + left: 0; + margin: 0; + padding: 0; + background-color: #000000; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; + filter: alpha(opacity = 50); + opacity: 0.5; +} + +.ui-widget .ui-widget { + font-size: 1em; +} + +.ui-widget-content { + border: 1px solid #dddddd; + background: #eeeeee 50% top repeat-x; + color: #333333; +} + +.ui-widget-content a { + color: #333333; +} + +.ui-widget-header { + border: 1px solid #e78f08; + background: #f6a828 50% 50% repeat-x; + color: #ffffff; + font-weight: bold; +} + +.ui-widget-header a { + color: #ffffff; +} + +.ui-widget-shadow { + margin: -5px 0 0 -5px; + padding: 5px; + background: #000000 50% 50% repeat-x; + opacity: .20; + filter: Alpha(Opacity = 20); + -moz-border-radius: 5px; + -khtml-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; +} + +.ui-dialog { + position: absolute; + width: 300px; + overflow: hidden; + box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.5); + background-color: #FFF +} + +.ui-dialog .ui-dialog-titlebar { + display: none +} + +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + background: none; + overflow: auto; + zoom: 1; +}
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css index dabef843723..cef77023fdc 100644 --- a/sonar-server/src/main/webapp/stylesheets/style.css +++ b/sonar-server/src/main/webapp/stylesheets/style.css @@ -306,7 +306,7 @@ h4, .h4 { .info { background-color: #CAE3F2; - padding: 4px; + padding: 5px; border: 1px solid #4B9FD5; } @@ -2357,7 +2357,7 @@ select.medium-width { } .form-body { - padding: 5px; + padding: 10px; } .form-field { |