Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #193 from Marchino/master
Browse files Browse the repository at this point in the history
Popup Warning
  • Loading branch information
a-barbieri authored May 10, 2018
2 parents 15f6a8b + 247cb2d commit 3c53385
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
20 changes: 20 additions & 0 deletions app/assets/stylesheets/binda/components/popup_warning.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
}

.popup-warning--loader {
transition: opacity 0.1s 0.1s linear;
&.popup-warning--loader--hidden {
opacity: 0;
}
opacity: 1;
margin-bottom: 16px;
span {
display: inline-block;
Expand All @@ -56,3 +61,18 @@
animation-delay: 540ms;
}
}

.popup-warning--success {
transition: opacity 0.1s 0.1s linear;
opacity: 1;
position: absolute;
left: 50%;
transform: translateX(-50%);
margin-bottom: 16px;
color: $color-success;
font-size: 30px;

&.popup-warning--success--hidden {
opacity: 0;
}
}
3 changes: 1 addition & 2 deletions app/views/binda/fieldable/_form_body.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<%= render 'layouts/binda/popup_warning' %>
<%= simple_form_for [ @instance.structure, @instance ], html: { class: 'form-body', multipart: true } do |f| %>
<%= f.error_notification %>
<%= render 'layouts/binda/form_errors', f: f %>
Expand Down Expand Up @@ -44,4 +43,4 @@
<div class="standard-form--container standard-form--sidebar">
<%= render "binda/fieldable/form_sidebar", f: f %>
</div>
<% end %>
<% end %>
5 changes: 4 additions & 1 deletion app/views/layouts/binda/_popup_warning.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<div class="popup-warning popup-warning--hidden">
<div class="popup-warning--success popup-warning--success--hidden">
<i class="fas fa-check-circle"></i>
</div>
<div class="popup-warning--loader">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<p class="popup-warning--message"></p>
</div>
</div>
1 change: 1 addition & 0 deletions app/views/layouts/binda/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<body class="<%= action_name %> <%= "#{controller_name}-#{action_name}" %> <%= 'devise-view' if is_devise_controller %>">

<%= render 'layouts/binda/popup_warning' %>
<div id="main-container">

<%= yield :background %>
Expand Down

0 comments on commit 3c53385

Please sign in to comment.