253 lines
8.9 KiB
PHP
Executable File
253 lines
8.9 KiB
PHP
Executable File
<style>
|
|
small{word-break: break-word;white-space: break-spaces;};
|
|
#pub-container, #pdp-container {display: none;}
|
|
#menuIndep-container, #menuD-container {z-index: 0;}
|
|
#header-container{z-index: 0;}
|
|
#page-container {display:contents;}
|
|
#modaleSite{
|
|
display: block;
|
|
/* position: fixed -> pas possible conflit z-index */
|
|
z-index: 15;
|
|
margin:auto;
|
|
position:relative;
|
|
position:absolute;
|
|
top: 0px;
|
|
padding: 5px;
|
|
left: 0;
|
|
right: 0;
|
|
border:4px;
|
|
bottom: 0;
|
|
border-radius: 25px;
|
|
background-color: rgba(180, 180, 180, 0.5);
|
|
width:70%;
|
|
resize:both;
|
|
opacity:1;
|
|
}
|
|
|
|
#popupSite {
|
|
vertical-align:top;
|
|
display: block;
|
|
padding: 2px;
|
|
border: 10px solid #FAFAFA;
|
|
position: relative;
|
|
margin: 3% auto;
|
|
box-shadow: 0px 0px 20px #000;
|
|
overflow: auto;
|
|
resize:both;
|
|
border-radius: 10px;
|
|
left: 0;
|
|
top: 0;
|
|
height:90%;
|
|
z-index:3;
|
|
max-width:90%;/* Conflit entre plusieurs modales trop grandes ou trop petites */
|
|
background-color:white;
|
|
}
|
|
|
|
/* garder les sauts de ligne pour le responsive */
|
|
#btnCloseSiteModale {
|
|
position:absolute;
|
|
float: right;
|
|
right:5px;
|
|
top:10px;
|
|
font-size:25px;
|
|
z-index:3;
|
|
color:black;
|
|
background-color:white;
|
|
/*box-shadow: 0px 10px 10px grey;*/
|
|
/*color:#0b4c5f;*/
|
|
border-radius: 100%;
|
|
padding:3px;
|
|
border-color:1px solid white;
|
|
/*z-index:5001;*/
|
|
}
|
|
|
|
#btnCloseSiteModale:hover {color:white; font-size:25px; background-color:grey; cursor:pointer; border-color:black;}
|
|
|
|
.respWidthTo100 {width: 20%;}
|
|
.flexToColum{display: flex;justify-content: space-between;}
|
|
.onlyInResponsive{display: none;}
|
|
.respWidth40To80 {width: 40%;}
|
|
.respWidth20To5 {width: 20%;}
|
|
.blocItemOption{width: 80%;}
|
|
|
|
@media only screen and (max-width: 930px) {
|
|
.flexToColum{flex-direction:column;}
|
|
.notInResponsive{display: none;}
|
|
.onlyInResponsive{display: block;height: 19%; margin: 1px;}
|
|
/*.divMenu, .divChamps {grid-column:1 / span 4;height: 22%; margin: 1px;}*/
|
|
.respWidthTo100 {width: 100%;}
|
|
.respWidthTo80 {width: 80%;}
|
|
.respWidthTo60 {width: 60%;}
|
|
.respWidthTo40 {width: 40%;}
|
|
.respWidth20To5 {width: 5px;}
|
|
.itemListe {width: 80%; padding: 0px;}
|
|
#modaleSite{width: 100%;}
|
|
.blocItemOption{width: 100%;}
|
|
}
|
|
|
|
/*.fad {z-index: 1;}*/
|
|
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
|
|
// ---------------------------------------------------
|
|
// Afficher masquer les lignes items ( fonctionne par autant de colonnes )
|
|
// ---------------------------------------------------
|
|
// function afficheListes ( prefixIdItem, aff) {
|
|
// debugLocal=0;
|
|
// // alert('affItem prefixIdItem : '+ prefixIdItem);
|
|
// if (document.getElementById(prefixIdItem)) {
|
|
// if (debugLocal==1) alert(' prefixIdItem trouvé : '+ document.getElementById(prefixIdItem).id);
|
|
// nb=document.getElementById(prefixIdItem).value;
|
|
// if (debugLocal==1) alert(' nombre items : '+ nb);
|
|
// if (aff=='') aff='none';
|
|
// if (debugLocal==1) alert(' aff : '+ aff);
|
|
// for(nbCol=0; nbCol<nb; nbCol++) {
|
|
// if (document.getElementById(prefixIdItem+nbCol)) {
|
|
// document.getElementById(prefixIdItem+nbCol).style.display=aff;
|
|
// }
|
|
// else if (debugLocal==2 && document.getElementById(prefixIdItem).id=='Frites') alert('pas trouve colone');
|
|
// }
|
|
// }
|
|
// else if (debugLocal==1) alert(' prefixIdItem pas trouvé : '+ document.getElementById(prefixIdItem).id);
|
|
// }
|
|
|
|
// ---------------------------------------------------
|
|
// Postage de la quantité
|
|
// ---------------------------------------------------
|
|
function upQte (quantite, itemNumber, isAucun) {
|
|
debugLocal=0;
|
|
if (debugLocal==1) alert('upQte (quantite postée) = '+quantite+ ' item number=' +itemNumber+ ' isAucun='+isAucun);
|
|
|
|
if (document.getElementById('quantitePost')) document.getElementById('quantitePost').value=quantite;
|
|
if (document.getElementById('itemNumberPost')) document.getElementById('itemNumberPost').value=itemNumber;
|
|
// is Aucun si vrai doit vider les autres items de la liste
|
|
if (document.getElementById('isAucun')) document.getElementById('isAucun').value=isAucun;
|
|
if (isAucun=="AUCUN") document.getElementById('quantitePost').value=0;
|
|
posteMoi();
|
|
}
|
|
|
|
function posteMoi () {
|
|
debugLocal=0;
|
|
document.getElementById('codeOpeForm').value='majOptions';
|
|
if (document.getElementById('codeOpe')) document.getElementById('codeOpe').value='0';
|
|
if (debugLocal==1) alert('je poste ');
|
|
document.formOpt.submit();
|
|
}
|
|
|
|
// ---------------------------------------------------
|
|
// Afficher le bouton suivant
|
|
// ---------------------------------------------------
|
|
function activBouton (activ, sOpt) {
|
|
if (activ==1) {
|
|
debugLocal=0;
|
|
if (debugLocal==1) alert('activ : '+ activ+' sOpt'+sOpt);
|
|
// activation du bouton suivant
|
|
document.getElementById('activBtn').value=1;
|
|
if (sOpt!='') document.getElementById('sOpt').value=sOpt;
|
|
}
|
|
}
|
|
|
|
// ---------------------------------------------------
|
|
// Lancé depuis 21 et 22-items
|
|
// ---------------------------------------------------
|
|
// Si OU : on désactive l'ancienne quantite et le btn radio qui va avec
|
|
// ---------------------------------------------------
|
|
function radioChange (u, x) {
|
|
var debugLocal;
|
|
debugLocal=0;
|
|
if (debugLocal==1) alert('Activation de '+u);
|
|
document.getElementById('kant'+u).value=1;
|
|
if (document.getElementById('itemToDesactiv') ) {
|
|
var itemTochange =document.getElementById('itemToDesactiv').value ;
|
|
if (itemTochange!=u) {
|
|
|
|
// ---------------------------------------------------
|
|
// Pour le form
|
|
// ---------------------------------------------------
|
|
if (debugLocal==1) alert('Desactivation de '+itemTochange);
|
|
if (document.getElementById('radio'+itemTochange)) document.getElementById('radio'+itemTochange).checked=false;
|
|
if (document.getElementById('kant'+itemTochange)) document.getElementById('kant'+itemTochange).value=0;
|
|
document.getElementById('selected'+x).value=u;
|
|
|
|
// ---------------------------------------------------
|
|
// Pour le postage
|
|
// ---------------------------------------------------
|
|
if (document.getElementById('kantToDesactiv')) document.getElementById('kantToDesactiv').value='0';
|
|
if (debugLocal==1) alert('Desactivation Item ' +itemTochange+ ' passe à => '+document.getElementById('kantToDesactiv').value + ' itemToDesavtiv => ' +document.getElementById('itemToDesactiv').value);
|
|
if (debugLocal==1) alert('Desactivation de '+itemTochange+' ok');
|
|
}
|
|
else
|
|
if (debugLocal==1) alert("itemTochange = u -- je ne fais rien");
|
|
}
|
|
else if (debugLocal==1) alert("itemTochange desactivation = "+itemTochange);
|
|
}
|
|
|
|
// ---------------------------------------------------
|
|
// Lancé depuis 22-items
|
|
// ---------------------------------------------------
|
|
function defautChoixRadio (u) {
|
|
if (document.getElementById('radio'+u).checked==false) {
|
|
// alert('Desactivation defautChoixRadio = '+u);
|
|
document.getElementById('kant'+u).value=0;
|
|
}
|
|
else {
|
|
// alert('Activation defautChoixRadio = '+u);
|
|
document.getElementById('kant'+u).value=1;
|
|
}
|
|
// else alert('a malibu pas '+u);
|
|
}
|
|
|
|
// ---------------------------------------------------
|
|
// Lancé depuis 22-items
|
|
// ---------------------------------------------------
|
|
// function defautChoixCheck (u) {
|
|
// debugLocal=0;
|
|
// if (u==1) alert('defautChoixCheck = '+u);
|
|
// // if (u==1) alert('kant u = '+document.getElementById('kant'+u).value);
|
|
// if (document.getElementById('kant'+u)) {
|
|
// if (document.getElementById('kant'+u).value > 0) {
|
|
// document.getElementById('check'+u).checked=true;
|
|
// }
|
|
// // else alert('pas de qte checked quantite = '+document.getElementById('kant'+u).value);
|
|
// }
|
|
// // else alert('pas de checked quantite = '+document.getElementById('kant'+u).value);
|
|
// }
|
|
|
|
// ---------------------------------------------------
|
|
// Lancé depuis 21-itemsCheck
|
|
// ---------------------------------------------------
|
|
function checkChange (u) {
|
|
debugLocal=0;
|
|
if (document.getElementById('kant'+u)) {
|
|
if (debugLocal==1) alert('checkChange = '+u);
|
|
if (document.getElementById('check'+u).checked==true) {
|
|
document.getElementById('kant'+u).value=1;
|
|
}
|
|
else {
|
|
document.getElementById('kant'+u).value=0;
|
|
}
|
|
if (document.getElementById('itemToDesactiv')) document.getElementById('itemToDesactiv').value='';
|
|
if (document.getElementById('kantToDesactiv')) document.getElementById('kantToDesactiv').value=0;
|
|
}
|
|
// else alert('a malibu pas '+u);
|
|
}
|
|
|
|
// ---------------------------------------------------
|
|
// Lancé depuis 22-items : quantité + ou -
|
|
// ---------------------------------------------------
|
|
function quantUp (u, itemNumber, mode, c1) {
|
|
var debugLocal;
|
|
debugLocal=0;
|
|
if (debugLocal==1) alert('u =' +u+ ' itemNumber = ' +itemNumber+ ' mode = ' +mode );
|
|
if (document.getElementById('kant'+u) ) {
|
|
var quant=parseInt(document.getElementById ('kant'+u).value);
|
|
if (debugLocal==1) alert('quant actuelle = '+quant);
|
|
if (mode=='minus' && quant >0) {quant=parseInt(quant-1); } else {quant=parseInt(quant)+1; }
|
|
document.getElementById('kant'+u).value=quant;
|
|
upQte (quant, itemNumber, c1);
|
|
}
|
|
if (debugLocal==1) alert('quant finale = '+quant);
|
|
}
|
|
</script> |