This commit is contained in:
Michael RICOIS 2017-08-10 12:25:10 +02:00
parent 47ac773a88
commit b95fc35eb6

View File

@ -95,14 +95,11 @@ function initFaces()
if(theme == "damier")
{
$(".chocos-holder").html($('#temp-base .chocos').contents().clone());
$(".chocos-holder").html($('#temp-base .chocos').contents().clone());
$('.chocos-holder .flipper .front').html('<div class="colorface color_1"></div><div class="colorface color_2"></div>')
$('.chocos-holder .flipper .back').html('<div class="colorface color_1"></div><div class="colorface color_2"></div>')
$('.chocos-holder .flipper .back').html('<div class="colorface color_1"></div><div class="colorface color_2"></div>')
$(".color_1").addClass(color1)
$(".color_2").addClass(color2)
$(".color_2").addClass(color2)
$('.switch').removeClass('switch');
var color = (color1 == "blanc" || color1 == "ivoire") ? 'noir' : color2;
@ -114,14 +111,12 @@ function initFaces()
$('.chocos-holder .choco5 .front .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/face_21.png)'})
$('.chocos-holder .choco5 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/face_22.png)'})
//chocos
// Chocos
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front .color_2")
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front .color_1")
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front .color_1")
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front .color_1")
$(".chocos-holder .choco2").addClass('switch')
$(".chocos-holder .choco4").addClass('switch')
$('.chocos-holder').addClass('damier');
$('.chocos-holder .color_1').css({ 'background-color':colorRGB[color1]})
$('.chocos-holder .color_2').css({ 'color':colorRGB[color2]})
@ -130,79 +125,33 @@ function initFaces()
}
else if(theme == "ruban")
{
$(".container-db").html($('#temp-ruban .doublecube').contents().clone());
$(".chocos-holder").html($('#temp-ruban .chocos').contents().clone());
$(".container-pochette").html($('#temp-ruban .pochettes').contents().clone());
$(".container-db .cubeface").addClass('b-'+color1)
$(".container-db .bande").addClass('b-'+color2)
$(".container-db .txt").addClass('c-'+color1)
$(".chocos-holder").html($('#temp-ruban .chocos').contents().clone());
$('.chocos-holder .front').addClass('b-'+color1)
$('.chocos-holder .back').addClass('b-'+color1)
$('.chocos-holder .bande').addClass('b-'+color2)
$(".chocos-holder .txt").addClass('c-'+color1)
$('.container-pochette .front').addClass('b-'+color1)
$('.container-pochette .back').addClass('b-'+color1)
$('.container-pochette .bande').addClass('b-'+color2)
$(".container-pochette .txt").addClass('c-'+color1)
$('.chocos-holder .back').css({'background-image':'url(img/simulation/bicolore/liseres/chocos/'+color2+'/face_14.png)'})
$('.container-pochette .back').css({'background-image':'url(img/simulation/bicolore/liseres/chocos/'+color2+'/face_14.png)'})
}
else if(theme == "bayadere")
{
$(".container-db").html($('#temp-base .doublecube').contents().clone());
$(".chocos-holder").html($('#temp-base .chocos').contents().clone());
$(".container-pochette").html($('#temp-base .pochettes').contents().clone());
$('.container-db .cubeface').html($('#temp-bayadere .bayaface').clone())
$('.chocos-holder .flipper .front').html($('#temp-bayadere .bayaface').clone())
$('.chocos-holder .flipper .back').html($('#temp-bayadere .bayaface').clone())
$('.container-pochette .pochette .front').html($('#temp-bayadere .bayaface').clone())
$('.container-pochette .pochette .back').html($('#temp-bayadere .bayaface').clone())
$(".container-db .db-cube1 .back").append('<div class="face-custom-txt face-custom-img"></div>')
$(".container-db .db-cube1 .back").append('<div class="face-custom-txt face-custom-img"></div>')
$('.bayaface .col1').addClass('b-'+color1)
$('.bayaface .col2').addClass('b-'+color2)
$('.bayaface .col3').addClass('b-'+color1)
$('.bayaface .col4').addClass('b-'+color2)
// dc
$('#custom_elmts .noms-holder').clone().appendTo(".container-db .db-cube1 .front")
$('#custom_elmts .date-holder').clone().appendTo(".container-db .db-cube2 .front")
$('.container-db .db-cube1 .right').append('<div class="coeur"></div>');
$('.container-db .db-cube2 .left').append('<div class="coeur"></div>');
$('.container-db .db-cube2 .back').append('<div class="oui"></div>');
//chocos
// Chocos
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .front")
$('#custom_elmts .date-holder-line').clone().appendTo(".chocos-holder .back")
//pochette
$('#custom_elmts .noms-holder').clone().appendTo(".container-pochette .front")
$('#custom_elmts .date-holder-line').clone().appendTo(".container-pochette .back")
$('.chocos-holder .back .colover').css({'background-image':'url(img/simulation/bicolore/liseres/chocos/'+color2+'/face_14.png)'})
$('.container-pochette .back .colover').css({'background-image':'url(img/simulation/bicolore/liseres/chocos/'+color2+'/face_14.png)'})
}
else if(theme == "liseres")
{
$(".container-db").html($('#temp-base .doublecube').contents().clone());
$(".chocos-holder").html($('#temp-base .chocos').contents().clone());
$(".container-pochette").html($('#temp-base .pochettes').contents().clone());
$('.container-db .cubeface').html($('#temp-liseres .liseface').contents().clone())
$('.chocos-holder .flipper .front').html($('#temp-liseres .lisefacesmall').contents().clone())
$('.chocos-holder .flipper .back').html($('#temp-liseres .lisefacesmall').contents().clone())
$('.container-pochette .pochette .front').html($('#temp-liseres .lisefacesmall').contents().clone())
$('.container-pochette .pochette .back').html($('#temp-liseres .lisefacesmall').contents().clone())
$(".container-db .db-cube1 .back").append('<div class="face-custom-txt face-custom-img"></div>')
$('.chocos-holder .flipper .back').html($('#temp-liseres .lisefacesmall').contents().clone())
var file;
if(color1 == "blanc")
{
@ -221,51 +170,13 @@ function initFaces()
{
file = color2;
color = color2;
}
// dc
$('#custom_elmts .noms-holder').clone().appendTo(".container-db .db-cube1 .front")
$('#custom_elmts .date-holder').clone().appendTo(".container-db .db-cube2 .right")
$('#custom_elmts .noms-holder').clone().appendTo(".container-db .db-cube2 .bottom")
$('.container-db .bkgface').addClass('b-'+color1)
$('.container-db .imgface').addClass(color)
$('.container-db .noms-holder').addClass('c-'+color)
$('.container-db .date-holder').addClass('c-'+color)
$('.container-db .face-custom-txt').addClass('c-'+color)
$('.container-db .db-cube1 .top .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/box/'+file+'/face_1.png)'})
$('.container-db .db-cube1 .bottom .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/box/'+file+'/face_2.png)'})
$('.container-db .db-cube1 .front .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/box/'+file+'/face_4.png)'})
$('.container-db .db-cube1 .left .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/box/'+file+'/face_5.png)'})
$('.container-db .db-cube1 .right .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/box/'+file+'/face_6.png)'})
$('.container-db .db-cube2 .top .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/box/'+file+'/face_7.png)'})
$('.container-db .db-cube2 .bottom .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/box/'+file+'/face_8.png)'})
$('.container-db .db-cube2 .back .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/box/'+file+'/face_9.png)'})
$('.container-db .db-cube2 .front .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/box/'+file+'/face_10.png)'})
$('.container-db .db-cube2 .left .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/box/'+file+'/face_11.png)'})
$('.container-db .db-cube2 .right .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/box/'+file+'/face_12.png)'})
$('.chocos-holder .back .bkgface').css({'background-image':'url(img/simulation/bicolore/liseres/chocos/'+(color1 == "blanc" || color1 == "ivoire") ? 'noir' : color2+'/face_14.png)'})
$('.container-pochette .back .bkgface').css({'background-image':'url(img/simulation/bicolore/liseres/chocos/'+(color1 == "blanc" || color1 == "ivoire") ? 'noir' : color2+'/face_14.png)'})
//chocos
}
$('.chocos-holder .back .bkgface').css({'background-image':'url(img/simulation/bicolore/liseres/chocos/'+(color1 == "blanc" || color1 == "ivoire") ? 'noir' : color2+'/face_14.png)'})
// Chocos
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .front .txtface")
$('#custom_elmts .date-holder-line').clone().appendTo(".chocos-holder .back .txtface")
$('#custom_elmts .date-holder-line').clone().appendTo(".chocos-holder .back .txtface")
$('.chocos-holder .bkgface').addClass('b-'+color1)
$('.chocos-holder .txtface').addClass('c-'+color2)
//pochette
$('#custom_elmts .noms-holder').clone().appendTo(".container-pochette .front .txtface")
$('#custom_elmts .date-holder-line').clone().appendTo(".container-pochette .back .txtface")
$('.container-pochette .bkgface').addClass('b-'+color1);
$('.container-pochette .txtface').addClass('c-'+color2);
}
$('.chocos-holder .flip-container').eq(4).show();