Merge branch 'ticket-11056' into develop
This commit is contained in:
commit
bb95ffcaa1
@ -55,7 +55,7 @@ if (isset($_GET['getSales'])){
|
||||
<td><strong>'.$sale->title[intval($cookie->id_lang)].'</strong><br/><span style="color:#666; font-style:italic">'.$extrafields[$sale->id][1].'</span></td>
|
||||
<td>'.$sale->date_start.'</td>
|
||||
<td>'.$sale->date_end.'</td>
|
||||
<td>'.($sale->enabled? 'Oui':'Non').'</td>';
|
||||
<td>'.($sale->enabled? '<img src="../img/admin/module_install.png"/>':'<img src="../img/admin/module_notinstall.png"/>').'</td>';
|
||||
|
||||
if($sale->new == 0){
|
||||
echo "<td>Non</td>";
|
||||
|
@ -134,8 +134,78 @@ class AdminPrivateSalesSales extends AdminTab {
|
||||
.red {
|
||||
background : #f29b9b;
|
||||
}
|
||||
.sale_0 {
|
||||
background : #fbfbdb;
|
||||
fieldset.bg-grey{
|
||||
background: #F1F1F1;
|
||||
border: 1px solid #565485;
|
||||
}
|
||||
fieldset.bg-grey legend{
|
||||
background: rgba(86,84,133,0.9);
|
||||
border: 1px solid #565485;
|
||||
color: #fff;
|
||||
font-weight: 300;
|
||||
}
|
||||
table {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
-moz-box-shadow: 2px 2px 5px #cccccc;
|
||||
-webkit-box-shadow: 2px 2px 5px #CCC;
|
||||
-ms-box-shadow: 2px 2px 5px #cccccc;
|
||||
-o-box-shadow: 2px 2px 5px #cccccc;
|
||||
box-shadow: 2px 2px 5px #CCC;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
.table {
|
||||
border: 1px solid #565485;
|
||||
}
|
||||
.table tr th{
|
||||
background: rgba(86,84,133,0.9);
|
||||
color: #fff;
|
||||
font-weight: 300;
|
||||
}
|
||||
.table tr td {
|
||||
border-bottom: 1px solid #DEDEDE;
|
||||
color: #000;
|
||||
padding: 0 4px 0 6px;
|
||||
}
|
||||
.table tr td:nth-child(6),
|
||||
.table tr td:nth-child(7),
|
||||
.table tr td:nth-child(11),
|
||||
.table tr td:nth-child(12){
|
||||
text-align:center;
|
||||
}
|
||||
.table tr:nth-child(odd){
|
||||
background : #F3F3F3;
|
||||
}
|
||||
.button.purple {
|
||||
background-color: rgba(86,84,133,0.7);
|
||||
border: 1px solid #565485;
|
||||
border-left: 1px solid rgba(86,84,133,0.6);
|
||||
border-top: 1px solid rgba(86,84,133,0.6);
|
||||
color: rgba(255,255,255,0.9);
|
||||
padding: 3px;
|
||||
}
|
||||
.button.purple:hover {
|
||||
background-color: #565485;
|
||||
border: 1px solid rgba(86,84,133,0.6);
|
||||
border-left: 1px solid #565485;
|
||||
border-top: 1px solid #565485;
|
||||
color: #fff;
|
||||
padding: 3px;
|
||||
}
|
||||
.button.purple:focus{
|
||||
background-color: rgba(86,84,133,1.6);
|
||||
}
|
||||
#delivery_mode{
|
||||
margin-bottom:5px;
|
||||
}
|
||||
.carriers_info{
|
||||
background:#fff;
|
||||
padding:10px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
.carriers_hidden{
|
||||
display:none;
|
||||
}
|
||||
</style>
|
||||
<form action="'.$currentIndex.'&token='.Tools::getAdminTokenLite('AdminPrivateSalesSales').'" method="post" enctype="multipart/form-data">
|
||||
@ -394,34 +464,61 @@ class AdminPrivateSalesSales extends AdminTab {
|
||||
WHERE c.`deleted` != 1
|
||||
');
|
||||
|
||||
$carriers_default = array(22, 87, 88, 89); // prod
|
||||
// $carriers_default = array(22, 46, 47, 48); // dev
|
||||
// $carriers_default = array(22, 87, 88, 89); // prod
|
||||
$carriers_default = array(22, 45, 47, 48); // dev
|
||||
|
||||
echo '<label>'.$this->l('Carriers:').'</label>
|
||||
<div class="margin-form">
|
||||
<div id="carriers" style="float: left;">
|
||||
<select id="m_carriers" name="m_groups[]" multiple="multiple" size="5">
|
||||
<option value=""></option>
|
||||
<optgroup label="'.$this->l('Select one or more carriers:').'">';
|
||||
if( Tools::getIsset('edit')) {
|
||||
foreach($carriers as $carrier) {
|
||||
echo '<option value="'.$carrier['id_carrier'].'"'.(isset($carrier['id_sale']) && $carrier['id_sale'] !== NULL?' selected="selected"':'').'>'.$carrier['name'].'</option>';
|
||||
}
|
||||
} else{
|
||||
foreach($carriers as $carrier) {
|
||||
echo '<option value="'.$carrier['id_carrier'].'"'.(in_array($carrier['id_carrier'], $carriers_default) ? ' selected="selected"':'').'>'.$carrier['name'].'</option>';
|
||||
}
|
||||
<select id="delivery_mode" name="delivery_mode" >
|
||||
<option value="0">'.$this->l('Select Expedition').'</option>
|
||||
<option value="1">'.$this->l('Expédition classique').'</option>
|
||||
<option value="2">'.$this->l('Expédition domicile uniquement').'</option>
|
||||
<option value="3">'.$this->l('Expédition gratuite').'</option>
|
||||
<option value="4">'.$this->l('Expédition gratuite domicile uniquement').'</option>
|
||||
</select>
|
||||
<div class="carriers_info">
|
||||
<h3>'.$this->l('Transporteurs selectionnés : ').'</h3>
|
||||
<div class="info"></div>
|
||||
</div>
|
||||
<div class="carriers_hidden">';
|
||||
if(Tools::getIsset('edit')) {
|
||||
foreach($carriers as $carrier) {
|
||||
echo '<input name="m_carriers[]" type="checkbox" value="'.$carrier['id_carrier'].'"'.(isset($carrier['id_sale']) && $carrier['id_sale'] !== NULL? ' checked="checked"':'').' data-carrier-name="'.$carrier['name'].'"/>';
|
||||
}
|
||||
echo '
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
} else {
|
||||
foreach($carriers as $carrier) {
|
||||
echo '<input name="m_carriers[]" type="checkbox" value="'.$carrier['id_carrier'].'"'.(in_array($carrier['id_carrier'], $carriers_default) ? ' checked="checked"':'').' data-carrier-name="'.$carrier['name'].'"/>';
|
||||
}
|
||||
}
|
||||
echo '</div></div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#m_carriers").multiSelect({
|
||||
selectAllText: "'.$this->l('Select all').'",
|
||||
noneSelected: " ",
|
||||
oneOrMoreSelected: "*"
|
||||
var carriers_info = "";
|
||||
$("input[name=\'m_carriers[]\']:checked").each(function(i, el) {
|
||||
carriers_info += "<p>"+$(el).data("carrier-name")+"</p>";
|
||||
});
|
||||
$(".carriers_info div.info").html(carriers_info);
|
||||
|
||||
$("#delivery_mode").change(function(){
|
||||
carriers_info = "";
|
||||
$("input[name=\'m_carriers[]\']").each(function(i, el) {
|
||||
$(el).attr("checked",false);
|
||||
});
|
||||
var selected_carriers = [];
|
||||
if($(this).val() == 1 || $(this).val() == 3) {
|
||||
selected_carriers = ["22", "45", "47", "48"];
|
||||
} else if($(this).val() == 2 || $(this).val() == 4) {
|
||||
selected_carriers = ["22", "45"];
|
||||
}
|
||||
$("input[name=\'m_carriers[]\']").each(function(){
|
||||
if ($.inArray($(this).val(),selected_carriers) != -1){
|
||||
$(this).attr("checked",true);
|
||||
carriers_info += "<p>"+$(this).data("carrier-name")+"</p>";
|
||||
}
|
||||
});
|
||||
$(".carriers_info div.info").empty();
|
||||
$(".carriers_info div.info").html(carriers_info);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -545,11 +642,11 @@ class AdminPrivateSalesSales extends AdminTab {
|
||||
}
|
||||
|
||||
//ANTADIS
|
||||
echo '<fieldset style="margin-top:15px">';
|
||||
echo '<fieldset class="bg-grey" style="margin-top:15px">';
|
||||
echo '<legend>Tri des ventes</legend>';
|
||||
echo '<input type="submit" value="Ventes actuelles" name="not_ended" class="tri button active" style="margin-right:10px;">';
|
||||
echo '<input type="submit" value="Ventes terminées" name="finished" class="tri button" style="margin-right:10px;">';
|
||||
echo '<input type="submit" value="Toutes les ventes" name="all" class="tri button">';
|
||||
echo '<input type="submit" value="Ventes actuelles" name="not_ended" class="tri button purple active" style="margin-right:10px;">';
|
||||
echo '<input type="submit" value="Ventes terminées" name="finished" class="tri button purple" style="margin-right:10px;">';
|
||||
echo '<input type="submit" value="Toutes les ventes" name="all" class="tri button purple">';
|
||||
echo '</fieldset>';
|
||||
|
||||
?>
|
||||
@ -564,7 +661,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
||||
$(this).addClass('active');
|
||||
$('.list_vente').empty();
|
||||
|
||||
var loader = "<p class='text-align:center'><img src='../img/loader.gif' /></p>";
|
||||
var loader = "<p style='text-align:center'><img src='../img/loader_payment.gif' /></p>";
|
||||
$('.list_vente').html(loader);
|
||||
|
||||
$.ajax({
|
||||
@ -664,7 +761,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
||||
';
|
||||
|
||||
|
||||
echo '<fieldset class="space">
|
||||
echo '<fieldset class="space bg-grey">
|
||||
<legend><img src="'.__PS_BASE_URI__.'modules/privatesales/prefs.gif" alt="" title="" /> '.$this->l('Sales list').'</legend>
|
||||
<table class="table list_vente" style="width: 100%;">
|
||||
<thead>
|
||||
@ -701,7 +798,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
||||
<td><strong>'.$sale->title[intval($cookie->id_lang)].'</strong><br/><span style="color:#666; font-style:italic">'.$extrafields[$sale->id][1].'</span></td>
|
||||
<td>'.$sale->date_start.'</td>
|
||||
<td>'.$sale->date_end.'</td>
|
||||
<td>'.($sale->enabled?$this->l('Yes'):$this->l('No')).'</td>
|
||||
<td>'.($sale->enabled?'<img src="../img/admin/module_install.png"/>':'<img src="../img/admin/module_notinstall.png"/>').'</td>
|
||||
';
|
||||
|
||||
if($sale->new == 0){
|
||||
|
Loading…
Reference in New Issue
Block a user