summaryrefslogtreecommitdiff
path: root/js/farbtastic
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-06-16 02:33:10 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-06-16 02:33:10 +0000
commitbd8f9a979acb1607e00499dfba223a51b57596af (patch)
tree1cee2c9722531cadc5cacebfa6d36380307651bd /js/farbtastic
parent2f693c4c9453fc61bea960ba8767fdf68e5130cd (diff)
Converts user entry in the form of '#1B2' into '#11BB22' for user
design swatches
Diffstat (limited to 'js/farbtastic')
-rw-r--r--js/farbtastic/farbtastic.go.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/farbtastic/farbtastic.go.js b/js/farbtastic/farbtastic.go.js
index 4e0493b40..2f202ced1 100644
--- a/js/farbtastic/farbtastic.go.js
+++ b/js/farbtastic/farbtastic.go.js
@@ -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();