summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/farbtastic/farbtastic.go.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/js/farbtastic/farbtastic.go.js b/js/farbtastic/farbtastic.go.js
index 0149eca7d..2f202ced1 100644
--- a/js/farbtastic/farbtastic.go.js
+++ b/js/farbtastic/farbtastic.go.js
@@ -10,19 +10,19 @@ $(document).ready(function() {
function UpdateColors(S) {
C = $(S).val();
switch (parseInt(S.id.slice(-1))) {
- case 0: default:
+ case 1: default:
$('body').css({'background-color':C});
break;
- case 1:
- $('#content').css({'background-color':C});
- break;
case 2:
- $('#aside_primary').css({'background-color':C});
+ $('#content').css({'background-color':C});
break;
case 3:
- $('body').css({'color':C});
+ $('#aside_primary').css({'background-color':C});
break;
case 4:
+ $('html body').css({'color':C});
+ break;
+ case 5:
$('a').css({'color':C});
break;
}
@@ -59,7 +59,9 @@ $(document).ready(function() {
swatches
.each(SynchColors)
.blur(function() {
- $(this).val($(this).val().toUpperCase());
+ tv = $(this).val();
+ $(this).val(tv.toUpperCase());
+ (tv.length == 4) ? ((tv[0] == '#') ? $(this).val('#'+tv[1]+tv[1]+tv[2]+tv[2]+tv[3]+tv[3]) : '') : '';
})
.focus(function() {
$('#color-picker').show();