otherWebsite/ecommerce/js/controlador.js
//dependiendo el parametro que le hemos enviado
dependiendo el parametro que le hemos enviado
dependiendo el parametro que le hemos enviado
function ProductColor(x){
    var XX=x;
    if(XX==1){
        $('#AddColor').append($(`<button type="button" class="btn">White</button>`));
        document.getElementById("btn-Color-Blanco").disabled = true;
    }
    if(XX==2){
        $('#AddColor').append($(`<button type="button" class="btn">Black</button>`));
        document.getElementById("btn-Color-Negro").disabled = true;
    }
    if(XX==3){
        $('#AddColor').append($(`<button type="button" class="btn">Blue</button>`));
        document.getElementById("btn-Color-Azul").disabled = true;
    }
    if(XX==4){
        $('#AddColor').append($(`<button type="button" class="btn">Red</button>`));
        document.getElementById("btn-Color-Rojo").disabled = true;
    }
    if(XX==5){
        $('#AddColor').append($(`<button type="button" class="btn">Yellow</button>`));
        document.getElementById("btn-Color-Amarillo").disabled = true;
    }
    if(XX==6){
        $('#AddColor').append($(`<button type="button" class="btn">Green</button>`));
        document.getElementById("btn-Color-Verde").disabled = true;
    }
    if(XX==7){
        $('#AddColor').append($(`<button type="button" class="btn">Pink</button>`));
        document.getElementById("btn-Color-Rosado").disabled = true;
    }
    if(XX==8){
        $('#AddColor').append($(`<button type="button" class="btn">Orange</button>`));
        document.getElementById("btn-Color-Naranja").disabled = true;
    }if(XX==9){
        $('#AddColor').append($(`<button type="button" class="btn">Purple</button>`));
        document.getElementById("btn-Color-Morado").disabled = true;
    }if(XX==10){
        $('#AddColor').append($(`<button type="button" class="btn">IMG</button>`));
        document.getElementById("btn-Color-Imagen").disabled = true;
    }
}
function ProductColor ( x ) { var XX = x ; if ( XX == 1 ) { $ ( '#AddColor' ) . append ( $ ( ` ` ) ) ; document . getElementById ( "btn-Color-Blanco" ) . disabled = true ; } if ( XX == 2 ) { $ ( '#AddColor' ) . append ( $ ( ` ` ) ) ; document . getElementById ( "btn-Color-Negro" ) . disabled = true ; } if ( XX == 3 ) { $ ( '#AddColor' ) . append ( $ ( ` ` ) ) ; document . getElementById ( "btn-Color-Azul" ) . disabled = true ; } if ( XX == 4 ) { $ ( '#AddColor' ) . append ( $ ( ` ` ) ) ; document . getElementById ( "btn-Color-Rojo" ) . disabled = true ; } if ( XX == 5 ) { $ ( '#AddColor' ) . append ( $ ( ` ` ) ) ; document . getElementById ( "btn-Color-Amarillo" ) . disabled = true ; } if ( XX == 6 ) { $ ( '#AddColor' ) . append ( $ ( ` ` ) ) ; document . getElementById ( "btn-Color-Verde" ) . disabled = true ; } if ( XX == 7 ) { $ ( '#AddColor' ) . append ( $ ( ` ` ) ) ; document . getElementById ( "btn-Color-Rosado" ) . disabled = true ; } if ( XX == 8 ) { $ ( '#AddColor' ) . append ( $ ( ` ` ) ) ; document . getElementById ( "btn-Color-Naranja" ) . disabled = true ; } if ( XX == 9 ) { $ ( '#AddColor' ) . append ( $ ( ` ` ) ) ; document . getElementById ( "btn-Color-Morado" ) . disabled = true ; } if ( XX == 10 ) { $ ( '#AddColor' ) . append ( $ ( ` ` ) ) ; document . getElementById ( "btn-Color-Imagen" ) . disabled = true ; } }
dependiendo el parametro que le hemos enviado
dependiendo el parametro que le hemos enviado