minor improvements for progress bars
This commit is contained in:
@ -175,11 +175,11 @@ $(function() {
|
|||||||
|
|
||||||
var getProgressBarClass = function(percentage) {
|
var getProgressBarClass = function(percentage) {
|
||||||
if (percentage < ADEQUATE_PERCENTAGE) {
|
if (percentage < ADEQUATE_PERCENTAGE) {
|
||||||
return 'progress-bar progress-bar-danger';
|
return 'progress-bar progress-bar-striped progress-bar-danger';
|
||||||
} else if (percentage < SUCCESSFULL_PERCENTAGE) {
|
} else if (percentage < SUCCESSFULL_PERCENTAGE) {
|
||||||
return 'progress-bar progress-bar-warning';
|
return 'progress-bar progress-bar-striped progress-bar-warning';
|
||||||
} else {
|
} else {
|
||||||
return 'progress-bar progress-bar-success';
|
return 'progress-bar progress-bar-striped progress-bar-success';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ span.caret {
|
|||||||
|
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
line-height: initial;
|
line-height: initial;
|
||||||
|
min-width: 2em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ module ApplicationHelper
|
|||||||
|
|
||||||
def progress_bar(value)
|
def progress_bar(value)
|
||||||
content_tag(:div, class: 'progress') do
|
content_tag(:div, class: 'progress') do
|
||||||
content_tag(:div, "#{value}%", :'aria-valuemax' => 100, :'aria-valuemin' => 0, :'aria-valuenow' => value, class: 'progress-bar', role: 'progressbar', style: "width: #{[value, 100].min}%;")
|
content_tag(:div, "#{value}%", :'aria-valuemax' => 100, :'aria-valuemin' => 0, :'aria-valuenow' => value, class: 'progress-bar progress-bar-striped', role: 'progressbar', style: "width: #{[value, 100].min}%;")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user