diff --git a/js/includes/input-html-data-min.js b/js/includes/input-html-data-min.js index 769abde..1137240 100644 --- a/js/includes/input-html-data-min.js +++ b/js/includes/input-html-data-min.js @@ -1,3 +1,3 @@ -var contactBuilder=new HTMLBuilder;contactBuilder.setLayout("

\n\t\n\t\n\t\n\t \n\t \n\t \n\t \n\t \n\t \n\t\n

\n\n"); -var miniFicheBuilder=new HTMLBuilder;miniFicheBuilder.setLayout("
\n\t\n\t\n\t\n\t\n\t\n\t

@firstname @lastname @username

\n\t
\t\t10 appels\t
\t
\t\t15 sms\t
\t
\n\t\t\n\t\t   \n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\tO\u00f9 habite t-elle/il\u00a0?
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   \n\t
\n
"); -var ficheBuilder=new HTMLBuilder;ficheBuilder.setLayout("
\n\t\n\t\n\t\n\t\n\t\n\t

@firstname @lastname @username

\n\t
\n\t\t\n\t\t   \n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\tSituation familiale:
\n\t\t
\n\t\t   
\n\t\t   
\n\t\t   \n\t
\n\t
\n\t\t\n\t
\n\t

Type de relation

\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t

O\u00f9 habite t-elle/il\u00a0?

\n\t
\n\t\t\n\t
\n\t
\n\t\tO\u00f9 habite t-elle/il\u00a0?
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   \n\t
\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t
\n\t\tDepuis quand connaissez-vous cette personne ?

\n\t\tmois\n\t\tet    ans.\n\t
\n\t

Contexte de rencontre

\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t

Avec quelle fr\u00e9quence discutez-vous avec cette personne\u00a0?

\n\t
\n\t\tFace \u00e0 face
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tT\u00e9l\u00e9phone ou skype et \u00e9quivalent
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tSMS, et \u00e9quivalents
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tCourrier \u00e9lectronique
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tFacebook ou autre r\u00e9seau social
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t

Comment \u00eates-vous \u00ab\u00a0connect\u00e9\u00a0\u00bb \u00e0 cette personne\u00a0?

\n\t
\n\t\tSes coordonn\u00e9es sont dans votre carnet d\u2019adresse
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tSon num\u00e9ro de mobile est enregistr\u00e9 sur votre mobile (ou vous-m\u00eames \u00eates sur le sien)
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tElle figure parmi vos amis facebook
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tElle figure parmi vos amis facebook et vous interagissez avec elle sur ce dispositif r\u00e9guli\u00e8rement
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous le suivez sur Twitter
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous communiquez avec cette personne sur Twitter
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous communiquez dans autre r\u00e9seau social : \n\t
\n\t
\n\t\tVous communiquez dans un autre dispositif (blogs, jeu vid\u00e9o ou autre) : \n\t
\n
\n"); +var contactBuilder=new HTMLBuilder;contactBuilder.setLayout("

\n\t\n\t\n\t\n\t\n\t\n\t \n\t \n\t \n\t \n\t \n\t \n\t\n

\n\n"); +var miniFicheBuilder=new HTMLBuilder;miniFicheBuilder.setLayout("
\n\t\n\t\n\t\n\t\n\t\n\t

@firstname @lastname @username

\n\t
\t\t@countcall appels\t
\t
\t\t@countsms sms\t
\t
\n\t\t\n\t\t   \n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\tO\u00f9 habite t-elle/il\u00a0?
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   \n\t
\n
"); +var ficheBuilder=new HTMLBuilder;ficheBuilder.setLayout("
\n\t\n\t\n\t\n\t\n\t\n\t

@firstname @lastname @username

\n\t
\t\t@countcall appels\t
\t
\t\t@countsms sms\t
\t
\n\t\t\n\t\t   \n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\t\n\t
\n\t
\n\t\tSituation familiale:
\n\t\t
\n\t\t   
\n\t\t   
\n\t\t   \n\t
\n\t
\n\t\t\n\t
\n\t

Type de relation

\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t

O\u00f9 habite t-elle/il\u00a0?

\n\t
\n\t\t\n\t
\n\t
\n\t\tO\u00f9 habite t-elle/il\u00a0?
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   \n\t
\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t
\n\t\tDepuis quand connaissez-vous cette personne ?

\n\t\tmois\n\t\tet    ans.\n\t
\n\t

Contexte de rencontre

\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t

Avec quelle fr\u00e9quence discutez-vous avec cette personne\u00a0?

\n\t
\n\t\tFace \u00e0 face
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tT\u00e9l\u00e9phone ou skype et \u00e9quivalent
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tSMS, et \u00e9quivalents
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tCourrier \u00e9lectronique
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tFacebook ou autre r\u00e9seau social
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t

Comment \u00eates-vous \u00ab\u00a0connect\u00e9\u00a0\u00bb \u00e0 cette personne\u00a0?

\n\t
\n\t\tSes coordonn\u00e9es sont dans votre carnet d\u2019adresse
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tSon num\u00e9ro de mobile est enregistr\u00e9 sur votre mobile (ou vous-m\u00eames \u00eates sur le sien)
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tElle figure parmi vos amis facebook
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tElle figure parmi vos amis facebook et vous interagissez avec elle sur ce dispositif r\u00e9guli\u00e8rement
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous le suivez sur Twitter
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous communiquez avec cette personne sur Twitter
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous communiquez dans autre r\u00e9seau social : \n\t
\n\t
\n\t\tVous communiquez dans un autre dispositif (blogs, jeu vid\u00e9o ou autre) : \n\t
\n
\n"); diff --git a/js/includes/input-html-data.js b/js/includes/input-html-data.js index ff2cb52..e586dbf 100644 --- a/js/includes/input-html-data.js +++ b/js/includes/input-html-data.js @@ -9,6 +9,9 @@ contactBuilder.setLayout( "\t\n"+ "\t\n"+ + "\t\n"+ + "\t\n"+ + "\t \n"+ "\t \n"+ "\t \n"+ @@ -51,10 +54,10 @@ miniFicheBuilder.setLayout( "\t

@firstname @lastname @username

\n"+ "\t
"+ - "\t\t10 appels"+ + "\t\t@countcall appels"+ "\t
"+ "\t
"+ - "\t\t15 sms"+ + "\t\t@countsms sms"+ "\t
"+ "\t
\n"+ @@ -177,6 +180,13 @@ ficheBuilder.setLayout( "\t

@firstname @lastname @username

\n"+ + "\t
"+ + "\t\t@countcall appels"+ + "\t
"+ + "\t
"+ + "\t\t@countsms sms"+ + "\t
"+ + "\t
\n"+ "\t\t\n"+ "\t\t   \n"+ diff --git a/js/includes/input-phone-contact-min.js b/js/includes/input-phone-contact-min.js index 40f24a4..a66317c 100644 --- a/js/includes/input-phone-contact-min.js +++ b/js/includes/input-phone-contact-min.js @@ -1,8 +1,9 @@ function inputPhoneContact(a,c){this.container=a;this.nav_container=c}inputPhoneContact.prototype={container:this.container,nav_container:this.nav_container,selected:1,handler:null}; inputPhoneContact.prototype.fieldsToStorage=function(){console.log("CONTACTS: FIELDS TO STORAGE");for(var a=$$("article.contact-panel .new-contact"),c=0;c=a.length&&this.add({uid:a.length,number:"",firstname:"",lastname:"",username:"",call:-1,sms:-1});this.updateNavBar()}; +sms:parseInt(b.sms.value),countcall:parseInt(b.countcall.value),countsms:parseInt(b.countsms.value)},d.hash=crc32(JSON.stringify(d)),lsi.set("contacts",parseInt(b.uid.value),d)}}; +inputPhoneContact.prototype.add=function(a){console.log("CONTACTS: ADD");if(null==a.uid||isNaN("number"))return!1;a.number=null!=a.number?a.number:"";a.username=null!=a.username?a.username:"";a.firstname=null!=a.firstname?a.firstname:"";a.lastname=null!=a.lastname?a.lastname:"";a.call=null!=a.call?a.call:-1;a.sms=null!=a.sms?a.sms:-1;a.countcall=null!=a.countcall?a.countcall:0;a.countsms=null!=a.countsms?a.countsms:0;this.container.innerHTML+=contactBuilder.build(a);a=$$("article.contact-panel .new-contact"); +for(var c=this,b=0;b=a.length&&this.add({uid:a.length,number:"",firstname:"",lastname:"",username:"",call:-1,sms:-1,countcall:0,countsms:0});this.updateNavBar()}; inputPhoneContact.prototype.nav=function(a){if("undefined"==typeof a||isNaN(a.getData("n"))||"nav-contact"!=a.parentNode.id)return!1;for(var c=$$("#nav-contact > span.active"),b=0;b'+(1+c/10)+""}this.nav(this.nav_container.children[this.selected-1])}; inputPhoneContact.prototype.attach=function(a){console.log("CONTACTS: ATTACH");lsi.createDataset("contacts");this.storageToFields();this.handler=a;var c=this;this.nav_container.addEventListener("click",function(a){c.nav(a.target);c.handler(a.target)},!1)}; diff --git a/js/includes/input-phone-contact.js b/js/includes/input-phone-contact.js index 8e6ce2b..79f6b2f 100644 --- a/js/includes/input-phone-contact.js +++ b/js/includes/input-phone-contact.js @@ -47,7 +47,10 @@ inputPhoneContact.prototype.fieldsToStorage = function(){ lastname: deflated.lastname.value, call: parseInt(deflated.call.value), - sms: parseInt(deflated.sms.value) + sms: parseInt(deflated.sms.value), + + countcall: parseInt(deflated.countcall.value), + countsms: parseInt(deflated.countsms.value) }; /* (5) On calcule et ajoute le hash des données */ @@ -79,7 +82,7 @@ inputPhoneContact.prototype.add = function(objectData){ console.log('CONTACTS: ADD'); // Si pas d'uid, on quitte - if( objectData.uid == null || typeof objectData.uid != 'number' ) + if( objectData.uid == null || isNaN('number') ) return false // {0} On formatte l'object // @@ -89,6 +92,8 @@ inputPhoneContact.prototype.add = function(objectData){ objectData.lastname = (objectData.lastname != null) ? objectData.lastname : ''; objectData.call = (objectData.call != null) ? objectData.call : -1; objectData.sms = (objectData.sms != null) ? objectData.sms : -1; + objectData.countcall = (objectData.countcall != null) ? objectData.countcall : 0; + objectData.countsms = (objectData.countsms != null) ? objectData.countsms : 0; // {1} On ajoute le HTML // @@ -136,7 +141,7 @@ inputPhoneContact.prototype.storageToFields = function(){ // On ajoute un champ de plus à remplir si c'est la dernière page if( max >= contactKeys.length ) - this.add({uid: contactKeys.length, number:'', firstname:'', lastname:'', username:'', call:-1, sms:-1}); + this.add({uid: contactKeys.length, number:'', firstname:'', lastname:'', username:'', call:-1, sms:-1, countcall: 0, countsms: 0}); /* (3) On met à jour la barre de navigation */ this.updateNavBar(); diff --git a/js/includes/input-phone-fiche-min.js b/js/includes/input-phone-fiche-min.js index 7620ba4..a0b71fc 100644 --- a/js/includes/input-phone-fiche-min.js +++ b/js/includes/input-phone-fiche-min.js @@ -8,12 +8,12 @@ lsi.set("fiches",c.uid,c)}}}; inputPhoneFiche.prototype.add=function(a){console.log("FICHE: ADD");if(null==a.uid||null==a.contact)return!1;a.age=null!=a.age?a.age:this.defaultData.age;a.city=null!=a.city?a.city:this.defaultData.city;a.duration[0]=null!=a.duration[0]?a.duration[0]:this.defaultData.duration[0];a.duration[1]=null!=a.duration[1]?a.duration[1]:this.defaultData.duration[1];a.reltypeSpecial=null!=a.reltypeSpecial?a.reltypeSpecial:this.defaultData.reltypeSpecial;a.contextSpecial[0]=null!=a.contextSpecial[0]?a.contextSpecial[0]: this.defaultData.contextSpecial[0];a.contextSpecial[1]=null!=a.contextSpecial[1]?a.contextSpecial[1]:this.defaultData.contextSpecial[1];a.contextSpecial[2]=null!=a.contextSpecial[2]?a.contextSpecial[2]:this.defaultData.contextSpecial[2];a.connectSpecial[0]=null!=a.connectSpecial[0]?a.connectSpecial[0]:this.defaultData.connectSpecial[0];a.connectSpecial[1]=null!=a.connectSpecial[1]?a.connectSpecial[1]:this.defaultData.connectSpecial[1];a.job=null!=a.job?a.job:this.defaultData.job;a.studies=null!=a.studies? a.studies:this.defaultData.studies;a.sexe=null!=a.sexe?a.sexe:this.defaultData.sexe;a.famsit=null!=a.famsit?a.famsit:this.defaultData.famsit;a.reltype=null!=a.reltype?a.reltype:this.defaultData.reltype;a.loc=null!=a.loc?a.loc:this.defaultData.loc;a.loc2=null!=a.loc2?a.loc2:this.defaultData.loc2;a.context=null!=a.context?a.context:this.defaultData.context;a.freq=null!=a.freq?a.freq:this.defaultData.freq;a.connect=null!=a.connect?a.connect:this.defaultData.connect;var b=lsi.get("contacts",a.contact); -if(!1===b)return!1;this.container.innerHTML+=ficheBuilder.build({firstname:b.firstname,lastname:b.lastname,username:0==b.username.length?"":"("+b.username+")",uid:a.uid,contact:a.contact,age:a.age,city:a.city,duration0:a.duration[0],duration1:a.duration[1],reltypespecial:a.reltypeSpecial,contextspecial0:a.contextSpecial[0],contextspecial1:a.contextSpecial[1],contextspecial2:a.contextSpecial[2],connectspecial0:a.connectSpecial[0],connectspecial1:a.connectSpecial[1]});b=$('article.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");b=$('article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="studies"]>option[value="'+a.studies+'"]');null!=b&&b.setAttribute("selected","selected");for(var c=$$('article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="sexe"]'),b=0;binput[type="radio"][data-name="famsit"]');for(b=0;binput[type="radio"][data-name="reltype"]');for(b=0;binput[type="radio"][data-name="loc"]');for(b=0;binput[type="radio"][data-name="loc2"]');for(b=0;binput[type="radio"][data-name="context"]');for(b=0;binput[type="radio"][data-name="freq'+c+'"]'),b=0;binput[type="radio"][data-name="connect'+c+'"]'),b=0;bspan>select[data-name="job"]>option[value="'+a.job+'"]');null!=b&&b.setAttribute("selected","selected");b=$('article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="studies"]>option[value="'+a.studies+'"]');null!=b&&b.setAttribute("selected","selected");for(var c=$$('article.fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="sexe"]'),b=0;binput[type="radio"][data-name="famsit"]');for(b=0;binput[type="radio"][data-name="reltype"]');for(b=0;binput[type="radio"][data-name="loc"]');for(b=0;binput[type="radio"][data-name="loc2"]');for(b=0;binput[type="radio"][data-name="context"]');for(b=0;binput[type="radio"][data-name="freq'+c+'"]'),b=0;binput[type="radio"][data-name="connect'+c+'"]'),b=0;ba[e].timestamp?(a[e].sexe=d[e].sexe,a[e].age=d[e].age, a[e].job=d[e].job,a[e].loc=d[e].loc):(d[e].sexe=a[e].sexe,d[e].age=a[e].age,d[e].job=a[e].job,d[e].loc=a[e].loc),lsi.set("mini-fiches",e,a[e]),lsi.set("fiches",e,d[e])};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;c MINI UPDATE");c={uid:c.uid.value,firstname:d.firstname,lastname:d.lastname,username:d.username,sexe:c.sexe,age:c.age.value, job:c.job.value,loc:c.loc,hash:e};c.valid=this.check(c);c.timestamp=Date.now();lsi.set("mini-fiches",c.uid,c)}}}; -inputPhoneMini.prototype.add=function(a){console.log("MINI FICHE: ADD");if(null==a||null==a.uid)return!1;a.age=null!=a.age?a.age:this.defaultData.age;a.sexe=null!=a.sexe?a.sexe:this.defaultData.sexe;a.job=null!=a.job?a.job:this.defaultData.job;a.loc=null!=a.loc?a.loc:this.defaultData.loc;var b=lsi.get("contacts",a.uid);if(!1===b)return!1;this.container.innerHTML+=miniFicheBuilder.build({firstname:b.firstname,lastname:b.lastname,username:0==b.username.length?"":"("+b.username+")",uid:a.uid,age:a.age, -job:a.job});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;bspan>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'+(c+1)+""}for(var e in a)b=this.nav_container.children[a[e].uid],!0===a[e].valid?b.addClass("done"):b.remClass("done");this.nav(this.nav_container.children[this.selected])}; diff --git a/js/includes/input-phone-mini.js b/js/includes/input-phone-mini.js index 3a1395c..16a1c37 100644 --- a/js/includes/input-phone-mini.js +++ b/js/includes/input-phone-mini.js @@ -124,6 +124,8 @@ inputPhoneMini.prototype.add = function(objectData){ firstname: associatedContact.firstname, lastname: associatedContact.lastname, username: (associatedContact.username.length==0) ? '' : '('+associatedContact.username+')', + countcall: associatedContact.countcall, + countsms: associatedContact.countsms, uid: objectData.uid, age: objectData.age, job: objectData.job diff --git a/view/js/input-min.js b/view/js/input-min.js index 5559537..6691fa7 100644 --- a/view/js/input-min.js +++ b/view/js/input-min.js @@ -1,11 +1,12 @@ var clearAllButton=$("#clear-all"),submitAllButton=$("#submit-all"),importCallLog=$('input#call_log-import[type="file"]'),subjectManager,contactManager,miniManager,ficheManager; -function dynamicUpdate(a){var e=a instanceof Element,b=e&&"SPAN"==a.tagName&&"switch-left"==a.className,f=e&&"SPAN"==a.tagName&&"switch-both"==a.className,c=e&&"INPUT"==a.tagName&&"submit"==a.type,d=e&&"SPAN"==a.tagName&&("nav-mini"==a.parentNode.id||"nav-fiche"==a.parentNode.id),e=e&&"SPAN"==a.tagName&&"nav-contact"==a.parentNode.id;if(!(f||b||c||d||e)&&!0!==a)return!1;if(f)console.log("> switch firstname <-> lastname"),b=a.parentNode,a=b.children[3],b=b.children[5],f=a.value,a.value=b.value,b.value= -f;else if(b){console.log("> switch firstname+lastname -> username");b=a.parentNode;f=b.children[1];a=b.children[3];b=b.children[5];if(0 dynamic update"),miniManager.fieldsToStorage(),ficheManager.fieldsToStorage(),contactManager.fieldsToStorage(),miniManager.sync(),ficheManager.sync(),miniManager.storageToFields(),ficheManager.storageToFields(),(c||e)&&contactManager.storageToFields()} -function checkRadioValue(a){for(var e=0,b=0;b switch firstname <-> lastname"),e=a.parentNode,a=e.children[3],e=e.children[5],f=a.value,a.value=e.value,e.value= +f;else if(e){console.log("> switch firstname+lastname -> username");e=a.parentNode;f=e.children[1];a=e.children[3];e=e.children[5];if(0 dynamic update"),miniManager.fieldsToStorage(),ficheManager.fieldsToStorage(),contactManager.fieldsToStorage(),miniManager.sync(),ficheManager.sync(),miniManager.storageToFields(),ficheManager.storageToFields(),(c||b)&&contactManager.storageToFields()} +function checkRadioValue(a){for(var b=0,e=0;ec;c++)f.push(a.calls[c].number);for(c=0;cc;c++)g.push(a.sms[c].number);for(c=0;c GATHERING ALL DATA");subjectManager.fieldsToStorage();contactManager.fieldsToStorage();miniManager.fieldsToStorage();ficheManager.fieldsToStorage();a={path:"input/phone",subject:lsi["export"]("subject")[0],contacts:lsi["export"]("contacts"),mini:lsi["export"]("mini-fiches"),fiches:lsi["export"]("fiches")};api.send(a,function(a){console.log(a)},!1)},!1)})})})}); +api.send(a,function(b){console.log(b);if(0==b.ModuleError){for(var a=0,f=[],c=0;cc;c++)f.push(b.calls[c].number);for(c=0;cc;c++)g.push(b.sms[c].number);for(c=0;c< +g.length;c++)if(d=f.indexOf(g[c]),-1 GATHERING ALL DATA");subjectManager.fieldsToStorage();contactManager.fieldsToStorage();miniManager.fieldsToStorage();ficheManager.fieldsToStorage();a={path:"input/phone",subject:lsi["export"]("subject")[0],contacts:lsi["export"]("contacts"), +mini:lsi["export"]("mini-fiches"),fiches:lsi["export"]("fiches")};api.send(a,function(a){console.log(a)},!1)},!1)})})})}); diff --git a/view/js/input.js b/view/js/input.js index 5149e48..d425d3a 100644 --- a/view/js/input.js +++ b/view/js/input.js @@ -255,10 +255,10 @@ include('/js/includes/input-phone-fiche.js', function(){ username: splittedName.length == 1 ? splittedName[0] : '', // Si un seul mot -> pseudo firstname: splittedName.length > 1 ? splittedName[0] : '', // Si plusieurs mots -> le 1er est le prénom lastname: splittedName.length > 1 ? splittedName.splice(1).join(' ') : '', // et les autres sont le nom - // smscount: response.directory[most_called[i]].sms, // Nombre de sms - // callcount: response.directory[most_called[i]].calls, // Nombre d'appels - - call: i // classement dans le top 10 des APPELS + countsms: response.directory[most_called[i]].sms, // Nombre de sms + countcall: response.directory[most_called[i]].calls, // Nombre d'appels + call: i, // classement dans le top 10 des APPELS + sms: -1 // classement dans le top 10 des SMS }); uid++; @@ -291,7 +291,10 @@ include('/js/includes/input-phone-fiche.js', function(){ username: splittedName.length == 1 ? splittedName[0] : '', // Si un seul mot -> pseudo firstname: splittedName.length > 1 ? splittedName[0] : '', // Si plusieurs mots -> le 1er est le prénom lastname: splittedName.length > 1 ? splittedName.splice(1).join(' ') : '', // et les autres sont le nom - sms: i // classement dans le top 10 des SMS + countsms: response.directory[most_sms[i]].sms, // Nombre de sms + countcall: response.directory[most_sms[i]].calls, // Nombre d'appels + call: -1, // classement dans le top 10 des APPELS + sms: i // classement dans le top 10 des SMS }); uid++; @@ -321,8 +324,10 @@ include('/js/includes/input-phone-fiche.js', function(){ username: splittedName.length == 1 ? splittedName[0] : '', // Si un seul mot -> pseudo firstname: splittedName.length > 1 ? splittedName[0] : '', // Si plusieurs mots -> le 1er est le prénom lastname: splittedName.length > 1 ? splittedName.splice(1).join(' ') : '', // et les autres sont le nom - call: -1, - sms: -1 + countsms: response.directory[number].sms, // Nombre de sms + countcall: response.directory[number].calls, // Nombre d'appels + call: -1, + sms: -1 }); uid++;