Cleanup
This commit is contained in:
parent
39ffdba897
commit
6258d3aaf1
@ -67,20 +67,18 @@ function initFaces()
|
||||
$(".chocos-holder").empty()
|
||||
|
||||
$('#custom-freeface').hide()
|
||||
|
||||
$('.container-db').addClass(theme);
|
||||
$('.chocos-holder').addClass(theme);
|
||||
|
||||
if(theme == "damier")
|
||||
{
|
||||
$('#custom-freeface').show()
|
||||
|
||||
$(".container-db").html($('#temp-base .doublecube').contents().clone());
|
||||
$(".chocos-holder").html($('#temp-base .chocos').contents().clone());
|
||||
$(".container-pochette").html($('#temp-base .pochettes').contents().clone());
|
||||
|
||||
$(".chocos-holder").html($('#temp-base .chocos').contents().clone());
|
||||
$('.container-db .cubeface').html('<div class="colorface color_1"></div><div class="colorface color_2"></div>')
|
||||
$('.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>')
|
||||
$('.container-pochette .pochette .front').html('<div class="colorface color_1"></div><div class="colorface color_2"></div>')
|
||||
$('.container-pochette .pochette .back').html('<div class="colorface color_1"></div><div class="colorface color_2"></div>')
|
||||
|
||||
$(".color_1").addClass(color1)
|
||||
$(".color_2").addClass(color2)
|
||||
@ -124,7 +122,6 @@ function initFaces()
|
||||
$('.chocos-holder .choco4 .back .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/face_20.png)'})
|
||||
$('.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-holder').addClass(theme);
|
||||
//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")
|
||||
@ -153,13 +150,7 @@ function initFaces()
|
||||
$('.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('+themeImg+'/chocos/'+color2+'/face_14.png)'})
|
||||
$('.container-pochette .back').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/face_14.png)'})
|
||||
}
|
||||
else if(theme == "bayadere")
|
||||
{
|
||||
@ -185,6 +176,11 @@ function initFaces()
|
||||
// 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').css({'background-image' : 'url('+themeImg+'/box/face_6.png)'});
|
||||
$('.container-db .db-cube2 .left').css({'background-image' : 'url('+themeImg+'/box/face_11.png)'});
|
||||
$('.container-db .db-cube2 .back').css({'background-image' : 'url('+themeImg+'/box/face_10.png)'});
|
||||
|
||||
$('.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>');
|
||||
@ -199,8 +195,6 @@ function initFaces()
|
||||
|
||||
$('.chocos-holder .back .colover').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/face_14.png)'})
|
||||
$('.container-pochette .back .colover').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/face_14.png)'})
|
||||
|
||||
checkfaceCustom()
|
||||
}
|
||||
else if(theme == "liseres")
|
||||
{
|
||||
@ -242,7 +236,7 @@ function initFaces()
|
||||
$('#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)
|
||||
|
@ -18,6 +18,31 @@ var faceDeg = {
|
||||
'right': { 'x': 0, 'y': 0, },
|
||||
};
|
||||
|
||||
var color1 = 'anis';
|
||||
var colorRGB =
|
||||
{
|
||||
anis: '#B5DC10',
|
||||
argent: '#C2C2C2',
|
||||
blanc: '#FFFFFF',
|
||||
bleuf: '#10147E',
|
||||
bordeaux: 'bordeaux',
|
||||
framboise: '#C42B68',
|
||||
fuschia: '#F0037F',
|
||||
grisf: '#766546',
|
||||
ivoire: '#FFFAD7',
|
||||
marron: '#3C1503',
|
||||
noir: '#000000',
|
||||
or: '#FFC211',
|
||||
orange: '#E37222',
|
||||
parme: '#D198CA',
|
||||
rose: '#F88CC4',
|
||||
rouge: '#F50003',
|
||||
taupe: '#CCC6AB',
|
||||
turquoise: '#7FCDD0',
|
||||
vert: '#159033',
|
||||
violet: '#6B1687',
|
||||
}
|
||||
|
||||
// Start when DOM is ready
|
||||
$(function() {
|
||||
initInfos();
|
||||
@ -32,98 +57,51 @@ function initFaces()
|
||||
$('.container-db').find('.date-holder').remove();
|
||||
$('.chocos-holder').find('.noms-holder').remove();
|
||||
$('.chocos-holder').find('.date-holder').remove();
|
||||
$('.container-pochette').find('.noms-holder').remove();
|
||||
$('.container-pochette').find('.date-holder').remove();
|
||||
$('.face-custom-txt').removeClass('face-custom-txt');
|
||||
$('.face-custom-img').removeClass('face-custom-img');
|
||||
|
||||
$(".container-db").empty()
|
||||
$(".chocos-holder").empty()
|
||||
$(".container-pochette").empty()
|
||||
|
||||
$(".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-exclu .excluface').contents().clone()).css({'background' : 'url('+themeImg+'/face.jpg)'})
|
||||
$('.chocos-holder .flipper .front').html($('#temp-exclu .excluface').contents().clone()).css({'background' : 'url('+themeImg+'/face.jpg)'})
|
||||
$('.chocos-holder .flipper .back').html($('#temp-exclu .excluface').contents().clone()).css({'background' : 'url('+themeImg+'/face.jpg)'})
|
||||
$('.container-pochette .pochette .front').html($('#temp-exclu .excluface').contents().clone()).css({'background' : 'url('+themeImg+'/face.jpg)'})
|
||||
$('.container-pochette .pochette .back').html($('#temp-exclu .excluface').contents().clone()).css({'background' : 'url('+themeImg+'/face.jpg)'})
|
||||
|
||||
/*setFacesExclu(_custom.faces_dc_exclu,$('.exclu .container-db .cubeface'))
|
||||
setFacesExclu(_custom.faces_chocos_exclu,$('.exclu .chocos-holder .flipper .front'))
|
||||
|
||||
$('.exclu .container-db .cubeface').on('click',function(){
|
||||
|
||||
_faceSelected = "dc";
|
||||
$_face_exclu = $(this);
|
||||
|
||||
$('.imgface').removeClass('actif')
|
||||
$(this).find('.imgface').addClass('actif');
|
||||
_face_exclu_id = parseInt($(this).attr('data-id'));
|
||||
_face_exclu = _custom.faces_dc_exclu["face_"+_face_exclu_id];
|
||||
|
||||
//log('_face_exclu : ' + _face_exclu.text)
|
||||
|
||||
});
|
||||
|
||||
$('.exclu .chocos-holder .flipper .front').on('click',function(){
|
||||
|
||||
_faceSelected = "chocos"
|
||||
$_face_exclu = $(this);
|
||||
|
||||
$('.imgface').removeClass('actif')
|
||||
$(this).find('.imgface').addClass('actif');
|
||||
_choco_exclu_id = parseInt($(this).attr('data-id'));
|
||||
_face_exclu = _custom.faces_chocos_exclu["face_"+_choco_exclu_id];
|
||||
|
||||
$('.exclu .container-pochette .pochette').eq(_choco_exclu_id-1).find('.front').html($('.exclu .chocos-holder .flipper').eq(_choco_exclu_id-1).find('.front').contents().clone())
|
||||
$('.exclu .container-pochette .pochette').eq(_choco_exclu_id-1).find('.back').html($('.exclu .chocos-holder .flipper').eq(_choco_exclu_id-1).find('.front').contents().clone())
|
||||
});
|
||||
|
||||
$('.container-pochette .pochette').on('click',function(){
|
||||
|
||||
var index = parseInt($(this).attr('data-id'))-1;
|
||||
|
||||
$('.exclu .chocos-holder .flipper').eq(index).find('.front').click()
|
||||
$('.exclu .container-pochette .pochette').eq(index).find('.front').html($('.exclu .chocos-holder .flipper').eq(index).find('.front').contents().clone())
|
||||
$('.exclu .container-pochette .pochette').eq(index).find('.back').html($('.exclu .chocos-holder .flipper').eq(index).find('.front').contents().clone())
|
||||
});*/
|
||||
$('.container-db .cubeface').html($('#temp-exclu .excluface').contents().clone()).css({'background' : 'url('+themeImg+'face.jpg)'})
|
||||
$('.chocos-holder .flipper .front').html($('#temp-exclu .excluface').contents().clone()).css({'background' : 'url('+themeImg+'face.jpg)'})
|
||||
$('.chocos-holder .flipper .back').html($('#temp-exclu .excluface').contents().clone()).css({'background' : 'url('+themeImg+'face.jpg)'})
|
||||
|
||||
$('.exclu .container-db .cubeface').eq(3).click()
|
||||
$('.chocos-holder .flip-container').eq(4).show();
|
||||
$('.chocos-holder .flip-container').eq(4).show();
|
||||
}
|
||||
|
||||
//=== Events
|
||||
$('.container-db').on('click', '.cubeface', function(e){
|
||||
$('.imgface').removeClass('actif');
|
||||
$(this).find('.imgface').addClass('actif');
|
||||
if ($(this).parent('.cube').hasClass('db-cube1')){
|
||||
$('input[name=cube]').val('1');
|
||||
} else {
|
||||
$('input[name=cube]').val('2');
|
||||
}
|
||||
console.log($(this).data('id'));
|
||||
$('input[name=face]').val($(this).data('id'));
|
||||
});
|
||||
|
||||
$('#NOM1').on('keyup click', function(){
|
||||
defNOM1($(this));
|
||||
rotateDC(0,45);
|
||||
});
|
||||
|
||||
$('#NOM2').on('keyup click', function(){
|
||||
$('#NOM2').on('keyup click', function(){
|
||||
defNOM2($(this));
|
||||
rotateDC(0,45);
|
||||
});
|
||||
|
||||
$('#PERSOTXT').on('keyup click', function(){
|
||||
var txt = $(this).val().replace(/\n/g, "<br />");
|
||||
$('.face-custom-img').empty();
|
||||
$('.face-custom-txt').html('<div class="freetext-holder"></div>');
|
||||
$('.freetext-holder').html(txt).css({'margin-top':-$('.freetext-holder').height()*0.5});
|
||||
rotateDC(0,180);
|
||||
});
|
||||
|
||||
$('#DATEMARIAGE').on('change click', function(e) {
|
||||
defDATEMARIAGE($(this));
|
||||
rotateDC(0,90);
|
||||
});
|
||||
|
||||
$('.FACELIBRE').on('change', function(e) {
|
||||
defFACELIBRE($(this));
|
||||
rotateDC(0,180);
|
||||
});
|
||||
|
||||
$('#EMBALLAGE').on('change', function(e) {
|
||||
defEMBALLAGE($(this));
|
||||
});
|
||||
@ -132,6 +110,15 @@ $('#PELLICULAGE').on('change', function(e) {
|
||||
defPELLICULAGE($(this));
|
||||
});
|
||||
|
||||
$('#colorpicker1').simplecolorpicker({picker: true, theme: 'glyphicons'})
|
||||
.on('change', function() {
|
||||
color1 = $('#colorpicker1 option:selected').attr('data-id');
|
||||
$('.color1text').html($('#colorpicker1 option:selected').text());
|
||||
console.log($('.imgface.actif'));
|
||||
console.log($('.imgface .actif').parent().data('id'));
|
||||
//initFaces();
|
||||
});
|
||||
|
||||
function initDrag()
|
||||
{
|
||||
$('#simu-box').on(events.start, function(e) {
|
||||
@ -189,6 +176,10 @@ function initInfos()
|
||||
defFACELIBRE($('.FACELIBRE'));
|
||||
defPELLICULAGE($('#PELLICULAGE'));
|
||||
defEMBALLAGE($('#EMBALLAGE'));
|
||||
$('#colorpicker1').simplecolorpicker('selectColor', colorRGB[color1]);
|
||||
$('.color1text').html($('#colorpicker1 option:selected').text());
|
||||
console.log($('.db-cube1 .cubeface.front'));
|
||||
$('.db-cube1 .cubeface.front').addClass('actif');
|
||||
}
|
||||
|
||||
function defDATEMARIAGE(obj){
|
||||
|
@ -5,17 +5,16 @@ _unit = 360/_max_amount ,
|
||||
_flag = false,
|
||||
_angle = {'x': 0, 'y': 0};
|
||||
_anglelast = {'x': 0, 'y': 0};
|
||||
monthR = ["","Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"];
|
||||
;
|
||||
|
||||
var monthR = ["","Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"];
|
||||
|
||||
var faceDeg = {
|
||||
'top': { 'x': 0, 'y': 0, },
|
||||
'bottom': { 'x': 0, 'y': 0, },
|
||||
'back': { 'x': 0, 'y': 0, },
|
||||
'back': { 'x': 0, 'y': 180, },
|
||||
'front': { 'x': 0, 'y': 45, },
|
||||
'left': { 'x': 0, 'y': 0, },
|
||||
'right': { 'x': 0, 'y': 0, },
|
||||
'left': { 'x': 0, 'y': 90, },
|
||||
'right': { 'x': 0, 'y': -90, },
|
||||
};
|
||||
|
||||
// Start when DOM is ready
|
||||
@ -84,25 +83,27 @@ function initFaces()
|
||||
//=== Events
|
||||
$('#NOM1').on('keyup click', function(){
|
||||
defNOM1($(this));
|
||||
rotateDC(0,45);
|
||||
rotateDC(faceDeg['front']['x'],faceDeg['front']['y']);
|
||||
});
|
||||
|
||||
$('#NOM2').on('keyup click', function(){
|
||||
defNOM2($(this));
|
||||
rotateDC(0,45);
|
||||
rotateDC(faceDeg['front']['x'],faceDeg['front']['y']);
|
||||
});
|
||||
|
||||
$('#PERSOTXT').on('keyup click', function(){
|
||||
var txt = $(this).val().replace(/\n/g, "<br />");
|
||||
$('.face-custom-img').empty();
|
||||
$('.face-custom-txt').html('<div class="freetext-holder"></div>');
|
||||
$('.freetext-holder').html(txt).css({'margin-top':-$('.freetext-holder').height()*0.5});
|
||||
rotateDC(0,180);
|
||||
$('.freetext-holder').html(txt).css({'margin-top':-$('.freetext-holder').height()*0.5});
|
||||
var face = facename($('.freetext-holder'));
|
||||
rotateDC(faceDeg[face]['x'],faceDeg[face]['y']);
|
||||
});
|
||||
|
||||
$('#DATEMARIAGE').on('change click', function(e) {
|
||||
defDATEMARIAGE($(this));
|
||||
rotateDC(0,90);
|
||||
var face = facename($('.date-holder'));
|
||||
rotateDC(faceDeg[face]['x'],faceDeg[face]['y']);
|
||||
});
|
||||
|
||||
$('#FACELIBRE').on('change', function(e) {
|
||||
@ -171,13 +172,12 @@ function drag(e) {
|
||||
};
|
||||
|
||||
// === Functions
|
||||
|
||||
function initInfos()
|
||||
{
|
||||
defNOM1($('#NOM1'));
|
||||
defNOM2($('#NOM2'));
|
||||
defDATEMARIAGE($('#DATEMARIAGE'));
|
||||
defFACELIBRE($('.FACELIBRE'));
|
||||
defFACELIBRE($('#FACELIBRE'));
|
||||
defPELLICULAGE($('#PELLICULAGE'));
|
||||
defEMBALLAGE($('#EMBALLAGE'));
|
||||
}
|
||||
@ -262,6 +262,23 @@ function defDOUBLECUBEIMAGE(obj){
|
||||
}
|
||||
}
|
||||
|
||||
function facename(obj){
|
||||
var face = obj.parent('.cubeface');
|
||||
if(face.hasClass('top')){
|
||||
return 'top';
|
||||
} else if(face.hasClass('bottom')){
|
||||
return 'bottom';
|
||||
} else if(face.hasClass('back')){
|
||||
return 'back';
|
||||
} else if(face.hasClass('front')){
|
||||
return 'front';
|
||||
} else if(face.hasClass('left')){
|
||||
return 'left';
|
||||
} else if(face.hasClass('right')){
|
||||
return 'right';
|
||||
}
|
||||
}
|
||||
|
||||
function formatDateInput(date)
|
||||
{
|
||||
var day = date.substring(6,8);
|
||||
|
@ -194,28 +194,28 @@ function initFaces()
|
||||
$(".color_1").addClass(color1);
|
||||
$(".color_2").addClass(color2);
|
||||
|
||||
$('.switch').removeClass('switch');
|
||||
|
||||
$(".container-db .db-cube1 .back .color_2").addClass('face-custom-img');
|
||||
$(".container-db .db-cube1 .back .color_1").addClass('face-custom-txt');
|
||||
$('.switch').removeClass('switch');
|
||||
|
||||
var color = (color1 == "blanc" || color1 == "ivoire") ? 'noir' : color2;
|
||||
|
||||
// 1F
|
||||
$('.chocos-holder .choco1 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/face_14.png)'}); //1B - 14
|
||||
// 2F
|
||||
$('.chocos-holder .choco2 .back .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/face_16.png)'}); //2B - 16
|
||||
$('.chocos-holder .choco3 .front .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/face_17.png)'}); //3F - 17
|
||||
$('.chocos-holder .choco3 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/face_18.png)'}); //3B - 18
|
||||
|
||||
// 4F
|
||||
$('.chocos-holder .choco4 .back .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/face_20.png)'}); //4B - 20
|
||||
$('.chocos-holder .choco5 .front .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/face_21.png)'}); // 5F - 21
|
||||
$('.chocos-holder .choco5 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/face_22.png)'}); // 5B - 22
|
||||
|
||||
// 1F
|
||||
$('.container-pochette .pochette1 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/face_14.png)'}); // 1B - 14
|
||||
$('.container-pochette .pochette2 .back .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/face_16.png)'}); // 2B - 16
|
||||
|
||||
$('.container-pochette .pochette3 .front .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/face_17.png)'}); // 3F - 17
|
||||
|
||||
// 2F
|
||||
$('.container-pochette .pochette2 .back .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/face_16.png)'}); // 2B - 16
|
||||
$('.container-pochette .pochette3 .front .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/face_17.png)'}); // 3F - 17
|
||||
$('.container-pochette .pochette3 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/face_18.png)'}); // 3B - 18
|
||||
// 4F
|
||||
$('.container-pochette .pochette4 .back .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/face_20.png)'}); // 4B - 20
|
||||
|
||||
//chocos
|
||||
|
@ -106,10 +106,13 @@ function initFaces()
|
||||
$('.switch').removeClass('switch');
|
||||
|
||||
var color = (color1 == "blanc" || color1 == "ivoire") ? 'noir' : color2;
|
||||
//$('.chocos-holder .choco1 .front .color_2')
|
||||
$('.chocos-holder .choco1 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/face_14.png)'})
|
||||
//$('.chocos-holder .choco2 .front .color_1')
|
||||
$('.chocos-holder .choco2 .back .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/face_16.png)'})
|
||||
$('.chocos-holder .choco3 .front .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/face_17.png)'})
|
||||
$('.chocos-holder .choco3 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/face_18.png)'})
|
||||
//$('.chocos-holder .choco4 .front .color_1')
|
||||
$('.chocos-holder .choco4 .back .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/face_20.png)'})
|
||||
$('.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)'})
|
||||
@ -129,80 +132,34 @@ function initFaces()
|
||||
$('.chocos-holder .switch .color_2').css({'background-color':colorRGB[color2]})
|
||||
}
|
||||
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 .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)'})
|
||||
$('.chocos-holder .back').css({'background-image':'url('+themeImg+'/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").html($('#temp-base .chocos').contents().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>')
|
||||
|
||||
$('.chocos-holder .flipper .back').html($('#temp-bayadere .bayaface').clone())
|
||||
$('.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
|
||||
$('#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)'})
|
||||
|
||||
$('.chocos-holder .back .colover').css({'background-image':'url('+themeImg+'/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>')
|
||||
|
||||
var file;
|
||||
if(color1 == "blanc")
|
||||
{
|
||||
@ -223,49 +180,12 @@ function initFaces()
|
||||
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")
|
||||
$('.chocos-holder .back .bkgface').css({'background-image':'url('+themeImg+'/chocos/'+(color1 == "blanc" || color1 == "ivoire") ? 'noir' : color2+'/face_14.png)'})
|
||||
|
||||
$('.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/db/'+file+'/face_1.png)'})
|
||||
$('.container-db .db-cube1 .bottom .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_2.png)'})
|
||||
$('.container-db .db-cube1 .front .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_4.png)'})
|
||||
$('.container-db .db-cube1 .left .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_5.png)'})
|
||||
$('.container-db .db-cube1 .right .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_6.png)'})
|
||||
$('.container-db .db-cube2 .top .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_7.png)'})
|
||||
$('.container-db .db-cube2 .bottom .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_8.png)'})
|
||||
$('.container-db .db-cube2 .back .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_9.png)'})
|
||||
$('.container-db .db-cube2 .front .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_10.png)'})
|
||||
$('.container-db .db-cube2 .left .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_11.png)'})
|
||||
$('.container-db .db-cube2 .right .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+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
|
||||
$('#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 .txtface').addClass('c-'+color2)
|
||||
}
|
||||
|
||||
$('.chocos-holder .flip-container').eq(4).show();
|
||||
|
@ -236,17 +236,17 @@ function initFaces()
|
||||
|
||||
|
||||
|
||||
$('.container-db .db-cube1 .top .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_1.png)'})
|
||||
$('.container-db .db-cube1 .bottom .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_2.png)'})
|
||||
$('.container-db .db-cube1 .front .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_4.png)'})
|
||||
$('.container-db .db-cube1 .left .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_5.png)'})
|
||||
$('.container-db .db-cube1 .right .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_6.png)'})
|
||||
$('.container-db .db-cube2 .top .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_7.png)'})
|
||||
$('.container-db .db-cube2 .bottom .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_8.png)'})
|
||||
$('.container-db .db-cube2 .back .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_9.png)'})
|
||||
$('.container-db .db-cube2 .front .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_10.png)'})
|
||||
$('.container-db .db-cube2 .left .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_11.png)'})
|
||||
$('.container-db .db-cube2 .right .imgface.'+color).css({'background-image' : 'url(img/simulation/bicolore/liseres/db/'+file+'/face_12.png)'})
|
||||
$('.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)'})
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user