mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 17:22:20 +09:00
Consolidate popup/iframe handling code in common areas
This commit is contained in:
parent
262560ce04
commit
7157181726
6 changed files with 51 additions and 41 deletions
|
|
@ -1,12 +1,33 @@
|
|||
@version(2)
|
||||
@load('../../modules/admin/tpl/css/admin.bootstrap.css')
|
||||
@load('../../modules/admin/tpl/css/admin.css')
|
||||
|
||||
<div class="x popup">
|
||||
{!! $content !!}
|
||||
</div>
|
||||
<script>
|
||||
jQuery(function() {
|
||||
setTimeout(setFixedPopupSize, 500);
|
||||
});
|
||||
var _isPoped = true;
|
||||
</script>
|
||||
|
||||
@if (isset($iframe_sequence) && preg_match('/^\w+$/', $iframe_sequence))
|
||||
<script>
|
||||
const iframe_sequence = '{{ $iframe_sequence }}';
|
||||
window.opener = window.parent;
|
||||
window.close = function() {
|
||||
const iframe = parent.document.getElementById('_rx_iframe_' + iframe_sequence);
|
||||
if (iframe) {
|
||||
iframe.remove();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.x.popup { width: 100vw; height: 100vh; }
|
||||
.x.popup > div { width: 100vw; height: 100vh; display: flex; flex-direction: column; }
|
||||
.x_modal-header { flex: 0 0 auto; }
|
||||
.x_modal-body { flex: 1; overflow: scroll; }
|
||||
</style>
|
||||
@else
|
||||
<script>
|
||||
jQuery(function() {
|
||||
setTimeout(setFixedPopupSize, 500);
|
||||
});
|
||||
var _isPoped = true;
|
||||
</script>
|
||||
@endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue