Intégration dans le modèle 'facebook.mini'
This commit is contained in:
parent
bad062d570
commit
969f974031
|
@ -1,12 +1,12 @@
|
||||||
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:"2",age:".",studies:"0",loc:"0",reltype:"9",reltypeSpecial:"",timestamp:0,valid:!1}};
|
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:"2",age:".",studies:"0",loc:".",reltype:"9",unknown:!1,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<a.length;b++){var c=(new FormDeflater(a[b],["input","select"],["data-name"])).deflate(),d=crc32(JSON.stringify(c)),e=lsi.get("f_mini-fiches",c.uid);if(!1!==e){if(null!=e&&null!=e.hash&&e.hash==d)break;console.warn("> MINI UPDATE");c={uid:parseInt(c.uid),sexe:c.sexe,age:c.age,studies:c.studies,reltype:c.reltype,
|
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<a.length;b++){var c=(new FormDeflater(a[b],["input","select"],["data-name"])).deflate(),d=crc32(JSON.stringify(c)),e=lsi.get("f_mini-fiches",c.uid);if(!1!==e){if(null!=e&&null!=e.hash&&e.hash==d)break;console.warn("> 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:d};c.valid=this.check(c);0<diff(e,c,["hash","valid","timestamp"]).length&&(console.log(diff(e,c,["hash","valid","timestamp"])),console.warn("> FICHE UPDATE"),c.timestamp=Date.now());lsi.set("f_mini-fiches",c.uid,c)}}};
|
reltypeSpecial:c.reltypeSpecial,loc:c.loc,unknown:null!=c.unknown,hash:d};c.valid=this.check(c);0<diff(e,c,["hash","valid","timestamp"]).length&&(console.log(diff(e,c,["hash","valid","timestamp"])),console.warn("> 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;
|
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;a.unknown=null!=a.unknown?a.unknown:this.defaultData.unknown;
|
||||||
this.container.innerHTML+=fMiniFicheBuilder.build({name:b.username,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="'+
|
var b=lsi.get("f_contacts",a.uid);if(!1===b)return!1;this.container.innerHTML+=fMiniFicheBuilder.build({name:b.username,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.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;b<c.length;b++)c[b].value==a.sexe?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="facebook"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="reltype"]');for(b=0;b<c.length;b++)c[b].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;b<c.length;b++)c[b].value==a.sexe?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="facebook"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="reltype"]');
|
||||||
a.reltype?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="facebook"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="loc"]');for(b=0;b<c.length;b++)c[b].value==a.loc?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked")};
|
for(b=0;b<c.length;b++)c[b].value==a.reltype?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");c=$$('[data-sublink="facebook"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="loc"]');for(b=0;b<c.length;b++)c[b].value==a.loc?c[b].setAttribute("checked","checked"):c[b].removeAttribute("checked");b=$('[data-sublink="facebook"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="checkbox"][data-name="unknown"]');
|
||||||
inputFacebookMini.prototype.storageToFields=function(){console.log("MINI FICHE: STORAGE TO FIELDS");var a=lsi.get("f_mini-fiches",this.selected);if(null==a)return this.updateNavBar(),!1;this.container.innerHTML="";this.add(a);this.updateNavBar()};
|
null!=b&&a.unknown&&b.setAttribute("checked","checked")};inputFacebookMini.prototype.storageToFields=function(){console.log("MINI FICHE: STORAGE TO FIELDS");var a=lsi.get("f_mini-fiches",this.selected);if(null==a)return this.updateNavBar(),!1;this.container.innerHTML="";this.add(a);this.updateNavBar()};
|
||||||
inputFacebookMini.prototype.sync=function(){console.log("MINI FICHE: SYNC");var a=lsi["export"]("f_contacts"),b=lsi["export"]("f_fiches"),c=[],d;for(d in b)-1==c.indexOf(b[d].contact)&&c.push(b[d].contact);for(var e in a)-1<c.indexOf(parseInt(e))?lsi.del("f_mini-fiches",e):(b=0==a[e].username.length?e.toString()+"-":e,d=lsi.get("f_mini-fiches",b),null==d&&(d=this.defaultData,d.valid=!1,isNaN(b)&&(d.reltype="9")),d.uid=parseInt(e),lsi.set("f_mini-fiches",b,d));d=lsi["export"]("f_mini-fiches");if(null==
|
inputFacebookMini.prototype.sync=function(){console.log("MINI FICHE: SYNC");var a=lsi["export"]("f_contacts"),b=lsi["export"]("f_fiches"),c=[],d;for(d in b)-1==c.indexOf(b[d].contact)&&c.push(b[d].contact);for(var e in a)-1<c.indexOf(parseInt(e))?lsi.del("f_mini-fiches",e):(b=0==a[e].username.length?e.toString()+"-":e,d=lsi.get("f_mini-fiches",b),null==d&&(d=this.defaultData,d.valid=!1,isNaN(b)&&(d.reltype="9")),d.uid=parseInt(e),lsi.set("f_mini-fiches",b,d));d=lsi["export"]("f_mini-fiches");if(null==
|
||||||
d[this.selected])for(e in d)if(!isNaN(e)){this.selected=parseInt(e);break}};inputFacebookMini.prototype.nav=function(a){if(null==a||!1===a.getData("n")||isNaN(a.getData("n"))||"f_nav-mini"!=a.parentNode.id)return!1;for(var b=$$('[data-sublink="facebook"] #f_nav-mini > span.active'),c=0;c<b.length;c++)b[c].remClass("active");a.addClass("active");this.selected=parseInt(a.getData("n"))};
|
d[this.selected])for(e in d)if(!isNaN(e)){this.selected=parseInt(e);break}};inputFacebookMini.prototype.nav=function(a){if(null==a||!1===a.getData("n")||isNaN(a.getData("n"))||"f_nav-mini"!=a.parentNode.id)return!1;for(var b=$$('[data-sublink="facebook"] #f_nav-mini > span.active'),c=0;c<b.length;c++)b[c].remClass("active");a.addClass("active");this.selected=parseInt(a.getData("n"))};
|
||||||
inputFacebookMini.prototype.updateNavBar=function(){var a=lsi["export"]("f_mini-fiches");this.nav_container.innerHTML="";var b=0,c;for(c in a)isNaN(c)||(this.nav_container.innerHTML+='<span data-n="'+c+'">'+ ++b+"</span>");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.updateNavBar=function(){var a=lsi["export"]("f_mini-fiches");this.nav_container.innerHTML="";var b=0,c;for(c in a)isNaN(c)||(this.nav_container.innerHTML+='<span data-n="'+c+'">'+ ++b+"</span>");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)};
|
inputFacebookMini.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};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)};
|
||||||
|
|
|
@ -16,8 +16,9 @@ inputFacebookMini.prototype = {
|
||||||
sexe: '2',
|
sexe: '2',
|
||||||
age: '.',
|
age: '.',
|
||||||
studies: '0',
|
studies: '0',
|
||||||
loc: '0',
|
loc: '.',
|
||||||
reltype: '9',
|
reltype: '9',
|
||||||
|
unknown: false,
|
||||||
reltypeSpecial: '',
|
reltypeSpecial: '',
|
||||||
timestamp: 0,
|
timestamp: 0,
|
||||||
valid: false
|
valid: false
|
||||||
|
@ -69,6 +70,7 @@ inputFacebookMini.prototype.fieldsToStorage = function(){
|
||||||
reltype: deflated.reltype, // [0] ...
|
reltype: deflated.reltype, // [0] ...
|
||||||
reltypeSpecial: deflated.reltypeSpecial,
|
reltypeSpecial: deflated.reltypeSpecial,
|
||||||
loc: deflated.loc, // [0] Choix 1 -> [3] Choix 4
|
loc: deflated.loc, // [0] Choix 1 -> [3] Choix 4
|
||||||
|
unknown: deflated.unknown != null,
|
||||||
hash: deflatedHash
|
hash: deflatedHash
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,6 +120,7 @@ inputFacebookMini.prototype.add = function(objectData){
|
||||||
objectData.reltype = (objectData.reltype != null) ? objectData.reltype : this.defaultData.reltype;
|
objectData.reltype = (objectData.reltype != null) ? objectData.reltype : this.defaultData.reltype;
|
||||||
objectData.reltypeSpecial = (objectData.reltypeSpecial != null) ? objectData.reltypeSpecial : this.defaultData.reltypeSpecial;
|
objectData.reltypeSpecial = (objectData.reltypeSpecial != null) ? objectData.reltypeSpecial : this.defaultData.reltypeSpecial;
|
||||||
objectData.loc = (objectData.loc != null) ? objectData.loc : this.defaultData.loc;
|
objectData.loc = (objectData.loc != null) ? objectData.loc : this.defaultData.loc;
|
||||||
|
objectData.unknown = (objectData.unknown != null) ? objectData.unknown : this.defaultData.unknown;
|
||||||
|
|
||||||
|
|
||||||
// {1} On récupère username/firstname/lastname du contact associé //
|
// {1} On récupère username/firstname/lastname du contact associé //
|
||||||
|
@ -166,6 +169,11 @@ inputFacebookMini.prototype.add = function(objectData){
|
||||||
if( locCreated[i].value == objectData.loc ) locCreated[i].setAttribute('checked', 'checked');
|
if( locCreated[i].value == objectData.loc ) locCreated[i].setAttribute('checked', 'checked');
|
||||||
else locCreated[i].removeAttribute('checked');
|
else locCreated[i].removeAttribute('checked');
|
||||||
|
|
||||||
|
/* (8) On coche ou non 'unknonw' */
|
||||||
|
var unknownCreated = $('[data-sublink="facebook"] article.mini-fiche-relation input[data-name="uid"][value="'+objectData.uid+'"] ~ h5>input[type="checkbox"][data-name="unknown"]');
|
||||||
|
if( unknownCreated != null && objectData.unknown )
|
||||||
|
unknownCreated.setAttribute('checked', 'checked');
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -368,6 +376,10 @@ inputFacebookMini.prototype.updateNavBar = function(){
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
inputFacebookMini.prototype.check = function(miniData){
|
inputFacebookMini.prototype.check = function(miniData){
|
||||||
|
|
||||||
|
// 0. Si inconnu coché, on valide
|
||||||
|
if( miniData.unknown )
|
||||||
|
return true;
|
||||||
|
|
||||||
// 1. Le sexe est défini
|
// 1. Le sexe est défini
|
||||||
if( miniData.sexe == '' )
|
if( miniData.sexe == '' )
|
||||||
return false;
|
return false;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -40,6 +40,10 @@ fMiniFicheBuilder.setLayout(
|
||||||
"\t<span data-space></span>\n"+
|
"\t<span data-space></span>\n"+
|
||||||
"\t<h4 data-icon='a' class='color2'>@name</h4>\n"+
|
"\t<h4 data-icon='a' class='color2'>@name</h4>\n"+
|
||||||
|
|
||||||
|
"\t<h5 class='nobold color0'>"+
|
||||||
|
"\t\t<input type='checkbox' data-name='unknown' id='unknown_min_f_@uid' value='1'><label for='unknown_min_f_@uid'>Contact inconnu</label>"+
|
||||||
|
"\t</h5>"+
|
||||||
|
|
||||||
"\t<h5 class='nobold color0'>\n"+
|
"\t<h5 class='nobold color0'>\n"+
|
||||||
"\t\t<input type='radio' name='sexe_mini_f_@uid' data-name='sexe' id='sexeH_mini_f_@uid' value='0'><label for='sexeH_mini_f_@uid'>Homme</label>\n"+
|
"\t\t<input type='radio' name='sexe_mini_f_@uid' data-name='sexe' id='sexeH_mini_f_@uid' value='0'><label for='sexeH_mini_f_@uid'>Homme</label>\n"+
|
||||||
"\t\t <input type='radio' name='sexe_mini_f_@uid' data-name='sexe' id='sexeF_mini_f_@uid' value='1'><label for='sexeF_mini_f_@uid'>Femme</label>\n"+
|
"\t\t <input type='radio' name='sexe_mini_f_@uid' data-name='sexe' id='sexeF_mini_f_@uid' value='1'><label for='sexeF_mini_f_@uid'>Femme</label>\n"+
|
||||||
|
@ -106,6 +110,7 @@ fMiniFicheBuilder.setLayout(
|
||||||
"\t<h4 data-icon='m'>Où habite t-elle/il ?</h4>\n"+
|
"\t<h4 data-icon='m'>Où habite t-elle/il ?</h4>\n"+
|
||||||
"\t<h5 class='nobold color0'>\n"+
|
"\t<h5 class='nobold color0'>\n"+
|
||||||
"\t\tÀ combien de temps est-ce de chez vous ?<br>\n"+
|
"\t\tÀ combien de temps est-ce de chez vous ?<br>\n"+
|
||||||
|
"\t\t <input type='radio' name='loc_mini_f_@uid' data-name='loc' id='locX_mini_f_@uid' value='.'><label for='locX_mini_f_@uid'>Je ne sais pas</label><br>\n"+
|
||||||
"\t\t <input type='radio' name='loc_mini_f_@uid' data-name='loc' id='locA_mini_f_@uid' value='0'><label for='locA_mini_f_@uid'>- de 5 minutes</label><br>\n"+
|
"\t\t <input type='radio' name='loc_mini_f_@uid' data-name='loc' id='locA_mini_f_@uid' value='0'><label for='locA_mini_f_@uid'>- de 5 minutes</label><br>\n"+
|
||||||
"\t\t <input type='radio' name='loc_mini_f_@uid' data-name='loc' id='locB_mini_f_@uid' value='1'><label for='locB_mini_f_@uid'>de 5 à 15 minutes</label><br>\n"+
|
"\t\t <input type='radio' name='loc_mini_f_@uid' data-name='loc' id='locB_mini_f_@uid' value='1'><label for='locB_mini_f_@uid'>de 5 à 15 minutes</label><br>\n"+
|
||||||
"\t\t <input type='radio' name='loc_mini_f_@uid' data-name='loc' id='locC_mini_f_@uid' value='2'><label for='locC_mini_f_@uid'>de 15 à 60 minutes</label><br>\n"+
|
"\t\t <input type='radio' name='loc_mini_f_@uid' data-name='loc' id='locC_mini_f_@uid' value='2'><label for='locC_mini_f_@uid'>de 15 à 60 minutes</label><br>\n"+
|
||||||
|
|
|
@ -9,4 +9,4 @@ null!=b&&a.unknown&&b.setAttribute("checked","checked")};inputPhoneMini.prototyp
|
||||||
inputPhoneMini.prototype.sync=function(){console.log("MINI FICHE: SYNC");var a=lsi["export"]("p_contacts"),b=lsi["export"]("p_fiches"),c=[],d;for(d in b)-1==c.indexOf(b[d].contact)&&c.push(b[d].contact);for(var e in a)-1<c.indexOf(parseInt(e))?lsi.del("p_mini-fiches",e):(b=0==a[e].username.length?e.toString()+"-":e,d=lsi.get("p_mini-fiches",b),null==d&&(d=this.defaultData,d.valid=!1,isNaN(b)&&(d.reltype="9")),d.uid=parseInt(e),lsi.set("p_mini-fiches",b,d));d=lsi["export"]("p_mini-fiches");if(null==
|
inputPhoneMini.prototype.sync=function(){console.log("MINI FICHE: SYNC");var a=lsi["export"]("p_contacts"),b=lsi["export"]("p_fiches"),c=[],d;for(d in b)-1==c.indexOf(b[d].contact)&&c.push(b[d].contact);for(var e in a)-1<c.indexOf(parseInt(e))?lsi.del("p_mini-fiches",e):(b=0==a[e].username.length?e.toString()+"-":e,d=lsi.get("p_mini-fiches",b),null==d&&(d=this.defaultData,d.valid=!1,isNaN(b)&&(d.reltype="9")),d.uid=parseInt(e),lsi.set("p_mini-fiches",b,d));d=lsi["export"]("p_mini-fiches");if(null==
|
||||||
d[this.selected])for(e in d)if(!isNaN(e)){this.selected=parseInt(e);break}};inputPhoneMini.prototype.nav=function(a){if(null==a||!1===a.getData("n")||isNaN(a.getData("n"))||"p_nav-mini"!=a.parentNode.id)return!1;for(var b=$$('[data-sublink="phone"] #p_nav-mini > span.active'),c=0;c<b.length;c++)b[c].remClass("active");a.addClass("active");this.selected=parseInt(a.getData("n"))};
|
d[this.selected])for(e in d)if(!isNaN(e)){this.selected=parseInt(e);break}};inputPhoneMini.prototype.nav=function(a){if(null==a||!1===a.getData("n")||isNaN(a.getData("n"))||"p_nav-mini"!=a.parentNode.id)return!1;for(var b=$$('[data-sublink="phone"] #p_nav-mini > span.active'),c=0;c<b.length;c++)b[c].remClass("active");a.addClass("active");this.selected=parseInt(a.getData("n"))};
|
||||||
inputPhoneMini.prototype.updateNavBar=function(){var a=lsi["export"]("p_mini-fiches");this.nav_container.innerHTML="";var b=0,c;for(c in a)isNaN(c)||(this.nav_container.innerHTML+='<span data-n="'+c+'">'+ ++b+"</span>");for(c in a)isNaN(c)||(b=$('[data-sublink="phone"] #p_nav-mini [data-n="'+a[c].uid+'"]'),null!=b&&(!0===a[c].valid?b.addClass("done"):b.remClass("done")));this.nav($('[data-sublink="phone"] #p_nav-mini [data-n="'+this.selected+'"]'))};
|
inputPhoneMini.prototype.updateNavBar=function(){var a=lsi["export"]("p_mini-fiches");this.nav_container.innerHTML="";var b=0,c;for(c in a)isNaN(c)||(this.nav_container.innerHTML+='<span data-n="'+c+'">'+ ++b+"</span>");for(c in a)isNaN(c)||(b=$('[data-sublink="phone"] #p_nav-mini [data-n="'+a[c].uid+'"]'),null!=b&&(!0===a[c].valid?b.addClass("done"):b.remClass("done")));this.nav($('[data-sublink="phone"] #p_nav-mini [data-n="'+this.selected+'"]'))};
|
||||||
inputPhoneMini.prototype.check=function(a){console.log(a.unknown);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.log("MINI FICHE: ATTACH");lsi.createDataset("p_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)};
|
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.log("MINI FICHE: ATTACH");lsi.createDataset("p_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)};
|
||||||
|
|
|
@ -378,7 +378,6 @@ inputPhoneMini.prototype.updateNavBar = function(){
|
||||||
inputPhoneMini.prototype.check = function(miniData){
|
inputPhoneMini.prototype.check = function(miniData){
|
||||||
|
|
||||||
// 0. Si inconnu coché, on valide
|
// 0. Si inconnu coché, on valide
|
||||||
console.log( miniData.unknown );
|
|
||||||
if( miniData.unknown )
|
if( miniData.unknown )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue