summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-04-13 05:39:23 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-04-13 05:39:23 +0000
commited3d68435f042ff6bc212022058310255db0e1bd (patch)
tree3fd48baf75ea64353af82ab86f7b76b53d24e11f /actions
parent4a8c23fe32cf0f3c556dfa062dcffedd77fd5857 (diff)
Using farbtastic jQuery plugin to select design colours.
Diffstat (limited to 'actions')
-rw-r--r--actions/designsettings.php61
1 files changed, 58 insertions, 3 deletions
diff --git a/actions/designsettings.php b/actions/designsettings.php
index 87afdac8a..05293f712 100644
--- a/actions/designsettings.php
+++ b/actions/designsettings.php
@@ -88,19 +88,34 @@ class DesignsettingsAction extends AccountSettingsAction
$this->elementEnd('ul');
$this->elementEnd('fieldset');
- $this->elementStart('fieldset', array('id' => 'settings_design_colour'));
+ $this->elementStart('fieldset', array('id' => 'settings_design_color'));
$this->element('legend', null, _('Change colours'));
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
- $this->element('p', null, _('Edit text colours'));
+ $this->input('color-1', _('Background color'), '#F0F2F5', null);
$this->elementEnd('li');
- $this->elementEnd('ul');
+ $this->elementStart('li');
+ $this->input('color-2', _('Content background color'), '#FFFFFF', null);
+ $this->elementEnd('li');
+ $this->elementStart('li');
+ $this->input('color-3', _('Sidebar background color'), '#CEE1E9', null);
+ $this->elementEnd('li');
+ $this->elementStart('li');
+ $this->input('color-4', _('Text color'), '#000000', null);
+ $this->elementEnd('li');
+ $this->elementStart('li');
+ $this->input('color-5', _('Link color'), '#002E6E', null);
+ $this->elementEnd('li');
+ $this->elementEnd('ul');
+ $this->element('div', array('id' => 'color-picker'));
$this->elementEnd('fieldset');
+
$this->submit('save', _('Save'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
+
}
/**
@@ -169,4 +184,44 @@ class DesignsettingsAction extends AccountSettingsAction
$this->showForm(_('Password saved.'), true);
*/
}
+
+
+ /**
+ * Add the jCrop stylesheet
+ *
+ * @return void
+ */
+
+ function showStylesheets()
+ {
+ parent::showStylesheets();
+ $farbtasticStyle =
+ common_path('theme/default/base/css/farbtastic.css?version='.LACONICA_VERSION);
+
+ $this->element('link', array('rel' => 'stylesheet',
+ 'type' => 'text/css',
+ 'href' => $farbtasticStyle,
+ 'media' => 'screen, projection, tv'));
+ }
+
+ /**
+ * Add the jCrop scripts
+ *
+ * @return void
+ */
+
+ function showScripts()
+ {
+ parent::showScripts();
+
+// if ($this->mode == 'crop') {
+ $farbtasticPack = common_path('js/farbtastic/farbtastic.js');
+ $farbtasticGo = common_path('js/farbtastic/farbtastic.go.js');
+
+ $this->element('script', array('type' => 'text/javascript',
+ 'src' => $farbtasticPack));
+ $this->element('script', array('type' => 'text/javascript',
+ 'src' => $farbtasticGo));
+// }
+ }
}