Revamped modal iframe dialog handling

This commit is contained in:
Bernd Bestel
2025-01-10 17:15:09 +01:00
parent 1900a5b8a2
commit 201bda93a2
33 changed files with 175 additions and 118 deletions

View File

@@ -7,6 +7,8 @@
<div class="col-12 col-md-6 text-center">
<h2 class="title">@yield('title')</h2>
<hr class="my-2">
<ul class="nav nav-tabs grocy-tabs justify-content-center mt-3">
<li class="nav-item">
<a class="nav-link discrete-link active"

View File

@@ -137,7 +137,8 @@
</a>
<a class="dropdown-item show-as-dialog-link"
type="button"
href="{{ $U('/batteriesjournal?embedded&battery=') }}{{ $currentBatteryEntry->battery_id }}">
href="{{ $U('/batteriesjournal?embedded&battery=') }}{{ $currentBatteryEntry->battery_id }}"
data-dialog-type="table">
<span class="dropdown-item-text">{{ $__t('Battery journal') }}</span>
</a>
<a class="dropdown-item permission-MASTER_DATA_EDIT show-as-dialog-link"

View File

@@ -182,7 +182,8 @@
</a>
<a class="dropdown-item show-as-dialog-link"
type="button"
href="{{ $U('/choresjournal?embedded&chore=') }}{{ $curentChoreEntry->chore_id }}">
href="{{ $U('/choresjournal?embedded&chore=') }}{{ $curentChoreEntry->chore_id }}"
data-dialog-type="table">
<span class="dropdown-item-text">{{ $__t('Chore journal') }}</span>
</a>
<a class="dropdown-item permission-MASTER_DATA_EDIT"

View File

@@ -747,10 +747,6 @@
<script src="{{ $U('/packages/chartjs-plugin-doughnutlabel/dist/chartjs-plugin-doughnutlabel.js?v=', true) }}{{ $version }}"></script>
<script src="{{ $U('/packages/chartjs-plugin-piechart-outlabels/dist/chartjs-plugin-piechart-outlabels.min.js?v=', true) }}{{ $version}}"></script>
@endif
@if($embedded)
<script src="{{ $U('/packages/@iframe-resizer/child/index.umd.js?v=', true) }}{{ $version}}"></script>
@endif
<script src="{{ $U('/packages/@iframe-resizer/parent/index.umd.js?v=', true) }}{{ $version}}"></script>
<script src="{{ $U('/js/extensions.js?v=', true) }}{{ $version }}"></script>
<script src="{{ $U('/js/grocy_menu_layout.js?v=', true) }}{{ $version }}"></script>

View File

@@ -305,7 +305,7 @@
<div id="selectedRecipeCard"
class="card grocy-card">
@if(count($allRecipes) > 1)
<div class="card-header card-header-fullscreen mb-1 d-print-none">
<div class="card-header card-header-fullscreen mb-1 pt-0 d-print-none">
<ul class="nav nav-tabs grocy-tabs card-header-tabs">
@foreach($allRecipes as $index=>$recipe)
<li class="nav-item">

View File

@@ -208,12 +208,14 @@
</a>
<a class="dropdown-item show-as-dialog-link"
type="button"
href="{{ $U('/stockjournal?embedded&product=') }}{{ $stockEntry->product_id }}">
href="{{ $U('/stockjournal?embedded&product=') }}{{ $stockEntry->product_id }}"
data-dialog-type="table">
{{ $__t('Stock journal') }}
</a>
<a class="dropdown-item show-as-dialog-link"
type="button"
href="{{ $U('/stockjournal/summary?embedded&product=') }}{{ $stockEntry->product_id }}">
href="{{ $U('/stockjournal/summary?embedded&product=') }}{{ $stockEntry->product_id }}"
data-dialog-type="table">
{{ $__t('Stock journal summary') }}
</a>
<a class="dropdown-item link-return"

View File

@@ -23,7 +23,7 @@
</div>
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100"
id="related-links">
<a class="btn btn-outline-dark responsive-button m-1 mt-md-0 mb-md-0 float-right"
<a class="btn btn-outline-dark responsive-button m-1 mt-md-0 mb-md-0 float-right hide-when-embedded"
href="{{ $U('/stockjournal/summary') }}">
{{ $__t('Journal summary') }}
</a>
@@ -226,12 +226,14 @@
<a class="dropdown-item show-as-dialog-link"
type="button"
href="{{ $U('/stockentries?embedded&product=') }}{{ $stockLogEntry->product_id }}"
data-dialog-type="table"
data-product-id="{{ $stockLogEntry->product_id }}">
<span class="dropdown-item-text">{{ $__t('Stock entries') }}</span>
</a>
<a class="dropdown-item show-as-dialog-link"
type="button"
href="{{ $U('/stockjournal/summary?embedded&product_id=') }}{{ $stockLogEntry->product_id }}">
href="{{ $U('/stockjournal/summary?embedded&product_id=') }}{{ $stockLogEntry->product_id }}"
data-dialog-type="table">
<span class="dropdown-item-text">{{ $__t('Stock journal summary') }}</span>
</a>
<a class="dropdown-item permission-MASTER_DATA_EDIT link-return"

View File

@@ -288,17 +288,20 @@
<a class="dropdown-item show-as-dialog-link"
type="button"
href="{{ $U('/stockentries?embedded&product=') }}{{ $currentStockEntry->product_id }}"
data-dialog-type="table"
data-product-id="{{ $currentStockEntry->product_id }}">
<span class="dropdown-item-text">{{ $__t('Stock entries') }}</span>
</a>
<a class="dropdown-item show-as-dialog-link"
type="button"
href="{{ $U('/stockjournal?embedded&product=') }}{{ $currentStockEntry->product_id }}">
href="{{ $U('/stockjournal?embedded&product=') }}{{ $currentStockEntry->product_id }}"
data-dialog-type="table">
<span class="dropdown-item-text">{{ $__t('Stock journal') }}</span>
</a>
<a class="dropdown-item show-as-dialog-link"
type="button"
href="{{ $U('/stockjournal/summary?embedded&product_id=') }}{{ $currentStockEntry->product_id }}">
href="{{ $U('/stockjournal/summary?embedded&product_id=') }}{{ $currentStockEntry->product_id }}"
data-dialog-type="table">
<span class="dropdown-item-text">{{ $__t('Stock journal summary') }}</span>
</a>
<a class="dropdown-item permission-MASTER_DATA_EDIT link-return"