fixes edit modal [fixes SCI-467]

This commit is contained in:
zmagod 2016-09-22 09:29:38 +02:00
parent cde7f3805f
commit 6143b257d0

View file

@ -17,6 +17,7 @@
});
validateMoveModal(id);
clearModal($(id));
reloadPageAfterUpdate($(id));
})
.on("ajax:error", function() {
animateSpinner(null, false);
@ -73,6 +74,17 @@
.clearFormErrors();
}
}
// Reload after successfully updated experiment
function reloadPageAfterUpdate(element){
if ( element ) {
var form = element.find("form");
form
.on('ajax:success' , function(){
animateSpinner(form, true);
location.reload();
});
}
}
// Initialize no description edit link
function initEditNoDescription(){
var modal = "#edit-experiment-modal-";