aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvogeley <christian.vogeley@hotmail.de>2014-01-13 14:14:53 -0800
committercvogeley <christian.vogeley@hotmail.de>2014-01-13 14:14:53 -0800
commitd0e657f0f034b10f35bae56f1834d7e41e552486 (patch)
tree4876ffbe25f83a268fd0f71266fc9b5aaa305939
parent9e8ed133c3e755e29b413ff7b03557c2b91e3b4e (diff)
parentd9d894cbb3ef1be5c4f0b30ed703f229d4c61473 (diff)
downloadvolse-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 ...
-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>