mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Prevent e-modal conflict with other modals. (also supports data-modal-target attribute)
This commit is contained in:
@@ -4308,6 +4308,7 @@ var_dump($select_options);*/
|
|||||||
|
|
||||||
$cnt = 0;
|
$cnt = 0;
|
||||||
$text = '';
|
$text = '';
|
||||||
|
|
||||||
|
|
||||||
foreach ($fieldarray as $field => $data)
|
foreach ($fieldarray as $field => $data)
|
||||||
{
|
{
|
||||||
@@ -4323,11 +4324,11 @@ var_dump($select_options);*/
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//Not found
|
//Not found
|
||||||
if((!varset($data['forced']) && !in_array($field, $currentlist)) || varset($data['nolist']))
|
if((empty($data['forced']) && !in_array($field, $currentlist)) || !empty($data['nolist']))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
elseif(vartrue($data['type']) != 'method' && !$data['forced'] && !isset($fieldvalues[$field]) && $fieldvalues[$field] !== NULL)
|
elseif(vartrue($data['type']) != 'method' && empty($data['forced']) && !isset($fieldvalues[$field]) && $fieldvalues[$field] !== null)
|
||||||
{
|
{
|
||||||
$text .= "
|
$text .= "
|
||||||
<td>
|
<td>
|
||||||
|
@@ -30,16 +30,21 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
|||||||
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) - 120;
|
var height = ($(window).height() * 0.7) - 120;
|
||||||
|
var target = $this.attr('data-modal-target');
|
||||||
|
|
||||||
if(caption === undefined)
|
if(caption === undefined)
|
||||||
{
|
{
|
||||||
caption = '';
|
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>');
|
if(target === undefined)
|
||||||
$('.modal-caption').html(caption + ' <i id="e-modal-loading" class="fa fa-spin fa-spinner"></i>');
|
{
|
||||||
$('.modal').modal('show');
|
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 ()
|
$("#e-modal-iframe").on("load", function ()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user