From 5b1d01ecbf558013a228d64157fbdf0fbe4db8f3 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 6 May 2016 14:48:19 +0200 Subject: [PATCH] Correction --- js/includes/input-phone-fiche-min.js | 5 ++--- js/includes/input-phone-fiche.js | 6 +++--- js/includes/input-phone-mini-min.js | 2 +- js/includes/input-phone-mini.js | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/js/includes/input-phone-fiche-min.js b/js/includes/input-phone-fiche-min.js index 4dac2c0..3dd3448 100644 --- a/js/includes/input-phone-fiche-min.js +++ b/js/includes/input-phone-fiche-min.js @@ -20,6 +20,5 @@ miniData.reltypeSpecial),lsi.set("mini-fiches",d[f].contact,miniData),lsi.set("f inputPhoneFiche.prototype.nav=function(a){if(null==a||!1===a.getData("n")||isNaN(a.getData("n"))||"nav-fiche"!=a.parentNode.id)return!1;for(var b=$$("#nav-fiche > span.active"),c=0;cAPPELS";for(var c=0;c'+(c%10+1)+"  ":(10==c&&(this.nav_container.innerHTML+='SMS'),this.nav_container.innerHTML+=''+(c%10+1)+"")}for(var e in a)b=$('#nav-fiche [data-n="'+ a[e].uid+'"]'),!0===a[e].valid?b.addClass("done"):b.remClass("done");this.nav($('#nav-fiche [data-n="'+this.selected+'"]'))}; -inputPhoneFiche.prototype.check=function(a){if(2>a.city.length||isNaN(parseInt(a.duration[0]))&&0a.reltypeSpecial.length||a.context[11].status&&2>a.contextSpecial[0].length||a.context[12].status&&2>a.contextSpecial[1].length||a.context[13].status&&2>a.contextSpecial[2].length?!1:!0}; -inputPhoneFiche.prototype.attach=function(a){console.log("FICHE: ATTACH");lsi.createDataset("fiches");this.storageToFields();this.handler=a;var b=this,b=this;this.nav_container.addEventListener("click",function(a){b.nav(a.target);b.handler(a.target)},!1)}; +inputPhoneFiche.prototype.check=function(a){if(2>a.city.length||isNaN(parseInt(a.duration[0]))&&0a.reltypeSpecial.length||a.context[11].status&&2>a.contextSpecial[0].length||a.context[12].status&&2>a.contextSpecial[1].length||a.context[13].status&&2>a.contextSpecial[2].length?!1:!0};inputPhoneFiche.prototype.attach=function(a){console.log("FICHE: ATTACH");lsi.createDataset("fiches");this.storageToFields();this.handler=a;var b=this,b=this;this.nav_container.addEventListener("click",function(a){b.nav(a.target);b.handler(a.target)},!1)}; diff --git a/js/includes/input-phone-fiche.js b/js/includes/input-phone-fiche.js index 58895e4..f6ea8a0 100644 --- a/js/includes/input-phone-fiche.js +++ b/js/includes/input-phone-fiche.js @@ -610,11 +610,11 @@ inputPhoneFiche.prototype.check = function(ficheData){ // 6. Le pour l'AGE n'est pas indéfini + if( ficheData.age == '.' ) + return false; // {3} Vérification des radio // - // 7. L'AGE a un et un seul choix - if( !checkRadioValue(ficheData.age) ) - return false; // 8. Le SEXE a un et un seul choix if( !checkRadioValue(ficheData.sexe) ) return false; diff --git a/js/includes/input-phone-mini-min.js b/js/includes/input-phone-mini-min.js index 840e26d..0700423 100644 --- a/js/includes/input-phone-mini-min.js +++ b/js/includes/input-phone-mini-min.js @@ -7,4 +7,4 @@ a.age+'"]');null!=b&&b.setAttribute("selected","selected");for(var c=$$('article "checked"):c[b].removeAttribute("checked");c=$$('article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="loc"]');for(b=0;b span.active"),c=0;c'+(c+1)+""}for(var e in a)b=$('#nav-mini [data-n="'+a[e].uid+'"]'),!0===a[e].valid?b.addClass("done"):b.remClass("done");this.nav($('#nav-mini [data-n="'+this.selected+'"]'))}; -inputPhoneMini.prototype.check=function(a){return!(checkRadioValue(a.sexe)&&"."!=a.studies&&checkRadioValue(a.age)&&checkRadioValue(a.loc)&&checkRadioValue(a.reltype))||a.reltype[8].status&&2>a.reltypeSpecial.length?!1:!0};inputPhoneMini.prototype.attach=function(a){console.log("MINI FICHE: ATTACH");lsi.createDataset("mini-fiches");this.storageToFields();this.handler=a;var b=this;this.nav_container.addEventListener("click",function(a){b.nav(a.target);b.handler(a.target)},!1)}; +inputPhoneMini.prototype.check=function(a){return!checkRadioValue(a.sexe)||"."==a.studies||"."==a.age||!checkRadioValue(a.loc)||!checkRadioValue(a.reltype)||a.reltype[8].status&&2>a.reltypeSpecial.length?!1:!0};inputPhoneMini.prototype.attach=function(a){console.log("MINI FICHE: ATTACH");lsi.createDataset("mini-fiches");this.storageToFields();this.handler=a;var b=this;this.nav_container.addEventListener("click",function(a){b.nav(a.target);b.handler(a.target)},!1)}; diff --git a/js/includes/input-phone-mini.js b/js/includes/input-phone-mini.js index b98b4d8..79f64c4 100644 --- a/js/includes/input-phone-mini.js +++ b/js/includes/input-phone-mini.js @@ -325,7 +325,7 @@ inputPhoneMini.prototype.check = function(miniData){ if( miniData.studies == '.' ) return false; // 3. L'age est définie - if( !checkRadioValue(miniData.age) ) + if( miniData.age == '.' ) return false; // 4. La distance de localisation est définie if( !checkRadioValue(miniData.loc) )