Fix #10 - Allow to choose card color

This commit is contained in:
Luc Didry 2018-09-17 09:49:48 +02:00
parent ae4db29b8c
commit 33d96d90ea
No known key found for this signature in database
GPG key ID: EA868E12D0257E3C
2 changed files with 15 additions and 2 deletions

View file

@ -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);

View file

@ -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