Pārlūkot izejas kodu

[Producer] Commande : responsive table products #181

refactoring
Guillaume pirms 2 gadiem
vecāks
revīzija
e53812a37c
4 mainītis faili ar 93 papildinājumiem un 30 dzēšanām
  1. +5
    -5
      producer/views/order/order.php
  2. +41
    -20
      producer/web/css/screen.css
  3. +25
    -3
      producer/web/js/vuejs/order-order.js
  4. +22
    -2
      producer/web/sass/_responsive.scss

+ 5
- 5
producer/views/order/order.php Parādīt failu

<table id="products" class="table table-bordered" > <table id="products" class="table table-bordered" >
<thead> <thead>
<tr> <tr>
<th>Photo</th>
<th>Nom</th>
<th>Prix unitaire</th>
<th>Quantité</th>
<th>Total</th>
<th class="photo">Photo</th>
<th class="name">Nom</th>
<th class="price">Prix unitaire</th>
<th class="quantity">Quantité</th>
<th class="total">Total</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

+ 41
- 20
producer/web/css/screen.css Parādīt failu

padding: 3px; padding: 3px;
} }
/* line 121, ../sass/_responsive.scss */ /* line 121, ../sass/_responsive.scss */
#main #products .td-photo, #main #products .th-photo {
#main #products td.photo, #main #products th.photo {
display: none; display: none;
} }
/* line 125, ../sass/_responsive.scss */ /* line 125, ../sass/_responsive.scss */
#main #products .product .nom { #main #products .product .nom {
font-size: 15px; font-size: 15px;
} }
/* line 134, ../sass/_responsive.scss */
#main #bar-fixed {
/* line 133, ../sass/_responsive.scss */
#main #products .td-quantity .input-group {
position: relative; position: relative;
} }
/* line 136, ../sass/_responsive.scss */ /* line 136, ../sass/_responsive.scss */
#main #products .td-quantity .input-group .input-group-btn {
display: block;
width: 100%;
}
/* line 140, ../sass/_responsive.scss */
#main #products .td-quantity .input-group .form-control.quantity {
text-align: left !important;
}
/* line 143, ../sass/_responsive.scss */
#main #products .td-quantity .input-group .input-group-addon {
position: absolute;
top: 37px;
right: 15px;
z-index: 10;
border: 0px none;
}
/* line 154, ../sass/_responsive.scss */
#main #bar-fixed {
position: relative;
}
/* line 156, ../sass/_responsive.scss */
#main #bar-fixed .btn-comment { #main #bar-fixed .btn-comment {
float: none; float: none;
display: block; display: block;
margin-top: 15px; margin-top: 15px;
} }


/* line 146, ../sass/_responsive.scss */
/* line 166, ../sass/_responsive.scss */
.order-create #main #content .order-form #products .table .input-group, .order-create #main #content .order-form #products .table .input-group,
.order-update #main #content .order-form #products .table .input-group { .order-update #main #content .order-form #products .table .input-group {
width: 60px; width: 60px;
} }
/* line 150, ../sass/_responsive.scss */
/* line 170, ../sass/_responsive.scss */
.order-create #main #content .order-form #products .table .input-group .form-control, .order-create #main #content .order-form #products .table .input-group .form-control,
.order-update #main #content .order-form #products .table .input-group .form-control { .order-update #main #content .order-form #products .table .input-group .form-control {
width: 20px; width: 20px;
padding: 3px; padding: 3px;
} }


/* line 156, ../sass/_responsive.scss */
/* line 176, ../sass/_responsive.scss */
.order-create #main #content .order-form #bar-fixed #checkbox-credit, .order-create #main #content .order-form #bar-fixed #checkbox-credit,
.order-update #main #content .order-form #bar-fixed #checkbox-credit { .order-update #main #content .order-form #bar-fixed #checkbox-credit {
width: 100%; width: 100%;
margin: 0px; margin: 0px;
padding: 5px 0px; padding: 5px 0px;
} }
/* line 162, ../sass/_responsive.scss */
/* line 182, ../sass/_responsive.scss */
.order-create #main #content .order-form #bar-fixed #checkbox-credit .the-credit, .order-create #main #content .order-form #bar-fixed #checkbox-credit .the-credit,
.order-update #main #content .order-form #bar-fixed #checkbox-credit .the-credit { .order-update #main #content .order-form #bar-fixed #checkbox-credit .the-credit {
word-break: break-all; word-break: break-all;
} }


/* line 167, ../sass/_responsive.scss */
/* line 187, ../sass/_responsive.scss */
.order-create #main #content .order-form #bar-fixed #block-confirm-order button, .order-create #main #content .order-form #bar-fixed #block-confirm-order button,
.order-update #main #content .order-form #bar-fixed #block-confirm-order button { .order-update #main #content .order-form #bar-fixed #block-confirm-order button {
width: 100%; width: 100%;
} }


