From f23cfb489c7a9ad4a585a91f37c2257b3881b2cc Mon Sep 17 00:00:00 2001 From: Paul Baranowski Date: Tue, 12 Apr 2011 13:59:08 -0400 Subject: [PATCH 1/5] Moved function ExitIFNotRoot() to AirtimeInstall.php instead of AirtimeIni.php. --- install/airtime-install.php | 4 ++-- install/airtime-uninstall.php | 4 ++-- install/include/AirtimeIni.php | 18 ++---------------- install/include/AirtimeInstall.php | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/install/airtime-install.php b/install/airtime-install.php index 8b203f6df..542ed18ff 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; 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 bd3a568c2..9612cd9ed 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) { From 4c4e75a38f3009415ed90b6cff6df8a6963013de Mon Sep 17 00:00:00 2001 From: lukabazuka Date: Wed, 13 Apr 2011 19:23:38 +0200 Subject: [PATCH 2/5] CSS modifications for issues CC-2039, CC-2160 and CC-2174 --- public/css/fullcalendar.css | 41 +++++++++++++++++++++--- public/css/images/icon_alert_ffffff.png | Bin 0 -> 1014 bytes public/css/playlist_builder.css | 7 ++-- public/css/plupload.queue.css | 2 +- public/css/styles.css | 14 ++++++++ 5 files changed, 56 insertions(+), 8 deletions(-) create mode 100644 public/css/images/icon_alert_ffffff.png diff --git a/public/css/fullcalendar.css b/public/css/fullcalendar.css index 06af1a321..0c93d9936 100644 --- a/public/css/fullcalendar.css +++ b/public/css/fullcalendar.css @@ -1,11 +1,11 @@ /* - * FullCalendar v1.5 Stylesheet + * FullCalendar v1.5.1 Stylesheet * * Copyright (c) 2011 Adam Shaw * Dual licensed under the MIT and GPL licenses, located in * MIT-LICENSE.txt and GPL-LICENSE.txt respectively. * - * Date: Sat Mar 19 18:59:37 2011 -0700 + * Date: Sat Apr 9 14:09:51 2011 -0700 * */ @@ -245,6 +245,10 @@ html .fc, border-color: #ddd; } +.fc-state-disabled { + cursor: default; + } + .fc-state-disabled .fc-button-effect { display: none; } @@ -286,6 +290,7 @@ a.fc-event { height: 100%; border-style: solid; border-width: 0; + overflow: hidden; } .fc-event-time, @@ -609,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 0000000000000000000000000000000000000000..35d3d1b642eeccfc5227cbf4d1c72ea5ae48a73b GIT binary patch literal 1014 zcmaJ=J#5oJ7z%NW`(PiD~RJ_LaDq zs&1f4UAqATNGu33bSML`!OX@43`k5!NGzyQIHyUgTnG+eB|;7 zMN#qml3FD57#X9dhROe?*SJHbOIR!86|{z%h7YN%g{lzb9is+|(6Bb|eSjH?8Ul8y zjLZ5h*+dRwL>MM?Ji?}^%xvfx<~qcn3Tw8j&_7%48iKvoz>H@VY`DnJViAkV8HMDTYg!+$0Ak zd4^Alk|f;#0>^VKC$PMb;3YXJ$Q%c{A5Eh9)|y;Y7rL>?PNC}|CRq>_^BDPdb9cwbpS*i` zWq;@8oO-bqJ9oPLHM3FNv(BTdmg>Sytb^qn6GUA E0X^A1#{d8T literal 0 HcmV?d00001 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; From aca157f0ee614080afd7f7d12dedd1f8e9c563aa Mon Sep 17 00:00:00 2001 From: Paul Baranowski Date: Wed, 13 Apr 2011 14:03:23 -0400 Subject: [PATCH 3/5] CC-2170 Add option to airtime-install to install with or without audio samples Now we dont install audio samples by default. --- install/airtime-install.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/install/airtime-install.php b/install/airtime-install.php index 542ed18ff..9d97f3bb2 100644 --- a/install/airtime-install.php +++ b/install/airtime-install.php @@ -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"); From 32c9d9b7f28811933ae086a2200bec6d891f65a1 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 13 Apr 2011 14:13:52 -0400 Subject: [PATCH 4/5] nudge progress bar up a bit for new css. --- public/js/airtime/schedule/full-calendar-functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/airtime/schedule/full-calendar-functions.js b/public/js/airtime/schedule/full-calendar-functions.js index ce53f9737..dadb46839 100644 --- a/public/js/airtime/schedule/full-calendar-functions.js +++ b/public/js/airtime/schedule/full-calendar-functions.js @@ -172,7 +172,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({ From 492c76cb2f671875ee0aa2421a117038b7848a82 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 13 Apr 2011 15:11:06 -0400 Subject: [PATCH 5/5] CC-2176 : Allow up to 10 rebroadcasts, add in the plus button with hidden elements creating elements inside for loop to be less redundant. --- .../forms/AddShowAbsoluteRebroadcastDates.php | 182 ++---------------- application/forms/AddShowRebroadcastDates.php | 141 ++------------ 2 files changed, 34 insertions(+), 289 deletions(-) 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) {