mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-14 09:04:56 +08:00
Fix alerts style
This commit is contained in:
parent
ee609890ef
commit
981f8678df
11 changed files with 41 additions and 17 deletions
|
@ -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">' +
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
||||
<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>
|
||||
|
|
|
@ -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 @@
|
|||
|
||||
<span data-val="message2"></span>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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 %>
|
||||
|
|
|
@ -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>
|
||||
|
||||
<%= t("repositories.index.modal_delete.alert_heading") %>
|
||||
<ul>
|
||||
|
|
|
@ -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>
|
||||
|
||||
<%= t("repositories.modal_delete_column.alert_heading") %>
|
||||
<ul>
|
||||
<li><%= t("repositories.modal_delete_column.alert_line_1", nr: @repository_column.repository_cells.count) %></li>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
<%= t("users.settings.user_teams.destroy_uo_alert_heading") %>
|
||||
<ul>
|
||||
|
|
|
@ -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>
|
||||
|
||||
<%= t("users.settings.user_teams.leave_uo_alert_heading") %>
|
||||
<ul>
|
||||
|
|
Loading…
Add table
Reference in a new issue