Fix in card css modal display (#36569)
* Fix display of cards in a modal * fix php stan * fix php stan * Try a change to force CI --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
793bfde2a6
commit
b313d7c0fd
8 changed files with 76 additions and 28 deletions
|
|
@ -59,3 +59,8 @@
|
|||
grid-row: 2;
|
||||
}
|
||||
}
|
||||
|
||||
:is(.object-card-view__footer, .object-card-edit__footer):empty,
|
||||
:is(.object-card-view__footer, .object-card-edit__footer):has(#actions_buttons:empty){
|
||||
display: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,3 +107,54 @@ dialog article .dialog-header-btn.close {
|
|||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
body.--is-modal {
|
||||
background: var(--colorbackbody);
|
||||
}
|
||||
|
||||
body.--is-modal .modal-hidden,
|
||||
body:not(.--is-modal) .modal-displayed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
body.--is-modal .card-view-container,
|
||||
body.--is-modal main.container {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
body.--is-modal article.card-view-container {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
body.--is-modal article.card-view-container > header {
|
||||
margin-top: 0;
|
||||
}
|
||||
body.--is-modal article.card-view-container > footer {
|
||||
margin-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 576px) {
|
||||
body.--is-modal .container {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
body.--is-modal .container {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
body.--is-modal .container {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
body.--is-modal .container {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,5 +22,4 @@ $formCard = $this->formCard;
|
|||
|
||||
?>
|
||||
|
||||
<footer>
|
||||
</footer>
|
||||
<footer class="object-card-edit__footer"><?php $this->loadTemplate('card-edit-actions-buttons') ?></footer>
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ $formCard = $this->formCard;
|
|||
<?php $this->loadTemplate('card-edit-properties') ?>
|
||||
|
||||
<?php $this->loadTemplate('card-edit-lines') ?>
|
||||
|
||||
|
||||
<?php $this->loadTemplate('card-edit-footer') ?>
|
||||
</article>
|
||||
|
||||
<?php $this->loadTemplate('card-edit-actions-buttons') ?>
|
||||
|
||||
<?php $this->loadTemplate('card-edit-footer') ?>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -22,21 +22,17 @@ $formCard = $this->formCard;
|
|||
|
||||
$url = $context->getControllerUrl($context->controller). '&id=' . $formCard->object->id;
|
||||
|
||||
?>
|
||||
|
||||
<?php if ($formCard->action != 'presend' && $formCard->action != 'editline') { ?>
|
||||
<div id="actions_buttons">
|
||||
<?php
|
||||
if ($formCard->action != 'presend' && $formCard->action != 'editline') { ?>
|
||||
<div id="actions_buttons"><?php
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $context);
|
||||
if ($reshook < 0) {
|
||||
$context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
} elseif (empty($reshook)) {
|
||||
// Edit card
|
||||
if ($formCard->permissiontoadd) { ?>
|
||||
if ($reshook < 0) {
|
||||
$context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
} elseif (empty($reshook)) {
|
||||
// Edit card
|
||||
if ($formCard->permissiontoadd) { ?>
|
||||
<a href="<?php print $url . "&action=edit" ?>" role="button"><?php print $langs->trans('Modify') ?></a>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php }
|
||||
}
|
||||
?></div>
|
||||
<?php }
|
||||
|
|
|
|||
|
|
@ -22,5 +22,4 @@ $formCard = $this->formCard;
|
|||
|
||||
?>
|
||||
|
||||
<footer>
|
||||
</footer>
|
||||
<footer class="object-card-view__footer"><?php $this->loadTemplate('card-view-actions-buttons') ?></footer>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ $fieldShowList = $formCard->fieldsmanager->getAllFieldsInfos($formCard->object,
|
|||
|
||||
?>
|
||||
|
||||
<div id="properties">
|
||||
<div id="properties" data-element="<?php print dol_escape_htmltag($formCard->object->element) ?>" >
|
||||
<div class="grid">
|
||||
<div class="card-left">
|
||||
<?php foreach ($fieldShowList['columns'] as $idxColumn => $fields) {
|
||||
|
|
|
|||
|
|
@ -36,14 +36,12 @@ print $formconfirm;
|
|||
|
||||
?>
|
||||
|
||||
<article>
|
||||
<article class="card-view-container" data-element-id="<?php print dol_escape_htmltag((string) $formCard->object->id) ?>" data-element="<?php print dol_escape_htmltag($formCard->object->element) ?>" >
|
||||
<?php $this->loadTemplate('card-view-header') ?>
|
||||
|
||||
<?php $this->loadTemplate('card-view-properties') ?>
|
||||
|
||||
<?php $this->loadTemplate('card-view-lines') ?>
|
||||
|
||||
<?php $this->loadTemplate('card-view-footer') ?>
|
||||
</article>
|
||||
|
||||
<?php $this->loadTemplate('card-view-actions-buttons') ?>
|
||||
|
||||
<?php $this->loadTemplate('card-view-footer') ?>
|
||||
|
|
|
|||
Loading…
Reference in a new issue