diff --git a/public_html/js/includes/input-facebook-fiche.js b/public_html/js/includes/input-facebook-fiche.js
index 6584f89..face42b 100644
--- a/public_html/js/includes/input-facebook-fiche.js
+++ b/public_html/js/includes/input-facebook-fiche.js
@@ -60,7 +60,7 @@ inputFacebookFiche.prototype.fieldsToStorage = function(){
existingData = lsi.get('f_fiches', deflated.uid);
// Si erreur, on passe à la fiche suivante
- if( existingData === false )
+ if( !existingData )
continue;
@@ -93,7 +93,7 @@ inputFacebookFiche.prototype.fieldsToStorage = function(){
hash = crc32( JSON.stringify(obj) );
// {5.2} Si le hash est identique, on ne fait rien //
- if( existingData['hash'] != undefined && hash == existingData.hash )
+ if( existingData.hasOwnProperty('hash') && hash == existingData.hash )
continue;
// {5.3} On enregistre le hash //
diff --git a/public_html/js/includes/input-facebook-mini.js b/public_html/js/includes/input-facebook-mini.js
index be544fa..1f9d767 100644
--- a/public_html/js/includes/input-facebook-mini.js
+++ b/public_html/js/includes/input-facebook-mini.js
@@ -50,7 +50,7 @@ inputFacebookMini.prototype.fieldsToStorage = function(){
existingData = lsi.get('f_mini-fiches', deflated.uid);
// Si erreur, on passe à la fiche suivante
- if( existingData === false )
+ if( !existingData )
continue;
/* (4) On récupère et met en forme les valeurs du deflater */
@@ -72,7 +72,7 @@ inputFacebookMini.prototype.fieldsToStorage = function(){
hash = crc32( JSON.stringify(obj) );
// {5.2} Si le hash est identique, on ne fait rien //
- if( existingData['hash'] != undefined && hash == existingData.hash )
+ if( existingData.hasOwnProperty('hash') && hash == existingData.hash )
continue;
// {5.3} On enregistre le hash //
diff --git a/public_html/js/includes/input-phone-fiche.js b/public_html/js/includes/input-phone-fiche.js
index ca6acb1..3f89af6 100644
--- a/public_html/js/includes/input-phone-fiche.js
+++ b/public_html/js/includes/input-phone-fiche.js
@@ -59,7 +59,7 @@ inputPhoneFiche.prototype.fieldsToStorage = function(){
existingData = lsi.get('p_fiches', deflated.uid);
// Si erreur, on passe à la fiche suivante
- if( existingData === false )
+ if( !existingData )
continue;
@@ -92,7 +92,7 @@ inputPhoneFiche.prototype.fieldsToStorage = function(){
hash = crc32( JSON.stringify(obj) );
// {5.2} Si le hash est identique, on ne fait rien //
- if( existingData['hash'] != undefined && hash == existingData.hash )
+ if( existingData.hasOwnProperty('hash') && hash == existingData.hash )
continue;
// {5.3} On enregistre le hash //
diff --git a/public_html/js/includes/input-phone-mini.js b/public_html/js/includes/input-phone-mini.js
index 337fc66..c4667de 100644
--- a/public_html/js/includes/input-phone-mini.js
+++ b/public_html/js/includes/input-phone-mini.js
@@ -50,7 +50,7 @@ inputPhoneMini.prototype.fieldsToStorage = function(){
existingData = lsi.get('p_mini-fiches', deflated.uid);
// Si erreur, on passe à la fiche suivante
- if( existingData === false )
+ if( !existingData )
continue;
/* (4) On récupère et met en forme les valeurs du deflater */
@@ -72,7 +72,7 @@ inputPhoneMini.prototype.fieldsToStorage = function(){
hash = crc32( JSON.stringify(obj) );
// {5.2} Si le hash est identique, on ne fait rien //
- if( existingData['hash'] != undefined && hash == existingData.hash )
+ if( existingData.hasOwnProperty('hash') && hash == existingData.hash )
continue;
// {5.3} On enregistre le hash //
diff --git a/public_html/js/includes/min/input-facebook-fiche.js b/public_html/js/includes/min/input-facebook-fiche.js
index 444da5c..0a16dd2 100644
--- a/public_html/js/includes/min/input-facebook-fiche.js
+++ b/public_html/js/includes/min/input-facebook-fiche.js
@@ -1,6 +1,6 @@
function inputFacebookFiche(a,b){this.container=a;this.nav_container=b;this.top_size=10}inputFacebookFiche.prototype={container:this.container,nav_container:this.nav_container,selected:0,handler:null,defaultData:{sexe:"2",age:".",job:".",famsit:"0",studies:"0",reltype:"0",reltypeSpecial:"",city:"",quartier:"",cp:"",loc:"0",duration:["",""],context:"0",contextSpecial:["","",""],freq:["4","9","14","19","24"],connect:"1 3 5 7 9 11".split(" "),connectSpecial:["",""],timestamp:0,valid:!1}};
-inputFacebookFiche.prototype.fieldsToStorage=function(){console.group("[facebook.fiche] fields to storage");var a,b,c,e,d,h=$$('[data-sublink="facebook"] article.relation-panel .fiche-relation');a=0;for(b=h.length;a FICHE UPDATE ("+(e.timestamp-input_ts)+")"),lsi.set("f_fiches",e.uid,e);console.groupEnd()};
+inputFacebookFiche.prototype.fieldsToStorage=function(){console.group("[facebook.fiche] fields to storage");var a,b,c,e,d,h=$$('[data-sublink="facebook"] article.relation-panel .fiche-relation');a=0;for(b=h.length;a FICHE UPDATE ("+(e.timestamp-input_ts)+")"),lsi.set("f_fiches",e.uid,e));console.groupEnd()};
inputFacebookFiche.prototype.add=function(a){if(null==a.uid||isNaN(a.uid)||null==a.contact||isNaN(a.contact))return!1;a.city=null!=a.city?a.city:this.defaultData.city;a.quartier=null!=a.quartier?a.quartier:this.defaultData.quartier;a.cp=null!=a.cp?a.cp:this.defaultData.cp;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.age=null!=a.age?a.age:this.defaultData.age;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.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:
diff --git a/public_html/js/includes/min/input-facebook-mini.js b/public_html/js/includes/min/input-facebook-mini.js
index bd48798..e1c46a1 100644
--- a/public_html/js/includes/min/input-facebook-mini.js
+++ b/public_html/js/includes/min/input-facebook-mini.js
@@ -1,6 +1,6 @@
function inputFacebookMini(a,b){this.container=a;this.nav_container=b}inputFacebookMini.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}};
-inputFacebookMini.prototype.fieldsToStorage=function(){console.group("[facebook.mini] fields to storage");var a,b,c,d,e,f=$$('[data-sublink="facebook"] article.mini-relation-panel .mini-fiche-relation');a=0;for(b=f.length;a MINI UPDATE ("+(d.timestamp-input_ts)+")"),lsi.set("f_mini-fiches",d.uid,d);console.groupEnd()};
+inputFacebookMini.prototype.fieldsToStorage=function(){console.group("[facebook.mini] fields to storage");var a,b,c,d,e,f=$$('[data-sublink="facebook"] article.mini-relation-panel .mini-fiche-relation');a=0;for(b=f.length;a MINI UPDATE ("+(d.timestamp-input_ts)+")"),lsi.set("f_mini-fiches",d.uid,d));console.groupEnd()};
inputFacebookMini.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 b=lsi.get("f_contacts",
a.uid);if(!1===b)return!1;if(!isNaN(b.existing)){var c=lsi.get("f_friends",b.existing);b.username=c.name;a.contact=c.contact;a.age=c.age;a.sexe=c.sexe;a.loc=c.dist;isNaN(c.reltype)?(a.reltype=10,a.reltypeSpecial=c.reltype):(a.reltype=c.reltype,a.reltypeSpecial="");null!=c.studies1&&(a.studies=c.studies1)}this.container.innerHTML+=fMiniFicheBuilder.build({name:b.username,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");c=$$('[data-sublink="facebook"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="sexe"]');for(b=0;b FICHE UPDATE ("+(e.timestamp-input_ts)+")"),lsi.set("p_fiches",e.uid,e);console.groupEnd()};
+inputPhoneFiche.prototype.fieldsToStorage=function(){console.group("[phone.fiche] fields to storage");var a,b,c,e,d,h=$$('[data-sublink="phone"] article.relation-panel .fiche-relation');a=0;for(b=h.length;a FICHE UPDATE ("+(e.timestamp-input_ts)+")"),lsi.set("p_fiches",e.uid,e));console.groupEnd()};
inputPhoneFiche.prototype.add=function(a){if(null==a.uid||isNaN(a.uid)||null==a.contact||isNaN(a.contact))return!1;a.city=null!=a.city?a.city:this.defaultData.city;a.quartier=null!=a.quartier?a.quartier:this.defaultData.quartier;a.cp=null!=a.cp?a.cp:this.defaultData.cp;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.age=null!=a.age?a.age:this.defaultData.age;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.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:
diff --git a/public_html/js/includes/min/input-phone-mini.js b/public_html/js/includes/min/input-phone-mini.js
index c85d740..0a27ea5 100644
--- a/public_html/js/includes/min/input-phone-mini.js
+++ b/public_html/js/includes/min/input-phone-mini.js
@@ -1,6 +1,6 @@
function inputPhoneMini(a,b){this.container=a;this.nav_container=b}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");var a,b,c,d,e,f=$$('[data-sublink="phone"] article.mini-relation-panel .mini-fiche-relation');a=0;for(b=f.length;a MINI UPDATE ("+(d.timestamp-input_ts)+")"),lsi.set("p_mini-fiches",d.uid,d);console.groupEnd()};
+inputPhoneMini.prototype.fieldsToStorage=function(){console.group("[phone.mini] fields to storage");var a,b,c,d,e,f=$$('[data-sublink="phone"] article.mini-relation-panel .mini-fiche-relation');a=0;for(b=f.length;a MINI UPDATE ("+(d.timestamp-input_ts)+")"),lsi.set("p_mini-fiches",d.uid,d));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 b=lsi.get("p_contacts",
a.uid);if(!1===b)return!1;if(!isNaN(b.existing)){var c=lsi.get("p_friends",b.existing);b.username=c.name;a.contact=b.uid;a.age=c.age;a.sexe=c.sexe;a.loc=c.dist;isNaN(c.reltype)?(a.reltype=10,a.reltypeSpecial=c.reltype):(a.reltype=c.reltype,a.reltypeSpecial="");null!=c.studies1&&(a.studies=c.studies1)}this.container.innerHTML+=pMiniFicheBuilder.build({name:b.username,countcall:b.countcall,countsms:b.countsms,uid:a.uid,reltypespecial:a.reltypeSpecial});b=$('[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!=b&&b.setAttribute("selected","selected");b=$('[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!=b&&b.setAttribute("selected","selected");c=$$('[data-sublink="phone"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="sexe"]');for(b=0;b