function inputPhoneMini(a,c){this.container=a;this.nav_container=c}inputPhoneMini.prototype={container:this.container,nav_container:this.nav_container,selected:null,handler:null,defaultData:{contact:null,sexe:"2",age:".",studies:"0",loc:".",reltype:"9",reltypeSpecial:"",unknown:!1,timestamp:0,valid:!1}}; inputPhoneMini.prototype.fieldsToStorage=function(){console.group("[phone.mini] fields to storage");for(var a=$$('[data-sublink="phone"] article.mini-relation-panel .mini-fiche-relation'),c=0;c MINI UPDATE");b={uid:parseInt(b.uid),sexe:b.sexe,age:b.age,studies:b.studies,reltype:b.reltype, reltypeSpecial:b.reltypeSpecial,loc:b.loc,unknown:null!=b.unknown,hash:e};b.valid=this.check(b);0 FICHE UPDATE"),b.timestamp=Date.now());lsi.set("p_mini-fiches",b.uid,b)}}console.groupEnd()}; inputPhoneMini.prototype.add=function(a){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.studies=null!=a.studies?a.studies:this.defaultData.studies;a.reltype=null!=a.reltype?a.reltype:this.defaultData.reltype;a.reltypeSpecial=null!=a.reltypeSpecial?a.reltypeSpecial:this.defaultData.reltypeSpecial;a.loc=null!=a.loc?a.loc:this.defaultData.loc;a.unknown=null!=a.unknown?a.unknown:this.defaultData.unknown;var c=lsi.get("p_contacts", a.uid);if(!1===c)return!1;if(!isNaN(c.existing)){var b=lsi.get("p_friends",c.existing);c.username=b.name;a.contact=c.uid;a.age=b.age;a.sexe=b.sexe;a.loc=b.dist;isNaN(b.reltype)?(a.reltype=10,a.reltypeSpecial=b.reltype):(a.reltype=b.reltype,a.reltypeSpecial="");null!=b.studies1&&(a.studies=b.studies1)}this.container.innerHTML+=pMiniFicheBuilder.build({name:c.username,countcall:c.countcall,countsms:c.countsms,uid:a.uid,reltypespecial:a.reltypeSpecial});c=$('[data-sublink="phone"] article.mini-fiche-relation input[data-name="uid"][value="'+ a.uid+'"] ~ h5>span>select[data-name="studies"]>option[value="'+a.studies+'"]');null!=c&&c.setAttribute("selected","selected");c=$('[data-sublink="phone"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>span>select[data-name="age"]>option[value="'+a.age+'"]');null!=c&&c.setAttribute("selected","selected");b=$$('[data-sublink="phone"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="sexe"]');for(c=0;cinput[type="radio"][data-name="reltype"]');for(c=0;cinput[type="radio"][data-name="loc"]');for(c=0;cinput[type="checkbox"][data-name="unknown"]');null!=c&&a.unknown&&c.setAttribute("checked","checked")}; inputPhoneMini.prototype.storageToFields=function(){console.group("[phone.mini] storage to fields");console.warn(this.selected);var a=lsi.get("p_mini-fiches",this.selected);if(null===a){if(null===this.selected)return a=lsi.keys("p_mini-fiches"),0 span.active'),b=0;b'+ ++c+"");for(b in a)isNaN(b)||(c=$('[data-sublink="phone"] #p_nav-mini [data-n="'+a[b].uid+'"]'),null!=c&&(!0===a[b].valid?c.addClass("done"):c.remClass("done")));this.nav($('[data-sublink="phone"] #p_nav-mini [data-n="'+this.selected+'"]'))}; inputPhoneMini.prototype.check=function(a){return a.unknown?!0:""==a.sexe||"."==a.studies||"."==a.age||""==a.loc||""==a.reltype||"10"==a.reltype&&2>a.reltypeSpecial.length?!1:!0};inputPhoneMini.prototype.attach=function(a){console.group("[phone.mini] attaching events");lsi.createDataset("p_mini-fiches");this.storageToFields();this.handler=a;this.nav_container.addEventListener("click",function(a){this.nav(a.target);this.handler(a.target)}.bind(this),!1);console.groupEnd()};