Debug last commit
This commit is contained in:
parent
269b6dd2b0
commit
b5858bf369
|
|
@ -25,8 +25,6 @@ var btnDeleteClient = false;
|
|||
var currentDeleteClient = 0;
|
||||
|
||||
$(document).ready( function() {
|
||||
// console.log("INIT CLIENTS");
|
||||
|
||||
// INIT SEARCH
|
||||
clientsSearch = $("#clientsSearch");
|
||||
if(clientsSearch.length>0) initSearchClients();
|
||||
|
|
@ -61,8 +59,6 @@ $(document).ready( function() {
|
|||
|
||||
/***** SEARCH CLIENTS *****/
|
||||
function initSearchClients() {
|
||||
// console.log("INIT SEARCH CLIENTS");
|
||||
|
||||
clientsSearch.find("input[name=search]").unbind('keypress').keypress( function(event) {
|
||||
if(event.keyCode==13) searchClient(false);
|
||||
});
|
||||
|
|
@ -80,8 +76,6 @@ function searchClient(clear) {
|
|||
|
||||
/***** VIEW CLIENT *****/
|
||||
function initViewClient() {
|
||||
// console.log("INIT VIEW CLIENT");
|
||||
|
||||
// BTN VIEW
|
||||
btnViewClient.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
|
|
@ -92,6 +86,7 @@ function initViewClient() {
|
|||
loadDatasInViewClientModal(id);
|
||||
});
|
||||
|
||||
// INIT FORM VIEW
|
||||
var form = modalViewClient.find("div.formClient");
|
||||
|
||||
// TABS
|
||||
|
|
@ -176,8 +171,6 @@ function clearViewClientModal() {
|
|||
}
|
||||
|
||||
function initModalViewClientTabAbsences() {
|
||||
console.log("INIT MODAL VIEW CLIENT TAB ABSENCES");
|
||||
|
||||
// BTN ADD ABSENCES
|
||||
modalViewClient.find("#btnAddAbsence").click(function(e) {
|
||||
e.preventDefault();
|
||||
|
|
@ -369,14 +362,14 @@ function getClientFormDatas(form) {
|
|||
|
||||
/***** ADD CLIENT *****/
|
||||
function initAddClient() {
|
||||
// console.log("INIT ADD CLIENT");
|
||||
|
||||
// BTN ADD
|
||||
btnAddClient.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
clearFormClientDatas(formAddClient);
|
||||
modalAddClient.modal('show');
|
||||
});
|
||||
|
||||
// INIT FORM ADD
|
||||
initFormClient(formAddClient);
|
||||
|
||||
// SAVE CLIENT
|
||||
|
|
@ -420,8 +413,7 @@ function initAddClient() {
|
|||
|
||||
/***** EDIT CLIENT *****/
|
||||
function initEditClient() {
|
||||
// console.log("INIT EDIT CLIENT");
|
||||
|
||||
// BTN EDIT
|
||||
btnEditClient.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
@ -431,6 +423,7 @@ function initEditClient() {
|
|||
loadDatasInFormClientDatas(modalEditClient,formEditClient,id);
|
||||
});
|
||||
|
||||
// INIT FORM EDIT
|
||||
initFormClient(formEditClient);
|
||||
|
||||
// SAVE CLIENT
|
||||
|
|
@ -448,8 +441,6 @@ function initEditClient() {
|
|||
datas.action = 'edit';
|
||||
datas.ref = currentEditClient;
|
||||
|
||||
// console.log(datas,"EDIT datas");
|
||||
|
||||
formEditClient.find("div.modaLoader").addClass("show");
|
||||
$(".btnSaveEditClient").prop("disabled", true);
|
||||
|
||||
|
|
@ -482,8 +473,7 @@ function initEditClient() {
|
|||
|
||||
/***** DELETE CLIENT *****/
|
||||
function initDeleteClient() {
|
||||
// console.log("INIT DELETE CLIENT");
|
||||
|
||||
// BTN DELETE
|
||||
btnDeleteClient.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ var btnDeleteContrat = false;
|
|||
var currentDeleteContrat = 0;
|
||||
|
||||
$(document).ready( function() {
|
||||
// console.log("INIT CONTRATS");
|
||||
|
||||
// INIT SEARCH
|
||||
contratsSearch = $("#contratsSearch");
|
||||
if(contratsSearch.length>0) initSearchContrats();
|
||||
|
|
@ -73,7 +71,6 @@ $(document).ready( function() {
|
|||
|
||||
/***** SEARCH CONTRATS *****/
|
||||
function initSearchContrats() {
|
||||
// console.log("INIT SEARCH CONTRATS");
|
||||
// SEARCH
|
||||
contratsSearch.find("input[name=search]").unbind('keypress').keypress( function(event) {
|
||||
if(event.keyCode==13) searchContrat(false);
|
||||
|
|
@ -127,8 +124,7 @@ function searchContrat(clear) {
|
|||
|
||||
/***** VIEW CONTRAT *****/
|
||||
function initViewContrat() {
|
||||
// console.log("INIT VIEW CONTRAT");
|
||||
|
||||
// BTN VIEW
|
||||
btnViewContrat.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
@ -162,7 +158,6 @@ function initViewContrat() {
|
|||
resizeFormContrat(form);
|
||||
$( window ).on( "resize", function() { resizeFormContrat(form) });
|
||||
|
||||
|
||||
// CANCEL
|
||||
modalViewContrat.on('hidden.bs.modal', function (e) {
|
||||
clearViewContratModal();
|
||||
|
|
@ -182,7 +177,6 @@ function loadDatasInViewContratModal(id) {
|
|||
};
|
||||
$.post( contratsBaseURL, datas, function( result ) {
|
||||
var datas = JSON.parse(result);
|
||||
console.log(datas);
|
||||
|
||||
modalViewContrat.find("small.db_ref > span").html(datas.ref);
|
||||
|
||||
|
|
@ -271,12 +265,7 @@ function initFormContrat(form) {
|
|||
reponse(datas);
|
||||
}).fail(function() { alert(srvErrorMsg+" (form contrat - client autocomplete)"); });
|
||||
},
|
||||
response: function( event, ui ) {
|
||||
//console.log('ui',ui);
|
||||
},
|
||||
focus: function(event, ui) {
|
||||
event.preventDefault();
|
||||
},
|
||||
focus: function(event, ui) { event.preventDefault(); },
|
||||
select: function(event, ui) {
|
||||
event.preventDefault();
|
||||
form.find("input[name=client]").val( ui.item.value ).attr('ref', ui.item.ref).blur();
|
||||
|
|
@ -287,7 +276,6 @@ function initFormContrat(form) {
|
|||
else if(parseInt($(this).attr('ref'))>0) $(this).val("").removeAttr('ref');
|
||||
});
|
||||
form.find("input[name=client]").on("blur", function(e) {
|
||||
console.log("blured", $(this).attr('ref'), parseInt($(this).attr('ref'))>0);
|
||||
if(!parseInt($(this).attr('ref'))>0) $(this).val("").removeAttr('ref');
|
||||
});
|
||||
|
||||
|
|
@ -618,9 +606,7 @@ function loadDatasInFormContratDatas(modal,form,id) {
|
|||
'action' : 'getDatas'
|
||||
};
|
||||
$.post( contratsBaseURL, datas, function( result ) {
|
||||
//console.log(result);
|
||||
var datas = JSON.parse(result);
|
||||
console.log(datas);
|
||||
|
||||
form.find("input[name=client]").val(datas.client_prenom+" "+datas.client_nom).attr('ref', datas.client_ref);
|
||||
|
||||
|
|
@ -865,14 +851,14 @@ function getContratFormDatas(form) {
|
|||
|
||||
/***** ADD CONTRAT *****/
|
||||
function initAddContrat() {
|
||||
// console.log("INIT ADD CONTRAT");
|
||||
|
||||
// BTN ADD
|
||||
btnAddContrat.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
clearFormContratDatas(formAddContrat);
|
||||
modalAddContrat.modal('show');
|
||||
});
|
||||
|
||||
// INIT FORM ADD
|
||||
initFormContrat(formAddContrat);
|
||||
|
||||
// SAVE CONTRAT
|
||||
|
|
@ -917,8 +903,7 @@ function initAddContrat() {
|
|||
|
||||
/***** EDIT CONTRAT *****/
|
||||
function initEditContrat() {
|
||||
// console.log("INIT EDIT CONTRAT");
|
||||
|
||||
// BTN EDIT
|
||||
btnEditContrat.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
@ -928,6 +913,7 @@ function initEditContrat() {
|
|||
loadDatasInFormContratDatas(modalEditContrat,formEditContrat,id);
|
||||
});
|
||||
|
||||
// INIT FORM EDIT
|
||||
initFormContrat(formEditContrat);
|
||||
|
||||
// SAVE CONTRAT
|
||||
|
|
@ -945,8 +931,6 @@ function initEditContrat() {
|
|||
datas.action = 'edit';
|
||||
datas.ref = currentEditContrat;
|
||||
|
||||
// console.log(datas,"EDIT datas");
|
||||
|
||||
formEditContrat.find("div.modaLoader").addClass("show");
|
||||
$(".btnSaveEditContrat").prop("disabled", true);
|
||||
|
||||
|
|
@ -979,8 +963,7 @@ function initEditContrat() {
|
|||
|
||||
/***** ARCHIVE CONTRAT *****/
|
||||
function initArchiveContrat() {
|
||||
// console.log("INIT ARCHIVE CONTRAT");
|
||||
|
||||
// BTN ARCHIVE
|
||||
btnArchiveContrat.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
@ -1041,8 +1024,7 @@ function initArchiveContrat() {
|
|||
|
||||
/***** DELETE CONTRAT *****/
|
||||
function initDeleteContrat() {
|
||||
// console.log("INIT DELETE CONTRAT");
|
||||
|
||||
// BTN DELETE
|
||||
btnDeleteContrat.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ function getUrlParameter(sParam) {
|
|||
}
|
||||
|
||||
function beep(duration, frequency, volume, type, callback) {
|
||||
console.log("beep");
|
||||
var audioCtx = new (window.AudioContext || window.webkitAudioContext || window.audioContext);
|
||||
var oscillator = audioCtx.createOscillator();
|
||||
var gainNode = audioCtx.createGain();
|
||||
|
|
@ -176,7 +175,6 @@ function initEdiTable(elem,beforeFct,callbacbFct) {
|
|||
});
|
||||
if(nextFocus && nextFocus.length>0) nextFocus.dblclick();
|
||||
}
|
||||
//else console.log("cancel NextFocus");
|
||||
});
|
||||
|
||||
ipt.keypress( function(event) {
|
||||
|
|
@ -1084,13 +1082,11 @@ function uploadTmpPhotoFile(div, file, oldFile, calbckURL) {
|
|||
processData: false,
|
||||
type: 'POST',
|
||||
success: function(txt){
|
||||
//console.log(txt);
|
||||
if(txt=="error") {
|
||||
alert("ERREUR : un problème est survenue durant le chargement de la photo...");
|
||||
}
|
||||
else {
|
||||
datas = JSON.parse(txt);
|
||||
//console.log(datas);
|
||||
|
||||
photoIptFile.attr("file", datas.dir+datas.tmp).attr("nom", datas.tmp);
|
||||
photoPreview.css('background-image', "url('"+datas.prw+"&size=230')");
|
||||
|
|
@ -1131,7 +1127,6 @@ function getUrlParameter(sParam) {
|
|||
}
|
||||
|
||||
function beep(duration, frequency, volume, type, callback) {
|
||||
// console.log("beep");
|
||||
var audioCtx = new (window.AudioContext || window.webkitAudioContext || window.audioContext);
|
||||
var oscillator = audioCtx.createOscillator();
|
||||
var gainNode = audioCtx.createGain();
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ var btnDeleteLegume = false;
|
|||
var currentDeleteLegume = 0;
|
||||
|
||||
$(document).ready( function() {
|
||||
// console.log("INIT LEGUMES");
|
||||
|
||||
// INIT SEARCH
|
||||
legumesSearch = $("#legumesSearch");
|
||||
if(legumesSearch.length>0) initSearchLegumes();
|
||||
|
|
@ -61,8 +59,6 @@ $(document).ready( function() {
|
|||
|
||||
/***** SEARCH LEGUMES *****/
|
||||
function initSearchLegumes() {
|
||||
// console.log("INIT SEARCH LEGUMES");
|
||||
|
||||
legumesSearch.find("input[name=search]").unbind('keypress').keypress( function(event) {
|
||||
if(event.keyCode==13) searchLegume(false);
|
||||
});
|
||||
|
|
@ -80,8 +76,7 @@ function searchLegume(clear) {
|
|||
|
||||
/***** VIEW LEGUME *****/
|
||||
function initViewLegume() {
|
||||
// console.log("INIT VIEW LEGUME");
|
||||
|
||||
// BTN VIEW
|
||||
btnViewLegume.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
@ -223,14 +218,14 @@ function getLegumeFormDatas(form) {
|
|||
|
||||
/***** ADD LEGUME *****/
|
||||
function initAddLegume() {
|
||||
// console.log("INIT ADD LEGUME");
|
||||
|
||||
// BTN ADD
|
||||
btnAddLegume.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
clearFormLegumeDatas(formAddLegume);
|
||||
modalAddLegume.modal('show');
|
||||
});
|
||||
|
||||
// INIT FORM ADD
|
||||
initFormLegume(formAddLegume);
|
||||
|
||||
// SAVE LEGUME
|
||||
|
|
@ -275,8 +270,7 @@ function initAddLegume() {
|
|||
|
||||
/***** EDIT LEGUME *****/
|
||||
function initEditLegume() {
|
||||
// console.log("INIT EDIT LEGUME");
|
||||
|
||||
// BTN EDIT
|
||||
btnEditLegume.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
@ -286,6 +280,7 @@ function initEditLegume() {
|
|||
loadDatasInFormLegumeDatas(modalEditLegume,formEditLegume,id);
|
||||
});
|
||||
|
||||
// INIT FORM EDIT
|
||||
initFormLegume(formEditLegume);
|
||||
|
||||
// SAVE LEGUME
|
||||
|
|
@ -303,8 +298,6 @@ function initEditLegume() {
|
|||
datas.action = 'edit';
|
||||
datas.ref = currentEditLegume;
|
||||
|
||||
// console.log(datas,"EDIT datas"); return;
|
||||
|
||||
formEditLegume.find("div.modaLoader").addClass("show");
|
||||
$(".btnSaveEditLegume").prop("disabled", true);
|
||||
|
||||
|
|
@ -337,8 +330,7 @@ function initEditLegume() {
|
|||
|
||||
/***** DELETE LEGUME *****/
|
||||
function initDeleteLegume() {
|
||||
// console.log("INIT DELETE LEGUME");
|
||||
|
||||
// BTN DELETE
|
||||
btnDeleteLegume.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ var btnDeleteLivraison = false;
|
|||
var currentDeleteLivraison = 0;
|
||||
|
||||
$(document).ready( function() {
|
||||
// console.log("INIT LIVRAISONS");
|
||||
|
||||
// FILTRES
|
||||
filtreLivraisonGroupe = $("#livraisonsFiltre select[name=groupe]");
|
||||
filtreLivraisonArchive = $("#livraisonsFiltre select[name=archive]");
|
||||
|
|
@ -75,14 +73,13 @@ $(document).ready( function() {
|
|||
|
||||
/***** FILTRES LIVRAISONS *****/
|
||||
function initFiltresLivraisons() {
|
||||
// console.log("INIT FILTRES LIVRAISONS");
|
||||
|
||||
// GROUPE
|
||||
loadValue = filtreLivraisonGroupe.attr("load_value");
|
||||
filtreLivraisonGroupe.change(function(e) {
|
||||
$(this).blur();
|
||||
document.location = "?groupe="+parseInt($(this).val());
|
||||
}).val(loadValue);
|
||||
|
||||
// ARCHIVE
|
||||
loadValue = filtreLivraisonArchive.attr("load_value");
|
||||
filtreLivraisonArchive.change(function(e) {
|
||||
$(this).blur();
|
||||
|
|
@ -92,8 +89,6 @@ function initFiltresLivraisons() {
|
|||
|
||||
/***** VIEW LIVRAISON *****/
|
||||
function initViewLivraison() {
|
||||
// console.log("INIT VIEW LIVRAISON");
|
||||
|
||||
var form = modalViewLivraison.find("div.formLivraison");
|
||||
|
||||
// TABS
|
||||
|
|
@ -149,10 +144,11 @@ function loadDatasInViewLivraisonModal(id) {
|
|||
};
|
||||
$.post( livraisonsBaseURL, datas, function( result ) {
|
||||
var datas = JSON.parse(result);
|
||||
console.log(datas);
|
||||
|
||||
modalViewLivraison.find("small.db_ref > span").html(datas.ref);
|
||||
|
||||
modalViewLivraison.find("td.paniers_groupe").html(datas.paniers_groupe_nom);
|
||||
modalViewLivraison.find("td.groupe").html(datas.paniers_groupe_nom);
|
||||
modalViewLivraison.find("td.date").html(datas.date_print);
|
||||
modalViewLivraison.find("td.quinz_groupe").html(datas.quinz_groupe);
|
||||
|
||||
|
|
@ -202,7 +198,7 @@ function clearViewLivraisonModal() {
|
|||
modalViewLivraison.find("div.formLivraisonTabs > div.tab:first-child").addClass("active");
|
||||
modalViewLivraison.find("div.btnPrint").removeClass("hide").find('li').removeClass("hide");
|
||||
|
||||
modalViewLivraison.find("td.paniers_groupe").html("");
|
||||
modalViewLivraison.find("td.groupe").html("");
|
||||
modalViewLivraison.find("td.date").html("");
|
||||
modalViewLivraison.find("td.quinz_groupe").html("");
|
||||
|
||||
|
|
@ -748,14 +744,14 @@ function getLivraisonPanierCompoLegumeDatas(tr) {
|
|||
|
||||
/***** ADD LIVRAISON *****/
|
||||
function initAddLivraison() {
|
||||
// console.log("INIT ADD LIVRAISON");
|
||||
|
||||
// BTN ADD
|
||||
btnAddLivraison.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
clearFormLivraisonDatas(formAddLivraison);
|
||||
modalAddLivraison.modal('show');
|
||||
});
|
||||
|
||||
// INIT FORM ADD
|
||||
initFormLivraison(formAddLivraison);
|
||||
|
||||
// SAVE LIVRAISON
|
||||
|
|
@ -800,8 +796,7 @@ function initAddLivraison() {
|
|||
|
||||
/***** EDIT LIVRAISON *****/
|
||||
function initEditLivraison() {
|
||||
// console.log("INIT EDIT LIVRAISON");
|
||||
|
||||
// BTN EDIT
|
||||
btnEditLivraison.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
@ -811,6 +806,7 @@ function initEditLivraison() {
|
|||
loadDatasInFormLivraisonDatas(modalEditLivraison,formEditLivraison,id);
|
||||
});
|
||||
|
||||
// INIT FORM EDIT
|
||||
initFormLivraison(formEditLivraison);
|
||||
|
||||
// SAVE LIVRAISON
|
||||
|
|
@ -860,8 +856,7 @@ function initEditLivraison() {
|
|||
|
||||
/***** ARCHIVE LIVRAISON *****/
|
||||
function initArchiveLivraison() {
|
||||
// console.log("INIT ARCHIVE LIVRAISON");
|
||||
|
||||
// BTN ARCHIVE
|
||||
btnArchiveLivraison.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
@ -921,8 +916,7 @@ function initArchiveLivraison() {
|
|||
|
||||
/***** DELETE LIVRAISON *****/
|
||||
function initDeleteLivraison() {
|
||||
// console.log("INIT DELETE LIVRAISON");
|
||||
|
||||
// BTN DELETE
|
||||
btnDeleteLivraison.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ $(document).ready( function() {
|
|||
});
|
||||
|
||||
function initSecondBarCollapse() {
|
||||
// console.log("INIT SECOND BAR COLLAPSE");
|
||||
|
||||
btnCollapseSecondBar.click(function(e) {
|
||||
e.preventDefault();
|
||||
$(this).blur();
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ var btnDeletePanier = false;
|
|||
var currentDeletePanier = 0;
|
||||
|
||||
$(document).ready( function() {
|
||||
// console.log("INIT PANIERS");
|
||||
|
||||
// INIT SEARCH
|
||||
paniersSearch = $("#paniersSearch");
|
||||
if(paniersSearch.length>0) initSearchPaniers();
|
||||
|
|
@ -61,14 +59,20 @@ $(document).ready( function() {
|
|||
|
||||
/***** SEARCH PANIERS *****/
|
||||
function initSearchPaniers() {
|
||||
// console.log("INIT SEARCH PANIERS");
|
||||
|
||||
// SEARCH
|
||||
paniersSearch.find("input[name=search]").unbind('keypress').keypress( function(event) {
|
||||
if(event.keyCode==13) searchPanier(false);
|
||||
});
|
||||
paniersSearch.find(".btnClearSearch").unbind('click').click( function(event) {
|
||||
searchPanier(true);
|
||||
});
|
||||
|
||||
// FILTRE GROUPE
|
||||
loadValue = paniersSearch.find("select[name=groupe]").attr("load_value");
|
||||
paniersSearch.find("select[name=groupe]").change(function(e) {
|
||||
$(this).blur();
|
||||
document.location = "?groupe="+parseInt($(this).val());
|
||||
}).val(loadValue);
|
||||
}
|
||||
|
||||
function searchPanier(clear) {
|
||||
|
|
@ -80,8 +84,7 @@ function searchPanier(clear) {
|
|||
|
||||
/***** VIEW PANIER *****/
|
||||
function initViewPanier() {
|
||||
// console.log("INIT VIEW PANIER");
|
||||
|
||||
// BTN VIEW
|
||||
btnViewPanier.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
@ -104,9 +107,7 @@ function loadDatasInViewPanierModal(id) {
|
|||
'action' : 'getDatas'
|
||||
};
|
||||
$.post(paniersBaseURL, datas, function(jsonTxt) {
|
||||
//console.log(jsonTxt);
|
||||
var datas = JSON.parse(jsonTxt);
|
||||
//console.log(datas);
|
||||
|
||||
modalViewPanier.find("small.db_ref > span").html(datas.ref);
|
||||
|
||||
|
|
@ -275,9 +276,7 @@ function loadDatasInFormPanierDatas(modal,form,id) {
|
|||
'action' : 'getDatas'
|
||||
};
|
||||
$.post(paniersBaseURL, datas, function(jsonTxt) {
|
||||
//console.log(jsonTxt);
|
||||
var datas = JSON.parse(jsonTxt);
|
||||
//console.log(datas);
|
||||
|
||||
form.find("input[name=nom]").val(datas.nom);
|
||||
|
||||
|
|
@ -388,14 +387,14 @@ function getPanierFormDatas(form) {
|
|||
|
||||
/***** ADD PANIER *****/
|
||||
function initAddPanier() {
|
||||
// console.log("INIT ADD PANIER");
|
||||
|
||||
// BTN ADD
|
||||
btnAddPanier.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
clearFormPanierDatas(formAddPanier);
|
||||
modalAddPanier.modal('show');
|
||||
});
|
||||
|
||||
// INIT FORM ADD
|
||||
initFormPanier(formAddPanier);
|
||||
|
||||
// SAVE PANIER
|
||||
|
|
@ -439,8 +438,7 @@ function initAddPanier() {
|
|||
|
||||
/***** EDIT PANIER *****/
|
||||
function initEditPanier() {
|
||||
// console.log("INIT EDIT PANIER");
|
||||
|
||||
// BTN EDIT
|
||||
btnEditPanier.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
@ -450,6 +448,7 @@ function initEditPanier() {
|
|||
loadDatasInFormPanierDatas(modalEditPanier,formEditPanier,id);
|
||||
});
|
||||
|
||||
// INIT FORM EDIT
|
||||
initFormPanier(formEditPanier);
|
||||
|
||||
// SAVE PANIER
|
||||
|
|
@ -467,8 +466,6 @@ function initEditPanier() {
|
|||
datas.action = 'edit';
|
||||
datas.ref = currentEditPanier;
|
||||
|
||||
// console.log(datas,"EDIT datas");
|
||||
|
||||
formEditPanier.find("div.modaLoader").addClass("show");
|
||||
$(".btnSaveEditPanier").prop("disabled", true);
|
||||
|
||||
|
|
@ -501,8 +498,7 @@ function initEditPanier() {
|
|||
|
||||
/***** DELETE PANIER *****/
|
||||
function initDeletePanier() {
|
||||
// console.log("INIT DELETE PANIER");
|
||||
|
||||
// BTN DELETE
|
||||
btnDeletePanier.unbind('click').click( function(event) {
|
||||
event.preventDefault();
|
||||
id = parseInt($(this).attr('ref'));
|
||||
|
|
|
|||
|
|
@ -1,75 +0,0 @@
|
|||
// SEARCH
|
||||
var searchNav = false;
|
||||
var searchList = false;
|
||||
|
||||
$(document).ready( function() {
|
||||
searchNav = $("div.search-container > div.leftCol");
|
||||
searchList = $("div.search-list");
|
||||
if(searchNav.length>0 && searchList.length>0) initSearch();
|
||||
})
|
||||
|
||||
function initSearch() {
|
||||
// console.log("INIT SEARCH !");
|
||||
|
||||
// FILTRE UNIVERS
|
||||
var filtreUnivers = searchNav.find("select[name=univers]");
|
||||
if(filtreUnivers.length>0) filtreUnivers.change(function(e) {
|
||||
$(this).blur();
|
||||
document.location = "?filtre_univers="+$(this).val();
|
||||
});
|
||||
|
||||
// FILTRE CATEGORY
|
||||
var filtreCategory = searchNav.find("select[name=category]");
|
||||
if(filtreCategory.length>0) filtreCategory.change(function(e) {
|
||||
$(this).blur();
|
||||
document.location = "?filtre_category="+$(this).val();
|
||||
});
|
||||
|
||||
// FILTRE FAMILY
|
||||
var filtreFamily = searchNav.find("select[name=family]");
|
||||
if(filtreFamily.length>0) filtreFamily.change(function(e) {
|
||||
$(this).blur();
|
||||
document.location = "?filtre_family="+$(this).val();
|
||||
});
|
||||
|
||||
// FILTRE GROUP
|
||||
var filtreGroup = searchNav.find("select[name=group]");
|
||||
if(filtreGroup.length>0) filtreGroup.change(function(e) {
|
||||
$(this).blur();
|
||||
document.location = "?filtre_group="+$(this).val();
|
||||
});
|
||||
|
||||
// FILTRE TYPE
|
||||
var filtreType = searchNav.find("select[name=type]");
|
||||
if(filtreType.length>0) filtreType.change(function(e) {
|
||||
$(this).blur();
|
||||
document.location = "?filtre_type="+$(this).val();
|
||||
});
|
||||
|
||||
// FILTRE ORIGIN
|
||||
var filtreOrigin = searchNav.find("select[name=origin]");
|
||||
if(filtreOrigin.length>0) filtreOrigin.change(function(e) {
|
||||
$(this).blur();
|
||||
document.location = "?filtre_origin="+$(this).val();
|
||||
});
|
||||
|
||||
// FILTRE PRODUCER
|
||||
var filtreProducer = searchNav.find("select[name=producer]");
|
||||
if(filtreProducer.length>0) filtreProducer.change(function(e) {
|
||||
$(this).blur();
|
||||
document.location = "?filtre_producer="+$(this).val();
|
||||
});
|
||||
|
||||
// AUTO-RESIZE SEARCH
|
||||
$(window).on("resize", function(e) { resizeSearch(); });
|
||||
resizeSearch();
|
||||
}
|
||||
|
||||
function resizeSearch() {
|
||||
var h = $(window).height();
|
||||
if($(window).width()>1260) h -= 78;
|
||||
else h -= 78;
|
||||
// console.log("RESIZE SEARCH !", h);
|
||||
searchNav.css("height", h+"px");
|
||||
searchList.css("height", h+"px");
|
||||
}
|
||||
|
|
@ -89,9 +89,11 @@ switch($action) {
|
|||
// DEFAULT - LIST
|
||||
default: {
|
||||
// LIST
|
||||
$groupesList = getPaniersGroupesList();
|
||||
$groupe = getRequestAndSessionSave("groupe", "paniers_filtre_groupe", "groupe", "int", 0, $groupesList, true);
|
||||
$search = getSearch("paniers_search");
|
||||
$order = getListOrder('paniers_list_order', 'paniers_list_sens', $allowPaniersTypesListOrder);
|
||||
$list = getPaniersTypesList($order["order"], $order["sens"], $search);
|
||||
$list = getPaniersTypesList($order["order"], $order["sens"], $search, $groupe);
|
||||
$GLOBALS['smarty'] -> assign('list',$list);
|
||||
|
||||
// TEMPLATE
|
||||
|
|
@ -99,7 +101,7 @@ switch($action) {
|
|||
$jsFiles[] = PUBLIC_HTML_ADMIN.'js/paniers.js';
|
||||
|
||||
// REQUIRED LISTS
|
||||
$GLOBALS['smarty'] -> assign('paniers_groupes_list', getPaniersGroupesList());
|
||||
$GLOBALS['smarty'] -> assign('paniers_groupes_list', $groupesList);
|
||||
|
||||
/****** DISPLAY PAGE ***********/
|
||||
$GLOBALS['smarty']->assign('racine',$GLOBALS['racine']);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
nb. de paniers livrés{if $order=="nb_paniers_livres"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th class="visible-md visible-lg center">
|
||||
<th class="visible-lg center">
|
||||
<a href={if $order=="nb_paniers_restant" && $sens=="ASC"}"?order=nb_paniers_restant&sens=DESC"
|
||||
{else}"?order=nb_paniers_restant&sens=ASC"{/if} style="text-decoration: none;">
|
||||
nb. de paniers restants{if $order=="nb_paniers_restants"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
|
|
@ -74,13 +74,13 @@
|
|||
<tr class="{if $i.archive>0}archive{/if}{if $i.warning_nb_paniers} warning{/if}{if $i.nb_paniers_restants<=0} danger{/if}">
|
||||
<td class="center visible-lg">{$i.ref}</td>
|
||||
<td><a href="#" class="btnViewContrat" ref={$i.ref}>{$i.client_prenom} {$i.client_nom}</a></td>
|
||||
<td class="visible-md visible-lg">{$i.groupe_nom}</td>
|
||||
<td class="visible-md visible-lg">{$i.type_nom}</td>
|
||||
<td class="visible-lg">{$i.groupe_nom}</td>
|
||||
<td class="visible-lg">{$i.type_nom}</td>
|
||||
<td class="visible-md visible-lg center">{$i.date_print}</td>
|
||||
<td class="visible-md visible-lg center">{$i.frequence_print}</td>
|
||||
<td class="visible-md visible-lg center">{$i.panier_type_nom}</td>
|
||||
<td class="visible-md visible-lg center">{$i.nb_paniers_livres} / {$i.nb_paniers}</td>
|
||||
<td class="visible-md visible-lg center">{$i.nb_paniers_restants}{if $i.force_eligible>0} <i class="glyphicon glyphicon-star"></i>{/if}</td>
|
||||
<td class="visible-lg center">{$i.nb_paniers_restants}{if $i.force_eligible>0} <i class="glyphicon glyphicon-star"></i>{/if}</td>
|
||||
<td class="visible-md visible-lg center">{$i.lieu_depot_nom}</td>
|
||||
<td class="td_btn_action"><button class="btn btn-xs btn-link glyphicon glyphicon-edit btnEditContrat" ref="{$i.ref}"></button></td>
|
||||
{if $i.nb_paniers_livres_absolute>0}
|
||||
|
|
|
|||
|
|
@ -14,19 +14,19 @@
|
|||
date{if $order=="date"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<th class="visible-md visible-lg">
|
||||
<a href={if $order=="quinz_groupe" && $sens=="ASC"}"?order=quinz_groupe&sens=DESC"
|
||||
{else}"?order=quinz_groupe&sens=ASC"{/if} style="text-decoration: none;">
|
||||
groupe quinzaine{if $order=="quinz_groupe"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<th class="visible-md visible-lg">
|
||||
<a href={if $order=="paniers_groupe" && $sens=="ASC"}"?order=paniers_groupe&sens=DESC"
|
||||
{else}"?order=paniers_groupe&sens=ASC"{/if} style="text-decoration: none;">
|
||||
groupe de paniers{if $order=="paniers_groupe"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<th class="visible-md visible-lg">
|
||||
<a href={if $order=="nb_paniers" && $sens=="ASC"}"?order=nb_paniers&sens=DESC"
|
||||
{else}"?order=nb_paniers&sens=ASC"{/if} style="text-decoration: none;">
|
||||
nb. de paniers{if $order=="nb_paniers"} <i class="glyphicon glyphicon-chevron-{if $sens=="ASC"}up{else}down{/if}"></i>{/if}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@
|
|||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<form class="navbar-form navbar-right" role="search" id="paniersSearch">
|
||||
<!-- GROUPE -->
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon{if $groupe>0} active{/if}">groupe :</span>
|
||||
<select class="form-control" name="groupe" load_value="{$groupe}">{include file='paniers_groupes/paniers_groupes_select_list.tpl'}</select>
|
||||
</div>
|
||||
<!-- SEARCH -->
|
||||
<div class="input-group class">
|
||||
<span class="input-group-addon{if $search!=""} active{/if}"><i class="glyphicon glyphicon-search"></i></span>
|
||||
<input type="text" class="form-control" placeholder="rechercher..." name="search" value="{$search}">
|
||||
|
|
|
|||
Loading…
Reference in New Issue