diff options
author | cvogeley <christian.vogeley@hotmail.de> | 2014-01-13 14:14:53 -0800 |
---|---|---|
committer | cvogeley <christian.vogeley@hotmail.de> | 2014-01-13 14:14:53 -0800 |
commit | d0e657f0f034b10f35bae56f1834d7e41e552486 (patch) | |
tree | 4876ffbe25f83a268fd0f71266fc9b5aaa305939 /view | |
parent | 9e8ed133c3e755e29b413ff7b03557c2b91e3b4e (diff) | |
parent | d9d894cbb3ef1be5c4f0b30ed703f229d4c61473 (diff) | |
download | volse-hubzilla-d0e657f0f034b10f35bae56f1834d7e41e552486.tar.gz volse-hubzilla-d0e657f0f034b10f35bae56f1834d7e41e552486.tar.bz2 volse-hubzilla-d0e657f0f034b10f35bae56f1834d7e41e552486.zip |
Merge pull request #271 from cvogeley/master
Confirm box: fall back to standard js confirm dialog if bootstrap isn't ...
Diffstat (limited to 'view')
-rwxr-xr-x | view/tpl/jot-header.tpl | 11 |
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> |