Gestion du choix de l'identifiant du sujet au début des questionnaires 'input/phone' et 'input/facebook':

This commit is contained in:
xdrm-brackets 2016-05-26 16:47:15 +02:00
parent f5d1d7a7e6
commit c1a7e16cf4
9 changed files with 7585 additions and 901 deletions

View File

@ -1,2 +1,2 @@
function inputFacebookSubject(a,b){this.username=a;this.store_button=b}inputFacebookSubject.prototype={store_button:this.store_button,username:this.username};inputFacebookSubject.prototype.check=function(){return 0<this.username.value.length};inputFacebookSubject.prototype.fieldsToStorage=function(){console.log("SUBJECT: FIELDS TO STORAGE");if(!this.check())return!1;lsi.set("f_subject",0,{username:this.username.value})}; function inputFacebookSubject(a,b){this.subject_id=a;this.store_button=b}inputFacebookSubject.prototype={store_button:this.store_button,subject_id:this.subject_id};inputFacebookSubject.prototype.check=function(){return 0<this.subject_id.value.length&&!isNaN(this.subject_id.value)};inputFacebookSubject.prototype.fieldsToStorage=function(){console.log("SUBJECT: FIELDS TO STORAGE");if(!this.check())return!1;lsi.set("f_subject",0,{subject_id:this.subject_id.value})};
inputFacebookSubject.prototype.storageToFields=function(){console.log("SUBJECT: STORAGE TO FIELDS");var a=lsi.get("f_subject",0);null==a&&(a={username:""});this.username.value=a.username};inputFacebookSubject.prototype.attach=function(){function a(a){b.fieldsToStorage()&&b.storageToFields()}console.log("SUBJECT: ATTACH");lsi.createDataset("f_subject");var b=this;this.store_button.addEventListener("click",a,!1);this.username.addEventListener("blur",a,!1);this.storageToFields()}; inputFacebookSubject.prototype.storageToFields=function(){console.log("SUBJECT: STORAGE TO FIELDS");var a=lsi.get("f_subject",0);null==a&&(a={subject_id:""});this.subject_id.value=a.subject_id};inputFacebookSubject.prototype.attach=function(){function a(a){b.fieldsToStorage()&&b.storageToFields()}console.log("SUBJECT: ATTACH");lsi.createDataset("f_subject");var b=this;this.store_button.addEventListener("click",a,!1);this.subject_id.addEventListener("blur",a,!1);this.storageToFields()};

View File

