Merge pull request #14842 from Godmartinz/adjust-preview-window
Fixed label preview window position
This commit is contained in:
commit
f8ab9f62f6
2 changed files with 10 additions and 6 deletions
|
@ -2,7 +2,7 @@
|
||||||
@push('css')
|
@push('css')
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--l2p-height: 400px;
|
--l2p-height: 200px;
|
||||||
--l2p-background-color: aliceblue;
|
--l2p-background-color: aliceblue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,10 +66,8 @@
|
||||||
|
|
||||||
<!-- Template -->
|
<!-- Template -->
|
||||||
<div class="form-group{{ $errors->has('label2_template') ? ' has-error' : '' }}">
|
<div class="form-group{{ $errors->has('label2_template') ? ' has-error' : '' }}">
|
||||||
<div class="col-md-3">
|
|
||||||
@include('partials.label2-preview')
|
<div class="col-md-9 col-md-offset-3">
|
||||||
</div>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<table
|
<table
|
||||||
data-click-to-select="true"
|
data-click-to-select="true"
|
||||||
data-columns="{{ \App\Presenters\LabelPresenter::dataTableLayout() }}"
|
data-columns="{{ \App\Presenters\LabelPresenter::dataTableLayout() }}"
|
||||||
|
@ -92,7 +90,11 @@
|
||||||
></table>
|
></table>
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const chosenLabel = "{{ old('label2_template', $chosenLabel ?? '') }}";
|
||||||
$('#label2TemplateTable').on('load-success.bs.table', (e) => {
|
$('#label2TemplateTable').on('load-success.bs.table', (e) => {
|
||||||
|
if (chosenLabel) {
|
||||||
|
$('input[name="label2_template"][value="' + chosenLabel + '"]').prop('checked', true);
|
||||||
|
}
|
||||||
let form = document.getElementById('settingsForm');
|
let form = document.getElementById('settingsForm');
|
||||||
form.dispatchEvent(new Event('change'));
|
form.dispatchEvent(new Event('change'));
|
||||||
});
|
});
|
||||||
|
@ -209,7 +211,9 @@
|
||||||
<p class="help-block">{{ trans('admin/settings/general.label2_2d_target_help') }}</p>
|
<p class="help-block">{{ trans('admin/settings/general.label2_2d_target_help') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-9 col-md-offset-3" style="margin-bottom: 10px;">
|
||||||
|
@include('partials.label2-preview')
|
||||||
|
</div>
|
||||||
<!-- Fields -->
|
<!-- Fields -->
|
||||||
<div class="form-group {{ $errors->has('label2_fields') ? 'error' : '' }}">
|
<div class="form-group {{ $errors->has('label2_fields') ? 'error' : '' }}">
|
||||||
<div class="col-md-3 text-right">
|
<div class="col-md-3 text-right">
|
||||||
|
|
Loading…
Add table
Reference in a new issue