瀏覽代碼

[Backend] Produits : essais édition avancée

feature/tableau_edition_avancee
Guillaume 4 年之前
父節點
當前提交
c00599965f
共有 7 個檔案被更改,包括 48 行新增76 行删除
  1. +1
    -2
      ShopBundle/Controller/Backend/ProductFamilyController.php
  2. +42
    -48
      ShopBundle/Resources/public/css/backend/custom.css
  3. +3
    -9
      ShopBundle/Resources/public/sass/backend/custom.scss
  4. +0
    -13
      ShopBundle/Resources/views/backend/default/edit-ajax.html.twig
  5. +2
    -2
      ShopBundle/Resources/views/backend/form/custom_bootstrap_4.html.twig
  6. +0
    -1
      ShopBundle/Resources/views/backend/productfamily/edit.html.twig
  7. +0
    -1
      ShopBundle/Resources/views/backend/productfamily/form.html.twig

+ 1
- 2
ShopBundle/Controller/Backend/ProductFamilyController.php 查看文件

@@ -209,7 +209,6 @@ class ProductFamilyController extends AdminController

protected function editAction()
{

$this->dispatch(EasyAdminEvents::PRE_EDIT);

$id = $this->request->query->get('id');
@@ -266,7 +265,7 @@ class ProductFamilyController extends AdminController

if ($editForm->get('stayOnPage')->getData() != "false" || $this->request->get('submitAndStay') !== null) {
$refererUrl = $this->request->query->get('referer', '');
return $this->redirectToRoute('easyadmin', ['entity' => 'ProductFamily', 'action' => 'edit', 'id' => $id, 'referer' => $refererUrl]);
return $this->redirectToRoute('easyadmin', ['entity' => 'ProductFamily', 'action' => 'edit', 'id' => $id, 'referer' => $refererUrl, 'ajax' => $this->request->query->get('ajax')]);
} else {
return $this->redirectToReferrer();
}

+ 42
- 48
ShopBundle/Resources/public/css/backend/custom.css 查看文件

@@ -625,35 +625,29 @@ table th .select2-container--default .select2-selection--single {
}

/* line 234, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .card-sections,
.layout-ajax #edit-productfamily-form .card-footer {
.layout-ajax #edit-productfamily-form .card-sections {
width: 100%;
position: fixed;
left: 0px;
top: 0px;
z-index: 10;
}
/* line 242, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .card-sections {
top: 0px;
}
/* line 246, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .form {
padding-top: 50px;
}
/* line 250, ../../sass/backend/custom.scss */
/* line 246, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .card-footer {
bottom: 0px;
background-color: white;
border: solid 1px #e0e0e0;
display: none;
}

/* ORDER */
/* line 260, ../../sass/backend/custom.scss */
/* line 254, ../../sass/backend/custom.scss */
.table-order-summary {
width: 100%;
}

/* line 263, ../../sass/backend/custom.scss */
/* line 257, ../../sass/backend/custom.scss */
.order-product-item.redelivery {
background: rgba(18, 104, 253, 0.38) !important;
}
@@ -661,36 +655,36 @@ table th .select2-container--default .select2-selection--single {
/*.select2-container--bootstrap .select2-selection{max-width: none;}*/
/*.order-product-item{margin: 15px 0; padding: 0;}*/
/* Product */
/* line 268, ../../sass/backend/custom.scss */
/* line 262, ../../sass/backend/custom.scss */
.product-form-modal {
display: none;
}

/* line 269, ../../sass/backend/custom.scss */
/* line 263, ../../sass/backend/custom.scss */
.product-form.modal .form-check-label {
font-style: italic;
color: #666;
text-align: left;
}

/* line 270, ../../sass/backend/custom.scss */
/* line 264, ../../sass/backend/custom.scss */
.products-collection-table .inherited {
color: #888;
font-style: italic;
font-weight: initial;
}

/* line 271, ../../sass/backend/custom.scss */
/* line 265, ../../sass/backend/custom.scss */
.products-collection-table td {
position: relative;
}

/* line 272, ../../sass/backend/custom.scss */
/* line 266, ../../sass/backend/custom.scss */
.card-body.p-0 .products-collection-table tbody > tr > td:first-of-type, .card-body.p-0 .products-collection-table tbody > tr > th:first-of-type, .card-body.p-0 .products-collection-table thead > tr > td:first-of-type, .card-body.p-0 .products-collection-table thead > tr > th:first-of-type {
padding-left: 0.35rem;
}

/* line 273, ../../sass/backend/custom.scss */
/* line 267, ../../sass/backend/custom.scss */
.products-collection-table .btn-empty-field {
position: absolute;
right: 3px;
@@ -699,14 +693,14 @@ table th .select2-container--default .select2-selection--single {
padding: 0px;
}

/* line 274, ../../sass/backend/custom.scss */
/* line 268, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table {
table-layout: fixed;
/* background-clip: padding-box;*/
border-collapse: collapse;
}

/* line 275, ../../sass/backend/custom.scss */
/* line 269, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table th {
font-size: 13px;
border-left: 1px solid #dee2e6;
@@ -716,22 +710,22 @@ table th .select2-container--default .select2-selection--single {
position: relative;
}

/* line 276, ../../sass/backend/custom.scss */
/* line 270, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table tfoot th {
border-top: 2px solid #dee2e6;
}

/* line 277, ../../sass/backend/custom.scss */
/* line 271, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table th span {
white-space: initial;
}

/* line 278, ../../sass/backend/custom.scss */
/* line 272, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table th:last-child {
border-right: 1px solid #dee2e6;
}

/* line 279, ../../sass/backend/custom.scss */
/* line 273, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td {
border-left: 1px solid #dee2e6;
text-align: center;
@@ -739,26 +733,26 @@ table th .select2-container--default .select2-selection--single {
border-bottom: 1px solid #dee2e6;
}

/* line 280, ../../sass/backend/custom.scss */
/* line 274, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td:last-child {
border-right: 1px solid #dee2e6;
white-space: nowrap;
}

/* line 281, ../../sass/backend/custom.scss */
/* line 275, ../../sass/backend/custom.scss */
#lc-product-family-edit .btn-add-product {
margin: 20px 0;
float: right;
}

/* line 282, ../../sass/backend/custom.scss */
/* line 276, ../../sass/backend/custom.scss */
#lc-product-family-edit .inherited {
color: #888;
font-style: italic;
font-weight: initial;
}

