Output custom stylesheets on design sub-Actions
This commit is contained in:
parent
44343986c3
commit
ef99f83963
|
@ -47,7 +47,7 @@ class Design extends Memcached_DataObject
|
|||
|
||||
function showCSS($out)
|
||||
{
|
||||
$out->element('stylesheet', array('type' => 'text/css'),
|
||||
$out->element('style', array('type' => 'text/css'),
|
||||
'body { background-color: #' . dechex($this->backgroundcolor) . '} '."\n".
|
||||
'#content { background-color #' . dechex($this->contentcolor) . '} '."\n".
|
||||
'#aside_primary { background-color #'. dechex($this->sidebarcolor) .'} '."\n".
|
||||
|
|
|
@ -47,6 +47,20 @@ if (!defined('LACONICA')) {
|
|||
|
||||
class CurrentUserDesignAction extends Action
|
||||
{
|
||||
|
||||
/**
|
||||
* Show the user's design stylesheet
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
function showStylesheets()
|
||||
{
|
||||
parent::showStylesheets();
|
||||
|
||||
$design = $this->getDesign();
|
||||
$design->showCSS($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* A design for this action
|
||||
*
|
||||
|
@ -66,4 +80,6 @@ class CurrentUserDesignAction extends Action
|
|||
|
||||
return $cur->getDesign();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -52,6 +52,19 @@ class OwnerDesignAction extends Action {
|
|||
|
||||
var $user = null;
|
||||
|
||||
/**
|
||||
* Show the owner's design stylesheet
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
function showStylesheets()
|
||||
{
|
||||
parent::showStylesheets();
|
||||
|
||||
$design = $this->getDesign();
|
||||
$design->showCSS($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* A design for this action
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user