diff --git a/client/script.js b/client/script.js index 2c97086..d3292fe 100644 --- a/client/script.js +++ b/client/script.js @@ -394,6 +394,11 @@ function createCard(id, text, x, y, rot, colour) { } function randomCardColour() { + var choosed = $('#choose-card-color').val(); + if (choosed !== 'random') { + return choosed; + } + var colours = ['yellow', 'green', 'blue', 'white']; var i = Math.floor(Math.random() * colours.length); diff --git a/views/index.jade b/views/index.jade index 3279ae7..2f02168 100644 --- a/views/index.jade +++ b/views/index.jade @@ -22,8 +22,16 @@ block body div.buttons - i#create-card.fa.fa-plus-circle.fa-2x.bottom-icon - i#smallify.fa.fa-expand.fa-2x.bottom-icon + i#create-card.fa.fa-plus-circle.fa-2x.bottom-icon(title='Ajouter une note') + i#smallify.fa.fa-expand.fa-2x.bottom-icon(title='RĂ©duire la taille des notes') + div.form-group + label.control-label(for='choose-card-color') Choisir la couleur de la nouvelle note  + select#choose-card-color.form-control + option(value='random') Couleur au hasard + option(value='yellow') Jaune + option(value='green') Vert + option(value='blue') Bleu + option(value='white') Blanc div.stickers