@ -1,7 +1,7 @@
/* [0] Constructeur -> définit le conteneur et le bouton d'ajout /* [0] Constructeur -> définit le conteneur et le bouton d'ajout
=========================================================*/ =========================================================*/
function inputFacebookSubject(iUsername, store_button){ function inputFacebookSubject(iSubjectId, store_button){
this.username = iUsername; this.subject_id = iSubjectId;
this.store_button = store_button; this.store_button = store_button;
} }
@ -10,7 +10,7 @@ function inputFacebookSubject(iUsername, store_button){
=========================================================*/ =========================================================*/
inputFacebookSubject.prototype = { inputFacebookSubject.prototype = {
store_button: this.store_button, // Bouton d'ajout d'un formulaire store_button: this.store_button, // Bouton d'ajout d'un formulaire
username: this.username subject_id: this.subject_id
}; };
@ -18,7 +18,7 @@ inputFacebookSubject.prototype = {
=========================================================*/ =========================================================*/
inputFacebookSubject.prototype.check = function(){ inputFacebookSubject.prototype.check = function(){
// On renvoie la validité du formulaire // On renvoie la validité du formulaire
return this.username.value.length > 0; return this.subject_id.value.length > 0 && !isNaN(this.subject_id.value);
}; };
/* [3] Gestion de l'enregistrement des formulaires de contact /* [3] Gestion de l'enregistrement des formulaires de contact
@ -31,7 +31,7 @@ inputFacebookSubject.prototype.fieldsToStorage = function(){
// {2} On récupère et met en forme les valeurs du deflater // // {2} On récupère et met en forme les valeurs du deflater //
var obj = { var obj = {
username: this.username.value subject_id: this.subject_id.value
}; };
// {3} On enregistre les données dans le 'localStorage' // // {3} On enregistre les données dans le 'localStorage' //
@ -53,10 +53,10 @@ inputFacebookSubject.prototype.storageToFields = function(){
var subjectData = lsi.get('f_subject', 0); var subjectData = lsi.get('f_subject', 0);
if( subjectData == null ) if( subjectData == null )
subjectData = { username: '' }; subjectData = { subject_id: '' };
// {2} On restore les valeurs // // {2} On restore les valeurs //
this.username.value = subjectData.username; this.subject_id.value = subjectData.subject_id;
}; };
@ -79,7 +79,7 @@ inputFacebookSubject.prototype.attach = function(){
this.store_button.addEventListener('click', fts, false); this.store_button.addEventListener('click', fts, false);
/* (3) On attache un évènement de 'blur' sur chaque '<input type="text">' */ /* (3) On attache un évènement de 'blur' sur chaque '<input type="text">' */
this.username.addEventListener( 'blur', fts, false); this.subject_id.addEventListener( 'blur', fts, false);
/* (4) On charge le sujet depuis la mémoire ('localStorage') */ /* (4) On charge le sujet depuis la mémoire ('localStorage') */
this.storageToFields(); this.storageToFields();

View File

@ -1,3 +1,3 @@
function inputPhoneSubject(a,b,c,d){this.tmp_id=a;this.number=b;this.username=c;this.store_button=d}inputPhoneSubject.prototype={store_button:this.store_button,tmp_id:this.tmp_id,number:this.number,username:this.username};inputPhoneSubject.prototype.check=function(){return 0<this.number.value.length&&0<this.username.value.length}; function inputPhoneSubject(a,b,c,d){this.tmp_id=a;this.number=c;this.subject_id=b;this.store_button=d}inputPhoneSubject.prototype={store_button:this.store_button,tmp_id:this.tmp_id,number:this.number,subject_id:this.subject_id};inputPhoneSubject.prototype.check=function(){return 0<this.number.value.length&&0<this.subject_id.value.length&&!isNaN(this.subject_id.value)};
inputPhoneSubject.prototype.fieldsToStorage=function(){console.log("SUBJECT: FIELDS TO STORAGE");if(!this.check())return!1;lsi.set("p_subject",0,{tmp_id:this.tmp_id.value,number:this.number.value,username:this.username.value})};inputPhoneSubject.prototype.storageToFields=function(){console.log("SUBJECT: STORAGE TO FIELDS");var a=lsi.get("p_subject",0);null==a&&(a={tmp_id:"",number:"",username:""});this.tmp_id.value=a.tmp_id;this.number.value=a.number;this.username.value=a.username}; inputPhoneSubject.prototype.fieldsToStorage=function(){console.log("SUBJECT: FIELDS TO STORAGE");if(!this.check())return!1;lsi.set("p_subject",0,{tmp_id:this.tmp_id.value,number:this.number.value,subject_id:this.subject_id.value})};inputPhoneSubject.prototype.storageToFields=function(){console.log("SUBJECT: STORAGE TO FIELDS");var a=lsi.get("p_subject",0);null==a&&(a={tmp_id:"",number:"",subject_id:""});this.tmp_id.value=a.tmp_id;this.number.value=a.number;this.subject_id.value=a.subject_id};
inputPhoneSubject.prototype.attach=function(){function a(a){b.fieldsToStorage()&&b.storageToFields()}console.log("SUBJECT: ATTACH");lsi.createDataset("p_subject");var b=this;this.store_button.addEventListener("click",a,!1);this.number.addEventListener("blur",a,!1);this.username.addEventListener("blur",a,!1);this.storageToFields()}; inputPhoneSubject.prototype.attach=function(){function a(a){b.fieldsToStorage()&&b.storageToFields()}console.log("SUBJECT: ATTACH");lsi.createDataset("p_subject");var b=this;this.store_button.addEventListener("click",a,!1);this.number.addEventListener("blur",a,!1);this.subject_id.addEventListener("blur",a,!1);this.storageToFields()};

View File

@ -1,9 +1,9 @@
/* [0] Constructeur -> définit le conteneur et le bouton d'ajout /* [0] Constructeur -> définit le conteneur et le bouton d'ajout
=========================================================*/ =========================================================*/
function inputPhoneSubject(iTmpId, iNumber, iUsername, store_button){ function inputPhoneSubject(iTmpId, iSubjectId, iNumber, store_button){
this.tmp_id = iTmpId; this.tmp_id = iTmpId;
this.number = iNumber; this.number = iNumber;
this.username = iUsername; this.subject_id = iSubjectId;
this.store_button = store_button; this.store_button = store_button;
} }
@ -14,7 +14,7 @@ inputPhoneSubject.prototype = {
store_button: this.store_button, // Bouton d'ajout d'un formulaire store_button: this.store_button, // Bouton d'ajout d'un formulaire
tmp_id: this.tmp_id, tmp_id: this.tmp_id,
number: this.number, number: this.number,
username: this.username subject_id: this.subject_id
}; };
@ -22,7 +22,7 @@ inputPhoneSubject.prototype = {
=========================================================*/ =========================================================*/
inputPhoneSubject.prototype.check = function(){ inputPhoneSubject.prototype.check = function(){
/* (1) Le numéro n'est pas vide */ /* (1) Le numéro n'est pas vide */
return this.number.value.length > 0 && this.username.value.length> 0; return this.number.value.length > 0 && this.subject_id.value.length > 0 && !isNaN(this.subject_id.value);
}; };
/* [3] Gestion de l'enregistrement des formulaires de contact /* [3] Gestion de l'enregistrement des formulaires de contact
@ -35,9 +35,9 @@ inputPhoneSubject.prototype.fieldsToStorage = function(){
// {2} On récupère et met en forme les valeurs du deflater // // {2} On récupère et met en forme les valeurs du deflater //
var obj = { var obj = {
tmp_id: this.tmp_id.value, tmp_id: this.tmp_id.value,
number: this.number.value, number: this.number.value,
username: this.username.value subject_id: this.subject_id.value
}; };
// {3} On enregistre les données dans le 'localStorage' // // {3} On enregistre les données dans le 'localStorage' //
@ -59,12 +59,12 @@ inputPhoneSubject.prototype.storageToFields = function(){
var subjectData = lsi.get('p_subject', 0); var subjectData = lsi.get('p_subject', 0);
if( subjectData == null ) if( subjectData == null )
subjectData = { tmp_id: '', number: '', username: '' }; subjectData = { tmp_id: '', number: '', subject_id: '' };
// {2} On restore les valeurs // // {2} On restore les valeurs //
this.tmp_id.value = subjectData.tmp_id; this.tmp_id.value = subjectData.tmp_id;
this.number.value = subjectData.number; this.number.value = subjectData.number;
this.username.value = subjectData.username; this.subject_id.value = subjectData.subject_id;
}; };
@ -88,7 +88,7 @@ inputPhoneSubject.prototype.attach = function(){
/* (3) On attache un évènement de 'blur' sur chaque '<input type="text">' */ /* (3) On attache un évènement de 'blur' sur chaque '<input type="text">' */
this.number.addEventListener( 'blur', fts, false); this.number.addEventListener( 'blur', fts, false);
this.username.addEventListener( 'blur', fts, false); this.subject_id.addEventListener( 'blur', fts, false);
/* (4) On charge le sujet depuis la mémoire ('localStorage') */ /* (4) On charge le sujet depuis la mémoire ('localStorage') */
this.storageToFields(); this.storageToFields();

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -71,8 +71,8 @@
<article class='subject-panel'> <article class='subject-panel'>
<h4 class='self color2' data-icon='a'> <h4 class='self color2' data-icon='a'>
<input type='hidden' data-name='tmp_id' value=''> <input type='hidden' data-name='tmp_id' value=''>
<input type='number' data-name='subject_id' placeholder='Identifiant'>
<input type='text' data-name='number' id='p_subject_phone_number' placeholder='Numéro de téléphone'> <input type='text' data-name='number' id='p_subject_phone_number' placeholder='Numéro de téléphone'>
<input type='text' data-name='username' placeholder='Pseudo'>
<input type='submit' class='primary' data-name='submit' data-store value='Enregistrer'> <input type='submit' class='primary' data-name='submit' data-store value='Enregistrer'>
</h4> </h4>
</article> </article>
@ -189,7 +189,7 @@
<span data-space></span> <span data-space></span>
<article class='subject-panel'> <article class='subject-panel'>
<h4 class='self color2' data-icon='a'> <h4 class='self color2' data-icon='a'>
<input type='text' data-name='username' placeholder='Pseudo'> <input type='text' data-name='subject_id' placeholder='Identifiant'>
<input type='submit' class='primary' data-name='submit' data-store value='Enregistrer'> <input type='submit' class='primary' data-name='submit' data-store value='Enregistrer'>
</h4> </h4>
</article> </article>

View File

@ -1,10 +1,10 @@
var sField=$("#search-field"),sSubmit=$("#search-subject"),sList=$('section[data-sublink="survey"] ul[data-list]'); var sField=$("#search-field"),sSubmit=$("#search-subject"),sList=$('section[data-sublink="survey"] ul[data-list]');
sSubmit.addEventListener("click",function(a){api.send({path:"subject/search",name:sField.value},function(c){if(0!=c.ModuleError)return Notification.error("Erreur","La recherche a \u00e9chou\u00e9."),!1;console.log(c);var b="",a;for(a in c.results)b+="<li data-element data-id='"+a+"'>",b+="<div data-user><span>SUJET</span></div>",b+="<div> <span data-prefix='Identifiant'><span class='flag'>"+a+"</span></span> </div>",b+="<div> <span data-prefix='Nom'>"+c.results[a].name+"</span> </div>",b+="<div> <span><input type='checkbox' id='s_"+ sSubmit.addEventListener("click",function(a){api.send({path:"subject/search",name:sField.value},function(c){if(0!=c.ModuleError)return Notification.error("Erreur","La recherche a \u00e9chou\u00e9."),!1;console.log(c);var b="",a;for(a in c.results)b+="<li data-element data-id='"+a+"'>",b+="<div data-user><span>SUJET</span></div>",b+="<div> <span data-prefix='Identifiant'><span class='flag'>"+a+"</span></span> </div>",b+="<div> <span data-prefix='Nom'>"+c.results[a].name+"</span> </div>",b+="<div> <span><input type='checkbox' id='s_"+
a+"' "+(null!=c.results[a].survey?"checked":"")+" disabled><label for='s_"+a+"'>ResTIC</label>",b+="</span> </div>",b+="<div> <span><input type='checkbox' id='s_"+a+"' "+(null!=c.results[a].facebook?"checked":"")+" disabled><label for='s_"+a+"'>Tacebook</label>",b+="</span> </div>",b+="<div> <span><input type='checkbox' id='s_"+a+"' "+(null!=c.results[a].phone?"checked":"")+" disabled><label for='s_"+a+"'>Cellulaire</label>",b+="</span> </div>",b+="</li>";sList.innerHTML=b})},!1); a+"' "+(null!=c.results[a].survey?"checked":"")+" disabled><label for='s_"+a+"'>ResTIC</label>",b+="</span> </div>",b+="<div> <span><input type='checkbox' id='s_"+a+"' "+(null!=c.results[a].facebook?"checked":"")+" disabled><label for='s_"+a+"'>Facebook</label>",b+="</span> </div>",b+="<div> <span><input type='checkbox' id='s_"+a+"' "+(null!=c.results[a].phone?"checked":"")+" disabled><label for='s_"+a+"'>Cellulaire</label>",b+="</span> </div>",b+="</li>";sList.innerHTML=b})},!1);
var pSubjectManager,pContactManager,pMiniManager,pFicheManager,pMatriceManager; var pSubjectManager,pContactManager,pMiniManager,pFicheManager,pMatriceManager;
function pDynamicUpdate(a){var c=a instanceof Element,b=c&&"INPUT"==a.tagName&&"submit"==a.type,e=c&&"SPAN"==a.tagName&&("p_nav-mini"==a.parentNode.id||"p_nav-fiche"==a.parentNode.id),c=c&&"SPAN"==a.tagName&&"p_nav-contact"==a.parentNode.id;if(!b&&!e&&!c&&!0!==a)return!1;console.log("> dynamic update");pMiniManager.fieldsToStorage();pFicheManager.fieldsToStorage();pContactManager.fieldsToStorage();pMatriceManager.fieldsToStorage();pFicheManager.sync();pMiniManager.sync();pMiniManager.storageToFields(); function pDynamicUpdate(a){var c=a instanceof Element,b=c&&"INPUT"==a.tagName&&"submit"==a.type,e=c&&"SPAN"==a.tagName&&("p_nav-mini"==a.parentNode.id||"p_nav-fiche"==a.parentNode.id),c=c&&"SPAN"==a.tagName&&"p_nav-contact"==a.parentNode.id;if(!b&&!e&&!c&&!0!==a)return!1;console.log("> dynamic update");pMiniManager.fieldsToStorage();pFicheManager.fieldsToStorage();pContactManager.fieldsToStorage();pMatriceManager.fieldsToStorage();pFicheManager.sync();pMiniManager.sync();pMiniManager.storageToFields();
pFicheManager.storageToFields();pMatriceManager.storageToFields();(b||c)&&pContactManager.storageToFields()} pFicheManager.storageToFields();pMatriceManager.storageToFields();(b||c)&&pContactManager.storageToFields()}
include("/js/includes/input-phone-subject-min.js",function(){include("/js/includes/input-phone-contact-min.js",function(){include("/js/includes/input-phone-mini-min.js",function(){include("/js/includes/input-phone-fiche-min.js",function(){include("/js/includes/input-phone-matrice-min.js",function(){pSubjectManager=new inputPhoneSubject($('[data-sublink="phone"] article.subject-panel [data-name="tmp_id"]'),$('[data-sublink="phone"] article.subject-panel [data-name="number"]'),$('[data-sublink="phone"] article.subject-panel [data-name="username"]'), include("/js/includes/input-phone-subject-min.js",function(){include("/js/includes/input-phone-contact-min.js",function(){include("/js/includes/input-phone-mini-min.js",function(){include("/js/includes/input-phone-fiche-min.js",function(){include("/js/includes/input-phone-matrice-min.js",function(){pSubjectManager=new inputPhoneSubject($('[data-sublink="phone"] article.subject-panel [data-name="tmp_id"]'),$('[data-sublink="phone"] article.subject-panel [data-name="subject_id"]'),$('[data-sublink="phone"] article.subject-panel [data-name="number"]'),
$('[data-sublink="phone"] article.subject-panel [data-name="submit"]'));pSubjectManager.attach();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"] article.subject-panel [data-name="submit"]'));pSubjectManager.attach();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.attach(pDynamicUpdate);pMatriceManager=new inputPhoneMatrice($('[data-sublink="phone"] article.matrice-panel'));pMatriceManager.attach(pDynamicUpdate);var a=new ShortcutManager;a.append("s+n+a+k+e",function(){pMatriceManager.snake()});a.listen();$('[data-sublink="phone"] input#p_call_log-import[type="file"]').addEventListener("click",function(c){c.target.value=null},!1);$('[data-sublink="phone"] input#p_call_log-import[type="file"]').addEventListener("change", $('[data-sublink="phone"] #p_nav-fiche'));pFicheManager.attach(pDynamicUpdate);pMatriceManager=new inputPhoneMatrice($('[data-sublink="phone"] article.matrice-panel'));pMatriceManager.attach(pDynamicUpdate);var a=new ShortcutManager;a.append("s+n+a+k+e",function(){pMatriceManager.snake()});a.listen();$('[data-sublink="phone"] input#p_call_log-import[type="file"]').addEventListener("click",function(c){c.target.value=null},!1);$('[data-sublink="phone"] input#p_call_log-import[type="file"]').addEventListener("change",
function(c){c={path:"upload/call_log",phone_number:$('[data-sublink="phone"] #p_subject_phone_number').value,file:c.target.files[0]};api.send(c,function(b){console.log(b);var c=null;if(0!=b.ModuleError)9==b.ModuleError?Notification.error("Erreur","Il est n\u00e9cessaire de saisir les informations du <b>sujet</b> avant d'exporter son journal d'appel"):Notification.error("Erreur",b.ModuleError);else{c=Notification.info("Info","Chargement du journal d'appel");pSubjectManager.tmp_id.value=b.tmp_id;pSubjectManager.fieldsToStorage(); function(c){c={path:"upload/call_log",phone_number:$('[data-sublink="phone"] #p_subject_phone_number').value,file:c.target.files[0]};api.send(c,function(b){console.log(b);var c=null;if(0!=b.ModuleError)9==b.ModuleError?Notification.error("Erreur","Il est n\u00e9cessaire de saisir les informations du <b>sujet</b> avant d'exporter son journal d'appel"):Notification.error("Erreur",b.ModuleError);else{c=Notification.info("Info","Chargement du journal d'appel");pSubjectManager.tmp_id.value=b.tmp_id;pSubjectManager.fieldsToStorage();
@ -18,7 +18,7 @@ pMatriceManager.storageToFields();pDynamicUpdate(!0)})},!1);$('[data-sublink="ph
api.send(e,function(a){console.log(a);if(0!=a.ModuleError)return Notification.error("ERREUR",a.ModuleError),!1;Notification.success("OK","L'identifiant du sujet est <strong>"+a.subject_id+"</strong> ! Tout s'est bien d\u00e9roul\u00e9.",1E4);console.log(a)},!1)},!1)})})})})});var fSubjectManager,fContactManager,fMiniManager,fFicheManager,fMatriceManager; api.send(e,function(a){console.log(a);if(0!=a.ModuleError)return Notification.error("ERREUR",a.ModuleError),!1;Notification.success("OK","L'identifiant du sujet est <strong>"+a.subject_id+"</strong> ! Tout s'est bien d\u00e9roul\u00e9.",1E4);console.log(a)},!1)},!1)})})})})});var fSubjectManager,fContactManager,fMiniManager,fFicheManager,fMatriceManager;
function fDynamicUpdate(a){var c=a instanceof Element,b=c&&"INPUT"==a.tagName&&"submit"==a.type,e=c&&"SPAN"==a.tagName&&("f_nav-mini"==a.parentNode.id||"f_nav-fiche"==a.parentNode.id),c=c&&"SPAN"==a.tagName&&"f_nav-contact"==a.parentNode.id;if(!b&&!e&&!c&&!0!==a)return!1;console.log("> dynamic update");fMiniManager.fieldsToStorage();fFicheManager.fieldsToStorage();fContactManager.fieldsToStorage();fMatriceManager.fieldsToStorage();fFicheManager.sync();fMiniManager.sync();fMiniManager.storageToFields(); function fDynamicUpdate(a){var c=a instanceof Element,b=c&&"INPUT"==a.tagName&&"submit"==a.type,e=c&&"SPAN"==a.tagName&&("f_nav-mini"==a.parentNode.id||"f_nav-fiche"==a.parentNode.id),c=c&&"SPAN"==a.tagName&&"f_nav-contact"==a.parentNode.id;if(!b&&!e&&!c&&!0!==a)return!1;console.log("> dynamic update");fMiniManager.fieldsToStorage();fFicheManager.fieldsToStorage();fContactManager.fieldsToStorage();fMatriceManager.fieldsToStorage();fFicheManager.sync();fMiniManager.sync();fMiniManager.storageToFields();
fFicheManager.storageToFields();fMatriceManager.storageToFields();(b||c)&&fContactManager.storageToFields()} fFicheManager.storageToFields();fMatriceManager.storageToFields();(b||c)&&fContactManager.storageToFields()}
include("/js/includes/input-facebook-subject-min.js",function(){include("/js/includes/input-facebook-contact-min.js",function(){include("/js/includes/input-facebook-mini-min.js",function(){include("/js/includes/input-facebook-fiche-min.js",function(){include("/js/includes/input-facebook-matrice-min.js",function(){fSubjectManager=new inputFacebookSubject($('[data-sublink="facebook"] article.subject-panel [data-name="username"]'),$('[data-sublink="facebook"] article.subject-panel [data-name="submit"]')); include("/js/includes/input-facebook-subject-min.js",function(){include("/js/includes/input-facebook-contact-min.js",function(){include("/js/includes/input-facebook-mini-min.js",function(){include("/js/includes/input-facebook-fiche-min.js",function(){include("/js/includes/input-facebook-matrice-min.js",function(){fSubjectManager=new inputFacebookSubject($('[data-sublink="facebook"] article.subject-panel [data-name="subject_id"]'),$('[data-sublink="facebook"] article.subject-panel [data-name="submit"]'));
fSubjectManager.attach();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')); fSubjectManager.attach();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.attach(fDynamicUpdate);fMatriceManager=new inputFacebookMatrice($('[data-sublink="facebook"] article.matrice-panel'));fMatriceManager.attach(fDynamicUpdate);$('[data-sublink="facebook"] #f_clear-all').addEventListener("click",function(a){lsi.clear("f_subject");lsi.clear("f_contacts");lsi.clear("f_mini-fiches");lsi.clear("f_fiches");lsi.clear("f_matrice");fSubjectManager.storageToFields();fContactManager.storageToFields();fMiniManager.storageToFields();fFicheManager.storageToFields(); fFicheManager.attach(fDynamicUpdate);fMatriceManager=new inputFacebookMatrice($('[data-sublink="facebook"] article.matrice-panel'));fMatriceManager.attach(fDynamicUpdate);$('[data-sublink="facebook"] #f_clear-all').addEventListener("click",function(a){lsi.clear("f_subject");lsi.clear("f_contacts");lsi.clear("f_mini-fiches");lsi.clear("f_fiches");lsi.clear("f_matrice");fSubjectManager.storageToFields();fContactManager.storageToFields();fMiniManager.storageToFields();fFicheManager.storageToFields();
fMatriceManager.storageToFields();Notification.success("OK","Les donn\u00e9es ont \u00e9t\u00e9 supprim\u00e9es")},!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],contacts:lsi["export"]("f_contacts"),mini:lsi["export"]("f_mini-fiches"),fiches:lsi["export"]("f_fiches"),matrice:lsi["export"]("f_matrice")[0]};var c=$('[data-sublink="facebook"] #f_download-target'); fMatriceManager.storageToFields();Notification.success("OK","Les donn\u00e9es ont \u00e9t\u00e9 supprim\u00e9es")},!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],contacts:lsi["export"]("f_contacts"),mini:lsi["export"]("f_mini-fiches"),fiches:lsi["export"]("f_fiches"),matrice:lsi["export"]("f_matrice")[0]};var c=$('[data-sublink="facebook"] #f_download-target');

View File

@ -40,7 +40,7 @@ sSubmit.addEventListener('click', function(e){
htmlContent += "<div> <span><input type='checkbox' id='s_"+id+"' "+((response.results[id].survey!=null)?'checked':'')+" disabled><label for='s_"+id+"'>ResTIC</label>"; htmlContent += "<div> <span><input type='checkbox' id='s_"+id+"' "+((response.results[id].survey!=null)?'checked':'')+" disabled><label for='s_"+id+"'>ResTIC</label>";
htmlContent += "</span> </div>"; htmlContent += "</span> </div>";
htmlContent += "<div> <span><input type='checkbox' id='s_"+id+"' "+((response.results[id].facebook!=null)?'checked':'')+" disabled><label for='s_"+id+"'>Tacebook</label>"; htmlContent += "<div> <span><input type='checkbox' id='s_"+id+"' "+((response.results[id].facebook!=null)?'checked':'')+" disabled><label for='s_"+id+"'>Facebook</label>";
htmlContent += "</span> </div>"; htmlContent += "</span> </div>";
htmlContent += "<div> <span><input type='checkbox' id='s_"+id+"' "+((response.results[id].phone!=null)?'checked':'')+" disabled><label for='s_"+id+"'>Cellulaire</label>"; htmlContent += "<div> <span><input type='checkbox' id='s_"+id+"' "+((response.results[id].phone!=null)?'checked':'')+" disabled><label for='s_"+id+"'>Cellulaire</label>";
@ -152,8 +152,8 @@ include('/js/includes/input-phone-matrice-min.js', function(){
/* (1) On crée une instance du manager du sujet */ /* (1) On crée une instance du manager du sujet */
pSubjectManager = new inputPhoneSubject( pSubjectManager = new inputPhoneSubject(
$('[data-sublink="phone"] article.subject-panel [data-name="tmp_id"]'), $('[data-sublink="phone"] article.subject-panel [data-name="tmp_id"]'),
$('[data-sublink="phone"] article.subject-panel [data-name="subject_id"]'),
$('[data-sublink="phone"] article.subject-panel [data-name="number"]'), $('[data-sublink="phone"] article.subject-panel [data-name="number"]'),
$('[data-sublink="phone"] article.subject-panel [data-name="username"]'),
$('[data-sublink="phone"] article.subject-panel [data-name="submit"]') $('[data-sublink="phone"] article.subject-panel [data-name="submit"]')
); );
@ -700,7 +700,7 @@ include('/js/includes/input-facebook-matrice-min.js', function(){
---------------------------------------------------------*/ ---------------------------------------------------------*/
/* (1) On crée une instance du manager du sujet */ /* (1) On crée une instance du manager du sujet */
fSubjectManager = new inputFacebookSubject( fSubjectManager = new inputFacebookSubject(
$('[data-sublink="facebook"] article.subject-panel [data-name="username"]'), $('[data-sublink="facebook"] article.subject-panel [data-name="subject_id"]'),
$('[data-sublink="facebook"] article.subject-panel [data-name="submit"]') $('[data-sublink="facebook"] article.subject-panel [data-name="submit"]')
); );