[9.2.01] footer réécriture jquery supp aperçu texte

This commit is contained in:
fredtempez 2019-07-15 18:35:25 +02:00
parent 5c94a30683
commit 56bffbcf36
1 changed files with 28 additions and 38 deletions

View File

@ -76,53 +76,49 @@ $("input, select").on("change", function() {
// Position dans les blocs // Position dans les blocs
// Bloc texte personnalisé // Bloc texte personnalisé
$(".themeFooterContent").on("change",function() { $(".themeFooterContent").on("change",function() {
var position = $("#themeFooterPosition").val(); // Position site ou body
var footerPosition = $("#themeFooterPosition").val();
//console.log("text : "+ $("#themeFooterTextPosition").val());
//console.log("socials : " + $("#themeFooterSocialsPosition").val());
//console.log("copyright: " + $("#themeFooterCopyrightPosition").val());
switch($("#themeFooterTextPosition").val()) { switch($("#themeFooterTextPosition").val()) {
case "hide": case "hide":
$("#footerText").hide(); $("#footerText").hide();
break; break;
case "left": default:
$("#footerText").show().appendTo("#footer" + position + "Left"); // Choix de la position du bloc
break; textPosition = $("#themeFooterTextPosition").val();
case "center": textPosition = textPosition.substr(0,1).toUpperCase()+textPosition.substr(1);
$("#footerText").show().appendTo("#footer" + position + "Center"); $("#footerText").show().appendTo("#footer" + footerPosition + textPosition);
break; //console.log("text");
case "right": //console.log("#footer" + footerPosition + textPosition);
$("#footerText").show().appendTo("#footer" + position + "Right"); break;
break;
} }
switch($("#themeFooterSocialsPosition").val()) { switch($("#themeFooterSocialsPosition").val()) {
case 'hide': case 'hide':
$("#footerSocials").hide(); $("#footerSocials").hide();
break; break;
case 'left': default:
$("#footerSocials").show().appendTo("#footer" + position + "Left"); // Choix de la position du bloc
break; socialsPosition = $("#themeFooterSocialsPosition").val();
case 'center': socialsPosition = socialsPosition.substr(0,1).toUpperCase()+socialsPosition.substr(1);
$("#footerSocials").show().appendTo("#footer" + position + "Center"); $("#footerSocials").show().appendTo("#footer" + footerPosition + socialsPosition);
break; //console.log("socials");
case 'right': //console.log("#footer" + footerPosition + socialsPosition);
$("#footerSocials").show().appendTo("#footer" + position + "Right");
break; break;
} }
switch($("#themeFooterCopyrightPosition").val()) { switch($("#themeFooterCopyrightPosition").val()) {
case 'hide': case 'hide':
$("#footerCopyright").hide(); $("#footerCopyright").hide();
break; break;
case 'left': default:
$("#footerCopyright").show().appendTo("#footer" + position + "Left"); // Choix de la position du bloc
break; copyrightPosition = $("#themeFooterCopyrightPosition").val();
case 'center': copyrightPosition = copyrightPosition.substr(0,1).toUpperCase()+copyrightPosition.substr(1);
$("#footerCopyright").show().appendTo("#footer" + position + "Center"); $("#footerCopyright").show().appendTo("#footer" + footerPosition + copyrightPosition);
break; //console.log("copyright");
case 'right': //console.log("#footer" + footerPosition + copyrightPosition);
$("#footerCopyright").show().appendTo("#footer" + position + "Right"); break;
break;
} }
}).trigger("change"); }).trigger("change");
// Fin Position dans les blocs // Fin Position dans les blocs
@ -265,12 +261,6 @@ $("#themeFooterDisplaySearch").on("change", function() {
} }
}).trigger("change"); }).trigger("change");
// Aperçu du texte
$("#themeFooterText").on("change keydown keyup", function() {
$("#footerText").html($(this).val());
});
// Affiche / Cache les options de la position // Affiche / Cache les options de la position
$("#themeFooterPosition").on("change", function() { $("#themeFooterPosition").on("change", function() {
if($(this).val() === 'site') { if($(this).val() === 'site') {