]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3623 fix compatibility with IE7/8 + change button name of confirmation popups
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 25 Sep 2012 08:54:41 +0000 (10:54 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 27 Sep 2012 12:32:33 +0000 (14:32 +0200)
plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_restore_form.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
sonar-server/src/main/webapp/stylesheets/jquery-ui.css
sonar-server/src/main/webapp/stylesheets/style.css

index abdbd4a4df6aea82c0fea3ebf04cc33745ca447c..bafe68fcfaa8f9ef9eac3a52da1e6755e96d1d52 100644 (file)
@@ -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
index efd21372d8c5ee74a3931fd183e8a4bb5668f5e0..39b9ac0f3abd10fcf097d05676e796d3e6d8b01a 100644 (file)
@@ -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
index 16a879d0ad1adc7c8b30ccdf161b20f957f9eb5d..63c5e59835a118f32c04cc0aeab259a7214ddec8 100644 (file)
@@ -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>
index a2274ec1d4f2177625648ea2be18303002bf9a48..ceb2dfcc8d583ffc865184312bf80f0e8e65bb02 100644 (file)
@@ -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>
index 59f703807f119c39d02e9a21c0e73867539831d1..201a77186820cf8fe6e8540842a7c6adf34dd13e 100644 (file)
@@ -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]
index 2f131a68a02396e86eea9aebc1585c3df6bf7069..fee2e781017fae64458c8857508901f6bc3b5269 100755 (executable)
  */
 
 /* 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
index dabef843723d7c384af9fad7286adc19d30a6c4e..cef77023fdcaa39d129f2bdcb985ffbb959ddad5 100644 (file)
@@ -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 {