bugfix im prototype

This commit is contained in:
Hendrik Fellerhoff 2012-03-26 13:45:37 +02:00
parent e49a0ddbab
commit ebaf602737
1 changed files with 16 additions and 3 deletions

View File

@ -118,8 +118,21 @@
}); });
$('#par56select').change(function() { $('#par56select').change(function() {
$('#par56select option:selected').each(function() { $('#par56select option:selected').each(function() {
var hexstring = '#' + devices[$(this).attr('name')].red.toString(16) + devices[$(this).attr('name')].green.toString(16) + devices[$(this).attr('name')].blue.toString(16); var red = devices[$(this).attr('name')].red.toString(16);
console.log(hexstring); if(red.length == 1) {
red += red;
}
var green = devices[$(this).attr('name')].green.toString(16);
if(green.length == 1) {
green += green;
}
var blue = devices[$(this).attr('name')].blue.toString(16);
if(blue.length == 1) {
blue += blue;
}
var hexstring = '#' + red + green + blue;
console.log(hexstring);
colorpicker_raum1.hex(hexstring); colorpicker_raum1.hex(hexstring);
}); });
}); });