/* line 175, ../sass/_responsive.scss */
/* line 195, ../sass/_responsive.scss */
.order-order #app-order-order h3 { .order-order #app-order-order h3 {
line-height: 28px; line-height: 28px;
} }
/* line 181, ../sass/_responsive.scss */
/* line 201, ../sass/_responsive.scss */
.order-order #app-order-order #distributions-list .panel .btn-primary { .order-order #app-order-order #distributions-list .panel .btn-primary {
display: block; display: block;
float: none !important; float: none !important;
margin-bottom: 10px; margin-bottom: 10px;
} }
/* line 190, ../sass/_responsive.scss */
/* line 210, ../sass/_responsive.scss */
.order-order #app-order-order #steps ul { .order-order #app-order-order #steps ul {
height: auto !important; height: auto !important;
} }
/* line 192, ../sass/_responsive.scss */
/* line 212, ../sass/_responsive.scss */
.order-order #app-order-order #steps ul li { .order-order #app-order-order #steps ul li {
padding-left: 0px !important; padding-left: 0px !important;
padding-right: 0px !important; padding-right: 0px !important;
} }
/* line 196, ../sass/_responsive.scss */
/* line 216, ../sass/_responsive.scss */
.order-order #app-order-order #steps ul li .info-step { .order-order #app-order-order #steps ul li .info-step {
display: none; display: none;
} }
/* line 200, ../sass/_responsive.scss */
/* line 220, ../sass/_responsive.scss */
.order-order #app-order-order #steps ul li .btn::after, .order-order #app-order-order #steps ul li .btn::after,
.order-order #app-order-order #steps ul li .btn::before { .order-order #app-order-order #steps ul li .btn::before {
display: none; display: none;
} }
/* line 211, ../sass/_responsive.scss */
/* line 231, ../sass/_responsive.scss */
.order-order #app-order-order table#products td.name .recipe { .order-order #app-order-order table#products td.name .recipe {
display: none; display: none;
} }
/* line 217, ../sass/_responsive.scss */
/* line 237, ../sass/_responsive.scss */
.order-order #app-order-order table#products td.td-quantity .input-group-btn { .order-order #app-order-order table#products td.td-quantity .input-group-btn {
width: 100%; width: 100%;
display: block; display: block;
} }
/* line 221, ../sass/_responsive.scss */
/* line 241, ../sass/_responsive.scss */
.order-order #app-order-order table#products td.td-quantity .input-group-btn button { .order-order #app-order-order table#products td.td-quantity .input-group-btn button {
width: 100%; width: 100%;
display: block; display: block;
} }
/* line 231, ../sass/_responsive.scss */
/* line 251, ../sass/_responsive.scss */
.order-order #app-order-order #order-success .alert .glyphicon-big { .order-order #app-order-order #order-success .alert .glyphicon-big {
font-size: 90px; font-size: 90px;
color: white; color: white;
text-align: center; text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
} }
/* line 240, ../sass/_responsive.scss */
/* line 260, ../sass/_responsive.scss */
.order-order #app-order-order #order-success .alert div.content { .order-order #app-order-order #order-success .alert div.content {
margin-left: 0px; margin-left: 0px;
text-align: center; text-align: center;
} }


/* line 251, ../sass/_responsive.scss */
/* line 271, ../sass/_responsive.scss */
#footer .content { #footer .content {
text-align: center; text-align: center;
} }

+ 25
- 3
producer/web/js/vuejs/order-order.js Parādīt failu

} }


app.loading = false ; app.loading = false ;
});

setTimeout(function() {
app.responsive();
}, 500);

});
}, },


isChangeState: function(entryPoint, oldStep, newStep) {
responsive: function() {
var app = this;
app.responsiveApply();
$(window).resize(function() {
app.responsiveApply();
});
},

responsiveApply: function() {
var width_window = parseInt($(window).width());
var $td_summary = $('#products tr.total td.summary');
if(width_window <= 768) {
$td_summary.attr('colspan', 3);
}
else {
$td_summary.attr('colspan', 4);
}
},


isChangeState: function(entryPoint, oldStep, newStep) {
return this.producer return this.producer
&& entryPoint == this.producer.option_order_entry_point && entryPoint == this.producer.option_order_entry_point
&& oldStep == this.oldStep && oldStep == this.oldStep
&& newStep == this.step ; && newStep == this.step ;

}, },


nextStep: function() { nextStep: function() {

+ 22
- 2
producer/web/sass/_responsive.scss Parādīt failu

padding: 3px ; padding: 3px ;
} }
.td-photo, .th-photo {
td.photo, th.photo {
display: none ; display: none ;
} }
.nom { .nom {
font-size: 15px ; font-size: 15px ;
} }
}

.td-quantity {
.input-group {
position: relative;

.input-group-btn {
display: block;
width: 100%;
}
.form-control.quantity {
text-align: left !important;
}
.input-group-addon {
position: absolute;
top: 37px;
right: 15px;
z-index: 10;
border: 0px none;
}
}
} }
} }

Notiek ielāde…
Atcelt
Saglabāt