Factor out default show background colour and fix some style issues
This commit is contained in:
parent
f63ce23c9f
commit
2a1d09bc08
9 changed files with 49 additions and 20 deletions
|
@ -67,7 +67,6 @@ class Application_Model_Show
|
|||
public function getColor()
|
||||
{
|
||||
$show = CcShowQuery::create()->findPK($this->_showId);
|
||||
|
||||
return $show->getDbColor();
|
||||
}
|
||||
|
||||
|
@ -111,7 +110,12 @@ class Application_Model_Show
|
|||
{
|
||||
$show = CcShowQuery::create()->findPK($this->_showId);
|
||||
|
||||
return $show->getDbBackgroundColor();
|
||||
$color = $show->getDbBackgroundColor();
|
||||
if (empty($color)) {
|
||||
return DEFAULT_SHOW_COLOR;
|
||||
} else {
|
||||
return $color;
|
||||
}
|
||||
}
|
||||
|
||||
public function setBackgroundColor($backgroundColor)
|
||||
|
@ -1035,8 +1039,10 @@ SQL;
|
|||
$event["textColor"] = "#".$show["color"];
|
||||
}
|
||||
|
||||
if ($show["background_color"] != "") {
|
||||
$event["color"] = "#".$show["background_color"];
|
||||
if (!empty($show["background_color"])) {
|
||||
$event["color"] = "#" . $show["background_color"];
|
||||
} else {
|
||||
$event["color"] = "#" . DEFAULT_SHOW_COLOR;
|
||||
}
|
||||
|
||||
foreach ($options as $key => $value) {
|
||||
|
|
|
@ -107,7 +107,7 @@ class Application_Model_ShowBuilder
|
|||
private function getItemColor($p_item, &$row)
|
||||
{
|
||||
$defaultColor = "ffffff";
|
||||
$defaultBackground = "3366cc";
|
||||
$defaultBackground = DEFAULT_SHOW_COLOR;
|
||||
|
||||
$color = $p_item["show_color"];
|
||||
if ($color === '') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue