diff --git a/e107_web/js/core/front.jquery.js b/e107_web/js/core/front.jquery.js index 03e9efe4b..418dc5149 100644 --- a/e107_web/js/core/front.jquery.js +++ b/e107_web/js/core/front.jquery.js @@ -402,7 +402,6 @@ $(document).ready(function() /* Bootstrap Modal window within an iFrame for frontend */ $('.e-modal').on('click', function(e) { - e.preventDefault(); if($(this).attr('data-cache') == 'false') @@ -414,8 +413,22 @@ $(document).ready(function() var url = $(this).attr('href'); var caption = $(this).attr('data-modal-caption'); + var backdrop = $(this).attr('data-modal-backdrop'); + var keyboard = $(this).attr('data-modal-keyboard'); var height = ($(window).height() * 0.7) - 120; + var modalOptions = {show: true}; + + if(backdrop !== undefined) + { + modalOptions['backdrop'] = backdrop; + } + + if(keyboard !== undefined) + { + modalOptions['keyboard'] = keyboard; + } + if(caption === undefined) { caption = ''; @@ -428,7 +441,7 @@ $(document).ready(function() $('.modal-body').html('
'); $('.modal-caption').html(caption + ' '); - $('.modal').modal('show'); + $('.modal').modal(modalOptions); $("#e-modal-iframe").on("load", function () { $('#e-modal-loading').hide(); @@ -438,4 +451,4 @@ $(document).ready(function() -}); \ No newline at end of file +});