Merge branch 'master' of dev.sourcefabric.org:airtime

This commit is contained in:
martin 2011-04-13 17:00:04 -04:00
commit f6abd30551
12 changed files with 104 additions and 319 deletions

View File

@ -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) {

View File

@ -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) {

View File

@ -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");

View File

@ -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();

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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;
}*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 B

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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({