diff --git a/build/lightdb/storage/dictionary.json b/build/lightdb/storage/dictionary.json index 56056a2..da59044 100644 --- a/build/lightdb/storage/dictionary.json +++ b/build/lightdb/storage/dictionary.json @@ -12,7 +12,7 @@ "contacts": { - "sexe": { "0":"Homme", "1":"Femme", "2":"Indéterminé" }, + "sexe": { "0":"Homme", "1":"Femme", "2":"Indéterminé" }, . "age": { ".": "NA", "0": "5 à 10", "1": "10 à 15", "2": "15 à 20", "3": "20 à 25", "4": "25 à 30", diff --git a/public_html/js/includes/input-html-phone-data.js b/public_html/js/includes/input-html-phone-data.js index fba4f16..f98ed93 100644 --- a/public_html/js/includes/input-html-phone-data.js +++ b/public_html/js/includes/input-html-phone-data.js @@ -472,10 +472,10 @@ pFicheBuilder.setLayout( "\t

Comment cette personne utilise-t-elle les médias sociaux de votre point de vue ? Il s'agit :

\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
\n"+ "\t
Sur une échelle de 1 à 5, préciser l'intérêt que vous accordez aux contenue qu'elle partage via les médias sociaux

\n"+ @@ -553,9 +553,9 @@ pFicheBuilder.setLayout( "\t
Considérez-vous que vos échange avec cette personne à travers les médias sociaux:
\n"+ "\t
\n"+ - "\t\t   
\n"+ - "\t\t   
\n"+ - "\t\t   
\n"+ + "\t\t   
\n"+ + "\t\t   
\n"+ + "\t\t   
\n"+ "\t
\n"+ "\n"); diff --git a/public_html/js/includes/min/input-html-phone-data.js b/public_html/js/includes/min/input-html-phone-data.js index 5325def..ae672c5 100644 --- a/public_html/js/includes/min/input-html-phone-data.js +++ b/public_html/js/includes/min/input-html-phone-data.js @@ -1,3 +1,3 @@ var pContactBuilder=new HTMLBuilder;pContactBuilder.setLayout("

\n\t\n\t\n\t    ou    \n\t \n\t\n

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

@name

\n\t
\t\t\t
\t
\n\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

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\t   
\n\t\t   
\n\t
\n\t

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

\n\t
\n\t\t\u00c0 combien de temps est-ce de chez vous ?
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n
"); -var pFicheBuilder=new HTMLBuilder;pFicheBuilder.setLayout("
\n\t\n\t\n\t

@name

\n\t
\t\t@importedfiche\t
\t
\n\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\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
\n\t

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

\n\t
\n\t\t\n\t\t
\n\t
\n\t
\n\t\tSi Toulouse : \n\t
\n\t
\n\t\t\u00c0 combien de temps est-ce de chez vous (en voiture) ?
\n\t\t(si deux domiciles, le plus proche)
\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\t   
\n\t
\n\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 (idem)
\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 (idem)
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous le suivez sur Twitter (ou elle vous suit)
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous communiquez avec cette personne sur Twitter (idem)
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous communiquez dans autre r\u00e9seau : \n\t
\n\t
\n\t\tVous communiquez dans un autre dispositif (blogs, jeu vid\u00e9o ou autre) : \n\t
\n\t

Comment cette personne utilise-t-elle les m\u00e9dias sociaux de votre point de vue ? Il s'agit :

\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t
Sur une \u00e9chelle de 1 \u00e0 5, pr\u00e9ciser l'int\u00e9r\u00eat que vous accordez aux contenue qu'elle partage via les m\u00e9dias sociaux

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

Selon vous, \u00e0 quelle fr\u00e9quence cette personne\u00a0?

\n\t
\n\t\tPublie des commentaires personnels ou r\u00e9agit aux publications des autres ?
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tPublie des photos personnelles (profil, voyages, etc.) ?
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tPartage de la musique ou des clips musicaux ?
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tPartage des informations culturelles (concert, exposition, etc.) ?
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tPartage des articles, des informations, des contenus avec une port\u00e9e politique ?
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
Sur une \u00e9chelle de 1 \u00e0 5, comment jugez-vous votre relation \u00e0 cette personne ?

\n\t\t\n\t
\n\t
Consid\u00e9rez-vous que vos \u00e9change avec cette personne \u00e0 travers les m\u00e9dias sociaux:
\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n
\n"); +var pFicheBuilder=new HTMLBuilder;pFicheBuilder.setLayout("
\n\t\n\t\n\t

@name

\n\t
\t\t@importedfiche\t
\t
\n\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\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
\n\t

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

\n\t
\n\t\t\n\t\t
\n\t
\n\t
\n\t\tSi Toulouse : \n\t
\n\t
\n\t\t\u00c0 combien de temps est-ce de chez vous (en voiture) ?
\n\t\t(si deux domiciles, le plus proche)
\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\t   
\n\t
\n\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 (idem)
\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 (idem)
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous le suivez sur Twitter (ou elle vous suit)
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous communiquez avec cette personne sur Twitter (idem)
\n\t\t   \n\t\t   \n\t
\n\t
\n\t\tVous communiquez dans autre r\u00e9seau : \n\t
\n\t
\n\t\tVous communiquez dans un autre dispositif (blogs, jeu vid\u00e9o ou autre) : \n\t
\n\t

Comment cette personne utilise-t-elle les m\u00e9dias sociaux de votre point de vue ? Il s'agit :

\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n\t
Sur une \u00e9chelle de 1 \u00e0 5, pr\u00e9ciser l'int\u00e9r\u00eat que vous accordez aux contenue qu'elle partage via les m\u00e9dias sociaux

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

Selon vous, \u00e0 quelle fr\u00e9quence cette personne\u00a0?

\n\t
\n\t\tPublie des commentaires personnels ou r\u00e9agit aux publications des autres ?
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tPublie des photos personnelles (profil, voyages, etc.) ?
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tPartage de la musique ou des clips musicaux ?
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tPartage des informations culturelles (concert, exposition, etc.) ?
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
\n\t\tPartage des articles, des informations, des contenus avec une port\u00e9e politique ?
\n\t\t   \n\t\t   \n\t\t   \n\t\t   \n\t
\n\t
Sur une \u00e9chelle de 1 \u00e0 5, comment jugez-vous votre relation \u00e0 cette personne ?

\n\t\t\n\t
\n\t
Consid\u00e9rez-vous que vos \u00e9change avec cette personne \u00e0 travers les m\u00e9dias sociaux:
\n\t
\n\t\t   
\n\t\t   
\n\t\t   
\n\t
\n
\n"); diff --git a/public_html/view/js/input.js b/public_html/view/js/input.js index a363ae8..36142ec 100644 --- a/public_html/view/js/input.js +++ b/public_html/view/js/input.js @@ -940,10 +940,10 @@ function testRoutinePhone(doMini){ $('article.fiche-relation > input[data-name="uid"][value="'+f+'"] ~ h5 select[data-name="studies"]').value = stuVal; // {5} Type de relation // - var relVal = count % 9; + var relVal = count % 8; // Si AUTRE - if( relVal == 8 ){ + if( relVal == 7 ){ $('#reltype10_p_'+f).checked = true; $('article.fiche-relation > input[data-name="uid"][value="'+f+'"] ~ h5 input[data-name="reltypeSpecial"]').value = 'autre'; // Sinon @@ -959,6 +959,22 @@ function testRoutinePhone(doMini){ var locVal = ['A', 'B', 'C', 'D'][ Math.floor(count % 4) ]; $('#loc'+locVal+'_p_'+f).checked = true; + // {7} Situation familiale // + var famsitVal = ['A', 'B', 'C', 'D'][ Math.floor(count % 4) ]; + $('#famsit'+famsitVal+'_p_'+f).checked = true; + + // {7} Situation familiale // + var famsitVal = ['A', 'B', 'C', 'D'][ Math.floor(count % 4) ]; + $('#famsit'+famsitVal+'_p_'+f).checked = true; + + // {7} Utilisation des Medias Sociaux // + var medsocVal = ['A', 'B', 'C', 'D'][ Math.floor(count % 4) ]; + $('#medsoc'+medsocVal+'_p_'+f).checked = true; + + // {7} Relation via médias sociaux // + var medrelVal = ['A', 'B', 'C'][ Math.floor(count % 3) ]; + $('#medrel'+medrelVal+'_p_'+f).checked = true; + // {8} Temps de connaissance // var duration = $$('article.fiche-relation > input[data-name="uid"][value="'+f+'"] ~ h5 input[data-name="duration"]'); duration[0].value = count.toString(); @@ -982,7 +998,41 @@ function testRoutinePhone(doMini){ if( ctxVal == 13 ) ctxSpe[2].value = 'autre'; + // {3} On remplit les interets // + var interestVal = ['0','1','2','3','4']; + interestVal = interestVal[ count % interestVal.length ]; + $('article.fiche-relation > input[data-name="uid"][value="'+f+'"] ~ h5 select[data-name="interest"]').value = interestVal; + // {3} On remplit la relation avec la personne // + var relmarkVal = ['0','1','2','3','4']; + relmarkVal = relmarkVal[ count % relmarkVal.length ]; + $('article.fiche-relation > input[data-name="uid"][value="'+f+'"] ~ h5 select[data-name="relmark"]').value = relmarkVal; + + + // FREQ + var freqVal; + for( var i = 0 ; i < 5 ; i++ ){ + freqVal = 1+ i*5+ Math.floor( count % 4 ); + if( freqVal < 10 ) freqVal = '0'+freqVal; + + $('#freq'+freqVal+'_p_'+f).checked = true; + } + // IRLFREQ + var irlfreqVal; + for( var i = 0 ; i < 5 ; i++ ){ + irlfreqVal = 1+ i*5+ Math.floor( count % 4 ); + if( irlfreqVal < 10 ) irlfreqVal = '0'+irlfreqVal; + + $('#irlfreq'+irlfreqVal+'_p_'+f).checked = true; + } + + // CONNECT + var connectVal; + for( var i = 1 ; i < 7 ; i++ ){ + connectVal = 1+ Math.floor( count % 2 ); + + $('#connect'+i+''+connectVal+'_p_'+f).checked = true; + } count++; diff --git a/public_html/view/js/min/input.js b/public_html/view/js/min/input.js index bf8a4c8..e9817cc 100644 --- a/public_html/view/js/min/input.js +++ b/public_html/view/js/min/input.js @@ -1,15 +1,15 @@ var sField,sSubmit,sList,pSubjectManager=null,pContactManager=null,pMiniManager=null,pFicheManager=null,pMatriceManager=null,fSubjectManager=null,fContactManager=null,fMiniManager=null,fFicheManager=null,fMatriceManager=null,input_ts=Date.now();sField=$("#search-field");sSubmit=$("#search-subject");sList=$('section[data-sublink="survey"] ul[data-list]'); -var tmpSubjectSearchListener=function(a){api.send({path:"subject/search",name:sField.value},function(a){console.warn(a);if(0!=a.ModuleError)return Notification.error("Erreur","La recherche a \u00e9chou\u00e9."),!1;console.log(a);var c=[],g;for(g in a.results)c.push("
  • "),c.push("
    SUJET
    "),c.push("
    "),c.push("
    "+ -a.results[g].name+"
    "),c.push("
    "+a.results[g].creation+"
    "),c.push("
    "),c.push("
    "),c.push("
    "),c.push("
    "),c.push("
  • ");sList.innerHTML= -c.join("")})};sSubmit.addEventListener("click",tmpSubjectSearchListener,!1);sField.addEventListener("keypress",function(a){13===a.keyCode&&tmpSubjectSearchListener(a)},!1);tmpSubjectSearchListener(); +var tmpSubjectSearchListener=function(a){api.send({path:"subject/search",name:sField.value},function(b){console.warn(b);if(0!=b.ModuleError)return Notification.error("Erreur","La recherche a \u00e9chou\u00e9."),!1;console.log(b);var a=[],e;for(e in b.results)a.push("
  • "),a.push("
    SUJET
    "),a.push("
    "),a.push("
    "+ +b.results[e].name+"
    "),a.push("
    "+b.results[e].creation+"
    "),a.push("
    "),a.push("
    "),a.push("
    "),a.push("
    "),a.push("
  • ");sList.innerHTML= +a.join("")})};sSubmit.addEventListener("click",tmpSubjectSearchListener,!1);sField.addEventListener("keypress",function(a){13===a.keyCode&&tmpSubjectSearchListener(a)},!1);tmpSubjectSearchListener(); var pAlready=0,pLoaded=[0,0,0,0,0],phoneRoutine=function(){!Math.min.apply(Math,pLoaded)|pAlready||(pAlready=1,console.groupEnd(),console.group("[phone] Initialization"),pSubjectManager=new inputPhoneSubject($('[data-sublink="phone"] article.subject-panel [data-name="subject_id"]'),$('[data-sublink="phone"] article.subject-panel [data-name="submit"]')),pSubjectManager.attach(pDynamicUpdate),pContactManager=new inputPhoneContact($('[data-sublink="phone"] article.contact-panel'),$('[data-sublink="phone"] #p_nav-contact')), pContactManager.attach(pDynamicUpdate),pMiniManager=new inputPhoneMini($('[data-sublink="phone"] article.mini-relation-panel'),$('[data-sublink="phone"] #p_nav-mini')),pMiniManager.attach(pDynamicUpdate),pFicheManager=new inputPhoneFiche($('[data-sublink="phone"] article.relation-panel'),$('[data-sublink="phone"] #p_nav-fiche')),pFicheManager.top_size=20,pFicheManager.attach(pDynamicUpdate),pMatriceManager=new inputPhoneMatrice($('[data-sublink="phone"] article.matrice-panel')),pMatriceManager.attach(pDynamicUpdate), $('[data-sublink="phone"] #p_clear-all').addEventListener("click",function(a){lsi.clear("p_subject");lsi.clear("p_contacts");lsi.clear("p_mini-fiches");lsi.clear("p_fiches");lsi.clear("p_matrice");lsi.clear("p_friends");pSubjectManager.storageToFields();pContactManager.storageToFields();pMiniManager.storageToFields();pFicheManager.storageToFields();pMatriceManager.storageToFields();Notification.success("OK","Les donn\u00e9es ont \u00e9t\u00e9 supprim\u00e9es")},!1),$('[data-sublink="phone"] #p_export-all').addEventListener("click", function(a){Notification.info("INFORMATION","Lancement du t\u00e9l\u00e9chargement de la sauvegarde");a={subject:lsi["export"]("p_subject")[0],contacts:lsi["export"]("p_contacts"),mini:lsi["export"]("p_mini-fiches"),fiches:lsi["export"]("p_fiches"),matrice:lsi["export"]("p_matrice")[0]};var b=$('[data-sublink="phone"] #p_download-target');b.download="local-facebook-data.json";b.href="data:application/octet-stream,"+encodeURIComponent(JSON.stringify(a));b.click()},!1),$('[data-sublink="phone"] #p_import-all').addEventListener("click", function(a){$('[data-sublink="phone"] #p_local-upload').click()},!1),$('[data-sublink="phone"] #p_local-upload').addEventListener("click",function(a){a.target.value=null},!1),$('[data-sublink="phone"] #p_local-upload').addEventListener("change",function(a){a={path:"upload/local_data",file:$('[data-sublink="phone"] #p_local-upload').files[0]};api.send(a,function(a){console.log(a);if(0!=a.ModuleError)return Notification.error("Erreur",a.ModuleError),!1;lsi.set("p_subject",0,a.local_data.subject);lsi["import"]("p_contacts", a.local_data.contacts);lsi["import"]("p_mini-fiches",a.local_data.mini);lsi["import"]("p_fiches",a.local_data.fiches);lsi.set("p_matrice",0,a.local_data.matrice);pSubjectManager.storageToFields();pContactManager.storageToFields();pMatriceManager.storageToFields();pDynamicUpdate(!0)})},!1),$('[data-sublink="phone"] #p_submit-all').addEventListener("click",function(a){console.log("> GATHERING ALL DATA");pContactManager.fieldsToStorage();pMiniManager.fieldsToStorage();pFicheManager.fieldsToStorage(); -if(!pSubjectManager.check())return Notification.warning("Attention","Vous devez saisir les informations du sujet"),!1;a=lsi["export"]("p_mini-fiches");var b=0,c;for(c in a)if(!isNaN(c)&&(b++,!a[c].valid))return Notification.warning("Attention","La fiche rapide "+b+" est incompl\u00e8te et/ou incorrecte"),!1;a=lsi["export"]("p_fiches");for(c in a)if(!a[c].valid)return Notification.warning("Attention","La fiche compl\u00e8te "+(parseInt(c)+1)+" est incompl\u00e8te et/ou incorrecte"), -!1;c={path:"input/phone",subject:lsi["export"]("p_subject")[0].subject_id,contacts:lsi["export"]("p_contacts"),mini:lsi["export"]("p_mini-fiches"),fiches:lsi["export"]("p_fiches"),matrice:lsi["export"]("p_matrice")[0]};api.send(c,function(a){console.log(a);if(0!=a.ModuleError)return Notification.error("ERREUR",a.ModuleError),!1;Notification.success("OK","L'identifiant du sujet est "+a.subject_id+" ! Tout s'est bien d\u00e9roul\u00e9.",1E4);console.log(a)},!1)},!1),console.groupEnd())}; +if(!pSubjectManager.check())return Notification.warning("Attention","Vous devez saisir les informations du sujet"),!1;a=lsi["export"]("p_mini-fiches");var b=0,f;for(f in a)if(!isNaN(f)&&(b++,!a[f].valid))return Notification.warning("Attention","La fiche rapide "+b+" est incompl\u00e8te et/ou incorrecte"),!1;a=lsi["export"]("p_fiches");for(f in a)if(!a[f].valid)return Notification.warning("Attention","La fiche compl\u00e8te "+(parseInt(f)+1)+" est incompl\u00e8te et/ou incorrecte"), +!1;f={path:"input/phone",subject:lsi["export"]("p_subject")[0].subject_id,contacts:lsi["export"]("p_contacts"),mini:lsi["export"]("p_mini-fiches"),fiches:lsi["export"]("p_fiches"),matrice:lsi["export"]("p_matrice")[0]};api.send(f,function(a){console.log(a);if(0!=a.ModuleError)return Notification.error("ERREUR",a.ModuleError),!1;Notification.success("OK","L'identifiant du sujet est "+a.subject_id+" ! Tout s'est bien d\u00e9roul\u00e9.",1E4);console.log(a)},!1)},!1),console.groupEnd())}; include("/js/includes/input-phone-subject.js",function(){pLoaded[0]=1;phoneRoutine()});include("/js/includes/input-phone-contact.js",function(){pLoaded[1]=1;phoneRoutine()});include("/js/includes/input-phone-mini.js",function(){pLoaded[2]=1;phoneRoutine()});include("/js/includes/input-phone-fiche.js",function(){pLoaded[3]=1;phoneRoutine()});include("/js/includes/input-phone-matrice.js",function(){pLoaded[4]=1;phoneRoutine()}); var fAlready=0,fLoaded=[0,0,0,0,0],facebookRoutine=function(){!Math.min.apply(Math,fLoaded)|fAlready||(fAlready=1,console.groupEnd(),console.group("[facebook] Initialization"),fSubjectManager=new inputFacebookSubject($('[data-sublink="facebook"] article.subject-panel [data-name="subject_id"]'),$('[data-sublink="facebook"] article.subject-panel [data-name="submit"]')),fSubjectManager.attach(fDynamicUpdate),fContactManager=new inputFacebookContact($('[data-sublink="facebook"] article.contact-panel'), $('[data-sublink="facebook"] #f_nav-contact')),fContactManager.attach(fDynamicUpdate),fMiniManager=new inputFacebookMini($('[data-sublink="facebook"] article.mini-relation-panel'),$('[data-sublink="facebook"] #f_nav-mini')),fMiniManager.attach(fDynamicUpdate),fFicheManager=new inputFacebookFiche($('[data-sublink="facebook"] article.relation-panel'),$('[data-sublink="facebook"] #f_nav-fiche')),fFicheManager.top_size=20,fFicheManager.attach(fDynamicUpdate),fMatriceManager=new inputFacebookMatrice($('[data-sublink="facebook"] article.matrice-panel')), @@ -17,24 +17,25 @@ fMatriceManager.attach(fDynamicUpdate),$('[data-sublink="facebook"] #f_clear-all !1),$('[data-sublink="facebook"] #f_export-all').addEventListener("click",function(a){Notification.info("INFORMATION","Lancement du t\u00e9l\u00e9chargement de la sauvegarde");a={subject:lsi["export"]("f_subject")[0].subject_id,contacts:lsi["export"]("f_contacts"),mini:lsi["export"]("f_mini-fiches"),fiches:lsi["export"]("f_fiches"),matrice:lsi["export"]("f_matrice")[0]};var b=$('[data-sublink="facebook"] #f_download-target');b.download="local-facebook-data.json";b.href="data:application/octet-stream,"+ encodeURIComponent(JSON.stringify(a));b.click()},!1),$('[data-sublink="facebook"] #f_import-all').addEventListener("click",function(a){$('[data-sublink="facebook"] #f_local-upload').click()},!1),$('[data-sublink="facebook"] #f_local-upload').addEventListener("click",function(a){a.target.value=null},!1),$('[data-sublink="facebook"] #f_local-upload').addEventListener("change",function(a){a={path:"upload/local_data",file:$('[data-sublink="facebook"] #f_local-upload').files[0]};api.send(a,function(a){console.log(a); if(0!=a.ModuleError)return Notification.error("Erreur",a.ModuleError),!1;lsi.set("f_subject",0,a.local_data.subject);lsi["import"]("f_contacts",a.local_data.contacts);lsi["import"]("f_mini-fiches",a.local_data.mini);lsi["import"]("f_fiches",a.local_data.fiches);lsi.set("f_matrice",0,a.local_data.matrice);pSubjectManager.storageToFields();pContactManager.storageToFields();pMatriceManager.storageToFields();pDynamicUpdate(!0)})},!1),$('[data-sublink="facebook"] #f_submit-all').addEventListener("click", -function(a){console.log("> GATHERING ALL DATA");pContactManager.fieldsToStorage();pMiniManager.fieldsToStorage();pFicheManager.fieldsToStorage();if(!pSubjectManager.check())return Notification.warning("Attention","Vous devez saisir les informations du sujet"),!1;a=lsi["export"]("f_mini-fiches");var b=0,c;for(c in a)if(!isNaN(c)&&(b++,!a[c].valid))return Notification.warning("Attention","La fiche rapide "+b+" est incompl\u00e8te et/ou incorrecte"),!1;a=lsi["export"]("f_fiches"); -for(c in a)if(!a[c].valid)return Notification.warning("Attention","La fiche compl\u00e8te "+(parseInt(c)+1)+" est incompl\u00e8te et/ou incorrecte"),!1;c={path:"input/facebook",subject:lsi["export"]("f_subject")[0],contacts:lsi["export"]("f_contacts"),mini:lsi["export"]("f_mini-fiches"),fiches:lsi["export"]("f_fiches"),matrice:lsi["export"]("f_matrice")[0]};api.send(c,function(a){console.log(a);if(0!=a.ModuleError)return Notification.error("ERREUR",a.ModuleError),!1;Notification.success("OK", +function(a){console.log("> GATHERING ALL DATA");pContactManager.fieldsToStorage();pMiniManager.fieldsToStorage();pFicheManager.fieldsToStorage();if(!pSubjectManager.check())return Notification.warning("Attention","Vous devez saisir les informations du sujet"),!1;a=lsi["export"]("f_mini-fiches");var b=0,f;for(f in a)if(!isNaN(f)&&(b++,!a[f].valid))return Notification.warning("Attention","La fiche rapide "+b+" est incompl\u00e8te et/ou incorrecte"),!1;a=lsi["export"]("f_fiches"); +for(f in a)if(!a[f].valid)return Notification.warning("Attention","La fiche compl\u00e8te "+(parseInt(f)+1)+" est incompl\u00e8te et/ou incorrecte"),!1;f={path:"input/facebook",subject:lsi["export"]("f_subject")[0],contacts:lsi["export"]("f_contacts"),mini:lsi["export"]("f_mini-fiches"),fiches:lsi["export"]("f_fiches"),matrice:lsi["export"]("f_matrice")[0]};api.send(f,function(a){console.log(a);if(0!=a.ModuleError)return Notification.error("ERREUR",a.ModuleError),!1;Notification.success("OK", "L'identifiant du sujet est "+a.subject_id+" ! Tout s'est bien d\u00e9roul\u00e9.",1E4);console.log(a)},!1)},!1),console.groupEnd())};include("/js/includes/input-facebook-subject.js",function(){fLoaded[0]=1;facebookRoutine()});include("/js/includes/input-facebook-contact.js",function(){fLoaded[1]=1;facebookRoutine()});include("/js/includes/input-facebook-mini.js",function(){fLoaded[2]=1;facebookRoutine()});include("/js/includes/input-facebook-fiche.js",function(){fLoaded[3]=1;facebookRoutine()}); include("/js/includes/input-facebook-matrice.js",function(){fLoaded[4]=1;facebookRoutine()}); -var pDynamicUpdate=function(a){var b=a instanceof Element,c=b&&"INPUT"==a.tagName&&"submit"==a.type,g=b&&"SPAN"==a.tagName&&("p_nav-mini"==a.parentNode.id||"p_nav-fiche"==a.parentNode.id),b=b&&"SPAN"==a.tagName&&"p_nav-contact"==a.parentNode.id;if(!c&&!g&&!b&&!0!==a)return!1;console.groupEnd();console.groupEnd();console.group("[phone] Dynamic Update");pMiniManager.fieldsToStorage();pFicheManager.fieldsToStorage();pContactManager.fieldsToStorage();pMatriceManager.fieldsToStorage();pFicheManager.sync(); +var pDynamicUpdate=function(a){var b=a instanceof Element,f=b&&"INPUT"==a.tagName&&"submit"==a.type,e=b&&"SPAN"==a.tagName&&("p_nav-mini"==a.parentNode.id||"p_nav-fiche"==a.parentNode.id),b=b&&"SPAN"==a.tagName&&"p_nav-contact"==a.parentNode.id;if(!f&&!e&&!b&&!0!==a)return!1;console.groupEnd();console.groupEnd();console.group("[phone] Dynamic Update");pMiniManager.fieldsToStorage();pFicheManager.fieldsToStorage();pContactManager.fieldsToStorage();pMatriceManager.fieldsToStorage();pFicheManager.sync(); pMiniManager.sync();!0===a?api.send({path:"subject/getFriends",subject_id:pSubjectManager.subject_id.value},function(a){console.warn("xx",a);if(0!=a.ModuleError)return console.groupEnd(),!1;lsi["import"]("p_friends",a.subjects);pMiniManager.storageToFields();pFicheManager.storageToFields();pMatriceManager.storageToFields();pContactManager.storageToFields();pMiniManager.updateNavBar();pFicheManager.updateNavBar()}):(pMiniManager.storageToFields(),pFicheManager.storageToFields(),pMatriceManager.storageToFields(), -pMiniManager.updateNavBar(),pFicheManager.updateNavBar(),(c||b)&&pContactManager.storageToFields());console.groupEnd()},fDynamicUpdate=function(a){var b=a instanceof Element,c=b&&"INPUT"==a.tagName&&"submit"==a.type,g=b&&"SPAN"==a.tagName&&("f_nav-mini"==a.parentNode.id||"f_nav-fiche"==a.parentNode.id),b=b&&"SPAN"==a.tagName&&"f_nav-contact"==a.parentNode.id;if(!c&&!g&&!b&&!0!==a)return!1;console.groupEnd();console.groupEnd();console.group("[facebook] Dynamic Update");fMiniManager.fieldsToStorage(); +pMiniManager.updateNavBar(),pFicheManager.updateNavBar(),(f||b)&&pContactManager.storageToFields());console.groupEnd()},fDynamicUpdate=function(a){var b=a instanceof Element,f=b&&"INPUT"==a.tagName&&"submit"==a.type,e=b&&"SPAN"==a.tagName&&("f_nav-mini"==a.parentNode.id||"f_nav-fiche"==a.parentNode.id),b=b&&"SPAN"==a.tagName&&"f_nav-contact"==a.parentNode.id;if(!f&&!e&&!b&&!0!==a)return!1;console.groupEnd();console.groupEnd();console.group("[facebook] Dynamic Update");fMiniManager.fieldsToStorage(); fFicheManager.fieldsToStorage();fContactManager.fieldsToStorage();fMatriceManager.fieldsToStorage();fFicheManager.sync();fMiniManager.sync();!0===a?api.send({path:"subject/getFriends",subject_id:fSubjectManager.subject_id.value},function(a){if(0!=a.ModuleError)return console.groupEnd(),!1;lsi["import"]("f_friends",a.subjects);fMiniManager.storageToFields();fFicheManager.storageToFields();fMatriceManager.storageToFields();fContactManager.storageToFields()}):(fMiniManager.storageToFields(),fFicheManager.storageToFields(), -fMatriceManager.storageToFields(),(c||b)&&fContactManager.storageToFields());console.groupEnd()};function testContactsPhone(){for(var a=0;45>a;a++)0==a%20?lsi.set("p_contacts",a,{uid:a,username:"contact-x"}):lsi.set("p_contacts",a,{uid:a,username:"contact-"+a})} -function testRoutinePhone(a){var b=lsi["export"]("p_contacts"),c=lsi["export"]("p_mini-fiches"),g=lsi["export"]("p_fiches"),d=0;if(null!=a&&a)for(var f in c)isNaN(f)||(a="",null!=b[f]&&(a=b[f].username),c=$('#p_nav-mini [data-n="'+f+'"]'),c.click(),$("#unknown_min_p_"+f).checked=0==a.length,0==a.length?($("#sexeI_mini_p_"+f).checked=!0,$('input[data-name="uid"][value="'+f+'"] ~ h5 select[data-name="age"]').value=d%19,$('input[data-name="uid"][value="'+f+'"] ~ h5 select[data-name="studies"]').value= -0,$("#reltype9_mini_p_"+f).checked=!0):(a=["H","F"][Math.floor(d%2)],$("#sexe"+a+"_mini_p_"+f).checked=!0,$('input[data-name="uid"][value="'+f+'"] ~ h5 select[data-name="age"]').value=d%19,$('input[data-name="uid"][value="'+f+'"] ~ h5 select[data-name="studies"]').value=1+d%6,a=d%10,9==a?($("#reltype10_mini_p_"+f).checked=!0,$('input[data-name="uid"][value="'+f+'"] ~ h5 input[data-name="reltypeSpecial"]').value="autre"):$("#reltype"+a+"_mini_p_"+f).checked=!0,d++));for(var e in g)isNaN(e)||(c=$('#p_nav-fiche [data-n="'+ -e+'"]'),c.click(),a=["H","F","I"][Math.floor(d%3)],$("#sexe"+a+"_p_"+e).checked=!0,$('article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 select[data-name="age"]').value=d%19,b="10 21 22 23 31 32 36 41 46 47 48 51 54 55 56 61 66 69 71 72 73 74 75 76 81 82".split(" "),b=b[d%b.length],$('article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 select[data-name="job"]').value=b,b=(d%12).toString(),1==b.length&&(b="0"+b),$('article.fiche-relation > input[data-name="uid"][value="'+ -e+'"] ~ h5 select[data-name="studies"]').value=b,a=d%9,8==a?($("#reltype10_p_"+e).checked=!0,$('article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 input[data-name="reltypeSpecial"]').value="autre"):$("#reltype"+a+"_p_"+e).checked=!0,$('article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 input[data-name="city"]').value=(10+d).toString(),$('article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 input[data-name="cp"]').value=(1E4+d).toString(),$('article.fiche-relation > input[data-name="uid"][value="'+ -e+'"] ~ h5 input[data-name="quartier"]').value=d,$("#loc"+["A","B","C","D"][Math.floor(d%4)]+"_p_"+e).checked=!0,b=$$('article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 input[data-name="duration"]'),b[0].value=d.toString(),b[1].value=1+d.toString(),b=d%14,$("article.fiche-relation #contexte"+b+"_p_"+e).checked=!0,g=$$('article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 input[data-name="contextSpecial"]'),11==b&&(g[0].value="internet"),12==b&&(g[1].value="association"), -13==b&&(g[2].value="autre"),d++)}function testContactsFacebook(){for(var a=0;45>a;a++)0==a%20?lsi.set("f_contacts",a,{uid:a,username:"contact-x"}):lsi.set("f_contacts",a,{uid:a,username:"contact-"+a})} -function testRoutineFacebook(a){var b=lsi["export"]("f_contacts"),c=lsi["export"]("f_mini-fiches"),g=lsi["export"]("f_fiches"),d=0;if(null!=a&&a)for(var f in c)isNaN(f)||(a="",null!=b[f]&&(a=b[f].username),c=$('#f_nav-mini [data-n="'+f+'"]'),c.click(),$("#unknown_min_f_"+f).checked=0==a.length,0==a.length?($("#sexeI_mini_f_"+f).checked=!0,$('input[data-name="uid"][value="'+f+'"] ~ h5 select[data-name="age"]').value=d%19,$('input[data-name="uid"][value="'+f+'"] ~ h5 select[data-name="studies"]').value= -0,$("#reltype9_mini_f_"+f).checked=!0):(a=["H","F"][Math.floor(d%2)],$("#sexe"+a+"_mini_f_"+f).checked=!0,$('input[data-name="uid"][value="'+f+'"] ~ h5 select[data-name="age"]').value=d%19,$('input[data-name="uid"][value="'+f+'"] ~ h5 select[data-name="studies"]').value=1+d%6,a=d%10,9==a?($("#reltype10_mini_f_"+f).checked=!0,$('input[data-name="uid"][value="'+f+'"] ~ h5 input[data-name="reltypeSpecial"]').value="autre"):$("#reltype"+a+"_mini_f_"+f).checked=!0,d++));for(var e in g)isNaN(e)||(c=$('#f_nav-fiche [data-n="'+ -e+'"]'),c.click(),a=["H","F","I"][Math.floor(d%3)],$("#sexe"+a+"_f_"+e).checked=!0,$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 select[data-name="age"]').value=d%19,b="10 21 22 23 31 32 36 41 46 47 48 51 54 55 56 61 66 69 71 72 73 74 75 76 81 82".split(" "),b=b[d%b.length],$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 select[data-name="job"]').value=b,b=(d%12).toString(),1==b.length&& -(b="0"+b),$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 select[data-name="studies"]').value=b,a=d%9,8==a?($("#reltype10_f_"+e).checked=!0,$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 input[data-name="reltypeSpecial"]').value="autre"):$("#reltype"+a+"_f_"+e).checked=!0,$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 input[data-name="city"]').value= -(10+d).toString(),$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 input[data-name="cp"]').value=(1E4+d).toString(),$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 input[data-name="quartier"]').value=d,$("#loc"+["A","B","C","D"][Math.floor(d%4)]+"_f_"+e).checked=!0,b=$$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 input[data-name="duration"]'), -b[0].value=d.toString(),b[1].value=1+d.toString(),b=d%14,$('section[data-sublink="facebook"] article.fiche-relation #contexte'+b+"_f_"+e).checked=!0,g=$$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+e+'"] ~ h5 input[data-name="contextSpecial"]'),11==b&&(g[0].value="internet"),12==b&&(g[1].value="association"),13==b&&(g[2].value="autre"),d++)}; +fMatriceManager.storageToFields(),(f||b)&&fContactManager.storageToFields());console.groupEnd()};function testContactsPhone(){for(var a=0;45>a;a++)0==a%20?lsi.set("p_contacts",a,{uid:a,username:"contact-x"}):lsi.set("p_contacts",a,{uid:a,username:"contact-"+a})} +function testRoutinePhone(a){var b=lsi["export"]("p_contacts"),f=lsi["export"]("p_mini-fiches"),e=lsi["export"]("p_fiches"),c=0;if(null!=a&&a)for(var g in f)isNaN(g)||(a="",null!=b[g]&&(a=b[g].username),f=$('#p_nav-mini [data-n="'+g+'"]'),f.click(),$("#unknown_min_p_"+g).checked=0==a.length,0==a.length?($("#sexeI_mini_p_"+g).checked=!0,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="age"]').value=c%19,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="studies"]').value= +0,$("#reltype9_mini_p_"+g).checked=!0):(a=["H","F"][Math.floor(c%2)],$("#sexe"+a+"_mini_p_"+g).checked=!0,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="age"]').value=c%19,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="studies"]').value=1+c%6,a=c%10,9==a?($("#reltype10_mini_p_"+g).checked=!0,$('input[data-name="uid"][value="'+g+'"] ~ h5 input[data-name="reltypeSpecial"]').value="autre"):$("#reltype"+a+"_mini_p_"+g).checked=!0,c++));for(var d in e)if(!isNaN(d)){f= +$('#p_nav-fiche [data-n="'+d+'"]');f.click();a=["H","F","I"][Math.floor(c%3)];$("#sexe"+a+"_p_"+d).checked=!0;$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 select[data-name="age"]').value=c%19;b="10 21 22 23 31 32 36 41 46 47 48 51 54 55 56 61 66 69 71 72 73 74 75 76 81 82".split(" ");b=b[c%b.length];$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 select[data-name="job"]').value=b;b=(c%12).toString();1==b.length&&(b="0"+b);$('article.fiche-relation > input[data-name="uid"][value="'+ +d+'"] ~ h5 select[data-name="studies"]').value=b;a=c%8;7==a?($("#reltype10_p_"+d).checked=!0,$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="reltypeSpecial"]').value="autre"):$("#reltype"+a+"_p_"+d).checked=!0;$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="city"]').value=(10+c).toString();$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="cp"]').value=(1E4+c).toString();$('article.fiche-relation > input[data-name="uid"][value="'+ +d+'"] ~ h5 input[data-name="quartier"]').value=c;$("#loc"+["A","B","C","D"][Math.floor(c%4)]+"_p_"+d).checked=!0;b=["A","B","C","D"][Math.floor(c%4)];$("#famsit"+b+"_p_"+d).checked=!0;b=["A","B","C","D"][Math.floor(c%4)];$("#famsit"+b+"_p_"+d).checked=!0;$("#medsoc"+["A","B","C","D"][Math.floor(c%4)]+"_p_"+d).checked=!0;$("#medrel"+["A","B","C"][Math.floor(c%3)]+"_p_"+d).checked=!0;b=$$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="duration"]');b[0].value=c.toString(); +b[1].value=1+c.toString();b=c%14;$("article.fiche-relation #contexte"+b+"_p_"+d).checked=!0;e=$$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="contextSpecial"]');11==b&&(e[0].value="internet");12==b&&(e[1].value="association");13==b&&(e[2].value="autre");b=["0","1","2","3","4"];b=b[c%b.length];$('article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 select[data-name="interest"]').value=b;b=["0","1","2","3","4"];b=b[c%b.length];$('article.fiche-relation > input[data-name="uid"][value="'+ +d+'"] ~ h5 select[data-name="relmark"]').value=b;for(b=0;5>b;b++)e=1+5*b+Math.floor(c%4),10>e&&(e="0"+e),$("#freq"+e+"_p_"+d).checked=!0;for(b=0;5>b;b++)e=1+5*b+Math.floor(c%4),10>e&&(e="0"+e),$("#irlfreq"+e+"_p_"+d).checked=!0;for(b=1;7>b;b++)e=1+Math.floor(c%2),$("#connect"+b+""+e+"_p_"+d).checked=!0;c++}}function testContactsFacebook(){for(var a=0;45>a;a++)0==a%20?lsi.set("f_contacts",a,{uid:a,username:"contact-x"}):lsi.set("f_contacts",a,{uid:a,username:"contact-"+a})} +function testRoutineFacebook(a){var b=lsi["export"]("f_contacts"),f=lsi["export"]("f_mini-fiches"),e=lsi["export"]("f_fiches"),c=0;if(null!=a&&a)for(var g in f)isNaN(g)||(a="",null!=b[g]&&(a=b[g].username),f=$('#f_nav-mini [data-n="'+g+'"]'),f.click(),$("#unknown_min_f_"+g).checked=0==a.length,0==a.length?($("#sexeI_mini_f_"+g).checked=!0,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="age"]').value=c%19,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="studies"]').value= +0,$("#reltype9_mini_f_"+g).checked=!0):(a=["H","F"][Math.floor(c%2)],$("#sexe"+a+"_mini_f_"+g).checked=!0,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="age"]').value=c%19,$('input[data-name="uid"][value="'+g+'"] ~ h5 select[data-name="studies"]').value=1+c%6,a=c%10,9==a?($("#reltype10_mini_f_"+g).checked=!0,$('input[data-name="uid"][value="'+g+'"] ~ h5 input[data-name="reltypeSpecial"]').value="autre"):$("#reltype"+a+"_mini_f_"+g).checked=!0,c++));for(var d in e)isNaN(d)||(f=$('#f_nav-fiche [data-n="'+ +d+'"]'),f.click(),a=["H","F","I"][Math.floor(c%3)],$("#sexe"+a+"_f_"+d).checked=!0,$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 select[data-name="age"]').value=c%19,b="10 21 22 23 31 32 36 41 46 47 48 51 54 55 56 61 66 69 71 72 73 74 75 76 81 82".split(" "),b=b[c%b.length],$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 select[data-name="job"]').value=b,b=(c%12).toString(),1==b.length&& +(b="0"+b),$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 select[data-name="studies"]').value=b,a=c%9,8==a?($("#reltype10_f_"+d).checked=!0,$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="reltypeSpecial"]').value="autre"):$("#reltype"+a+"_f_"+d).checked=!0,$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="city"]').value= +(10+c).toString(),$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="cp"]').value=(1E4+c).toString(),$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="quartier"]').value=c,$("#loc"+["A","B","C","D"][Math.floor(c%4)]+"_f_"+d).checked=!0,b=$$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="duration"]'), +b[0].value=c.toString(),b[1].value=1+c.toString(),b=c%14,$('section[data-sublink="facebook"] article.fiche-relation #contexte'+b+"_f_"+d).checked=!0,e=$$('section[data-sublink="facebook"] article.fiche-relation > input[data-name="uid"][value="'+d+'"] ~ h5 input[data-name="contextSpecial"]'),11==b&&(e[0].value="internet"),12==b&&(e[1].value="association"),13==b&&(e[2].value="autre"),c++)};