The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 16fad9dc authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Email lightbox handling UPGRADE. Bootstrap is king. All hail Bootstrap.

parent fc83cecc
No related merge requests found
......@@ -184,6 +184,18 @@ $(document).ready(function() {
});
return false;
});
addLightboxFormHandler('bulkEmail', function(evt){
ajaxSubmit($(evt.target), function(html){
var fi = html.indexOf('<div class="alert alert-error">');
if(fi > -1) {
var li = html.indexOf('</div>', fi+31);
displayLightboxError(html.substring(fi+31, li));
} else {
lightboxConfirm(vufindString['bulk_email_success']);
}
});
return false;
});
addLightboxFormHandler('exportForm', function(evt){
$.ajax({
url: path + '/AJAX/JSON?' + $.param({method:'exportFavorites'}),
......
......@@ -513,7 +513,7 @@ $(document).ready(function() {
var fi = html.indexOf('<div class="alert alert-error">');
if(fi > -1) {
var li = html.indexOf('</div>', fi+31);
changeModalContent(html.substring(fi, li));
changeModalContent(html.substring(fi, li+5));
} else {
changeModalContent(html);
}
......
......@@ -160,7 +160,15 @@ $(document).ready(function(){
});
// Form handlers
addLightboxFormHandler('emailRecord', function(evt) {
ajaxSubmit($(evt.target), function(){lightboxConfirm(vufindString['bulk_email_success']);});
ajaxSubmit($(evt.target), function(html){
var fi = html.indexOf('<div class="alert alert-error">');
if(fi > -1) {
var li = html.indexOf('</div>', fi+31);
displayLightboxError(html.substring(fi+31, li));
} else {
lightboxConfirm(vufindString['bulk_email_success']);
}
});
return false;
});
addLightboxFormHandler('smsRecord', function(evt) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment