// JavaScript Document C:\w3\systemboost.immobilier\pop.js.php C:\iC\pop\+\V0\cfgSite\pop.js.php //try{ var xline,popJsPhp=popJsPhpValScript=`/iC/pop/+/V0/cfgSite/pop.js.php`,isTest=0; //alert(`toto ${xline} / ${isLocal} / ${isTest} / ${popJsPhpScript} / `+ window.parent.popJsPhpScript); //alert(`toto ${xline} / ${isLocal} / ${isTest} / ${popJsPhpScript} / `); //alert(`${window.parent.popJsPhpValScript} = `+window.parent.popJsPhpValScript); // popJsPhpValScript ok ok //var xline='/4'; //============================== try{xline+='/10'; if(0&&isTest&&isLocal)alert(8757); //===================================== function popjsExistsFunction(string,display){ if(0&&isLocal)alert('string,display= popjsExistsFunction(string,display)'); try{xline+='/15'; if(!__poplocalhost){alert('!__poplocalhost');return;} if(!string||!display){alert('!string||!display');return;} let msg=``; //==== if(window.parent[string] && typeof window.parent[string] === 'function') { //window.toto[string];//("2025"); msg={owner:window,page:`parent`,functname:string,target:window[string]}; } if (window.parent && window.parent !== window && typeof window.parent[string] === 'function') { //window.toto[string];//("2025"); msg={owner:window.parent,page:`iframe`,functname:string,target:window.parent[string]}; } xline+='/28'; //==== if(0&&__poplocalhost&&msg&&display&&isLocal){ //if($x&&$x.owner) alert( `------- function ${string}() : -------\n` +`\n msg.functname= --> `+string +`\n msg.owner --> `+msg.owner +`\n msg.target= --> code of function ${string}()` //`+msg.target //+`\n msg.target= --> `+typeof msg.target +`\n\n content of Object.entries(msg) --> \n`+Object.entries(msg) ); } //==== }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; };//end:function popjsExistsFunction(string,display){ //===================================== //===================================== function popjsGetURLparts(popactionpage){ if(0&&isLocal)alert('popjsGetURLparts(popactionpage)'); try{xline+='/47'; popjsExistsFunction(`popjsdevAlert`,1); if(!popactionpage)popactionpage=`html`;// si popactionpage= __popactionpage=popactionpage; // popactionpage=`html` ou popactionpage=`ajax` ou popactionpage=`alert` x=window.location.href; // baseUrl= http://127.0.0.1 par exemple "http://localhost:3000"const imageUrl=`${baseUrl}/images/logo.png`; x=x.split(`${__popbaseUrl}/`);x =x[1]; x=x.split(`/`); __popfile=x[x.length-1];x[x.length-1]=null; y=x.join(`/`);//al ert(`y= `+y.substring(0,y.length-1)); __popdirname=y.substring(0,y.length-1); y=__popdirname.split(`/`);//al ert(`y= `+y.substring(0,y.length-1)); let z=y.length; //__popsitename2points=y.length; __popsitename2points="..";for(i=0;i/g," "); //xmsg=xmsg.replace(/&space;/g," "); //xmsg=popreplaceall(xmsg,`\n`,``); //xmsg=popreplaceall(xmsg,`\ \;`,` `); //xmsg=popreplaceall(xmsg,`&;`,``); //popreplaceall=function(text,src,dest) msgAll+=xmsg; //xmsg=`__popbaseUrl= ${__popbaseUrl}${br} __poplocalhost= ${__poplocalhost}` alert(xmsg,popactionpage);//`div`); } //var __popdirname=``; //__popBarTop=`possible function`; }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ function getStyleCSS(styles){//styles){ if(0&&isLocal)alert('function getStyleCSS(styles)'); try{xline+=`/128`; styles.forEach(obj=>{ x=document.getElementById(obj.name); // document.getElementById(obj.name); document.querySelector(obj.name) if(x&&x.style){ xline+=`/132`; if(obj.type==`visibility`)x.style.visibility=obj.value;// hidden/visible xline+=`/134`; if(obj.type==`display`)x.style.display=obj.value;// inline/block/none } } ); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //===== function getButtonsCmdLSallIHM(idname,fct,text,textarea){ if(0&&isLocal)alert('function getButtonsCmdLSallIHM(idname,fct,text,textarea)'); try{xline+=`/144`; document.open(); if(!textarea)textarea="textarea"; let msg=`
`; msg+=``; msg+=``; msg+=``; msg+=`
`; //document.open(); document.write(msg);document.close(); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //===== function getInformationIHMFilename(paramsinfos){//infos,filename,id,filesize){//copyright){// for popmodal if(0&&isLocal)alert('function getInformationIHMFilename(paramsinfos){'); try{xline+='/159'; if(0&&isLocal)alert('line 160 paramsinfos= '+Object.entries(paramsinfos)); display=(paramsinfos.infos?`block`:`none`); if(!paramsinfos.id)paramsinfos.id=null; //copyright=`@copyright`; let hr=`
`;//
`; let hrEnd=``;//`
`;paramsinfos let i=`
${paramsinfos.filename} | ${paramsinfos.filesize}
`; //document.open();//document.write(p_page);document.close(); let msg=hr;//`
`; msg+=i;//`
${copyright}
`; msg+=`${hrEnd}`;//
`; return({hr:hr,i:i,msg:msg}); //document.open();document.write(msg);document.close(); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //===== function popListIHMCopyrightGET(paramsCopyR){//infos,copyright){// for popmodal if(0&&isLocal)alert('function popListIHMCopyrightGET(paramsCopyR){'); try{xline+='/179'; // params={society:`society`,fct:`fct`,version:`version`,firstDate:`firstDate`} if(!paramsCopyR)paramsCopyR={}; if(!paramsCopyR.society)paramsCopyR.society=`pooletude`;// Pooletude$copy;popinfosNewsView.v0-2013 if(!paramsCopyR.fct)paramsCopyR.fct=`infosNewsView`;// fonction du module affiché if(!paramsCopyR.version)paramsCopyR.version=`v0`;// version lancée actuelle if(!paramsCopyR.firstDate)paramsCopyR.firstDate=`2013`;// de society return(`${paramsCopyR.society}©${paramsCopyR.fct}.${paramsCopyR.version}-${paramsCopyR.firstDate}`); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //===== function getInformationIHMCopyright(paramsinfos){//infos,copyright){// for popmodal if(0&&isLocal)alert('function getInformationIHMCopyright(paramsinfos){'); try{xline+='/193'; //(infos:`copyright`,configBtn:``,)) if(!paramsinfos.switchbtn)paramsinfos.switchbtn=` `; if(!paramsinfos.onclick)paramsinfos.onclick=``; if(!paramsinfos.imgSwitch)paramsinfos.imgSwitch=`not.jpg`; if(!paramsinfos.title)paramsinfos.title=``;// toutes les informations quotidiennes if(!paramsinfos.copyright)paramsinfos.copyright=popListIHMCopyrightGET();//paramsCopyR); //===== if(0&&isLocal)alert('line 201 paramsinfos= '+Object.entries(paramsinfos)); display=(paramsinfos.infos?`block`:`none`); xline+=`/203`; //if(!security) security=false; //copyright=`©copyright`; let configBtn=(paramsinfos.configBtn?paramsinfos.configBtn:``),hr=`
`;//
`; let hrEnd=``;//`
`; //if(paramsinfos.onclick) //security.devlop=(security.locate||security.private); xline+=`/210`; //!\\code:waiting if(configBtn&&security)if(security.locate||security.private) // paramsinfos.imgConfig config-system.png // configBtn=``; configBtn=``; if(paramsinfos.switchbtn!=` `||paramsinfos.imgSwitch){ paramsinfos.switchbtn=` `; } let i=`
${paramsinfos.switchbtn} ${configBtn} ${paramsinfos.copyright}  
`;// imgSwitch //document.open();//document.write(p_page);document.close(); let msg=hr;//`
`; msg+=i;//`
${copyright}
`; msg+=`${hrEnd}`;//
`; return({hr:hr,i:i,msg:msg}); //document.open();document.write(msg);document.close(); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //===== // module dédié function getInformationIHM(paramsinfos){//infos,copyright){// for popmodal if(0&&isLocal)alert('function getInformationIHM(paramsinfos){'); try{xline+=`/241`; if(0&&isLocal)alert('line 242 infos= '+paramsinfos.infos); document.open(); //paramsinfos.display=(paramsinfos.display?paramsinfos.display:`block`); paramsinfos.display=`block`; //display=(paramsinfos.infos?`block`:`none`); copyright=`©copyright`; //document.open();//document.write(p_page);document.close(); let msg=`
`; msg+=`
`; msg+=`
`; //if(0&&isLocal)alert(`window.parent.getPopModalOfBarTop= `+window.parent.getPopModalOfBarTop); //if(!window.parent.getPopModalOfBarTop){ //if(0&&isLocal)alert(`!window.parent.getPopModalOfBarTop`); //} // {whatType:whatType,dir:dir,title:title} if(window.parent.getPopModalOfBarTop) msg+=window.parent.getPopModalOfBarTop({whatType:null,dir:`./resources/images`,title:`Tableau des informations du jour`});//null,`./resources/images`,`Tableau des informations du jour`); //msg+=getPopModalOfBarTop(`modal`,`./resources/images`,`Tableau des informations du jour`); msg+=`
`; //msg+=getPopModalOfBarTop(`modal`,`./resources/images`,`Tableau des informations du jour`); //msg+=getPopModalOfBarTop(whatType,dir,title); ///let msg=`
`; //msg+=`
`; //==== let backgroundColor,infosTitle=new Array(`NOW`,`développement`,`locales`,`nationales`,`internationales`,`améliorations`); msg+=``; //==== msg+=` `; for (let i=0;i `; } msg+=`
information
${i+1} ${infosTitle[i]}
`; //==== msg+=`
outils et infos prioritaires
`; msg+=`
`;//` id="idListOfInfosDivNone //idListOfInfosDivMaster //paramsinfos.onclick=`alert(999);`; params={ onclick:`x=document.getElementById('idListOfInfosDivMaster');z=document.getElementById('idListOfInfosDivNone');if(x){y=(parseInt(x.style.width)>10);x.style.width=(y?'2%':'99.5%');if(z){z.style.display=(y?'none':'block');}};` //alert(999); idListOfInfosDivNone w=(z.style.display=='none'); ,copyright:`Pooletude©popDocTools.DuckPress-202506v0` ,imgSwitch:`${$jssliCpopPVx}/imgs/arrows_up_down_19336.png` // `imgSwitch.jpg` ,imgConfig:`${$jssliCpopPVx}/imgs/config-system.png` // paramsinfos.imgConfig config-system.png // ,imgSwitch:`../../iC/pop/+/V0/imgs/arrows_up_down_19336.png` // `imgSwitch.jpg` $jssliCpopPVx // ,imgConfig:`../../iC/pop/+/V0/imgs/config-system.png` // paramsinfos.imgConfig config-system.png // ,imgSwitch:`./resources/images/arrows_up_down_19336.png` // `imgSwitch.jpg` // ,imgConfig:`./resources/images/config-system.png` // paramsinfos.imgConfig config-system.png }; x=getInformationIHMCopyright(params);//.infos,copyright); msg+=x.msg; //msg+=`
${copyright}
`; msg+=`
`; //document.write(msg); document.close(); return(msg); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //======================== function popjsAjaxJsonActions(This,action,idbutton){//arr0,ARR0){// arr0,ARR0,arr1,ARR1,arr2,ARR2 try{xline+='/320'; let button=document.getElementById(idbutton);if(!button)return; //if(action=='save'&&This.disabled)return; if(0&&isLocal)alert('line323 function popjsAjaxJsonActions(params) action= '+action); if(!action)return; // params={fileFetch:fileAjax( ou filetext),datas:params,....}; if(0&&isLocal)alert('line322 function popjsAjaxJsonActions(params) Object.entries(params)= '+Object.entries(params0)); //if(1&&isLocal)alert('line323 function popjsAjaxJsonActions(params) params.fileFetch= '+params.fileFetch); if(!This)return; let paramsFileFetch=This.getAttribute(`data-file`);//paramsFileFetch=JSON.parse(paramsFileFetch); // data-idtextarea="${idtextarea}" data-file="${fileFetch}" let idtextarea=document.getElementById(This.getAttribute(`data-idtextarea`));//params0.idtextareaContent;//`paramsFileFetch=JSON.parse(paramsFileFetch)`;//This.getAttribute(`data-content`);//paramsFileFetch=JSON.parse(paramsFileFetch); //let idtextareaContentLength=paramsFileContent.length;//This.getAttribute(`data-length`);//params0.idtextareaContent;//`paramsFileFetch=JSON.parse(paramsFileFetch)`;//This.getAttribute(`data-content`);//paramsFileFetch=JSON.parse(paramsFileFetch); // data-length="${idtextareaContent.length}" //data-filetextarea="${idtextareaFile}" let filetextarea=This.getAttribute(`data-filetextarea`);//params0.idtextareaContent;//`paramsFileFetch=JSON.parse(paramsFileFetch)`;//This.getAttribute(`data-content`);//paramsFileFetch=JSON.parse(paramsFileFetch); let paramsFileContent=``; if(idtextarea){paramsFileContent=idtextarea.value;} if(0&&isLocal)alert('line323 function popjsAjaxJsonActions(params) paramsFileFetch= '+typeof paramsFileFetch); //let paramsFileFetch=JSON.parse(This.getAttribute(`data-file`)); if(0&&isLocal)alert('line323 function popjsAjaxJsonActions(params) Object.entries(paramsFileFetch)= '+Object.entries(paramsFileFetch)); fetch(paramsFileFetch, {//fetch('votre_script.php', {//!\success:not: params.fileFetch method: 'POST' ,headers: {'Content-Type': 'application/x-www-form-urlencoded',} ,body: `content=${encodeURIComponent(paramsFileContent)}&length=${paramsFileContent.length} &filetextarea=${filetextarea}&fileFetch=${paramsFileFetch} &action=${action}` // {dataContent:paramsFileContent} filetextarea // $_POST content, filetextarea, fileFetch }) .then(response => response.text()) .then(data => { if(0&&isLocal)alert(data); if(action=='save')button.disabled=`disabled`; // console.log('Réponse du serveur:', data); }); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //======= function popjsAjaxJsonGetDatasOfScreenTo(keys,values,control){//arr0,ARR0){// arr0,ARR0,arr1,ARR1,arr2,ARR2 //function getDatasOfScreenTo(fileAjax)//!\test:warning: exemple -> $ _SESSION[$sessionSite]['scrWidth'] //{//!\success:0K: if(0&&isLocal)alert('function popjsAjaxJsonGetDatasOfScreenTo(keys,values,control){'); try{xline+=`/364`; if(0&&isLocal)alert(365); if(!control)control=0; if(!keys.length||!keys[0]||!values.length||!values[0]) {alert(`function popjsAjaxJsonGetDatasOfScreenTo impossible`);return;}; let fileAjax=values[0]; //let keys=new Array('fileAjax','sessionSite','scrHeight','scrWidth'); //let values=new Array(fileAjax,'systemboost.immobilier',window.screen.width,window.screen.height); //v ar sessio nSite = 'systemboost.immobilier';//'< ? php echo $ sessionSite; ? >';//systemboost.immobilier'; // Récupérer les dimensions de l'écran //v ar scrWidth = window.screen.width; //v ar height = `${window.screen.height}`; //v ar scrHeight = window.screen.height; //v ar scrHWwithAjax = '/iC/_scripts/votre_script.php'; // Envoyer ces données à PHP via une requête GET ou POST // Par exemple, en utilisant fetch : //let params='sessionSite=' + encodeURIComponent(sessionSite)+'&'+'scrHeight=' + encodeURIComponent(scrHeight)+'&'+'scrWidth=' + encodeURIComponent(scrWidth); let params; for(let i=0;i<\/script>`); return(script); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ function fctjs_footer_OpenOrClose(what,This,files){ if(0&&isLocal)alert('function fctjs_footer_OpenOrClose(what,This,files){'); try{xline+=`/584`; // ne pas mettre what sinon la bar haute est vide if(0&&!what&&isLocal){alert('!what: popJsPhp function fctjs_footer_OpenOrClose(what,This,files)');return;} //what=true; if(This){ if(0&&isLocal)alert('This.id= '+This.id+' - This.src= '+This.src);// bottom-hbar-arrows-YY_up_down x=document.getElementById(`bottom-hbar-arrows-YY_up_down`);if(x)x.src=This.src; } if(!files) files=[ `idfooterTabberIdentityCV/arrows` // pour une personne ,`idfooterTabberLaw/law` ,`idfooterTabberDevlop/devlop` // idfooterDevlop ancienne div jaune //,`idfooterPublicity/pub` ,`idfooterTabberPublicity/pub` ,`idfooterTabberLearn/learn` // footerIdentityCV non pas learn , ]; files.forEach(obj=>{ z=obj.split(`/`);x=document.getElementById(z[0]); let divtop=document.getElementById("divtop-footer-top");// id="footer-top" let footerTop=document.getElementById("footer-top");// id="footer-top" if(0&&isLocal)alert('what= '+what+' - x= '+x); if(x){ if(what==z[1]){ y=x.style.display; y=(y?y:`none`); if(0&&isLocal)alert('what= '+what+' - y= '+y); //divtop.style.height=(y==`none`?650:0);//650;// height:650; //divtop.style.height=(y==`none`?650:0);//650;// height:650; //divtop.style.right=(y==`none`?`-90%`:`-10%`);//`100%`);`100%`); //divtop.style.left=(divtop.style.left<0?0:`-90%`); //if(parseInt(divtop.style.left)!=0){ x.style.display=(y==`none`?`block`:`none`); divtop.style.visibility=(y==`none`?`visible`:`hidden`); divtop.style.left=(y==`none`?0:`-90%`); //visibility:hidden; //divtop.style.top=220;//(y==`none`?20:0); //divtop.style.visibility=(y==`none`?`visible`:`hidden`); //footerTop.style.top=(y==`none`?-670:0); if(0&&isLocal)alert('what= '+what+' - x.style.display= '+x.style.display+' - divtop.style.left= '+divtop.style.left); } else {x.style.display=`none`;//divtop.style.top=220;//divtop.style.height=0; //divtop.style.height=0; //divtop.style.right=`-90%`;//`-100%`; //divtop.style.left=`-90%`;//`-100%`; //divtop.style.visibility=`hidden`; } } }); return(true); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ function popDayPilot_Modal_form_Calendar_Record(title){ if(0&&isLocal)alert('function popDayPilot_Modal_form_Calendar_Record(title){'); try{xline+=`/648`; //import {Modal} from '@daypilot/modal'; // ... `Calendar Record` const form = [ {name: `${title}`}, { name: 'Description', id: 'description', type: 'text', }, { name: 'Start', id: 'start', type: 'date', dateFormat: 'M/d/yyyy', }, ]; const data = {}; DayPilot.Modal.form(form, data).then(modal => { alert(modal.result);// résultat des éléments des cases de form }); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ function popDayPilot_Modal_form_Message_Resources_Dates(title){ if(0&&isLocal)alert('function popDayPilot_Modal_form_Message_Resources_Dates(title){'); try{xline+=`/680`; //===================== var resources = [ {name: "Resource A", id: "A"}, {name: "Resource B", id: "B"}, {name: "Resource C", id: "C"}, ]; function validateTextRequired(args) { var value = args.value || ""; if (value.trim().length === 0) { args.valid = false; args.message = "Text required"; } else if (value.toLowerCase().includes("a")) { args.valid = false; args.message = "Text must not contain 'a'."; } else if (value.includes("2020")) { args.valid = false; args.message = "2020 not allowed."; } } var form = [ {name: `${title}`}, {name: "Text", id: "text", onValidate: validateTextRequired }, {name: "Note", id: "note", onValidate: validateTextRequired }, {name: "Start", id: "start", type: "date", onValidate: validateTextRequired}, {name: "End", id: "end", type: "date"}, {name: "Resource", id: "resource", options: resources, onValidate: validateTextRequired}, ]; var data = { start: "2020-11-01", end: "2020-11-02", resource: "B" }; DayPilot.Modal.form(form, data).then(function(modal) { alert(modal); }); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ function popDayPilot_Modal_popup_ContactUser(title){//`Hello, World! Envoyer un email` if(0&&isLocal)alert('function popDayPilot_Modal_popup_ContactUser(title){'); try{xline+=`/727`; var maDiv = document.querySelector('.modal_default_background'); DayPilot_ihmContactUser(`${title}`); //================ if(maDiv){ //var maDiv = document.querySelector('.modal_default_background'); // Lorsqu'on survole maDiv, désactiver l'interaction maDiv.addEventListener('mouseover', () => { maDiv.style.pointerEvents = 'none'; }); // Lorsqu'on quitte maDiv, réactiver l'interaction maDiv.addEventListener('mouseout', () => { maDiv.style.pointerEvents = '';// 'auto'; }); if(0){ const idmadivmain = document.querySelector('.modal_default_main'); // Lorsqu'on survole maDivchild, réactiver l'interaction idmadivmain.addEventListener('mouseover', () => { maDiv.style.pointerEvents = '';// 'auto'; }); } } }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ function tabberCommandLoad(font7pt){ //tabber7pt=true; if(0&&isLocal)alert('function tabberCommandLoad(font7pt){'); try{xline+=`/756`; if(0&&isLocal)alert(`tabberCommandLoad(font7pt)`); // Run tabberAutomaticOnload() unless the "manualStartup" option was specified //tabberCommandLoad(!tabberAutoIsOnLoad);//!\code:test: !OK tabber7pt=(font7pt==`7pt`);//true; //if(font7pt==`7pt`)tabber7pt=true; let t0=`tabberAutoIsOnLoad`,t1=`tabberAutomaticOnLoad`; if(!window.parent[t0]) if(window.parent[t1]){ x=(typeof tabberOptions == 'undefined'||!tabberOptions['manualStartup']); if (x) { window.parent[t1](); } else { //if(!tabberOptions['manualStartup']) { window.parent[t1](tabberOptions); // } } } }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ function imageFlag(lang){// ex: lang=fr try{xline+=`/778`; if(0&&isLocal)alert(`758 function imageFlag(lang) ${popJsPhp}`); //}catch(e){alert("catch(e): "+e+" - "+xline+" - "+elementsOrIHMJs);}; LANG=lang.toUpperCase();// vers LANG=FR //if(0&&!lang&&isLocal)alert(`LANG= ${LANG}`); xmsg=`LANG= ${LANG}`;if(0&&isLocal)alert(xmsg); y="../../.."+"/"+"res/imgs/maps/flags/ico-"+lang+".png";//!\warning: //==== //if(0)al ert(`lang= ${lang}`+`\n`+`LANG= ${LANG}`+`\n`+`top-hbar-img${LANG}`); if(0&&isLocal)xmsg=`lang= ${lang}`+`\n`+`LANG= ${LANG}`+`\n`+`top-hbar-img${LANG}`;if(0&&isLocal)alert(xmsg); images=[{name:`top-hbar-img${LANG}`,file:y},{name:`bottom-hbar-img${LANG}`,file:y},]; images.forEach(obj=>{ xx=document.getElementById(obj.name);if(xx)xx.src=obj.file;});//images=null; //try{xline+=`/240`; }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ //============ start: barOfTopWindow //================================ function getPopModalOfBarTopImage(dir,image){ try{xline+=`/800`; if(0&&isLocal)alert('dir= '+dir+' - image= '+image+`- getPopModalOfBarTopImage(dir,image) ${popJsPhp}`); let x=''; // let iframe=0,plus=``; // if(0&&image==`system-out.gif`){ // //iframe=(window.popimgSystemFileIHM?0:1); // x=window.parent.popimgSystemFileIHM;//(!iframe?popimgSystemFileIHM:parent.popimgSystemFileIHM); // plus=``;//(!iframe?``:`../`); // // x=(window.popimgSystemFileIHM?popimgSystemFileIHM:parent.popimgSystemFileIHM); // // x=plus+(x.OUT?x.OUT:``);//`${dir}/${image}`; // x=plus+x.OUT;//`${dir}/${image}`; // x=x.replace(`/./`,`/../`); // if(0&&isLocal)alert(`image= ${x}`); // } // else // x=`${dir}/${image}`;// parce que iframe //alert(); x=`${dir}/${image}`; //x=`./resources/images/system-work.jpg`; //x=`../resources/images/${image}`;// parce que iframme let msg=``; msg+=``; msg+=``; return(msg); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ //padding-bottom:3;background-color:blue; ../../res/imgs/system/out.gif C:\w3\popDev IT\resources\images/system-out.gif function getPopModalOfBarTop(params){// whatType,dir,title){// {whatType:whatType,dir:dir,title:title} if(0&&isLocal)alert('function getPopModalOfBarTop(params){'); try{xline+=`/832`; //alert(9999); document.open();//document.write(p_page);document.close(); let msg=``; if(!params.whatType)params.whatType='modal'; if(!params.dir)params.dir=`./resources/images`;// `./resources/images/system-home.jpg` if(!params.title)params.title=document.title; if(!params.width)params.width=`100%`; //width=`99%`;//``; //if(``) xline+=`/842`; if(0&&isLocal)alert(xline+` window.parent.getPopModalOfBarTop= `+window.parent.getPopModalOfBarTop); msg+=` `; document.close(); if(0&&isLocal)alert(`1034 ${msg}`); return(msg); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; //document.write(`
`); }; //================================ function selectFileChange(This){ if(0&&isLocal)alert('function selectFileChange(This){'); try{xline+=`/932`; // myabout.php iframeAboutPhp /myabout.php/example00.php iframeAboutPhp selectFileChange(); // $file2textarea='/ic-functions/plugins/tcpdf-/res/myabout.php'; const select = This;//document.getElementById('monSelect'); // alert('select.option[select.selectedIndex].value= '+select.option[select.selectedIndex].value);return; alert('select.option[select.selectedIndex].value= '+select.value); let iframeAboutPhp=(iframeAboutPhpPDF?iframeAboutPhpPDF:'iframeAboutPhp'); let iframeAbout=document.getElementById(iframeAboutPhp); // file=`/ic-functions/plugins/tcpdf-/${select.value}`;// `/ic-functions/plugins/tcpdf-/example00.php`; file=`/ic-functions/plugins/tcpdf-/${select.value}`;// `/ic-functions/plugins/tcpdf-/example00.php`; if(iframeAboutPhpX)iframeAboutPhpX.src=file; return; const optionsSelectionnees = Array.from(select.selectedOptions); // iframeAboutPhp/example00.php let i=0; // Parcourir toutes les options sélectionnées optionsSelectionnees.forEach(option => { // Récupérer l'optgroup parent const optgroup = option.parentElement; const groupeLabel = optgroup.label; const optionText = option.text; const optionValue = option.value; const optionDataFile = option.getAttribute("data-file"); //======================= if(select.selectedIndex==i){ alert('optionValue= '+optionValue);return; //iframeAboutPhp=document.getElementById('iframeAboutPhp'); //if(iframeAboutPhp).src=select.value; } i++; }); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ function popbarOfTopWindowOnkeyupTextarea(This,input){ let button=document.getElementById(input);if(!button)return; button.disabled=``; if(0&&isLocal)alert('line979 function popbarOfTopWindowOnkeyupTextarea(This) button.id= '+button.id); if(0&&This.value==``){//&&This.getAttribute(`data-start`)==``){ // This.setAttribute(`onchange`,`popbarOfTopWindowOnkeyupTextarea(t\his);`); This.setAttribute(`data-start`,This.value.length); return; } //++This.getAttribute(`data-start`); //if(1&&isLocal)alert('line985 function popbarOfTopWindowOnkeyupTextarea(This) This.disabled= '+This.disabled); This.setAttribute(`data-length`,This.value.length); //button.setAttribute(`disabled`,0); //This.disabled=false; }; //================================ function popbarOfTopWindow(params){ if(0&&isLocal)alert('function popbarOfTopWindow(params){'); try{xline+=`/989`; let whatType=(params.whatType?params.whatType:''); let dir=(params.dir?params.dir:`./resources/images`); let title=(params.title?params.title:`write title`); let idDiv=(params.idDiv?params.idDiv:``);// id master div let idDivPadding=(params.idDivPadding?params.idDivPadding:``);// div paddings let TableImgsDisplay=(params.TableImgsDisplay?params.TableImgsDisplay:``);// block/none/`` let idInfoHelp=(params.idInfoHelp?params.idInfoHelp:`write help`);// id info div let infoHelp=(params.infoHelp?params.infoHelp:`writeHelp`);// text of div let infoHelpDisplay=(params.infoHelpDisplay?params.infoHelpDisplay:`none`);// css //======= if(0&&isLocal)alert('line 1000 params.idtextarea='+params.idtextarea); let textarea=params.idtextarea;let barButtons=barTextarea=''; if(textarea){ let idtextarea=(params.idtextarea?params.idtextarea:'');// id textarea let idtextareaFile=(params.idtextareaFile?params.idtextareaFile:'');// fichier de textarea let idtextareaContent=(params.idtextareaContent?params.idtextareaContent:'');// contenu de textarea let idtextareaContentLength=params.idtextareaContent.length;// contenu de textarea let idtextareaSave=(params.idtextareaSave?params.idtextareaSave:'');// id save if(0&&isLocal)alert('line985 idtextareaContent='+idtextareaContent); //var params0={};params0.idtextareaContent=idtextareaContent; //======= if(idtextareaSave){//!\here:save //$topBar.fileFetch let fileFetch=(params.fileFetch?params.fileFetch:`error`);// fichier ajax fetch //params0.fileFetch=fileFetch; if(0&&isLocal)alert('line979 if(idtextareaSave)'+fileFetch); //var datasFile = JSON.stringify(`{fileFetch:fileFetch}`); // json vaut '{"key":"value","n":123}' //let datasFile=JSON.stringify({fileFetch:fileFetch,content:idtextareaContent}); // var json = JSON.stringify(x); barButtons=`
Commandes:         
`; // myabout.php iframeAboutPhp /myabout.php/example00.php iframeAboutPhp selectFileChange(); // $file2textarea='/ic-functions/plugins/tcpdf-/res/myabout.php'; } //======= if(idtextarea){// This.setAttribute(`onchange`,`popbarOfTopWindowOnkeyupTextarea(t\his);`); barTextarea=` `; } //======= } let topBar=''; if(window.parent.getPopModalOfBarTop)topBar=window.parent.getPopModalOfBarTop(params); // topBar=window.parent.getPopModalOfBarTop({whatType:whatType,dir:dir,title:title // ,infoHelp:infoHelp,infoHelpDisplay:params.infoHelpDisplay,idInfoHelp:idInfoHelp // }); xline+=`/1047`; let msg=`
`; xline+=`/1052`; //msgDropArea+=parent.getPopModalOfBarTop(null,null,`title`); msg+=` ${topBar}
${params.infoHelp}
${barButtons}${barTextarea} `; xline+=`/1059`; return(msg); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ function popbarOfBottomWindow(params){ if(0&&isLocal)alert('function popbarOfBottomWindow(params){'); try{xline+=`/1066`; x0=`getInformationIHMCopyright`; x=window.parent[x0](params.infos,params.copyright);//`infos`,`copyright`); return(x.i+`
`); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ //============ end: barOfTopWindow //================================ //================================ //============ start: poplocalStorageDatas??? //================================ //================================ //poplocalStorageDatasSET(`localStorageObjDPE`,params);// keys=economy,co2 poplocalStorageDatasGET(name,coded) function poplocalStorageDatasADD(name,params,coded){//ex: name=localStorageObjDPE if(0&&isLocal)alert('function poplocalStorageDatasADD(name,params,coded){'); try{xline+=`/1084`; let datasActual=window.parent.poplocalStorageDatasGET(name,coded); //Object.assign(newparams,{[key]:d.value})); let datasAdd=Object.assign(datasActual,params); xline+=`/1088`; if(0&&isTest)alert('datasAdd= '+datasAdd); // localStorage.setItem('form_nom', nom); // const monObjet = { nom: nom, email: email, message: message, mdp:mdp }; xline+=`/1092`; if(!params){alert('!params');return;} const msg=JSON.stringify(datasAdd); localStorage.setItem(name,(coded ?btoa(msg):msg)); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ //poplocalStorageDatasSET(`localStorageObjDPE`,params);// keys=economy,co2 poplocalStorageDatasGET(name,coded) function poplocalStorageDatasDEL(name){//,params,coded){//ex: name=localStorageObjDPE localStorage.setItem(name,{}); }; //================================ //poplocalStorageDatasSET(`localStorageObjDPE`,params);// keys=economy,co2 poplocalStorageDatasGET(name,coded) function poplocalStorageDatasSET(name,params,coded){//ex: name=localStorageObjDPE if(0&&isLocal)alert('function poplocalStorageDatasSET(name,params,coded){'); try{xline+=`/1107`; if(0&&isTest)alert('params= '+params); // localStorage.setItem('form_nom', nom); // const monObjet = { nom: nom, email: email, message: message, mdp:mdp }; xline+=`/1111`; if(!params){alert('!params');return;} const msg=JSON.stringify(params); localStorage.setItem(name,(coded ?btoa(msg):msg)); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //======== //datasActual=window.parent.poplocalStorageDatasGET(name,coded); function poplocalStorageDatasXISTS(name){// poplocalStorageDatasSET(name,params,coded) if(0&&isLocal)alert('function poplocalStorageDatasXISTS(name){'); try{xline+=`/1121`; // Récupérer la chaîne JSON stockée dans localStorage const storedData = localStorage.getItem(name);//'formsTotalDatas'); return(storedData?1:0); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //======== //datasActual=window.parent.poplocalStorageDatasGET(name,coded); //function poplocalStorageDatasXISTS(name){// poplocalStorageDatasSET(name,params,coded) function poplocalStorageDatasGET(name,coded){// poplocalStorageDatasSET(name,params,coded) if(0&&isLocal)alert('function poplocalStorageDatasGET(name,coded){'); try{xline+=`/1133`; // localStorage.setItem('form_nom', nom); // const monObjet = { nom: nom, email: email, message: message, mdp:mdp }; // const msg=JSON.stringify(params); xline+=`/1137`; if(localStorage.getItem(name)){ const data = JSON.parse(localStorage.getItem(name)); // 1=65=A 1=a=97 return(coded ?atob(data):data); } // localStorage.setItem(name,(coded ?btoa(msg):msg)); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //======== function saveformDatas(This,listIDS){//'idformReferenceANN,idformDateANN'){ if(0&&isLocal)alert('function saveformDatas(This,listIDS){'); try{xline+=`/1149`; x=name=``;listIDS=listIDS.split(`,`); const storedData = localStorage.getItem(formsTotalDatasLS); formsTotalDatas = JSON.parse(storedData); listIDS.forEach(id=>{ x=id.split(`idform`);key=x[1]; if(key){ x=document.getElementById(id); // x=document.getElementById(`${x[1]}`); //if(0) alert('173 id= '+id+' - x= '+x+' - x.id= '+x.id); if(x){ //const storedData = localStorage.getItem(formsTotalDatasLS); //formsTotalDatas = JSON.parse(storedData); xline+=`/1164`; if(0) alert('1165 storedData= '+storedData+' - Object.entries(storedData)= '+Object.entries(storedData));// .ReferenceANN +' - x.ReferenceANN= '+x.ReferenceANN); if(0) alert('1165 storedData= '+storedData+' - formsTotalDatas= '+formsTotalDatas);// .ReferenceANN +' - x.ReferenceANN= '+x.ReferenceANN); //if (storedData) { // Convertir la chaîne JSON en objet // formsTotalDatas = storedData.JSON.parse(storedData); //.parse // Accéder à la valeur de ReferenceANN name=key;//`ReferenceANN`; // const referenceValue = formsTotalDatas[`${name}`];// formsTotalDatas.ReferenceANN; formsTotalDatas[`${name}`]=x.value;//referenceValue; //} // name=`${id}`; // formsTotalDatas[name]=x.value; // formsTotalDatas[`${key}`]=x.value; // w=localStorage.getItem(formsTotalDatasLS); if(0) alert('173 x.value= '+x.value+' - Object.keys(formsTotalDatas)= '+Object.keys(formsTotalDatas)); } } // area.setAttribute("data-activated","false"); }); localStorage.setItem(formsTotalDatasLS,JSON.stringify(formsTotalDatas)); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+popJsPhp);}; }; //================================ //============ end: poplocalStorageDatas??? //================================ //xline+=`/1182`; //if(0&&isLocal)alert(`ici C:/w3/popSchools/index.php `+horizontalBarStandardTopVAL);//horizontalBarStandardTop.js < ? php echo $file; ? > //< ? php $file=$g_dir_iC2cfgSite."/empty-horizontalBarStandardTop.js";require($file);$file=str_replace("empty-","",$file); ? > //if(horizontalBarStandardTopVAL){ //document.open(); //document.write(`