alpha_full/admin/contenu/contenu.js
2026-04-06 22:58:51 +02:00

175 lines
6.9 KiB
JavaScript
Executable File

/* ----------------------------------------------- */
/* Gestion du refresh
/* ----------------------------------------------- */
function checkRefresh ( ) {
ancreSection ( idLanguenav ) ;
document.menuSiteForm.submit();
}
/* ----------------------------------------------- */
/* Menus contextuels
/* ----------------------------------------------- */
var xMousePosition = 0;
var yMousePosition = 0;
document.onmousemove = function ( e ) {
xMousePosition = e.clientX + window.pageXOffset;
yMousePosition = e.clientY + window.pageYOffset;
}
/* ----------------------------------------------- */
/* Masqué / affiché
/* ----------------------------------------------- */
function upAff ( idLanguenav, theAff, c ) {
debugLocal=0;
if (debugLocal==1 ) alert ( "ID : " + idLanguenav + " Msg : " + theAff ) ;
document.getElementById ( 'idLanguenav' ).value=idLanguenav;
document.getElementById ( 'theAff' ).value=theAff;
document.getElementById ( 'codeOpe' ).value='upAff';
ancreSection ( c ) ;
document.menuSiteForm.submit();
}
function upDesc ( idLanguenav, theDesc, c ) {
debugLocal=0;
if (debugLocal==1 ) alert ( "ID : " + idLanguenav + " Msg : " + theDesc ) ;
document.getElementById ( 'idLanguenav' ).value=idLanguenav;
document.getElementById ( 'theDesc' ).value=theDesc;
document.getElementById ( 'codeOpe' ).value='upDesc';
ancreSection ( c ) ;
document.menuSiteForm.submit();
}
/* ----------------------------------------------- */
/* Message
/* ----------------------------------------------- */
function upMsg ( idLanguenav, theValue, c ) {
//pour Memoire : idLanguenav = le champ FRA ou ENG
debugLocal=0;
if (debugLocal==1 ) alert ( "upMsg idLanguenav : " + idLanguenav + ' value = ' + theValue + ' N° = ' + c ) ;
document.getElementById ( 'idLanguenav' ).value=idLanguenav;
document.getElementById ( 'theValue' ).value=theValue;
document.getElementById ( 'codeOpe' ).value='upLn';
ancreSection ( c ) ;
if (debugLocal==1 ) alert("document.form[0] "+ document.forms[0].name);
document.menuSiteForm.submit();
}
/* ----------------------------------------------- */
/* Lien
/* ----------------------------------------------- */
function upLien ( idLanguenav, theLien, c ) {
debugLocal=0;
if (debugLocal==1 ) alert ( "idLanguenav : " + idLanguenav + " Msg : " + theLien ) ;
document.getElementById ( 'idLanguenav' ).value=idLanguenav;
document.getElementById ( 'theLien' ).value=theLien;
document.getElementById ( 'codeOpe' ).value='upLien';
ancreSection ( c ) ;
document.menuSiteForm.submit();
}
function manageLien ( idLanguenav, theLien2, c ) {
debugLocal=0;
if (debugLocal==1 ) alert ( 'gestion lien : '+theLien2 ) ;
document.getElementById ( 'idLanguenav' ).value=idLanguenav;
document.getElementById ( 'codeOpe' ).value='upLien';
document.getElementById ( 'theLien' ).value=theLien2;
ancreSection ( c ) ;
document.menuSiteForm.submit();
}
/* ----------------------------------------------- */
/* Popup
/* ----------------------------------------------- */
function upPop ( idLanguenav, thePop, c ) {
debugLocal=0;
if (debugLocal==1 ) alert ( "idLanguenav : " + idLanguenav + " Msg : " + thePop ) ;
document.getElementById ( 'idLanguenav' ).value=idLanguenav;
document.getElementById ( 'thePop' ).value=thePop;
document.getElementById ( 'codeOpe' ).value='upPop';
ancreSection ( c ) ;
document.menuSiteForm.submit();
}
/* ----------------------------------------------- */
/* ImgPt : bouton download : oldImage permet d'"essayer d'avoir le folder pour le upload
/* ----------------------------------------------- */
// function uploadImg ( idLanguenav, theOldImage, c ) {
// debugLocal=0;
// if (debugLocal==1 ) alert ( "uploadImg => idLanguenav : " + idLanguenav + ' theOldImage : '+ theOldImage + ' c= ' + c ) ;
// document.getElementById ( 'idLanguenav' ).value=idLanguenav;
// document.getElementById ( 'theOldImage' ).value=theOldImage;
// document.getElementById ( 'codeOpe' ).value='uploadImg';
// ancreSection ( c ) ;
// document.menuSiteForm.submit();
// }
/* ----------------------------------------------- */
/* ImgPt : saisie directe
/* ----------------------------------------------- */
function upTheImg ( idLanguenav, theImage, c ) {
debugLocal=0;
if (debugLocal==1 ) alert ( "upTheImg =>idLanguenav : " + idLanguenav + ' img : '+theImage+ ' c = '+c ) ;
document.getElementById ( 'idLanguenav' ).value=idLanguenav;
document.getElementById ( 'theImage' ).value=theImage;
document.getElementById ( 'codeOpe' ).value='upImage';
ancreSection ( c ) ;
document.menuSiteForm.submit();
}
/* ----------------------------------------------- */
/* Alt
/* ----------------------------------------------- */
function upAlt ( idLanguenav, theAlt, c ) {
debugLocal=0;
if (debugLocal==1 ) alert ( "idLanguenav : " + idLanguenav + " Msg : " + theAlt ) ;
document.getElementById ( 'idLanguenav' ).value=idLanguenav;
document.getElementById ( 'theAlt' ).value=theAlt;
document.getElementById ( 'codeOpe' ).value='upAlt';
ancreSection ( c ) ;
document.menuSiteForm.submit();
}
/* ----------------------------------------------- */
/* Class
/* ----------------------------------------------- */
function upClasse ( idLanguenav, theClasse, c ) {
debugLocal=0;
if (debugLocal==1 ) alert ( "ID : " + idLanguenav + " Msg : " + theAff ) ;
document.getElementById ( 'idLanguenav' ).value=idLanguenav;
document.getElementById ( 'theClasse' ).value=theClasse;
document.getElementById ( 'codeOpe' ).value='upClass';
ancreSection ( c ) ;
document.menuSiteForm.submit();
}
/* ----------------------------------------------- */
/* Style
/* ----------------------------------------------- */
function upStyle ( idLanguenav, theStyle, c ) {
debugLocal=0;
if (debugLocal==1 ) alert ( "ID : " + idLanguenav + " Msg : " + theStyle ) ;
document.getElementById ( 'idLanguenav' ).value=idLanguenav;
document.getElementById ( 'theStyle' ).value=theStyle;
document.getElementById ( 'codeOpe' ).value='upStyle';
ancreSection ( c ) ;
document.menuSiteForm.submit();
}
function deleteContImg ( idLanguenav, c ) {
debugLocal=0;
var r=confirm ( 'Confirmez la supression de cette image' ) ;
if (r == true ) {
document.getElementById ( 'idLanguenav' ).value=idLanguenav;
document.getElementById ( 'codeOpe' ).value='deleteContImg';
ancreSection ( c ) ;
document.menuSiteForm.submit();
}
}
function ancreSection ( c ) {
debugLocal=0;
if (debugLocal==1 ) alert ( "ancreSection -> section ID : " + c ) ;
if (document.getElementById ( 'section'+c ).id ) document.getElementById ( 'sectionAff' ).value=document.getElementById ( 'section'+c ).id;
if (debugLocal==1 ) alert ( "ancreSection section ID : " + document.getElementById ( 'section'+c ).id + "sectionAff : " + document.getElementById ( 'sectionAff' ).value ) ;
}