recruiter Resend welcome email
This commit is contained in:
16
app/assets/javascripts/ajax-links.js
Normal file
16
app/assets/javascripts/ajax-links.js
Normal 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)); });
|
||||
});
|
@ -15,6 +15,8 @@
|
||||
//= require turbolinks
|
||||
//= require modernizr-lite/modernizr
|
||||
|
||||
//= require ajax-links
|
||||
|
||||
//= require forms/button-group
|
||||
//= require forms/animations
|
||||
//= require forms/textarea-limit
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user