mirror of
https://github.com/e107inc/e107.git
synced 2025-06-08 20:21:13 +02:00
e-modal loading animation added.
This commit is contained in:
parent
e745a2398a
commit
27d76b1685
@ -190,21 +190,22 @@ $(document).ready(function()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Bootstrap Modal window within an iFrame */
|
/* Bootstrap Modal window within an iFrame */
|
||||||
$('.e-modal').on('click', function(e)
|
$('.e-modal').on('click', function(e)
|
||||||
{
|
{
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var url = $(this).attr('href');
|
var url = $(this).attr('href');
|
||||||
var caption = $(this).attr('data-modal-caption');
|
var caption = $(this).attr('data-modal-caption');
|
||||||
var height = ($(window).height() * 0.7) - 50;
|
var height = ($(window).height() * 0.7) - 50;
|
||||||
|
|
||||||
$('.modal-body').html('<div class="well"><iframe width="100%" height="'+height+'px" frameborder="0" scrolling="auto" style="display:block;background-color:transparent" allowtransparency="true" src="' + url + '"></iframe></div>');
|
|
||||||
$('.modal-caption').text(caption);
|
$('.modal-body').html('<div class="well"><iframe id="e-modal-iframe" width="100%" height="'+height+'px" frameborder="0" scrolling="auto" style="display:block;background-color:transparent" allowtransparency="true" src="' + url + '"></iframe></div>');
|
||||||
|
$('.modal-caption').html(caption + ' <i id="e-modal-loading" class="fa fa-spin fa-spinner"></i>');
|
||||||
$('.modal').modal('show');
|
$('.modal').modal('show');
|
||||||
|
|
||||||
|
$("#e-modal-iframe").on("load", function () {
|
||||||
|
$('#e-modal-loading').hide();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user