summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-06-15 20:25:36 -0700
committerZach Copley <zach@controlyourself.ca>2009-06-15 20:25:36 -0700
commit9dce5d00f14e2a866633fc717ea9099429b2e7ea (patch)
treeb35d4da75f1a612effefd2692082fc54fcfae356
parent20d93508776398627f5aff64b83bd20a362cb45d (diff)
parentbd8f9a979acb1607e00499dfba223a51b57596af (diff)
Merge branch 'userdesign' of ssh://zach@dev.controlyourself.ca/mnt/www/design into userdesign
* 'userdesign' of ssh://zach@dev.controlyourself.ca/mnt/www/design: Converts user entry in the form of '#1B2' into '#11BB22' for user Updated swatch numbering Conflicts: actions/designsettings.php
-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();