From 2a1d09bc08fada389dbb1b856a72d9206c576e70 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Wed, 12 Aug 2015 12:55:39 -0400 Subject: [PATCH] Factor out default show background colour and fix some style issues --- airtime_mvc/application/configs/constants.php | 1 + .../controllers/LocaleController.php | 3 ++- airtime_mvc/application/models/Show.php | 14 +++++++++---- .../application/models/ShowBuilder.php | 2 +- airtime_mvc/public/css/fullcalendar.css | 18 ++++++++++++++++ airtime_mvc/public/css/history_styles.css | 3 --- .../css/redmond/jquery-ui-1.8.8.custom.css | 2 +- airtime_mvc/public/css/styles.css | 5 ++++- .../js/airtime/playouthistory/historytable.js | 21 +++++++++++-------- 9 files changed, 49 insertions(+), 20 deletions(-) diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index 6fec39088..2e1b81653 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -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'); diff --git a/airtime_mvc/application/controllers/LocaleController.php b/airtime_mvc/application/controllers/LocaleController.php index 0f024feda..1fb58008a 100644 --- a/airtime_mvc/application/controllers/LocaleController.php +++ b/airtime_mvc/application/controllers/LocaleController.php @@ -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); diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 2b021acb6..da508f31d 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -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) { diff --git a/airtime_mvc/application/models/ShowBuilder.php b/airtime_mvc/application/models/ShowBuilder.php index bd57fdff8..7b0c1b6a1 100644 --- a/airtime_mvc/application/models/ShowBuilder.php +++ b/airtime_mvc/application/models/ShowBuilder.php @@ -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 === '') { diff --git a/airtime_mvc/public/css/fullcalendar.css b/airtime_mvc/public/css/fullcalendar.css index 6017266ea..4ea1bf4c4 100644 --- a/airtime_mvc/public/css/fullcalendar.css +++ b/airtime_mvc/public/css/fullcalendar.css @@ -36,6 +36,24 @@ html .fc, /* Header ------------------------------------------------------------------------*/ +table.fc-header { + background: #4a4a4a; +} + +#schedule_calendar > table > tbody > tr > td.fc-header-left +{ + padding: 5px 0px 0px 5px; +} +#schedule_calendar > table > tbody > tr > td.fc-header-center +{ + padding: 10px 5px 0px 0px; +} +#schedule_calendar > table > tbody > tr > td.fc-header-right +{ + padding: 5px 5px 0px 0px; +} + + .fc-header td { white-space: nowrap; } diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css index 2d0c70d58..5e5100d64 100644 --- a/airtime_mvc/public/css/history_styles.css +++ b/airtime_mvc/public/css/history_styles.css @@ -170,9 +170,6 @@ background-color: #CACACA; } -.ui-widget-content { - background: #C0C0C0 !important; -} #history_content .btn-toolbar { margin: 10px; diff --git a/airtime_mvc/public/css/redmond/jquery-ui-1.8.8.custom.css b/airtime_mvc/public/css/redmond/jquery-ui-1.8.8.custom.css index 60ba3db7e..ae6d3d173 100644 --- a/airtime_mvc/public/css/redmond/jquery-ui-1.8.8.custom.css +++ b/airtime_mvc/public/css/redmond/jquery-ui-1.8.8.custom.css @@ -136,7 +136,7 @@ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { - border:0px solid #5b5b5b; + border:1px solid #5b5b5b; background-color: #6e6e6e; color: #ffffff; } diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 795efa472..352d7cb86 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -1029,6 +1029,7 @@ table.dataTable span.DataTables_sort_icon { table.dataTable th.ui-state-default { color: #eee; + border: 0px; } .ColVis.TableTools .ui-button { @@ -1658,12 +1659,14 @@ h2#scheduled_playlist_name span { clear: left; color: #CDCDCD; float: left; - font-size: 1.2em; + font-size: 1.4em; font-weight: normal; margin: 0; min-width: 90px; padding: 4px 0; text-align: left; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + } .simple-formblock dd { float: left; diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index bb1547e65..4ff6b8064 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -274,6 +274,8 @@ var AIRTIME = (function(AIRTIME) { animated: false, create: function( event, ui ) { var $div = $showList.find(".ui-accordion-content-active"); + console.log(event); + //$div.css() createShowTable($div); }, change: function( event, ui ) { @@ -288,8 +290,16 @@ var AIRTIME = (function(AIRTIME) { function createToolbarButtons ($el) { var $menu = $("
"); - - $menu.append("
" + + + $menu.append("
" + + "" + + "
"); + + + $menu.append("
" + "" + @@ -300,13 +310,6 @@ var AIRTIME = (function(AIRTIME) { "" + "
"); - $menu.append("
" + - "" + - "
"); - $menu.append("
" + "