Merge commit 'airtime-1.9.1'
This commit is contained in:
commit
4b16d4928d
23 changed files with 318 additions and 140 deletions
11
Changelog
11
Changelog
|
@ -1,3 +1,14 @@
|
||||||
|
1.9.1 - August 17th, 2011
|
||||||
|
*Fixes
|
||||||
|
-airtime-user shell script failing to start
|
||||||
|
-Progress bar for tracks appearing when no content scheduled
|
||||||
|
-Fix upgrades from Airtime 1.8.2 failing
|
||||||
|
-Fix various install issues with virtualenv
|
||||||
|
-Prevent users from doing a manual install of Airtime if they already have the
|
||||||
|
Debian package version installed
|
||||||
|
*Changes
|
||||||
|
-Support Settings moved to a seperate page accessible by Admin user only.
|
||||||
|
|
||||||
1.9.0 - August 9, 2011
|
1.9.0 - August 9, 2011
|
||||||
|
|
||||||
The cool stuff:
|
The cool stuff:
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1,2 +1,2 @@
|
||||||
PRODUCT_ID=Airtime
|
PRODUCT_ID=Airtime
|
||||||
PRODUCT_RELEASE=1.9.0
|
PRODUCT_RELEASE=1.9.1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
define('AIRTIME_VERSION', '1.9.0');
|
define('AIRTIME_VERSION', '1.9.1');
|
||||||
define('AIRTIME_COPYRIGHT_DATE', '2010-2011');
|
define('AIRTIME_COPYRIGHT_DATE', '2010-2011');
|
||||||
define('AIRTIME_REST_VERSION', '1.1');
|
define('AIRTIME_REST_VERSION', '1.1');
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,12 @@ $pages = array(
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'Preference',
|
'controller' => 'Preference',
|
||||||
'action' => 'directory-config'
|
'action' => 'directory-config'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'label' => 'Support Settings',
|
||||||
|
'module' => 'default',
|
||||||
|
'controller' => 'Preference',
|
||||||
|
'action' => 'support-setting'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
|
@ -7,9 +7,7 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
/* Initialize action controller here */
|
/* Initialize action controller here */
|
||||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||||
$ajaxContext/*->addActionContext('register', 'json')
|
$ajaxContext->addActionContext('server-browse', 'json')
|
||||||
->addActionContext('remindme', 'json')*/
|
|
||||||
->addActionContext('server-browse', 'json')
|
|
||||||
->addActionContext('change-stor-directory', 'json')
|
->addActionContext('change-stor-directory', 'json')
|
||||||
->addActionContext('reload-watch-directory', 'json')
|
->addActionContext('reload-watch-directory', 'json')
|
||||||
->addActionContext('remove-watch-directory', 'json')
|
->addActionContext('remove-watch-directory', 'json')
|
||||||
|
@ -45,21 +43,42 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
|
|
||||||
Application_Model_Preference::SetSoundCloudLicense($values["preferences_soundcloud"]["SoundCloudLicense"]);
|
Application_Model_Preference::SetSoundCloudLicense($values["preferences_soundcloud"]["SoundCloudLicense"]);
|
||||||
|
|
||||||
Application_Model_Preference::SetPhone($values["preferences_support"]["Phone"]);
|
$this->view->statusMsg = "<div class='success'>Preferences updated.</div>";
|
||||||
Application_Model_Preference::SetEmail($values["preferences_support"]["Email"]);
|
}
|
||||||
Application_Model_Preference::SetStationWebSite($values["preferences_support"]["StationWebSite"]);
|
}
|
||||||
Application_Model_Preference::SetSupportFeedback($values["preferences_support"]["SupportFeedback"]);
|
$this->view->form = $form;
|
||||||
Application_Model_Preference::SetPublicise($values["preferences_support"]["Publicise"]);
|
}
|
||||||
|
|
||||||
$form->getSubForm('preferences_support')->Logo->receive();
|
public function supportSettingAction()
|
||||||
$imagePath = $form->getSubForm('preferences_support')->Logo->getFileName();
|
{
|
||||||
|
$request = $this->getRequest();
|
||||||
|
$baseUrl = $request->getBaseUrl();
|
||||||
|
|
||||||
Application_Model_Preference::SetStationCountry($values["preferences_support"]["Country"]);
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/support-setting.js','text/javascript');
|
||||||
Application_Model_Preference::SetStationCity($values["preferences_support"]["City"]);
|
$this->view->statusMsg = "";
|
||||||
Application_Model_Preference::SetStationDescription($values["preferences_support"]["Description"]);
|
|
||||||
|
$form = new Application_Form_SupportSettings();
|
||||||
|
|
||||||
|
if ($request->isPost()) {
|
||||||
|
if ($form->isValid($request->getPost())) {
|
||||||
|
$values = $form->getValues();
|
||||||
|
|
||||||
|
Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view);
|
||||||
|
Application_Model_Preference::SetPhone($values["Phone"]);
|
||||||
|
Application_Model_Preference::SetEmail($values["Email"]);
|
||||||
|
Application_Model_Preference::SetStationWebSite($values["StationWebSite"]);
|
||||||
|
Application_Model_Preference::SetSupportFeedback($values["SupportFeedback"]);
|
||||||
|
Application_Model_Preference::SetPublicise($values["Publicise"]);
|
||||||
|
|
||||||
|
$form->Logo->receive();
|
||||||
|
$imagePath = $form->Logo->getFileName();
|
||||||
|
|
||||||
|
Application_Model_Preference::SetStationCountry($values["Country"]);
|
||||||
|
Application_Model_Preference::SetStationCity($values["City"]);
|
||||||
|
Application_Model_Preference::SetStationDescription($values["Description"]);
|
||||||
Application_Model_Preference::SetStationLogo($imagePath);
|
Application_Model_Preference::SetStationLogo($imagePath);
|
||||||
|
|
||||||
$this->view->statusMsg = "<div class='success'>Preferences updated.</div>";
|
$this->view->statusMsg = "<div class='success'>Support setting updated.</div>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$logo = Application_Model_Preference::GetStationLogo();
|
$logo = Application_Model_Preference::GetStationLogo();
|
||||||
|
|
|
@ -9,24 +9,23 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
||||||
array('ViewScript', array('viewScript' => 'form/preferences_general.phtml'))
|
array('ViewScript', array('viewScript' => 'form/preferences_general.phtml'))
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$defaultFade = Application_Model_Preference::GetDefaultFade();
|
||||||
|
if($defaultFade == ""){
|
||||||
|
$defaultFade = '00:00:00.000000';
|
||||||
|
}
|
||||||
|
|
||||||
//Station name
|
//Station name
|
||||||
$this->addElement('text', 'stationName', array(
|
$this->addElement('text', 'stationName', array(
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'label' => 'Station Name',
|
'label' => 'Station Name',
|
||||||
'required' => true,
|
'required' => false,
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'validators' => array('NotEmpty'),
|
|
||||||
'value' => Application_Model_Preference::GetValue("station_name"),
|
'value' => Application_Model_Preference::GetValue("station_name"),
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
'ViewHelper'
|
'ViewHelper'
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
$defaultFade = Application_Model_Preference::GetDefaultFade();
|
|
||||||
if($defaultFade == ""){
|
|
||||||
$defaultFade = '00:00:00.000000';
|
|
||||||
}
|
|
||||||
|
|
||||||
//Default station fade
|
//Default station fade
|
||||||
$this->addElement('text', 'stationDefaultFade', array(
|
$this->addElement('text', 'stationDefaultFade', array(
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
|
|
|
@ -18,8 +18,8 @@ class Application_Form_Preferences extends Zend_Form
|
||||||
$soundcloud_pref = new Application_Form_SoundcloudPreferences();
|
$soundcloud_pref = new Application_Form_SoundcloudPreferences();
|
||||||
$this->addSubForm($soundcloud_pref, 'preferences_soundcloud');
|
$this->addSubForm($soundcloud_pref, 'preferences_soundcloud');
|
||||||
|
|
||||||
$support_pref = new Application_Form_SupportPreferences();
|
/*$support_pref = new Application_Form_SupportPreferences();
|
||||||
$this->addSubForm($support_pref, 'preferences_support');
|
$this->addSubForm($support_pref, 'preferences_support');*/
|
||||||
|
|
||||||
$this->addElement('submit', 'submit', array(
|
$this->addElement('submit', 'submit', array(
|
||||||
'class' => 'ui-button ui-state-default right-floated',
|
'class' => 'ui-button ui-state-default right-floated',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class Application_Form_SupportPreferences extends Zend_Form_SubForm
|
class Application_Form_SupportSettings extends Zend_Form
|
||||||
{
|
{
|
||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
|
@ -8,10 +8,23 @@ class Application_Form_SupportPreferences extends Zend_Form_SubForm
|
||||||
$country_list = Application_Model_Preference::GetCountryList();
|
$country_list = Application_Model_Preference::GetCountryList();
|
||||||
|
|
||||||
$this->setDecorators(array(
|
$this->setDecorators(array(
|
||||||
array('ViewScript', array('viewScript' => 'form/preferences_support.phtml')),
|
array('ViewScript', array('viewScript' => 'form/support-setting.phtml')),
|
||||||
array('File', array('viewScript' => 'form/preferences_support.phtml', 'placement' => false)))
|
array('File', array('viewScript' => 'form/support-setting.phtml', 'placement' => false)))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//Station name
|
||||||
|
$this->addElement('text', 'stationName', array(
|
||||||
|
'class' => 'input_text',
|
||||||
|
'label' => 'Station Name',
|
||||||
|
'required' => true,
|
||||||
|
'filters' => array('StringTrim'),
|
||||||
|
'validator' => array('NotEmpty'),
|
||||||
|
'value' => Application_Model_Preference::GetValue("station_name"),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
// Phone number
|
// Phone number
|
||||||
$this->addElement('text', 'Phone', array(
|
$this->addElement('text', 'Phone', array(
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
|
@ -134,18 +147,26 @@ class Application_Form_SupportPreferences extends Zend_Form_SubForm
|
||||||
$checkboxPrivacy->setLabel("By checking this box, I agree to Sourcefabric's <a id=\"link_to_privacy\" href=\"http://www.sourcefabric.org/en/about/policy/\" onclick=\"window.open(this.href); return false;\">privacy policy</a>.")
|
$checkboxPrivacy->setLabel("By checking this box, I agree to Sourcefabric's <a id=\"link_to_privacy\" href=\"http://www.sourcefabric.org/en/about/policy/\" onclick=\"window.open(this.href); return false;\">privacy policy</a>.")
|
||||||
->setDecorators(array('ViewHelper'));
|
->setDecorators(array('ViewHelper'));
|
||||||
$this->addElement($checkboxPrivacy);
|
$this->addElement($checkboxPrivacy);
|
||||||
|
|
||||||
|
// submit button
|
||||||
|
$submit = new Zend_Form_Element_Submit("submit");
|
||||||
|
$submit->class = 'ui-button ui-state-default right-floated';
|
||||||
|
$submit->setIgnore(true)
|
||||||
|
->setLabel("Submit")
|
||||||
|
->setDecorators(array('ViewHelper'));
|
||||||
|
$this->addElement($submit);
|
||||||
}
|
}
|
||||||
|
|
||||||
// overwriting isValid function
|
// overwriting isValid function
|
||||||
public function isValid ($data)
|
public function isValid ($data)
|
||||||
{
|
{
|
||||||
parent::isValid($data);
|
$isValid = parent::isValid($data);
|
||||||
$checkPrivacy = $this->getElement('Privacy');
|
$checkPrivacy = $this->getElement('Privacy');
|
||||||
if($data["SupportFeedback"] == "1" && $data["Privacy"] != "1"){
|
if($data["SupportFeedback"] == "1" && $data["Privacy"] != "1"){
|
||||||
$checkPrivacy->addError("You have to agree to privacy policy.");
|
$checkPrivacy->addError("You have to agree to privacy policy.");
|
||||||
return false;
|
$isValid = false;
|
||||||
}
|
}
|
||||||
return true;
|
return $isValid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,10 +23,14 @@ class Application_Model_Dashboard
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (count($row) == 0){
|
if (count($row) == 0){
|
||||||
|
if ($showInstance->isRecorded()){
|
||||||
//last item is a show instance
|
//last item is a show instance
|
||||||
return array("name"=>$showInstance->getName(),
|
return array("name"=>$showInstance->getName(),
|
||||||
"starts"=>$showInstance->getShowStart(),
|
"starts"=>$showInstance->getShowStart(),
|
||||||
"ends"=>$showInstance->getShowEnd());
|
"ends"=>$showInstance->getShowEnd());
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
//return the one that started later.
|
//return the one that started later.
|
||||||
if ($row[0]["starts"] >= $showInstance->getShowStart()){
|
if ($row[0]["starts"] >= $showInstance->getShowStart()){
|
||||||
|
@ -69,11 +73,15 @@ class Application_Model_Dashboard
|
||||||
} else {
|
} else {
|
||||||
if (count($row) == 0){
|
if (count($row) == 0){
|
||||||
//last item is a show instance
|
//last item is a show instance
|
||||||
|
if ($showInstance->isRecorded()){
|
||||||
return array("name"=>$showInstance->getName(),
|
return array("name"=>$showInstance->getName(),
|
||||||
"starts"=>$showInstance->getShowStart(),
|
"starts"=>$showInstance->getShowStart(),
|
||||||
"ends"=>$showInstance->getShowEnd(),
|
"ends"=>$showInstance->getShowEnd(),
|
||||||
"media_item_played"=>false,
|
"media_item_played"=>false,
|
||||||
"record"=>$showInstance->isRecorded());
|
"record"=>true);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return array("name"=>$row[0]["artist_name"]." - ".$row[0]["track_title"],
|
return array("name"=>$row[0]["artist_name"]." - ".$row[0]["track_title"],
|
||||||
"starts"=>$row[0]["starts"],
|
"starts"=>$row[0]["starts"],
|
||||||
|
@ -103,10 +111,14 @@ class Application_Model_Dashboard
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (count($row) == 0){
|
if (count($row) == 0){
|
||||||
|
if ($showInstance->isRecorded()){
|
||||||
//last item is a show instance
|
//last item is a show instance
|
||||||
return array("name"=>$showInstance->getName(),
|
return array("name"=>$showInstance->getName(),
|
||||||
"starts"=>$showInstance->getShowStart(),
|
"starts"=>$showInstance->getShowStart(),
|
||||||
"ends"=>$showInstance->getShowEnd());
|
"ends"=>$showInstance->getShowEnd());
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
//return the one that starts sooner.
|
//return the one that starts sooner.
|
||||||
|
|
||||||
|
|
|
@ -9,11 +9,6 @@
|
||||||
<?php echo $this->element->getSubform('preferences_soundcloud') ?>
|
<?php echo $this->element->getSubform('preferences_soundcloud') ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 class="collapsible-header" id="support-heading"><span class="arrow-icon"></span>Support Settings</h3>
|
|
||||||
<div class="collapsible-content" id="support-settings" style="display: none;">
|
|
||||||
<?php echo $this->element->getSubform('preferences_support') ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="button-bar bottom" id="submit-element">
|
<div class="button-bar bottom" id="submit-element">
|
||||||
<?php echo $this->element->getElement('submit') ?>
|
<?php echo $this->element->getElement('submit') ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
<fieldset class="padded">
|
<fieldset class="padded">
|
||||||
<dl class="zend_form">
|
<dl class="zend_form">
|
||||||
|
|
||||||
<dt id="stationName-label" class="block-display">
|
<dt id="stationName-label" class="block-display">
|
||||||
<label class="required" for="stationName"><?php echo $this->element->getElement('stationName')->getLabel() ?>
|
<label class="required" for="stationName"><?php echo $this->element->getElement('stationName')->getLabel() ?>:
|
||||||
<span class="info-text-small">(Required)</span> :
|
|
||||||
</label>
|
</label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="stationName-element" class="block-display">
|
<dd id="stationName-element" class="block-display">
|
||||||
|
|
|
@ -34,6 +34,21 @@
|
||||||
</dl>
|
</dl>
|
||||||
<div class="info-text" style="clear: both;padding: 4px 0 4px 15px;"><p> Note: In order to promote your station, "Send support feedback" must be enabled</p></div>
|
<div class="info-text" style="clear: both;padding: 4px 0 4px 15px;"><p> Note: In order to promote your station, "Send support feedback" must be enabled</p></div>
|
||||||
<dl id="public-info" style="display:none;">
|
<dl id="public-info" style="display:none;">
|
||||||
|
<dt id="stationName-label" class="block-display">
|
||||||
|
<label class="required" for="stationName"><?php echo $this->element->getElement('stationName')->getLabel() ?>
|
||||||
|
<span class="info-text-small">(Required)</span>:
|
||||||
|
</label>
|
||||||
|
</dt>
|
||||||
|
<dd id="stationName-element" class="block-display">
|
||||||
|
<?php echo $this->element->getElement('stationName') ?>
|
||||||
|
<?php if($this->element->getElement('stationName')->hasErrors()) : ?>
|
||||||
|
<ul class='errors'>
|
||||||
|
<?php foreach($this->element->getElement('stationName')->getMessages() as $error): ?>
|
||||||
|
<li><?php echo $error; ?></li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
|
</dd>
|
||||||
<dt id="Phone-label" class="block-display">
|
<dt id="Phone-label" class="block-display">
|
||||||
<label class="optional" for="Phone"><?php echo $this->element->getElement('Phone')->getLabel() ?></label>
|
<label class="optional" for="Phone"><?php echo $this->element->getElement('Phone')->getLabel() ?></label>
|
||||||
<span class="info-text-small">(for verification purposes only, will not be published)</span>
|
<span class="info-text-small">(for verification purposes only, will not be published)</span>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong preferences">
|
||||||
|
<h2>Support Settings</h2>
|
||||||
|
<form method="post" action="/Preference/support-setting" enctype="multipart/form-data">
|
||||||
|
<div id="support-settings">
|
||||||
|
<?php echo $this->statusMsg ?>
|
||||||
|
<?php echo $this->form ?>
|
||||||
|
</div>
|
||||||
|
<div class="button-bar bottom" id="submit-element">
|
||||||
|
<?php echo $this->form->getElement('submit') ?>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
|
@ -4,39 +4,9 @@ function showErrorSections() {
|
||||||
$("#soundcloud-settings").show();
|
$("#soundcloud-settings").show();
|
||||||
$(window).scrollTop($("soundcloud-settings .errors").position().top);
|
$(window).scrollTop($("soundcloud-settings .errors").position().top);
|
||||||
}
|
}
|
||||||
if($("#support-settings .errors").length > 0) {
|
|
||||||
$("#support-settings").show();
|
|
||||||
$(window).scrollTop($("#support-settings .errors").position().top);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function resizeImg(ele){
|
|
||||||
var img = $(ele);
|
|
||||||
|
|
||||||
var width = ele.width;
|
|
||||||
var height = ele.height;
|
|
||||||
|
|
||||||
// resize img proportionaly
|
|
||||||
if( width > height && width > 450){
|
|
||||||
var ratio = 450/width;
|
|
||||||
img.css("width", "450px");
|
|
||||||
var newHeight = height * ratio;
|
|
||||||
img.css("height", newHeight );
|
|
||||||
|
|
||||||
}else if( width < height && height > 450){
|
|
||||||
var ratio = 450/height;
|
|
||||||
img.css("height", "450px");
|
|
||||||
var newWidth = width * ratio;
|
|
||||||
img.css("width", newWidth );
|
|
||||||
}else if( width == height && width > 450){
|
|
||||||
img.css("height", "450px");
|
|
||||||
img.css("width", "450px" );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var form = $("form");
|
|
||||||
|
|
||||||
$('.collapsible-header').live('click',function() {
|
$('.collapsible-header').live('click',function() {
|
||||||
$(this).next().toggle('fast');
|
$(this).next().toggle('fast');
|
||||||
|
@ -44,36 +14,5 @@ $(document).ready(function() {
|
||||||
return false;
|
return false;
|
||||||
}).next().hide();
|
}).next().hide();
|
||||||
|
|
||||||
$("#SupportFeedback").click( function(){
|
|
||||||
var pub = $("#Publicise");
|
|
||||||
if( !$(this).is(':checked') ){
|
|
||||||
pub.removeAttr("checked");
|
|
||||||
pub.attr("disabled", true);
|
|
||||||
}else{
|
|
||||||
pub.removeAttr("disabled");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var promote = $("#Publicise");
|
|
||||||
if(!$("#SupportFeedback").is(':checked')){
|
|
||||||
promote.removeAttr("checked");
|
|
||||||
promote.attr("disabled", true);
|
|
||||||
}
|
|
||||||
promote.live('click', function(){
|
|
||||||
if($(this).is(':checked')){
|
|
||||||
$("#public-info").show();
|
|
||||||
}else{
|
|
||||||
$("#public-info").hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if( promote.is(":checked")){
|
|
||||||
$("#public-info").show();
|
|
||||||
}
|
|
||||||
|
|
||||||
showErrorSections();
|
showErrorSections();
|
||||||
|
|
||||||
$('.toggle legend').click(function() {
|
|
||||||
$('.toggle').toggleClass('closed');
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
73
airtime_mvc/public/js/airtime/preferences/support-setting.js
Normal file
73
airtime_mvc/public/js/airtime/preferences/support-setting.js
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
function showErrorSections() {
|
||||||
|
|
||||||
|
if($("soundcloud-settings .errors").length > 0) {
|
||||||
|
$("#soundcloud-settings").show();
|
||||||
|
$(window).scrollTop($("soundcloud-settings .errors").position().top);
|
||||||
|
}
|
||||||
|
if($("#support-settings .errors").length > 0) {
|
||||||
|
$("#support-settings").show();
|
||||||
|
$(window).scrollTop($("#support-settings .errors").position().top);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function resizeImg(ele){
|
||||||
|
var img = $(ele);
|
||||||
|
|
||||||
|
var width = ele.width;
|
||||||
|
var height = ele.height;
|
||||||
|
|
||||||
|
// resize img proportionaly
|
||||||
|
if( width > height && width > 450){
|
||||||
|
var ratio = 450/width;
|
||||||
|
img.css("width", "450px");
|
||||||
|
var newHeight = height * ratio;
|
||||||
|
img.css("height", newHeight );
|
||||||
|
|
||||||
|
}else if( width < height && height > 450){
|
||||||
|
var ratio = 450/height;
|
||||||
|
img.css("height", "450px");
|
||||||
|
var newWidth = width * ratio;
|
||||||
|
img.css("width", newWidth );
|
||||||
|
}else if( width == height && width > 450){
|
||||||
|
img.css("height", "450px");
|
||||||
|
img.css("width", "450px" );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
var form = $("form");
|
||||||
|
|
||||||
|
$("#SupportFeedback").click( function(){
|
||||||
|
var pub = $("#Publicise");
|
||||||
|
if( !$(this).is(':checked') ){
|
||||||
|
pub.removeAttr("checked");
|
||||||
|
pub.attr("disabled", true);
|
||||||
|
}else{
|
||||||
|
pub.removeAttr("disabled");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var promote = $("#Publicise");
|
||||||
|
if(!$("#SupportFeedback").is(':checked')){
|
||||||
|
promote.removeAttr("checked");
|
||||||
|
promote.attr("disabled", true);
|
||||||
|
}
|
||||||
|
promote.live('click', function(){
|
||||||
|
if($(this).is(':checked')){
|
||||||
|
$("#public-info").show();
|
||||||
|
}else{
|
||||||
|
$("#public-info").hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if( promote.is(":checked")){
|
||||||
|
$("#public-info").show();
|
||||||
|
}
|
||||||
|
|
||||||
|
showErrorSections();
|
||||||
|
|
||||||
|
$('.toggle legend').click(function() {
|
||||||
|
$('.toggle').toggleClass('closed');
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
|
@ -28,6 +28,13 @@ class Version20110711161043 extends AbstractMigration
|
||||||
|
|
||||||
$cc_files->addNamedForeignKeyConstraint('cc_music_dirs_folder_fkey', $cc_music_dirs, array('directory'), array('id'), array('onDelete' => 'CASCADE'));
|
$cc_files->addNamedForeignKeyConstraint('cc_music_dirs_folder_fkey', $cc_music_dirs, array('directory'), array('id'), array('onDelete' => 'CASCADE'));
|
||||||
|
|
||||||
|
// before 3) we have to delete all entries in cc_schedule with file_id that are not in cc_file table
|
||||||
|
$this->_addSql("DELETE FROM cc_schedule WHERE cc_schedule.id IN(
|
||||||
|
SELECT cc_schedule.id
|
||||||
|
FROM cc_schedule
|
||||||
|
LEFT JOIN cc_files
|
||||||
|
ON cc_schedule.file_id = cc_files.id
|
||||||
|
WHERE cc_files.id IS NULL)");
|
||||||
/* 3) create a foreign key relationship from cc_schedule to cc_files */
|
/* 3) create a foreign key relationship from cc_schedule to cc_files */
|
||||||
$cc_schedule = $schema->getTable('cc_schedule');
|
$cc_schedule = $schema->getTable('cc_schedule');
|
||||||
$cc_schedule->addNamedForeignKeyConstraint('cc_files_folder_fkey', $cc_files, array('file_id'), array('id'), array('onDelete' => 'CASCADE'));
|
$cc_schedule->addNamedForeignKeyConstraint('cc_files_folder_fkey', $cc_files, array('file_id'), array('id'), array('onDelete' => 'CASCADE'));
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
DEB=$(dpkg -s airtime 2> /dev/null | grep Status)
|
||||||
|
if [[ "$DEB" = "Status: install ok installed" ]]; then
|
||||||
|
echo -e "\nDebian package of Airtime detected. Please use the debian package to upgrade.\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e "\n******************************** Install Begin *********************************"
|
echo -e "\n******************************** Install Begin *********************************"
|
||||||
|
|
||||||
# Absolute path to this script
|
# Absolute path to this script
|
||||||
|
@ -8,6 +14,7 @@ SCRIPT=`readlink -f $0`
|
||||||
SCRIPTPATH=`dirname $SCRIPT`
|
SCRIPTPATH=`dirname $SCRIPT`
|
||||||
|
|
||||||
VIRTUAL_ENV_DIR="/usr/lib/airtime/airtime_virtualenv"
|
VIRTUAL_ENV_DIR="/usr/lib/airtime/airtime_virtualenv"
|
||||||
|
VIRTUAL_ENV_SHARE="/usr/share/python-virtualenv/"
|
||||||
if [ ! -d "$VIRTUAL_ENV_DIR" ]; then
|
if [ ! -d "$VIRTUAL_ENV_DIR" ]; then
|
||||||
echo -e "\n*** Creating Virtualenv for Airtime ***"
|
echo -e "\n*** Creating Virtualenv for Airtime ***"
|
||||||
EXTRAOPTION=$(virtualenv --help | grep extra-search-dir)
|
EXTRAOPTION=$(virtualenv --help | grep extra-search-dir)
|
||||||
|
@ -15,9 +22,11 @@ if [ ! -d "$VIRTUAL_ENV_DIR" ]; then
|
||||||
if [ "$?" -eq "0" ]; then
|
if [ "$?" -eq "0" ]; then
|
||||||
sudo virtualenv --extra-search-dir=${SCRIPTPATH}/3rd_party --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv
|
sudo virtualenv --extra-search-dir=${SCRIPTPATH}/3rd_party --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv
|
||||||
else
|
else
|
||||||
# copy distibute-0.6.10.tar.gz to /usr/share/python-virtualenv/
|
# copy distribute-0.6.10.tar.gz to /usr/share/python-virtualenv/
|
||||||
# this is due to the bug in virtualenv 1.4.9
|
# this is due to the bug in virtualenv 1.4.9
|
||||||
|
if [ -d "$VIRTUAL_ENV_SHARE" ]; then
|
||||||
cp ${SCRIPTPATH}/3rd_party/distribute-0.6.10.tar.gz /usr/share/python-virtualenv/
|
cp ${SCRIPTPATH}/3rd_party/distribute-0.6.10.tar.gz /usr/share/python-virtualenv/
|
||||||
|
fi
|
||||||
sudo virtualenv --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv
|
sudo virtualenv --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -341,6 +341,10 @@ class AirtimeInstall
|
||||||
echo "* Installing airtime-check-system".PHP_EOL;
|
echo "* Installing airtime-check-system".PHP_EOL;
|
||||||
$dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-check-system";
|
$dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-check-system";
|
||||||
exec("ln -s $dir /usr/bin/airtime-check-system");
|
exec("ln -s $dir /usr/bin/airtime-check-system");
|
||||||
|
|
||||||
|
echo "* Installing airtime-user".PHP_EOL;
|
||||||
|
$dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-user";
|
||||||
|
exec("ln -s $dir /usr/bin/airtime-user");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function RemoveSymlinks()
|
public static function RemoveSymlinks()
|
||||||
|
|
|
@ -20,6 +20,14 @@ const CONF_DIR_BINARIES = "/usr/lib/airtime";
|
||||||
class AirtimeInstall{
|
class AirtimeInstall{
|
||||||
|
|
||||||
const CONF_DIR_LOG = "/var/log/airtime";
|
const CONF_DIR_LOG = "/var/log/airtime";
|
||||||
|
const CONF_DIR_BINARIES = "/usr/lib/airtime";
|
||||||
|
|
||||||
|
public static function CreateSymlinksToUtils()
|
||||||
|
{
|
||||||
|
echo "* Installing airtime-user".PHP_EOL;
|
||||||
|
$dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-user";
|
||||||
|
exec("ln -s $dir /usr/bin/airtime-user");
|
||||||
|
}
|
||||||
|
|
||||||
public static function CreateZendPhpLogFile(){
|
public static function CreateZendPhpLogFile(){
|
||||||
global $CC_CONFIG;
|
global $CC_CONFIG;
|
||||||
|
|
|
@ -21,7 +21,7 @@ from urlparse import urlparse
|
||||||
import base64
|
import base64
|
||||||
from configobj import ConfigObj
|
from configobj import ConfigObj
|
||||||
|
|
||||||
AIRTIME_VERSION = "1.9.0-devel"
|
AIRTIME_VERSION = "1.9.1"
|
||||||
|
|
||||||
def api_client_factory(config):
|
def api_client_factory(config):
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# This script cleans audio files in Airtime.
|
# This script for a correct system environment for Airtime.
|
||||||
#
|
#
|
||||||
# Absolute path to this script
|
# Absolute path to this script
|
||||||
SCRIPT=`readlink -f $0`
|
SCRIPT=`readlink -f $0`
|
||||||
|
|
34
utils/airtime-user
Executable file
34
utils/airtime-user
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# Copyright (c) 2010 Sourcefabric O.P.S.
|
||||||
|
#
|
||||||
|
# This file is part of the Airtime project.
|
||||||
|
# http://airtime.sourcefabric.org/
|
||||||
|
#
|
||||||
|
# Airtime is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Airtime is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Airtime; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# This script creates users in Airtime.
|
||||||
|
#
|
||||||
|
# Absolute path to this script
|
||||||
|
SCRIPT=`readlink -f $0`
|
||||||
|
# Absolute directory this script is in
|
||||||
|
SCRIPTPATH=`dirname $SCRIPT`
|
||||||
|
|
||||||
|
invokePwd=$PWD
|
||||||
|
cd $SCRIPTPATH
|
||||||
|
|
||||||
|
php -q airtime-user.php "$@" || exit 1
|
34
utils/airtime-user.php
Executable file → Normal file
34
utils/airtime-user.php
Executable file → Normal file
|
@ -1,12 +1,14 @@
|
||||||
#!/usr/bin/php
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
set_include_path('../application/models' . PATH_SEPARATOR . get_include_path());
|
$airtimeIni = GetAirtimeConf();
|
||||||
require_once(__DIR__.'/../library/propel/runtime/lib/Propel.php');
|
$airtime_base_dir = $airtimeIni['general']['airtime_dir'];
|
||||||
Propel::init(__DIR__.'/../application/configs/airtime-conf.php');
|
|
||||||
|
|
||||||
require_once(dirname(__FILE__).'/../application/configs/conf.php');
|
set_include_path("$airtime_base_dir/application/models" . PATH_SEPARATOR . get_include_path());
|
||||||
require_once(dirname(__FILE__).'/../application/models/Users.php');
|
require_once("$airtime_base_dir/library/propel/runtime/lib/Propel.php");
|
||||||
|
Propel::init("$airtime_base_dir/application/configs/airtime-conf.php");
|
||||||
|
|
||||||
|
require_once("$airtime_base_dir/application/configs/conf.php");
|
||||||
|
require_once("$airtime_base_dir/application/models/Users.php");
|
||||||
require_once('DB.php');
|
require_once('DB.php');
|
||||||
require_once('Console/Getopt.php');
|
require_once('Console/Getopt.php');
|
||||||
|
|
||||||
|
@ -99,10 +101,12 @@ if ($action == "addupdate") {
|
||||||
$user->setLastName($line);
|
$user->setLastName($line);
|
||||||
|
|
||||||
do{
|
do{
|
||||||
echo "Enter user type [(A)dmin|(H)ost|(G)uest]: ";
|
echo "Enter user type [(A)dmin|(P)rogram Manager|(D)J|(G)uest]: ";
|
||||||
$line = trim(fgets(fopen("php://stdin","r")));
|
$line = trim(fgets(fopen("php://stdin","r")));
|
||||||
} while($line != "A" && $line != "H" && $line != "G");
|
} while($line != "A" && $line != "P" && $line != "D" && $line != "G");
|
||||||
$user->setType($line);
|
|
||||||
|
$types = array("A"=>"A", "P"=>"P", "D"=>"H", "G"=>"G",);
|
||||||
|
$user->setType($types[$line]);
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
} elseif ($action == "delete") {
|
} elseif ($action == "delete") {
|
||||||
|
@ -115,3 +119,15 @@ if ($action == "addupdate") {
|
||||||
$user->delete();
|
$user->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function GetAirtimeConf()
|
||||||
|
{
|
||||||
|
$ini = parse_ini_file("/etc/airtime/airtime.conf", true);
|
||||||
|
|
||||||
|
if ($ini === false){
|
||||||
|
echo "Error reading /etc/airtime/airtime.conf.".PHP_EOL;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ini;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue