Fix alerts style

This commit is contained in:
Mojca Lorber 2020-01-21 15:21:40 +01:00
parent ee609890ef
commit 981f8678df
11 changed files with 41 additions and 17 deletions

View file

@ -228,13 +228,13 @@ var HelperModule = (function(){
fasSign = ' fa-check-circle ';
} else if (type === 'danger') {
alertType = ' alert-danger ';
fasSign = ' fa-exclamation-circle ';
fasSign = ' fa-exclamation-triangle ';
} else if (type === 'info') {
alertType = ' alert-info ';
fasSign = ' fa-exclamation-circle ';
fasSign = ' fa-info-circle ';
} else if (type === 'warning') {
alertType = ' alert-warning ';
fasSign = ' fa-exclamation-circle ';
fasSign = ' fa-exclamation-triangle ';
}
var htmlSnippet = '<div id="alert-flash" class="alert alert' + alertType +
'alert-dismissable alert-floating">' +

View file

@ -1,12 +1,15 @@
.alert {
align-items: center;
border-radius: 0;
display: flex;
height: 52px;
margin-bottom: 0;
opacity: .86;
padding: 9px;
width: 100%;
}
.alert-floating {
align-items: center;
display: flex;
height: 52px;
padding: 9px;
.fas {
font-size: $font-size-h2;
@ -23,3 +26,23 @@
top: 0;
}
}
.alert:not(.alert-floating) {
color: $color-volcano;
&.alert-danger .fas {
color: $brand-danger;
}
&.alert-warning .fas {
color: $brand-warning;
}
&.alert-info .fas {
color: $brand-info;
}
&.alert-success .fas {
color: $brand-success;
}
}

View file

@ -32,7 +32,7 @@
.custom-alert-info {
background-color: $state-info-bg;
border: 1px solid $state-info-border;
color: $state-info-text;
color: $color-volcano;
margin: 10px 0;
opacity: .86;
padding: 15px;

View file

@ -106,7 +106,7 @@
<a type="button" class="btn btn-warning link-button" tabindex="0" role="button" data-trigger="focus" data-container="body" data-html="true" data-toggle="popover" data-placement="bottom" title="<%= t("my_modules.protocols.protocol_status_bar.btns_parent_and_self_newer.title") %>" data-content="<%= t("my_modules.protocols.protocol_status_bar.btns_parent_and_self_newer.text", self_ts: l(@protocol.updated_at, format: :full), parent_ts: l(@protocol.parent.updated_at, format: :full)).html_safe %>">
<span class="fas fa-book"></span>
&nbsp;
<span class="fas fa-exclamation-circle"></span>
<span class="fas fa-exclamation-triangle"></span>
</a>
<a type="button" class="btn btn-warning dropdown-toggle link-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>

View file

@ -19,7 +19,7 @@
<!-- (THIS IS UGLY) -->
<div data-template="import-result-message-error" style="display: none;">
<div class="alert alert-danger" style="margin-bottom: 15px;" role="alert">
<span class="fas fa-exclamation-circle"></span>
<span class="fas fa-exclamation-triangle"></span>
<span data-val="message"></span>
</div>
</div>
@ -57,4 +57,4 @@
&nbsp;
<span data-val="message2"></span>
</li>
</div>
</div>

View file

@ -5,7 +5,7 @@
<% if failed.count > 0 %>
<div class="alert alert-danger" style="margin-bottom: 15px;" role="alert">
<span class="fas fa-exclamation-circle"></span>
<span class="fas fa-exclamation-triangle"></span>
<%= t("protocols.index.#{en_action}.message_failed", nr: failed.count) %>
</div>
<% end %>

View file

@ -10,7 +10,7 @@
<div class="modal-body">
<p><%= t("repositories.index.modal_delete.message_html", name: @repository.name) %></p>
<div class="alert alert-danger" role="alert">
<span class="fas fa-exclamation-circle"></span>
<span class="fas fa-exclamation-triangle"></span>
&nbsp;
<%= t("repositories.index.modal_delete.alert_heading") %>
<ul>

View file

@ -11,7 +11,8 @@
<div class="delete-content"
<p><%= t("repositories.modal_delete_column.message", column: @repository_column.name) %></p>
<div class="alert alert-danger" role="alert">
<span class="fas fa-exclamation-circle"></span>
<span class="fas fa-exclamation-triangle"></span>
&nbsp;
<%= t("repositories.modal_delete_column.alert_heading") %>
<ul>
<li><%= t("repositories.modal_delete_column.alert_line_1", nr: @repository_column.repository_cells.count) %></li>

View file

@ -15,7 +15,7 @@
<% end %>
<% if alert and !alert.empty? or flash[:error]%>
<div id="alert-flash" class="alert alert-danger alert-dismissable alert-floating">
<span class="fas fa-exclamation-circle"></span>
<span class="fas fa-exclamation-triangle"></span>
<span class="message"><%= alert || sanitize_input(flash[:error]) %></span>
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>

View file

@ -8,7 +8,7 @@
team: user_team.team.name) %></p>
<% if user_team.user.confirmed? %>
<div class="alert alert-danger" role="alert">
<span class="fas fa-exclamation-circle"></span>
<span class="fas fa-exclamation-triangle"></span>
&nbsp;
<%= t("users.settings.user_teams.destroy_uo_alert_heading") %>
<ul>

View file

@ -6,7 +6,7 @@
<%= hidden_field_tag :leave, true %>
<p><%= t("users.settings.user_teams.leave_uo_message", team: user_team.team.name) %></p>
<div class="alert alert-danger" role="alert">
<span class="fas fa-exclamation-circle"></span>
<span class="fas fa-exclamation-triangle"></span>
&nbsp;
<%= t("users.settings.user_teams.leave_uo_alert_heading") %>
<ul>