/* line 283, ../../sass/backend/custom.scss */
/* line 277, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td .value {
min-width: 80%;
margin: auto;
@@ -766,79 +760,79 @@ table th .select2-container--default .select2-selection--single {
cursor: pointer;
}

/* line 284, ../../sass/backend/custom.scss */
/* line 278, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td .modal {
text-align: left;
}

/* line 285, ../../sass/backend/custom.scss */
/* line 279, ../../sass/backend/custom.scss */
table.products-collection-table th.main-info, td.buyingPrice, td.multiplyingFactor, td.priceWithTax {
background: #eeeeee;
background-clip: padding-box;
text-decoration: underline;
}

/* line 287, ../../sass/backend/custom.scss */
/* line 281, ../../sass/backend/custom.scss */
table.products-collection-table tr.disabled {
opacity: 0.5;
}

/* line 288, ../../sass/backend/custom.scss */
/* line 282, ../../sass/backend/custom.scss */
.table-striped tbody .tr-sep {
border-top: 2px solid #888;
}

/* DeliveryZone */
/* line 292, ../../sass/backend/custom.scss */
/* line 286, ../../sass/backend/custom.scss */
#autocomplete-cities {
position: relative;
}

/* line 296, ../../sass/backend/custom.scss */
/* line 290, ../../sass/backend/custom.scss */
#autocomplete-cities .ui-autocomplete {
left: 30%;
top: 41px;
margin-left: 18px;
}

/* line 302, ../../sass/backend/custom.scss */
/* line 296, ../../sass/backend/custom.scss */
.head-reminders {
margin-top: 15px;
}

/* TABLEAU DE BORD */
/* line 305, ../../sass/backend/custom.scss */
/* line 299, ../../sass/backend/custom.scss */
.todo-list > li {
position: relative;
}

/* line 306, ../../sass/backend/custom.scss */
/* line 300, ../../sass/backend/custom.scss */
.todo-list > li .text {
margin-left: 30px;
}

/* line 307, ../../sass/backend/custom.scss */
/* line 301, ../../sass/backend/custom.scss */
.todo-list > li .tools {
position: absolute;
top: 4px;
right: 15px;
}

/* line 309, ../../sass/backend/custom.scss */
/* line 303, ../../sass/backend/custom.scss */
#addTicketMessageForm {
margin-top: 30px;
border-top: 2px dotted #eee;
padding-top: 30px;
}

/* line 311, ../../sass/backend/custom.scss */
/* line 305, ../../sass/backend/custom.scss */
#dashboard .list-btn-statistic {
display: flex;
flex-wrap: wrap;
justify-content: center;
}

/* line 312, ../../sass/backend/custom.scss */
/* line 306, ../../sass/backend/custom.scss */
#dashboard .btn-statistic {
width: 120px;
height: 70px;
@@ -847,41 +841,41 @@ table.products-collection-table tr.disabled {
line-height: 1rem;
}

