mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
Prevent e-modal conflict with other modals. (also supports data-modal-target attribute)
This commit is contained in:
@@ -30,16 +30,21 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
||||
var url = $this.attr('href');
|
||||
var caption = $this.attr('data-modal-caption');
|
||||
var height = ($(window).height() * 0.7) - 120;
|
||||
|
||||
var target = $this.attr('data-modal-target');
|
||||
|
||||
if(caption === undefined)
|
||||
{
|
||||
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');
|
||||
if(target === undefined)
|
||||
{
|
||||
target = '#uiModal';
|
||||
}
|
||||
|
||||
$(target+' .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>');
|
||||
$(target+' .modal-caption').html(caption + ' <i id="e-modal-loading" class="fa fa-spin fa-spinner"></i>');
|
||||
$(target+'.modal').modal('show');
|
||||
|
||||
$("#e-modal-iframe").on("load", function ()
|
||||
{
|
||||
|
Reference in New Issue
Block a user