From 092a09088f3bea4ebb8d63d35b0775764e9b5c7e Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 28 Apr 2016 18:00:09 +0200 Subject: [PATCH] =?UTF-8?q?Correction,=20affichage=20(m=C3=A0j)=20apr?= =?UTF-8?q?=C3=A8s=20import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/includes/input-phone-mini-min.js | 2 +- js/includes/input-phone-mini.js | 2 ++ manager/module/call_log.php | 2 +- view/js/input-min.js | 4 ++-- view/js/input.js | 15 ++++++++++----- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/js/includes/input-phone-mini-min.js b/js/includes/input-phone-mini-min.js index 4495a5b..89c7461 100644 --- a/js/includes/input-phone-mini-min.js +++ b/js/includes/input-phone-mini-min.js @@ -5,7 +5,7 @@ inputPhoneMini.prototype.add=function(a){console.log("MINI FICHE: ADD");if(null= miniFicheBuilder.build({firstname:a.firstname,lastname:a.lastname,username:a.username,uid:a.uid,age:a.age,job:a.job});var b=$('article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="job"]>option[value="'+a.job+'"]');null!=b&&b.setAttribute("selected","selected");for(var c=$$('article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="sexe"]'),b=0;binput[type="radio"][data-name="loc"]');for(b=0;b span.active"),c=0;c"+(parseInt(a[b])+1)+""}a=lsi["export"]("mini-fiches");for(var c in a)!0===a[c].valid?this.nav_container.children[a[c].uid].addClass("done"):this.nav_container.children[a[c].uid].remClass("done");this.nav(this.nav_container.children[this.selected])}; inputPhoneMini.prototype.check=function(a){return!isNaN(parseInt(a.age))&&checkRadioValue(a.sexe)&&"."!=a.job&&checkRadioValue(a.loc)?!0:!1};inputPhoneMini.prototype.attach=function(a){console.log("MINI FICHE: ATTACH");lsi.createDataset("mini-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-mini.js b/js/includes/input-phone-mini.js index 2969b47..babb62e 100644 --- a/js/includes/input-phone-mini.js +++ b/js/includes/input-phone-mini.js @@ -209,6 +209,8 @@ inputPhoneMini.prototype.sync = function(){ miniData.valid = false; } + console.log(contactData[key]); + /* (5) On met à jour la MINI fiche */ miniData.uid = contactData[key].uid; miniData.firstname = contactData[key].firstname; diff --git a/manager/module/call_log.php b/manager/module/call_log.php index be8294e..a3a897d 100644 --- a/manager/module/call_log.php +++ b/manager/module/call_log.php @@ -130,10 +130,10 @@ 'total' => $tmp[$maxNumber]['sms'] + 5*$tmp[$maxNumber]['calls'] )); + unset($tmp[$maxNumber]); } - /* [6] Gestion du retour =========================================================*/ return array( diff --git a/view/js/input-min.js b/view/js/input-min.js index adeb8fd..4959a67 100644 --- a/view/js/input-min.js +++ b/view/js/input-min.js @@ -3,5 +3,5 @@ function dynamicUpdate(a){var c=a instanceof Element,b=c&&"SPAN"==a.tagName&&"sw b=a.parentNode,d=b.children[1],a=b.children[3],b=b.children[5],d.value=a.value+" "+b.value,a.value="",b.value=""):(console.log("> dynamic update"),miniManager.fieldsToStorage(),ficheManager.fieldsToStorage(),contactManager.fieldsToStorage(),miniManager.sync(),ficheManager.sync(),miniManager.storageToFields(),ficheManager.storageToFields(),contactManager.storageToFields())}function checkRadioValue(a){for(var c=0,b=0;bd;d++){var c=a.directory[d].name.split(" ");lsi.set("contacts","form"+d,{uid:d,number:a.directory[d].number,username:1==c.length?c[0]:"",firstname:1 pseudo firstname: splitted.length > 1 ? splitted[0] : '', // Si plusieurs mots -> le 1er est le prénom