Updated swatch numbering

This commit is contained in:
Sarven Capadisli 2009-06-15 21:02:12 +00:00
parent 807d84d448
commit 2f693c4c94
2 changed files with 16 additions and 17 deletions

View File

@ -106,10 +106,10 @@ class DesignsettingsAction extends AccountSettingsAction
} }
$this->elementStart('li'); $this->elementStart('li');
$this->element('label', array('for' => 'swatch-0'), _('Background')); $this->element('label', array('for' => 'swatch-1'), _('Background'));
$this->element('input', array('name' => 'design_background', $this->element('input', array('name' => 'design_background',
'type' => 'text', 'type' => 'text',
'id' => 'swatch-0', 'id' => 'swatch-1',
'class' => 'swatch', 'class' => 'swatch',
'maxlength' => '7', 'maxlength' => '7',
'size' => '7', 'size' => '7',
@ -117,10 +117,10 @@ class DesignsettingsAction extends AccountSettingsAction
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementStart('li'); $this->elementStart('li');
$this->element('label', array('for' => 'swatch-1'), _('Content')); $this->element('label', array('for' => 'swatch-2'), _('Content'));
$this->element('input', array('name' => 'design_content', $this->element('input', array('name' => 'design_content',
'type' => 'text', 'type' => 'text',
'id' => 'swatch-1', 'id' => 'swatch-2',
'class' => 'swatch', 'class' => 'swatch',
'maxlength' => '7', 'maxlength' => '7',
'size' => '7', 'size' => '7',
@ -128,10 +128,10 @@ class DesignsettingsAction extends AccountSettingsAction
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementStart('li'); $this->elementStart('li');
$this->element('label', array('for' => 'swatch-2'), _('Sidebar')); $this->element('label', array('for' => 'swatch-3'), _('Sidebar'));
$this->element('input', array('name' => 'design_sidebar', $this->element('input', array('name' => 'design_sidebar',
'type' => 'text', 'type' => 'text',
'id' => 'swatch-2', 'id' => 'swatch-3',
'class' => 'swatch', 'class' => 'swatch',
'maxlength' => '7', 'maxlength' => '7',
'size' => '7', 'size' => '7',
@ -139,10 +139,10 @@ class DesignsettingsAction extends AccountSettingsAction
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementStart('li'); $this->elementStart('li');
$this->element('label', array('for' => 'swatch-3'), _('Text')); $this->element('label', array('for' => 'swatch-4'), _('Text'));
$this->element('input', array('name' => 'design_text', $this->element('input', array('name' => 'design_text',
'type' => 'text', 'type' => 'text',
'id' => 'swatch-3', 'id' => 'swatch-4',
'class' => 'swatch', 'class' => 'swatch',
'maxlength' => '7', 'maxlength' => '7',
'size' => '7', 'size' => '7',
@ -150,15 +150,14 @@ class DesignsettingsAction extends AccountSettingsAction
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementStart('li'); $this->elementStart('li');
$this->element('label', array('for' => 'swatch-4'), _('Links')); $this->element('label', array('for' => 'swatch-5'), _('Links'));
$this->element('input', array('name' => 'design_links', $this->element('input', array('name' => 'design_links',
'type' => 'text', 'type' => 'text',
'id' => 'swatch-4', 'id' => 'swatch-5',
'class' => 'swatch', 'class' => 'swatch',
'maxlength' => '7', 'maxlength' => '7',
'size' => '7', 'size' => '7',
'value' => $design->linkcolor)); 'value' => $design->linkcolor));
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementEnd('ul'); $this->elementEnd('ul');

View File

@ -10,19 +10,19 @@ $(document).ready(function() {
function UpdateColors(S) { function UpdateColors(S) {
C = $(S).val(); C = $(S).val();
switch (parseInt(S.id.slice(-1))) { switch (parseInt(S.id.slice(-1))) {
case 0: default: case 1: default:
$('body').css({'background-color':C}); $('body').css({'background-color':C});
break; break;
case 1: case 2:
$('#content').css({'background-color':C}); $('#content').css({'background-color':C});
break; break;
case 2: case 3:
$('#aside_primary').css({'background-color':C}); $('#aside_primary').css({'background-color':C});
break; break;
case 3:
$('body').css({'color':C});
break;
case 4: case 4:
$('html body').css({'color':C});
break;
case 5:
$('a').css({'color':C}); $('a').css({'color':C});
break; break;
} }