function inputFacebookMini(a,b){this.container=a;this.nav_container=b}inputFacebookMini.prototype={container:this.container,nav_container:this.nav_container,selected:0,handler:null,defaultData:{sexe:"0",age:".",studies:".",loc:"0",reltype:"0",reltypeSpecial:"",timestamp:0,valid:!1}}; inputFacebookMini.prototype.fieldsToStorage=function(){console.log("MINI FICHE: FIELDS TO STORAGE");for(var a=$$('[data-sublink="facebook"] article.mini-relation-panel .mini-fiche-relation'),b=0;b MINI UPDATE");c={uid:parseInt(c.uid),sexe:c.sexe,age:c.age,studies:c.studies,reltype:c.reltype, reltypeSpecial:c.reltypeSpecial,loc:c.loc,hash:e};c.valid=this.check(c);0 FICHE UPDATE"),c.timestamp=Date.now());lsi.set("f_mini-fiches",c.uid,c)}}}; inputFacebookMini.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.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;var b=lsi.get("f_contacts",a.uid);if(!1===b)return!1; this.container.innerHTML+=fMiniFicheBuilder.build({name:readableName(b.username,b.firstname,b.lastname),countcall:b.countcall,countsms:b.countsms,uid:a.uid,reltypespecial:a.reltypeSpecial});b=$('[data-sublink="facebook"] article.mini-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");b=$('[data-sublink="facebook"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+ '"] ~ h5>span>select[data-name="age"]>option[value="'+a.age+'"]');null!=b&&b.setAttribute("selected","selected");for(var c=$$('[data-sublink="facebook"] 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="reltype"]'); for(b=0;binput[type="radio"][data-name="loc"]');for(b=0;b span.active'),c=0;c'+ ++b+"");for(c in a)isNaN(c)||(b=$('[data-sublink="facebook"] #f_nav-mini [data-n="'+a[c].uid+'"]'),null!=b&&(!0===a[c].valid?b.addClass("done"):b.remClass("done")));this.nav($('[data-sublink="facebook"] #f_nav-mini [data-n="'+this.selected+'"]'))}; inputFacebookMini.prototype.check=function(a){return""==a.sexe||"."==a.studies||"."==a.age||""==a.loc||""==a.reltype||"10"==a.reltype&&2>a.reltypeSpecial.length?!1:!0};inputFacebookMini.prototype.attach=function(a){console.log("MINI FICHE: ATTACH");lsi.createDataset("f_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)};