From dbed75e84ee970088ae9c42c29b4c10e89f276e5 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 21 Apr 2016 15:22:43 +0200 Subject: [PATCH] Prise en compte du status {value, status} --- js/lib/form-deflater-min.js | 4 ++-- js/lib/form-deflater.js | 11 ++++------- view/analytics.php | 4 ++++ view/input.php | 8 ++++---- view/js/input-min.js | 6 +++--- view/js/input.js | 31 +++++++++++++++++-------------- 6 files changed, 34 insertions(+), 30 deletions(-) diff --git a/js/lib/form-deflater-min.js b/js/lib/form-deflater-min.js index faf9a27..4dce863 100644 --- a/js/lib/form-deflater-min.js +++ b/js/lib/form-deflater-min.js @@ -1,3 +1,3 @@ function FormDeflater(b,c,a){for(var d=0;danswer(); +
+
+
+
diff --git a/view/input.php b/view/input.php index 659235a..f9c13bc 100755 --- a/view/input.php +++ b/view/input.php @@ -45,10 +45,10 @@

- - - - + + + +

Ajouter un contact

diff --git a/view/js/input-min.js b/view/js/input-min.js index 851eb7d..10a9b61 100644 --- a/view/js/input-min.js +++ b/view/js/input-min.js @@ -1,3 +1,3 @@ -var newContact="

",newContact=newContact+"",newContact=newContact+"",newContact=newContact+"",newContact=newContact+"",newContact=newContact+"", -newContact=newContact+"

",ficheRelation="",ic=new inputChecker,importCallLog=document.querySelector('input#call_log-import[type="file"]');function contactForms(){return document.querySelectorAll("h4.new-contact")}var addContact=document.querySelector("h4.add-contact");function relationForms(){return document.querySelectorAll()}importCallLog.addEventListener("change",function(a){api.send({path:"upload/call_log",file:importCallLog.files[0]},function(a){console.log(a)})},!1);var number=document.querySelector('input.number[type="text"]'); -ic.append(number,format_number,"06 06 06 06 06");number.addEventListener("keyup",function(a){ic.correct(number,!1)},!1); +var newContact="

",newContact=newContact+"",newContact=newContact+"",newContact=newContact+"",newContact=newContact+"",newContact= +newContact+"",newContact=newContact+"

",ficheRelation="",ic=new inputChecker,FormDeflaterP={tags:["input"],attr:["data-name"]},importCallLog=document.querySelector('input#call_log-import[type="file"]');function contactForms(){return document.querySelectorAll("h4.new-contact")}var addContact=document.querySelector("h4.add-contact");function relationForms(){return document.querySelectorAll()} +importCallLog.addEventListener("change",function(b){api.send({path:"upload/call_log",file:importCallLog.files[0]},function(a){console.log(a)})},!1); diff --git a/view/js/input.js b/view/js/input.js index 895bdb5..e10f5f0 100644 --- a/view/js/input.js +++ b/view/js/input.js @@ -2,22 +2,25 @@ =========================================================*/ /* (1) Contiendra le formulaire d'ajout de contact (numéro, pseudo, prénom, nom, submit) */ var newContact = "

"; - newContact += ""; - newContact += ""; - newContact += ""; - newContact += ""; - newContact += ""; + newContact += ""; + newContact += ""; + newContact += ""; + newContact += ""; + newContact += ""; newContact += "

"; /* (2) TODO: Contiendra la fiche relation complète */ var ficheRelation = ""; -/* [1] Initialisation de l'inputChecker +/* [1] Initialisation des utilitaires =========================================================*/ -// Instanciation +/* (1) Instanciation de inputChecker */ var ic = new inputChecker(); +/* (2) Paramètres de FormDeflater */ +var FormDeflaterP = { tags: ['input'], attr: ['data-name'] }; + /* [2] Indexation des inputs @@ -58,10 +61,10 @@ importCallLog.addEventListener('change', function(e){ -var number = document.querySelector('input.number[type="text"]'); -ic.append(number, format_number, '06 06 06 06 06'); -// format_number -> format pour les numéros de téléphones - -number.addEventListener('keyup', function(e){ - ic.correct(number, false); -}, false); +// var number = document.querySelector('input.number[type="text"]'); +// ic.append(number, format_number, '06 06 06 06 06'); +// // format_number -> format pour les numéros de téléphones +// +// number.addEventListener('keyup', function(e){ +// ic.correct(number, false); +// }, false);