Confirm box: fall back to standard js confirm dialog if bootstrap isn't available

This commit is contained in:
Christian Vogeley 2014-01-13 22:32:13 +01:00
parent 325c5e4e76
commit d9d894cbb3

View File

@ -309,11 +309,16 @@ function enableOnUser(){
<script>
$( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-delete-link,.block-delete-link", function(e) {
var link = $(this).attr("href"); // "get" the intended link in a var
e.preventDefault();
bootbox.confirm("<h4>{{$confirmdelete}}</h4>", function(result) {
if (typeof(eval($.fn.modal)) === 'function'){
e.preventDefault();
bootbox.confirm("<h4>{{$confirmdelete}}</h4>",function(result) {
if (result) {
document.location.href = link;}
});
});}
else {
return confirm("{{$confirmdelete}}");
}
});
</script>