aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/jot-header.tpl
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2014-01-13 22:32:13 +0100
committerChristian Vogeley <christian.vogeley@hotmail.de>2014-01-13 22:32:13 +0100
commitd9d894cbb3ef1be5c4f0b30ed703f229d4c61473 (patch)
tree4deeed9d838557b1f8ef55119bb2b1993ef2256a /view/tpl/jot-header.tpl
parent325c5e4e7650329a42f61e9180fe986ef63671b5 (diff)
downloadvolse-hubzilla-d9d894cbb3ef1be5c4f0b30ed703f229d4c61473.tar.gz
volse-hubzilla-d9d894cbb3ef1be5c4f0b30ed703f229d4c61473.tar.bz2
volse-hubzilla-d9d894cbb3ef1be5c4f0b30ed703f229d4c61473.zip
Confirm box: fall back to standard js confirm dialog if bootstrap isn't available
Diffstat (limited to 'view/tpl/jot-header.tpl')
-rwxr-xr-xview/tpl/jot-header.tpl11
1 files changed, 8 insertions, 3 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index 687ad7302..878e1e7da 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -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>