/* line 313, ../../sass/backend/custom.scss */
/* line 307, ../../sass/backend/custom.scss */
#dashboard .btn-statistic small {
margin-bottom: 10px;
display: block;
}

/* line 314, ../../sass/backend/custom.scss */
/* line 308, ../../sass/backend/custom.scss */
#dashboard .btn-statistic .value {
display: block;
}

/* line 316, ../../sass/backend/custom.scss */
/* line 310, ../../sass/backend/custom.scss */
#dashboard #range_date_interval {
margin-bottom: 20px;
}

/* line 317, ../../sass/backend/custom.scss */
/* line 311, ../../sass/backend/custom.scss */
#dashboard #range_date_interval label {
float: left;
margin-right: 20px;
}

/* line 318, ../../sass/backend/custom.scss */
/* line 312, ../../sass/backend/custom.scss */
#dashboard #range_date_interval .form-check {
float: left;
margin-right: 10px;
}

/* line 319, ../../sass/backend/custom.scss */
/* line 313, ../../sass/backend/custom.scss */
#dashboard .table-condensed .btn, #dashboard .table-condensed .btn-sm {
white-space: nowrap;
}

/* Tickets */
/* line 325, ../../sass/backend/custom.scss */
/* line 319, ../../sass/backend/custom.scss */
#ticket-list .btn-sm {
display: block;
}

+ 3
- 9
ShopBundle/Resources/public/sass/backend/custom.scss 查看文件

@@ -231,16 +231,12 @@ table th .select2-container--default .select2-selection--single{padding:0.3rem 0

.layout-ajax {
#edit-productfamily-form {
.card-sections,
.card-footer {
.card-sections {
width: 100% ;
position: fixed ;
left: 0px ;
z-index: 10;
}

.card-sections {
top: 0px ;
z-index: 10;
}

.form {
@@ -248,9 +244,7 @@ table th .select2-container--default .select2-selection--single{padding:0.3rem 0
}

.card-footer {
bottom: 0px ;
background-color: white;
border: solid 1px #e0e0e0;
display: none ;
}
}
}

+ 0
- 13
ShopBundle/Resources/views/backend/default/edit-ajax.html.twig 查看文件

@@ -13,18 +13,6 @@
{{ form(form) }}
{% endblock entity_form %}

{% block delete_form %}
{{ include('@EasyAdmin/default/includes/_delete_form.html.twig', {
view: 'edit',
referer: app.request.query.get('referer', ''),
delete_form: delete_form,
_translation_domain: _entity_config.translation_domain,
_trans_parameters: _trans_parameters,
_entity_config: _entity_config,
}, with_context = false) }}
{% endblock delete_form %}


{% block head_stylesheets %}
{{ parent() }}
<link rel="stylesheet"
@@ -43,5 +31,4 @@
{% block script_javascript %}
<script src="{{ asset('bundles/lcshop/js/backend/script/default/init-edit.js') }}"></script>
{% endblock %}

{% endblock %}

+ 2
- 2
ShopBundle/Resources/views/backend/form/custom_bootstrap_4.html.twig 查看文件

@@ -233,12 +233,12 @@
{% set _translation_domain = easyadmin.entity.translation_domain %}
{% set _trans_parameters = { '%entity_name%': easyadmin.entity.name|trans(domain = _translation_domain), '%entity_label%': easyadmin.entity.label|trans(domain = _translation_domain) } %}

{# the 'save' action is hardcoded for the 'edit' and 'new' views #}
<button type="submit" name="save_and_leave" class="btn btn-primary action-save">
<span class="btn-label">{{ 'action.save'|trans(_trans_parameters, _translation_domain) }}</span>
</button>

{% if easyadmin.entity.name =='ProductFamily' %}
<button name="submitAndStay" value="1" type="submit" class="btn btn-success action-save">
<button name="submitAndStay" value="1" type="submit" class="btn btn-success action-save action-save-and-stay">
<span class="btn-label">{{ 'action.saveAndStay'|trans(_trans_parameters, _translation_domain) }}</span>
</button>
{% endif %}

+ 0
- 1
ShopBundle/Resources/views/backend/productfamily/edit.html.twig 查看文件

@@ -6,7 +6,6 @@
{% include '@LcShop/backend/productfamily/form.html.twig' %}
{% endblock entity_form %}


{% block head_stylesheets %}
{{ parent() }}
<link rel="stylesheet" href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/daterange/daterangepicker.css') }}">

+ 0
- 1
ShopBundle/Resources/views/backend/productfamily/form.html.twig 查看文件

@@ -114,7 +114,6 @@
</div>
{{ form_widget(form.stayOnPage, {"attr": {"v-model": "stayOnPage"}}) }}


</div>
{{ form_end(form) }}


Loading…
取消
儲存