mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Corrected frontend modal markup. Corrected page registry identifier.
This commit is contained in:
@@ -685,19 +685,26 @@ if(deftrue('BOOTSTRAP'))
|
|||||||
{
|
{
|
||||||
// if(empty($LAYOUT['_modal_'])) // leave it set for now.
|
// if(empty($LAYOUT['_modal_'])) // leave it set for now.
|
||||||
{
|
{
|
||||||
$LAYOUT['_modal_'] = '<div id="uiModal" style="display:none" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
|
$LAYOUT['_modal_'] = '<div id="uiModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
|
||||||
<div class="modal-header">
|
<div class="modal-dialog modal-lg">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<div class="modal-content">
|
||||||
<h4 class="modal-caption"> </h4>
|
<div class="modal-header">
|
||||||
</div>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
<div class="modal-body">
|
<h4 class="modal-caption"> </h4>
|
||||||
<p>Loading…</p>
|
</div>
|
||||||
</div>
|
<div class="modal-body">
|
||||||
<div class="modal-footer">
|
<p>Loading…</p>
|
||||||
<a href="#" data-dismiss="modal" class="btn btn-primary">Close</a>
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<a href="#" data-dismiss="modal" class="btn btn-primary">Close</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
';
|
';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $LAYOUT['_modal_'];
|
echo $LAYOUT['_modal_'];
|
||||||
|
@@ -532,6 +532,11 @@ class e107
|
|||||||
return self::$_registry[$id];
|
return self::$_registry[$id];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($id == '_all_')
|
||||||
|
{
|
||||||
|
return self::$_registry;
|
||||||
|
}
|
||||||
|
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@ class page_shortcodes extends e_shortcode
|
|||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->request = e107::getRegistry('core/pages/request');
|
$this->request = e107::getRegistry('core/page/request');
|
||||||
|
|
||||||
$action = varset($this->request['action']);
|
$action = varset($this->request['action']);
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ $tmpl = e107::getCoreTemplate('chapter','nav',true,true); // always merge and al
|
|||||||
|
|
||||||
$template = $tmpl['showPage'];
|
$template = $tmpl['showPage'];
|
||||||
|
|
||||||
$request = e107::getRegistry('core/pages/request');
|
$request = e107::getRegistry('core/page/request');
|
||||||
if($request && is_array($request))
|
if($request && is_array($request))
|
||||||
{
|
{
|
||||||
switch ($request['action'])
|
switch ($request['action'])
|
||||||
|
@@ -396,6 +396,46 @@ $(document).ready(function()
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Bootstrap Modal window within an iFrame for frontend */
|
||||||
|
$('.e-modal').on('click', function(e)
|
||||||
|
{
|
||||||
|
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
if($(this).attr('data-cache') == 'false')
|
||||||
|
{
|
||||||
|
$('#uiModal').on('shown.bs.modal', function () {
|
||||||
|
$(this).removeData('bs.modal');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var url = $(this).attr('href');
|
||||||
|
var caption = $(this).attr('data-modal-caption');
|
||||||
|
var height = ($(window).height() * 0.7) - 120;
|
||||||
|
|
||||||
|
if(caption === undefined)
|
||||||
|
{
|
||||||
|
caption = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($(this).attr('data-modal-height') !== undefined)
|
||||||
|
{
|
||||||
|
height = $(this).attr('data-modal-height');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.modal-body').html('<div><iframe id="e-modal-iframe" width="100%" height="'+height+'px" frameborder="0" scrolling="auto" style="display:block;" 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');
|
||||||
|
|
||||||
|
$("#e-modal-iframe").on("load", function () {
|
||||||
|
$('#e-modal-loading').hide();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
Reference in New Issue
Block a user