recruiter Resend welcome email

This commit is contained in:
Mark Moser
2016-09-15 10:01:31 -05:00
parent 9884748cf9
commit 372e86507e
9 changed files with 70 additions and 6 deletions

View File

@ -0,0 +1,16 @@
function handleAjaxResponse($el) {
var $header = $('header');
$el.on("ajax:success", function(e, data){
$header.after('<div class="success">' + data.message + '</div>');
}).on("ajax:error", function(e, xhr) {
if (xhr.status === 400){
$header.after('<div class="error">' + xhr.responseJSON.join('<br>') + '</div>');
} else {
$header.after('<div class="error">Oops! There was an error processing your request. Please try again.</div>');
}
});
}
$(document).ready(function() {
$('[data-id=ajax-action]').each(function(){ handleAjaxResponse($(this)); });
});

View File

@ -15,6 +15,8 @@
//= require turbolinks
//= require modernizr-lite/modernizr
//= require ajax-links
//= require forms/button-group
//= require forms/animations
//= require forms/textarea-limit

View File

@ -1,5 +1,5 @@
/* global updateResults */
/* TODO: remove global ^ once live-coder is properly name spaced */
// TODO: remove global ^ once live-coder is properly name spaced
/**
* Summary Page Answer Editor
*/

View File

@ -1,5 +1,28 @@
@keyframes success-fadeout {
0% { opacity: 1; max-height: 40px; }
85% { opacity: 0; max-height: 40px; padding: .5rem 0; margin-bottom: .5rem; }
100% { opacity: 0; max-height: 0; padding: 0; margin-bottom: 0; }
0% {
max-height: 40px;
opacity: 1;
}
85% {
margin-bottom: .5rem;
max-height: 40px;
opacity: 0;
padding: .5rem 0;
}
96% {
margin-bottom: 0;
max-height: 0;
opacity: 0;
padding: 0;
}
100% {
height: 0;
left: -10px;
position: absolute;
top: -10px;
width: 0;
}
}