function inputPhoneFiche(a,b){this.container=a;this.nav_container=b} inputPhoneFiche.prototype={container:this.container,nav_container:this.nav_container,selected:0,handler:null,defaultData:{firstname:"",lastname:"",username:"",sexe:[{status:!0},{status:!1}],age:"",job:".",famsit:[{status:!0},{status:!1},{status:!1}],studies:".",reltype:[{status:!0},{status:!1},{status:!1},{status:!1},{status:!1},{status:!1},{status:!1},{status:!1},{status:!1}],reltypeSpecial:"",city:"",loc:[{status:!0},{status:!1},{status:!1},{status:!1}],duration:["",""],context:[{status:!0},{status:!1}, {status:!1},{status:!1},{status:!1},{status:!1},{status:!1},{status:!1},{status:!1},{status:!1},{status:!1},{status:!1},{status:!1},{status:!1}],contextSpecial:["","",""],freq:[[{status:!0},{status:!1},{status:!1},{status:!1}],[{status:!0},{status:!1},{status:!1},{status:!1}],[{status:!0},{status:!1},{status:!1},{status:!1}],[{status:!0},{status:!1},{status:!1},{status:!1}],[{status:!0},{status:!1},{status:!1},{status:!1}]],connect:[[{status:!1},{status:!0}],[{status:!1},{status:!0}],[{status:!1}, {status:!0}],[{status:!1},{status:!0}],[{status:!1},{status:!0}],[{status:!1},{status:!0}]],connectSpecial:["",""]}}; inputPhoneFiche.prototype.fieldsToStorage=function(){console.log("FICHE: FIELDS TO STORAGE");for(var a=$$("article.relation-panel .fiche-relation"),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="context"]');for(b=0;binput[type="radio"][data-name="freq'+c+'"]'),b=0;binput[type="radio"][data-name="connect'+c+'"]'),b=0;bb;b++){var c=lsi.get("contacts",a[b]),d=lsi.get("fiches",a[b]);null==d&&(d=this.defaultData);d.uid=c.uid;d.firstname=c.firstname;d.lastname=c.lastname;d.username=c.username;lsi.set("fiches",a[b],d)}}; inputPhoneFiche.prototype.nav=function(a){if("undefined"==typeof a||isNaN(a.innerHTML)||"nav-fiche"!=a.parentNode.id)return!1;for(var b=$$("#nav-fiche > span.active"),c=0;c"}for(var d in a)b=this.nav_container.children[a[d].uid],b.innerHTML=a[d].uid+1,!0===a[d].valid?b.addClass("done"):b.remClass("done");this.nav(this.nav_container.children[this.selected])}; inputPhoneFiche.prototype.check=function(a){if(isNaN(parseInt(a.age))||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)};