commit 5d6ab0b1e2b6fdb0a751266db46b84d23f470f0d
Author: Amos Benari <abenari@redhat.com>
Date:   Mon Dec 30 16:15:01 2013 +0200

    refs #3811 - additional bootstrap 3 updates/fixes
    
    * css renamed alert-error is now alert-danger
    * spinner progress indicators are back
    * fixed progress bar on create host

diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index 8c32f8c67..0dbc684d6 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -25,7 +25,7 @@ function onContentLoad(){
   }
 
   $('.flash.error').each(function(index, item) {
-     if ($('.alert-message.alert-error.base').length == 0) {
+     if ($('.alert-message.alert-danger.base').length == 0) {
        if ($('#host-conflicts-modal').length == 0) {
          notify(item, 'error');
        }
@@ -291,6 +291,7 @@ function update_puppetclasses(element) {
   var data = $("form").serialize().replace('method=put', 'method=post');
   data = data + '&host_id=' + host_id
   if (env_id == "") return;
+  $(element).indicator_show();
   $.ajax({
     type: 'post',
     url:  url,
@@ -301,7 +302,7 @@ function update_puppetclasses(element) {
       $('[rel="twipsy"]').tooltip();
     },
     complete: function() {
-      $('#hostgroup_indicator').hide();
+      $(element).indicator_hide();
     }
   })
 }
@@ -323,11 +324,11 @@ $(function() {
 });
 
 $.fn.indicator_show = function(){
-  $(this).parent().find('img').show();
+ $(this).parents('.form-group').find('img').show();
 }
 
 $.fn.indicator_hide = function(){
-  $(this).parent().find('img').hide();
+ $(this).parents('.form-group').find('img').hide();
 }
 
 function spinner_placeholder(text){
diff --git a/app/assets/javascripts/host_edit.js b/app/assets/javascripts/host_edit.js
index f3eccc9a6..09af3ef45 100644
--- a/app/assets/javascripts/host_edit.js
+++ b/app/assets/javascripts/host_edit.js
@@ -32,7 +32,7 @@ function computeResourceSelected(item){
       },
       success: function(result){
         $('#compute_resource').html(result);
-        if ($('#compute_resource').find('.alert-error').length > 0) $('#compute_resource_tab a').addClass('tab-error');
+        if ($('#compute_resource').find('.alert-danger').length > 0) $('#compute_resource_tab a').addClass('tab-error');
         update_capabilities($('#capabilities').val());
       }
     })
@@ -103,7 +103,7 @@ function clear_errors(){
   $('.error').children().children('.help-block').remove();
   $('.error').removeClass('error');
   $('.tab-error').removeClass('tab-error');
-  $('.alert-error').remove();
+  $('.alert-danger').remove();
 }
 
 function animate_progress(){
@@ -123,15 +123,14 @@ function update_progress(data){
 
   var done_tasks = $('.glyphicon-check',data).size();
   var failed_tasks = $('.glyphicon-remove',data).size();
-  var $progress = $('.progress');
 
   $("#host-progress").show();
   if(failed_tasks > 0) {
-    $progress.removeClass('progress-success').addClass('progress-danger');
+    $('.progress-bar').addClass('progress-bar-danger');
   }else{
-    $progress.removeClass('progress-danger').addClass('progress-success');
+    $('.progress-bar').removeClass('progress-bar-danger');
   }
-  $('.bar').width(done_tasks/task_list_size *$progress.width());
+  $('.progress-bar').width(done_tasks/task_list_size * 100 + '%')
   $('#tasks_progress').replaceWith(data);
 }
 
diff --git a/app/assets/javascripts/two-pane.js b/app/assets/javascripts/two-pane.js
index c0f9012d7..f47a5d0ce 100644
--- a/app/assets/javascripts/two-pane.js
+++ b/app/assets/javascripts/two-pane.js
@@ -125,7 +125,7 @@ function clear_errors(){
   $('.error .help-block').hide();
   $('.error').removeClass('error');
   $('.tab-error').removeClass('tab-error');
-  $('.alert-error').remove();
+  $('.alert-danger').remove();
 }
 
 // when ajax call hit a session time out it should handle the redirect to login correctly.
diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb
index e41c71163..247e0e188 100644
--- a/app/helpers/layout_helper.rb
+++ b/app/helpers/layout_helper.rb
@@ -169,7 +169,7 @@ module LayoutHelper
 
   def base_errors_for obj
     unless obj.errors[:base].blank?
-      content_tag(:div, :class => "alert alert-message alert-block alert-error base in fade") do
+      content_tag(:div, :class => "alert alert-message alert-block alert-danger base in fade") do
         ("<a class='close' href='#' data-dismiss='alert'>&times;</a><h4>" + _("Unable to save") + "</h4> " + obj.errors[:base].map {|e| "<li>".html_safe + e + "</li>".html_safe}.join).html_safe
       end
     end
diff --git a/app/views/common/403.html.erb b/app/views/common/403.html.erb
index 2aae231b5..c254f59c1 100644
--- a/app/views/common/403.html.erb
+++ b/app/views/common/403.html.erb
@@ -1,4 +1,4 @@
-<div class="alert alert-message alert-block alert-error base in fade">
+<div class="alert alert-message alert-block alert-danger base in fade">
   <h2><%= _("Permission denied") %></h2>
 
   <p><strong><%= _("You are not authorized to perform this action") %></strong></p>
diff --git a/app/views/common/500.html.erb b/app/views/common/500.html.erb
index e909e13d0..e1bdce9a9 100644
--- a/app/views/common/500.html.erb
+++ b/app/views/common/500.html.erb
@@ -1,6 +1,6 @@
 <% title _("Oops, we're sorry but something went wrong") %>
 
-<div class="alert alert-message alert-block alert-error base in fade">
+<div class="alert alert-message alert-block alert-danger base in fade">
   <a class="close" href="#" data-dismiss="alert">x</a>
     <%= h exception.message %>
 </div>
@@ -11,7 +11,7 @@
   <%= link_to_function(_("Full trace"), "$('#backtrace').toggle()")%> <%= _("and relevant log entries.") %>
 </p>
 
-<div id="backtrace" class="alert alert-message alert-block alert-error base in fade hide">
+<div id="backtrace" class="alert alert-message alert-block alert-danger base in fade hide">
   <em><%= exception.class %></em><br>
   <strong><%= exception.message %></strong><br>
   <%= Rails.backtrace_cleaner.clean(exception.backtrace).join("<br>").html_safe %>
diff --git a/app/views/hosts/_compute.html.erb b/app/views/hosts/_compute.html.erb
index 2fffd1c9b..6422b2b24 100644
--- a/app/views/hosts/_compute.html.erb
+++ b/app/views/hosts/_compute.html.erb
@@ -4,7 +4,7 @@
     <%= render :partial => "compute_resources_vms/form/#{compute_resource.provider.downcase}",
                :locals => { :f => compute, :compute_resource => compute_resource}.merge(args_for_compute_resource_partial(@host)) %>
   <% else %>
-    <div class="alert alert-message alert-block alert-error base in fade">
+    <div class="alert alert-message alert-block alert-danger base in fade">
       <% if @host %>
         <h4><%= _("'%{host}' not found on '%{resource}'") % { :host => @host.name, :resource => compute_resource } %></h4>
         <p><%= _("'%{host}' could be deleted or '%{resource}' is not responding.") % {:host => @host.name, :resource => compute_resource} %></p>
diff --git a/app/views/hosts/_progress.html.erb b/app/views/hosts/_progress.html.erb
index 061280744..57d8cc853 100644
--- a/app/views/hosts/_progress.html.erb
+++ b/app/views/hosts/_progress.html.erb
@@ -2,7 +2,8 @@
  <a class='close' href='#' data-dismiss='alert'>&times</a>
   <h3><%= action_name %> <%= _('In Progress') %></h3>
   <p id="tasks_progress"><%= action_name %> in progress.</p>
-  <div class="progress progress-striped active" style="width: 400px;">
-    <div class="bar" style="width: 0%;"></div>
+  <div class="progress progress-striped active">
+    <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
+    </div>
   </div>
 </div>
diff --git a/app/views/puppetclasses/_class_selection.html.erb b/app/views/puppetclasses/_class_selection.html.erb
index c0d129ed3..54a6e520e 100644
--- a/app/views/puppetclasses/_class_selection.html.erb
+++ b/app/views/puppetclasses/_class_selection.html.erb
@@ -1,6 +1,6 @@
 <div class="row">
   <% if obj.errors[:puppetclasses].any? %>
-    <div class="alert alert-message alert-block alert-error base in fade">
+    <div class="alert alert-message alert-block alert-danger base in fade">
       <a class='close' href='#' data-dismiss="alert">×</a>
       <%= obj.errors[:puppetclasses].map {|e| "<li>#{e}</li>"}.to_s.html_safe %>
     </div>
diff --git a/app/views/puppetclasses/no_route.html.erb b/app/views/puppetclasses/no_route.html.erb
index 13294ec1b..2ff9ba52f 100644
--- a/app/views/puppetclasses/no_route.html.erb
+++ b/app/views/puppetclasses/no_route.html.erb
@@ -1,7 +1,7 @@
 <%= stylesheet_link_tag 'jquery-ui', 'jquery.jnotify', 'bootstrap.min', 'style' %>
 <%= javascript_include_tag :defaults %>
 <div id="content" class="container">
-<div class="alert alert-message alert-block alert-error">
+<div class="alert alert-message alert-block alert-danger">
   <h3><%= _('Oops') %></h3>
   <p>
   <%= _('Either you didn''t generate the puppetdocs (see <a rel="external" href="%{url}">here</a>) or the class <strong>%{name}</strong> could not be found in environment <strong>%{environment}</strong><br/> Please ensure that the class <strong>%{name}</strong>''s declaration is accessible via the modulepath associated with <strong>%{environment}</strong>.') % { :name => name, :environment => environment, :url => 'http://theforeman.org/projects/foreman/wiki/Puppet_class_browser' } %>
diff --git a/app/views/reports/show.html.erb b/app/views/reports/show.html.erb
index 771017e65..f65733d87 100644
--- a/app/views/reports/show.html.erb
+++ b/app/views/reports/show.html.erb
@@ -3,7 +3,7 @@
 
 <p class='ra'> <%= _("Reported at %s ") % @report.reported_at.getlocal %> </p>
 <% if @offset > 10 %>
-  <div class="alert alert-message alert-block alert-error">
+  <div class="alert alert-message alert-block alert-danger">
     <a class="close" href="#" data-dismiss="alert">&times;</a>
     <h3><%= _("Host times seems to be adrift!") %></h3>
     <%= (_("Host reported time is <em>%s</em>") % @report.reported_at).html_safe %> <br/>
