Creation feature

This commit is contained in:
xdrm-brackets 2016-10-14 11:38:46 +02:00
parent af08363c17
commit d253a7fb3c
4 changed files with 2 additions and 42 deletions

View File

@ -116,13 +116,6 @@ inputPhoneFiche.prototype.fieldsToStorage = function(){
};
/* [3] Gestion de l'ajout physique d'une nouvelle fiche
=========================================================*/
/*
@ -310,14 +303,6 @@ inputPhoneFiche.prototype.add = function(objectData){
};
/* [4] Gestion de l'affichage depuis le 'localStorage'
=========================================================*/
inputPhoneFiche.prototype.storageToFields = function(){
@ -342,15 +327,6 @@ inputPhoneFiche.prototype.storageToFields = function(){
};
/* [5] Synchronisation des CONTACT vers les MINI fiches
=========================================================*/
inputPhoneFiche.prototype.sync = function(){
@ -463,11 +439,6 @@ inputPhoneFiche.prototype.sync = function(){
};
/* [6] Gestion de la navigation entre les fiches
=========================================================*/
inputPhoneFiche.prototype.nav = function(element){
@ -490,11 +461,6 @@ inputPhoneFiche.prototype.nav = function(element){
};
/* [7] Mise à jour de la navigation
=========================================================*/
inputPhoneFiche.prototype.updateNavBar = function(){
@ -550,8 +516,6 @@ inputPhoneFiche.prototype.updateNavBar = function(){
};
/* [8] Vérification des données du formulaire
=========================================================*/
inputPhoneFiche.prototype.check = function(ficheData){
@ -629,9 +593,6 @@ inputPhoneFiche.prototype.check = function(ficheData){
};
/* [9] Point d'amorçage de la gestion des contacts
=========================================================*/
inputPhoneFiche.prototype.attach = function(handler){

View File

@ -302,7 +302,6 @@ inputPhoneMini.prototype.sync = function(){
/* (3) Pour chaque CONTACT restant, on met à jour/crée la MINI fiche associée */
for( var key in contactData ){
/* (4) Si le contact n'a aucun nominatif, on met inconnu par défaut, mais on ne l'affiche pas */
var noName = contactData[key].username.length == 0;

View File

@ -6,7 +6,7 @@ a.uid);if(!1===c)return!1;if(!isNaN(c.existing)){var b=lsi.get("p_friends",c.exi
a.uid+'"] ~ h5>span>select[data-name="studies"]>option[value="'+a.studies+'"]');null!=c&&c.setAttribute("selected","selected");c=$('[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!=c&&c.setAttribute("selected","selected");b=$$('[data-sublink="phone"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="sexe"]');for(c=0;c<b.length;c++)b[c].value==
a.sexe?b[c].setAttribute("checked","checked"):b[c].removeAttribute("checked");b=$$('[data-sublink="phone"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="reltype"]');for(c=0;c<b.length;c++)b[c].value==a.reltype?b[c].setAttribute("checked","checked"):b[c].removeAttribute("checked");b=$$('[data-sublink="phone"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="radio"][data-name="loc"]');for(c=0;c<b.length;c++)b[c].value==
a.loc?b[c].setAttribute("checked","checked"):b[c].removeAttribute("checked");c=$('[data-sublink="phone"] article.mini-fiche-relation input[data-name="uid"][value="'+a.uid+'"] ~ h5>input[type="checkbox"][data-name="unknown"]');null!=c&&a.unknown&&c.setAttribute("checked","checked")};
inputPhoneMini.prototype.storageToFields=function(){console.group("[phone.mini] storage to fields");console.warn(this.selected);var a=lsi.get("p_mini-fiches",this.selected);if(null===a){if(null===this.selected)return a=lsi.keys("p_mini-fiches"),0<a.length?(this.selected=a[0],this.storageToFields()):!1;this.updateNavBar();return!1}this.container.innerHTML="";this.add(a);this.updateNavBar();console.groupEnd()};
inputPhoneMini.prototype.storageToFields=function(){console.group("[phone.mini] storage to fields");var a=lsi.get("p_mini-fiches",this.selected);if(null===a){if(null===this.selected)return a=lsi.keys("p_mini-fiches"),0<a.length?(this.selected=a[0],this.storageToFields()):!1;this.updateNavBar();return!1}this.container.innerHTML="";this.add(a);this.updateNavBar();console.groupEnd()};
inputPhoneMini.prototype.sync=function(){console.group("[phone.mini] synchronisation");var a=lsi["export"]("p_contacts"),c;ficheIndexes=lsi.keys("p_fiches");for(c in ficheIndexes)delete a[ficheIndexes[c]];for(var b in a){var e=0==a[b].username.length?b.toString()+"-":b;c=lsi.get("p_mini-fiches",e);null==c&&(c=this.defaultData,c.contact=a[b].uid,c.valid=!1);c.uid=parseInt(b);lsi.set("p_mini-fiches",e,c)}c=lsi["export"]("p_mini-fiches");if(null==c[this.selected])for(b in c)if(!isNaN(b)){this.selected=
parseInt(b);break}console.groupEnd()};inputPhoneMini.prototype.nav=function(a){if(!(a instanceof Element&&a.getData("n"))||isNaN(a.getData("n"))||"p_nav-mini"!=a.parentNode.id)return!1;for(var c=$$('[data-sublink="phone"] #p_nav-mini > span.active'),b=0;b<c.length;b++)c[b].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 c=0,b;for(b in a)isNaN(b)||(this.nav_container.innerHTML+='<span data-n="'+b+'">'+ ++c+"</span>");for(b in a)isNaN(b)||(c=$('[data-sublink="phone"] #p_nav-mini [data-n="'+a[b].uid+'"]'),null!=c&&(!0===a[b].valid?c.addClass("done"):c.remClass("done")));this.nav($('[data-sublink="phone"] #p_nav-mini [data-n="'+this.selected+'"]'))};

View File

@ -145,7 +145,7 @@ if( $getAllR->error == ManagerError::Success )
<!-- MATRICE RELATIONNELLE DES 2 TOP 10 -->
<h3 data-n='5' class='color4'>Saisir les matrices des relations entre les contacts les plus contactés</h3>
<h3 data-n='5' class='color4'>Saisir la matrices des relations entre les contacts les plus contactés</h3>
<!-- NAVIGATION ENTRE LES FICHES -->
<article class='matrice-panel' id='snake'></article>