diff --git a/application/forms/AddShowAbsoluteRebroadcastDates.php b/application/forms/AddShowAbsoluteRebroadcastDates.php index 7d173df2a..8c87b66c7 100644 --- a/application/forms/AddShowAbsoluteRebroadcastDates.php +++ b/application/forms/AddShowAbsoluteRebroadcastDates.php @@ -5,177 +5,29 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm public function init() { - //$this->setDisableLoadDefaultDecorators(true); - $this->setDecorators(array( array('ViewScript', array('viewScript' => 'form/add-show-rebroadcast-absolute.phtml')) )); - // Add start date element - $this->addElement('text', 'add_show_rebroadcast_absolute_date_1', array( - 'label' => 'Rebroadcast Date:', - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - 'NotEmpty', - array('date', false, array('YYYY-MM-DD')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); + for($i=1; $i<=10; $i++) { - - // Add start time element - $this->addElement('text', 'add_show_rebroadcast_absolute_time_1', array( - 'label' => 'Rebroadcast Time:', - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - array('date', false, array('HH:mm')), - array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); - - // Add start date element - $this->addElement('text', 'add_show_rebroadcast_absolute_date_2', array( - 'label' => 'Rebroadcast Date:', - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - 'NotEmpty', - array('date', false, array('YYYY-MM-DD')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); - - - // Add start time element - $this->addElement('text', 'add_show_rebroadcast_absolute_time_2', array( - 'label' => 'Rebroadcast Time:', - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - array('date', false, array('HH:mm')), - array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); - - // Add start date element - $this->addElement('text', 'add_show_rebroadcast_absolute_date_3', array( - 'label' => 'Rebroadcast Date:', - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - 'NotEmpty', - array('date', false, array('YYYY-MM-DD')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); - - - // Add start time element - $this->addElement('text', 'add_show_rebroadcast_absolute_time_3', array( - 'label' => 'Rebroadcast Time:', - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - array('date', false, array('HH:mm')), - array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); - - // Add start date element - $this->addElement('text', 'add_show_rebroadcast_absolute_date_4', array( - 'label' => 'Rebroadcast Date:', - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - 'NotEmpty', - array('date', false, array('YYYY-MM-DD')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); - - - // Add start time element - $this->addElement('text', 'add_show_rebroadcast_absolute_time_4', array( - 'label' => 'Rebroadcast Time:', - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - array('date', false, array('HH:mm')), - array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); - - // Add start date element - $this->addElement('text', 'add_show_rebroadcast_absolute_date_5', array( - 'label' => 'Rebroadcast Date:', - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - 'NotEmpty', - array('date', false, array('YYYY-MM-DD')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); - - - // Add start time element - $this->addElement('text', 'add_show_rebroadcast_absolute_time_5', array( - 'label' => 'Rebroadcast Time:', - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - array('date', false, array('HH:mm')), - array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); + $text = new Zend_Form_Element_Text("add_show_rebroadcast_absolute_date_$i"); + $text->setAttrib('class', 'input_text'); + $text->addFilter('StringTrim'); + $text->addValidator('date', false, array('YYYY-MM-DD')); + $text->setRequired(false); + $text->setDecorators(array('ViewHelper')); + $this->addElement($text); + $text = new Zend_Form_Element_Text("add_show_rebroadcast_absolute_time_$i"); + $text->setAttrib('class', 'input_text'); + $text->addFilter('StringTrim'); + $text->addValidator('date', false, array('HH:mm')); + $text->addValidator('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered')); + $text->setRequired(false); + $text->setDecorators(array('ViewHelper')); + $this->addElement($text); + } } public function checkReliantFields($formData) { diff --git a/application/forms/AddShowRebroadcastDates.php b/application/forms/AddShowRebroadcastDates.php index 22e28a1a3..3a8cba562 100644 --- a/application/forms/AddShowRebroadcastDates.php +++ b/application/forms/AddShowRebroadcastDates.php @@ -9,137 +9,30 @@ class Application_Form_AddShowRebroadcastDates extends Zend_Form_SubForm array('ViewScript', array('viewScript' => 'form/add-show-rebroadcast.phtml')) )); - $relativeDates = array(); $relativeDates[""] = ""; - for($i=0; $i <=30; $i++) { + for($i=0; $i<=30; $i++) { $relativeDates["$i days"] = "+$i days"; } - //Add date select - $this->addElement('select', 'add_show_rebroadcast_date_1', array( - 'required' => false, - 'class' => ' input_select', - 'multiOptions' => $relativeDates, - 'decorators' => array( - 'ViewHelper' - ) - )); + for($i=1; $i<=10; $i++) { - // Add start time element - $this->addElement('text', 'add_show_rebroadcast_time_1', array( - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - array('date', false, array('HH:mm')), - array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); + $select = new Zend_Form_Element_Select("add_show_rebroadcast_date_$i"); + $select->setAttrib('class', 'input_select'); + $select->setMultiOptions($relativeDates); + $select->setRequired(false); + $select->setDecorators(array('ViewHelper')); + $this->addElement($select); - //Add date select - $this->addElement('select', 'add_show_rebroadcast_date_2', array( - 'required' => false, - 'class' => ' input_select', - 'multiOptions' => $relativeDates, - 'decorators' => array( - 'ViewHelper' - ) - )); - - // Add start time element - $this->addElement('text', 'add_show_rebroadcast_time_2', array( - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - array('date', false, array('HH:mm')), - array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); - - //Add date select - $this->addElement('select', 'add_show_rebroadcast_date_3', array( - 'required' => false, - 'class' => ' input_select', - 'multiOptions' => $relativeDates, - 'decorators' => array( - 'ViewHelper' - ) - )); - - // Add start time element - $this->addElement('text', 'add_show_rebroadcast_time_3', array( - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - array('date', false, array('HH:mm')), - array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); - - //Add date select - $this->addElement('select', 'add_show_rebroadcast_date_4', array( - 'required' => false, - 'class' => ' input_select', - 'multiOptions' => $relativeDates, - 'decorators' => array( - 'ViewHelper' - ) - )); - - // Add start time element - $this->addElement('text', 'add_show_rebroadcast_time_4', array( - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - array('date', false, array('HH:mm')), - array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); - - //Add date select - $this->addElement('select', 'add_show_rebroadcast_date_5', array( - 'required' => false, - 'class' => ' input_select', - 'multiOptions' => $relativeDates, - 'decorators' => array( - 'ViewHelper' - ) - )); - - // Add start time element - $this->addElement('text', 'add_show_rebroadcast_time_5', array( - 'class' => 'input_text', - 'required' => false, - 'value' => '', - 'filters' => array('StringTrim'), - 'validators' => array( - array('date', false, array('HH:mm')), - array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered')) - ), - 'decorators' => array( - 'ViewHelper' - ) - )); + $text = new Zend_Form_Element_Text("add_show_rebroadcast_time_$i"); + $text->setAttrib('class', 'input_text'); + $text->addFilter('StringTrim'); + $text->addValidator('date', false, array('HH:mm')); + $text->addValidator('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered')); + $text->setRequired(false); + $text->setDecorators(array('ViewHelper')); + $this->addElement($text); + } } public function checkReliantFields($formData) { diff --git a/install/airtime-install.php b/install/airtime-install.php index 2ba44be24..24d427638 100644 --- a/install/airtime-install.php +++ b/install/airtime-install.php @@ -8,13 +8,13 @@ echo "******************************** Install Begin *********************************".PHP_EOL; require_once(dirname(__FILE__).'/include/AirtimeIni.php'); +require_once(dirname(__FILE__).'/include/AirtimeInstall.php'); -AirtimeIni::ExitIfNotRoot(); +AirtimeInstall::ExitIfNotRoot(); AirtimeIni::CreateIniFile(); AirtimeIni::UpdateIniFiles(); require_once(dirname(__FILE__).'/../application/configs/conf.php'); -require_once(dirname(__FILE__).'/include/AirtimeInstall.php'); echo PHP_EOL."*** Installing Airtime ".AIRTIME_VERSION." ***".PHP_EOL; @@ -43,9 +43,6 @@ AirtimeInstall::ChangeDirOwnerToWebserver($CC_CONFIG["storageDir"]); echo "* Creating /usr/bin symlinks".PHP_EOL; AirtimeInstall::CreateSymlinks($CC_CONFIG["storageDir"]); -echo "* Importing sample audio clips".PHP_EOL; -system(__DIR__."/../utils/airtime-import --copy ../audio_samples/ > /dev/null"); - echo PHP_EOL."*** Pypo Installation ***".PHP_EOL; system("python ".__DIR__."/../python_apps/pypo/install/pypo-install.py"); diff --git a/install/airtime-uninstall.php b/install/airtime-uninstall.php index 298d3c945..ee96439a9 100644 --- a/install/airtime-uninstall.php +++ b/install/airtime-uninstall.php @@ -6,8 +6,9 @@ */ require_once(dirname(__FILE__).'/include/AirtimeIni.php'); +require_once(dirname(__FILE__).'/include/AirtimeInstall.php'); // Need to check that we are superuser before running this. -AirtimeIni::ExitIfNotRoot(); +AirtimeInstall::ExitIfNotRoot(); if (!file_exists('/etc/airtime/airtime.conf')) { echo PHP_EOL."Airtime config file '/etc/airtime/airtime.conf' does not exist.".PHP_EOL; @@ -15,7 +16,6 @@ if (!file_exists('/etc/airtime/airtime.conf')) { exit(); } require_once(dirname(__FILE__).'/../application/configs/conf.php'); -require_once(dirname(__FILE__).'/include/AirtimeInstall.php'); AirtimeInstall::RemoveSymlinks(); diff --git a/install/include/AirtimeIni.php b/install/include/AirtimeIni.php index 7f199e81a..6cebc4bc2 100644 --- a/install/include/AirtimeIni.php +++ b/install/include/AirtimeIni.php @@ -35,7 +35,7 @@ class AirtimeIni{ exit(1); } } - + if (!copy(__DIR__."/../../build/airtime.conf", "/etc/airtime/airtime.conf")){ echo "Could not copy airtime.conf to /etc/airtime/. Exiting."; exit(1); @@ -81,20 +81,6 @@ class AirtimeIni{ } } - /** - * Ensures that the user is running this PHP script with root - * permissions. If not running with root permissions, causes the - * script to exit. - */ - static function ExitIfNotRoot() - { - // Need to check that we are superuser before running this. - if(exec("whoami") != "root"){ - echo "Must be root user.\n"; - exit(1); - } - } - /** * This function generates a random string. * @@ -132,7 +118,7 @@ class AirtimeIni{ * The property to look for in order to change its value. * @param string $p_value * The value the property should be changed to. - * + * */ static function UpdateIniValue($p_filename, $p_property, $p_value) { diff --git a/install/include/AirtimeInstall.php b/install/include/AirtimeInstall.php index cf8c22738..847fc2a45 100644 --- a/install/include/AirtimeInstall.php +++ b/install/include/AirtimeInstall.php @@ -4,6 +4,20 @@ require_once(dirname(__FILE__).'/../../library/pear/DB.php'); require_once(dirname(__FILE__).'/../../application/configs/conf.php'); class AirtimeInstall { + /** + * Ensures that the user is running this PHP script with root + * permissions. If not running with root permissions, causes the + * script to exit. + */ + static function ExitIfNotRoot() + { + // Need to check that we are superuser before running this. + if(exec("whoami") != "root"){ + echo "Must be root user.\n"; + exit(1); + } + } + static function DbTableExists($p_name) { diff --git a/public/css/fullcalendar.css b/public/css/fullcalendar.css index 3a3ee5b64..0c93d9936 100644 --- a/public/css/fullcalendar.css +++ b/public/css/fullcalendar.css @@ -614,5 +614,33 @@ table.fc-border-separate { .fc-agenda .ui-resizable-resizing { /* TODO: better selector */ _overflow: hidden; } - - + +/*---////////////////////////////////////////// CUSTOM OVERRIDES ////////////////////////////////---*/ + +html .fc, .fc table { + font-size: 12px; +} +.fc table thead tr.fc-first th, .fc table thead tr.fc-first th.fc-agenda-axis { + height:26px !important; + vertical-align:middle; +} +.fc-agenda-axis input.input_select { + height:22px !important; + font-size:11px; +} +.fc-header-title h2 { + font-size: 18px; + font-weight: normal; + margin-top:2px; +} +.fc-event-vert .fc-event-time { + font-size: 11px; +} +.fc-event-time, .fc-event-title { + font-size: 11px; + padding: 0 2px; +} + +/*.fc-event { + overflow:hidden; +}*/ diff --git a/public/css/images/icon_alert_ffffff.png b/public/css/images/icon_alert_ffffff.png new file mode 100644 index 000000000..35d3d1b64 Binary files /dev/null and b/public/css/images/icon_alert_ffffff.png differ diff --git a/public/css/playlist_builder.css b/public/css/playlist_builder.css index bd0ecc44f..4724055e9 100644 --- a/public/css/playlist_builder.css +++ b/public/css/playlist_builder.css @@ -78,6 +78,7 @@ .spl_artist { font-size:12px; + color:#d5d5d5; } /*#spl_editor { @@ -108,10 +109,10 @@ } #side_playlist h3 { - font-size:17px; + font-size:20px; margin:9px 0 3px 0; padding:0; - color:#1c1c1c; + color:#444444; font-weight:normal; clear:both; float:left; @@ -120,7 +121,7 @@ font-size:15px; margin:8px 0 10px 0; padding:0; - color:#1c1c1c; + color:#6e6e6e; font-weight:normal; clear:both; float:left; diff --git a/public/css/plupload.queue.css b/public/css/plupload.queue.css index 75489a419..e54912b37 100644 --- a/public/css/plupload.queue.css +++ b/public/css/plupload.queue.css @@ -107,7 +107,7 @@ } .plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;} -.plupload_filelist .plupload_file_name {width: 205px} +.plupload_filelist .plupload_file_name {width: 68%;} .plupload_file_action { float: right; diff --git a/public/css/styles.css b/public/css/styles.css index a500fdc26..c204c11b0 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -899,6 +899,7 @@ div.ui-datepicker { } #show_time_info { font-size:12px; + height:30px; } #show_time_info > div, #show_time_info > span{ @@ -1595,6 +1596,19 @@ dd.radio-inline-list, .preferences dd.radio-inline-list { height: 120px; } +#show_time_info { + font-size:12px; + height:30px; +} +#show_time_warning { + background:#c83f3f url(images/icon_alert_ffffff.png) no-repeat 5px 4px; + border:1px solid #9d1010; + color:#fff; + padding: 2px 5px 2px 24px; + font-size: 12px; + line-height: 140%; +} + /* HACK, to be removed after 1.7.0 */ button.ui-button.md-cancel { padding: .4em 1em; diff --git a/public/js/airtime/schedule/full-calendar-functions.js b/public/js/airtime/schedule/full-calendar-functions.js index 6a21d21af..1bb3d50ea 100644 --- a/public/js/airtime/schedule/full-calendar-functions.js +++ b/public/js/airtime/schedule/full-calendar-functions.js @@ -177,7 +177,7 @@ function eventRender(event, element, view) { div .height('5px') .width('95%') - .css('margin-top', '5px') + .css('margin-top', '1px') .css('margin-left', 'auto') .css('margin-right', 'auto') .progressbar({