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
|
@ -36,6 +36,7 @@ define('DEFAULT_TIMESTAMP_FORMAT', 'Y-m-d H:i:s');
|
|||
define('DEFAULT_MICROTIME_FORMAT', 'Y-m-d H:i:s.u');
|
||||
define('DEFAULT_ICECAST_PORT', 8000);
|
||||
define('DEFAULT_ICECAST_PASS', 'hackme');
|
||||
define('DEFAULT_SHOW_COLOR', '3366cc');
|
||||
|
||||
// Metadata Keys for files
|
||||
define('MDATA_KEY_FILEPATH' , 'filepath');
|
||||
|
|
|
@ -391,7 +391,8 @@ class LocaleController extends Zend_Controller_Action
|
|||
"All" => _("All"),
|
||||
"Copied %s row%s to the clipboard" => _("Copied %s row%s to the clipboard"),
|
||||
"%sPrint view%sPlease use your browser's print function to print this table. Press escape when finished." => _("%sPrint view%sPlease use your browser's print function to print this table. Press escape when finished."),
|
||||
"New Show" => _("New Show")
|
||||
"New Show" => _("New Show"),
|
||||
"New Log Entry" => _("New Log Entry")
|
||||
);
|
||||
$this->view->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
|
|
@ -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