]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2436 Add red color to "Delete"-like buttons
authorFabrice Bellingard <bellingard@gmail.com>
Fri, 17 Jun 2011 09:08:24 +0000 (11:08 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Fri, 17 Jun 2011 09:08:24 +0000 (11:08 +0200)
sonar-server/src/main/webapp/WEB-INF/app/views/event_categories/index.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/filters/new.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/project/settings/_delete_project.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/edit.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/system_updates.html.erb
sonar-server/src/main/webapp/stylesheets/style.css

index 7ce1cdb16402ec17fa23cf3df280d558a628911d..c1ea394f1449da6e026db33ebd7767002c34c483 100644 (file)
@@ -21,7 +21,7 @@
           </td>
           <td class="left">
           <% if category.editable? %>
-              <form method="post" action="<%= ApplicationController.root_context -%>/event_categories/delete" class="button-to"><div><input type="hidden" name="name" value="<%= category.name -%>"/> <input class="action" id="delete_<%= category.name -%>" onclick="return confirm('Info : events with this category will not be deleted.');" value="Delete" type="submit"></div></form>
+              <form method="post" action="<%= ApplicationController.root_context -%>/event_categories/delete" class="button-to"><div><input type="hidden" name="name" value="<%= category.name -%>"/> <input class="action red-button" id="delete_<%= category.name -%>" onclick="return confirm('Info : events with this category will not be deleted.');" value="Delete" type="submit"></div></form>
           <% end %>
           </td>
         </tr>
index b8fabbfd88da72722682cb067378274aa3a31695..5fb9ed095e7ff14613040e8cfccc542b90723f80 100644 (file)
@@ -163,7 +163,7 @@ table#columns td {
             <input type="submit" value="Save & Close" />
             <span class="spacer"> </span>
             <% if @filter.id %>
-              <%= link_to "Delete", {:action => 'delete', :id => @filter.id}, :method => :post, :confirm => 'Do you want to delete this filter ?' %>
+              <input class="red-button" type="submit" value="Delete" onclick="return confirm('Do you want to delete this filter ?');">
               <span class="spacer"> </span>
               <a href="<%= url_for :action => 'index', :name => @filter.name -%>">Cancel</a>
             <% else %>
index c3d2cf5104ee0d5f8b9289cd0fb29e621f661f8e..0c52938ba878b5851dbda15f7a70624ca35341b6 100644 (file)
 
         <td>
             <% if profile.deletable? %>
-            <%= button_to "Delete", { :action => 'delete', :id => profile.id }, :class => 'action',
+            <%= button_to "Delete", { :action => 'delete', :id => profile.id }, :class => 'action red-button',
                         :id => "delete_#{u profile.key}",
                         :confirm => "Are you sure that you want to delete the profile '#{profile.name}' ?",
                         :method => :post %>
index 22ed6b0059336e77e6087d543ed078f2dd29172e..7e89d570273aa5856c416f2ffc2ddaa452281257 100644 (file)
@@ -3,7 +3,7 @@
 <div class="yui-g widget" id="widget_delete_project">
   <div class="warning">
     This operation can not be undone.
-    <%= button_to( "Delete project", { :action => "delete", :id => @project.id }, :confirm => "Are you sure you want to delete this project?", :method => :delete) %>
+    <%= button_to( "Delete project", { :action => "delete", :id => @project.id }, :class => 'action red-button', :confirm => "Are you sure you want to delete this project?", :method => :delete) %>
   </div>
 </div>
 <% end %>
\ No newline at end of file
index a156e45d7270900e34d5a205fd7794048c70b055..de04a3f4e4b0cc1484fb86657dad3a208dc2781f 100644 (file)
@@ -60,7 +60,7 @@
   <tr>
     <td colspan="3">
       <input type="submit" value="Update"></input>
-      <input type="submit" value="Delete" onclick="return deleteRule()"></input>
+      <input type="submit" value="Delete" onclick="return deleteRule()" class="red-button"></input>
       <a href="<%= url_for :action => 'index', :id => @profile.id -%>">Cancel</a>
     </td>
   </tr>
index add8e887402d85b5776671e680ca70249848e315..50e4ad7029fb4548434f3256f23874985f0420c0 100644 (file)
@@ -44,7 +44,7 @@
           <tr>
             <td colspan="2">
              <form method="post" action="<%= ApplicationController.root_context -%>/updatecenter/uninstall?key=<%= plugin.getKey() -%>" style="display: inline-block">
-               <input type="submit" value="Uninstall"></input>
+               <input type="submit" value="Uninstall" class="red-button"></input>
              </form>
               </td>
             </tr>
index a5e950f0580def1542f48c9bc028305aaf6131b5..1c71d8c1649e3ce2d7ace75dd1ff38ad2e179c48 100644 (file)
@@ -66,7 +66,7 @@
                    <% update.getIncompatiblePlugins().each do |incompatible_plugin| %>
                       <li>
                       <form method="post" action="<%= ApplicationController.root_context -%>/updatecenter/uninstall?key=<%= incompatible_plugin.getKey() -%>&amp;from=system_updates" style="display: inline-block">
-                        <%= image_tag 'warning.png' -%> <input type="submit" value="Uninstall" onClick="return submitForm(this);"></input> the plugin <%= incompatible_plugin.getName() -%> which is not compatible with Sonar <%= release.getVersion() -%>.
+                        <%= image_tag 'warning.png' -%> <input type="submit" value="Uninstall" class="red-button" onClick="return submitForm(this);"></input> the plugin <%= incompatible_plugin.getName() -%> which is not compatible with Sonar <%= release.getVersion() -%>.
                       </form>
                    </li>
              <% end %>
index 39bd63d2a1c73b7f38bab3c9ce63750019b866bc..09c0a8fd691cc845b6553bcaa422a2d3224de17f 100644 (file)
@@ -312,7 +312,7 @@ button, .button, input[type="submit"], input[type="button"] {
   font-size:90%;
   text-align: center;
   text-decoration: none;
-  text-shadow: 0 1px 1px rgba(0,0,0,.3);
+  text-shadow: 1px 1px 0 #FFFFFF;
   
   cursor: pointer;
   outline: none;
@@ -325,12 +325,12 @@ button, .button, input[type="submit"], input[type="button"] {
   -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
   box-shadow: 0 1px 2px rgba(0,0,0,.2);
   
-  color: #d9eef7;
-  border: solid 1px #0076a3;
-  background: #0095cd;
-  background: -webkit-gradient(linear, left top, left bottom, from(#7BCFF5), to(#2B7FB5));
-  background: -moz-linear-gradient(top,  #7BCFF5,  #2B7FB5);
-  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#7BCFF5', endColorstr='#2B7FB5');
+  color: #333333;
+  border: solid 1px #EBEBEB;
+  background: #EBEBEB;
+  background: -webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#E1E1E1));
+  background: -moz-linear-gradient(top,  #FFFFFF,  #E1E1E1);
+  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#E1E1E1');
   
   vertical-align: baseline;
   display: inline-block;
@@ -338,20 +338,44 @@ button, .button, input[type="submit"], input[type="button"] {
   zoom: 1; 
   *display: inline;
 }
+.red-button {
+  color: #990000 !important;
+}
 button:hover, .button:hover, input[type="submit"]:hover, input[type="button"]:hover {
   text-decoration: none;
+  text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3);
+  color: #FFFFFF;
+  border: solid 1px #0770A0;
   background: #007ead;
-  background: -webkit-gradient(linear, left top, left bottom, from(#0095cc), to(#00678e));
-  background: -moz-linear-gradient(top,  #0095cc,  #00678e);
-  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#0095cc', endColorstr='#00678e');
+  background: -webkit-gradient(linear, left top, left bottom, from(#0CA6DD), to(#0770A0));
+  background: -moz-linear-gradient(top,  #0CA6DD,  #0770A0);
+  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#0CA6DD', endColorstr='#0770A0');
+}
+.red-button:hover {
+  color: #FFFFFF !important;
+  border: solid 1px #CD504A !important;
+  background: #B33630 !important;
+  background: -webkit-gradient(linear, left top, left bottom, from(#DC5F59), to(#B33630)) !important;
+  background: -moz-linear-gradient(top,  #DC5F59,  #B33630) !important;
+  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#DC5F59', endColorstr='#B33630') !important;
 }
 button:active, .button:active, input[type="submit"]:active, input[type="button"]:active {
   position: relative;
-  top: 1px;  
-  color: #80bed6;
-  background: -webkit-gradient(linear, left top, left bottom, from(#0078a5), to(#00adee));
-  background: -moz-linear-gradient(top,  #0078a5,  #00adee);
-  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#0078a5', endColorstr='#00adee');
+  top: 1px;
+  text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3);
+  color: #FFFFFF;
+  border: solid 1px #2790C0;
+  background: -webkit-gradient(linear, left top, left bottom, from(#0076AD), to(#2790C0));
+  background: -moz-linear-gradient(top,  #0076AD,  #2790C0);
+  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#0076AD', endColorstr='#2790C0');
+}
+.red-button:active {
+  color: #FFFFFF !important;
+  border: solid 1px #CD504A !important;
+  background: #B33630 !important;
+  background: -webkit-gradient(linear, left top, left bottom, from(#AC2F29), to(#D35650)) !important;
+  background: -moz-linear-gradient(top,  #AC2F29,  #D35650) !important;
+  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#AC2F29', endColorstr='#D35650') !important;
 }
 
 */