Merge pull request #271 from cvogeley/master
Confirm box: fall back to standard js confirm dialog if bootstrap isn't ...
This commit is contained in:
commit
d0e657f0f0
@ -309,11 +309,16 @@ function enableOnUser(){
|
|||||||
<script>
|
<script>
|
||||||
$( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-delete-link,.block-delete-link", function(e) {
|
$( 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
|
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) {
|
if (result) {
|
||||||
document.location.href = link;}
|
document.location.href = link;}
|
||||||
});
|
});}
|
||||||
|
else {
|
||||||
|
return confirm("{{$confirmdelete}}");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user