Merge branch 'saas-dev' into saas-stream-settings
Conflicts: airtime_mvc/application/models/Preference.php
This commit is contained in:
commit
37ed35f5b2
|
@ -69,6 +69,8 @@ class WidgetHelper
|
||||||
* We don't do any timezone conversion in this function on purpose. All timezone conversion
|
* We don't do any timezone conversion in this function on purpose. All timezone conversion
|
||||||
* and show time ordering should be done on the frontend.
|
* and show time ordering should be done on the frontend.
|
||||||
*
|
*
|
||||||
|
* *** This function does no HTML encoding. It is up to the caller to escape or encode the data appropriately.
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function getWeekInfoV2()
|
public static function getWeekInfoV2()
|
||||||
|
@ -139,9 +141,6 @@ class WidgetHelper
|
||||||
}
|
}
|
||||||
$result["shows"] = $shows;
|
$result["shows"] = $shows;
|
||||||
|
|
||||||
// XSS exploit prevention
|
|
||||||
SecurityHelper::htmlescape_recursive($result);
|
|
||||||
|
|
||||||
// convert image paths to point to api endpoints
|
// convert image paths to point to api endpoints
|
||||||
//TODO: do we need this here?
|
//TODO: do we need this here?
|
||||||
self::findAndConvertPaths($result);
|
self::findAndConvertPaths($result);
|
||||||
|
|
|
@ -27,6 +27,12 @@ class IndexController extends Zend_Controller_Action
|
||||||
|
|
||||||
$this->view->stationUrl = Application_Common_HTTPHelper::getStationUrl();
|
$this->view->stationUrl = Application_Common_HTTPHelper::getStationUrl();
|
||||||
|
|
||||||
|
$displayRadioPageLoginButtonValue = Application_Model_Preference::getRadioPageDisplayLoginButton();
|
||||||
|
if ($displayRadioPageLoginButtonValue == "") {
|
||||||
|
$displayRadioPageLoginButtonValue = true;
|
||||||
|
}
|
||||||
|
$this->view->displayLoginButton = $displayRadioPageLoginButtonValue;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mainAction()
|
public function mainAction()
|
||||||
|
|
|
@ -47,6 +47,7 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
Application_Model_Preference::SetDefaultLocale($values["locale"]);
|
Application_Model_Preference::SetDefaultLocale($values["locale"]);
|
||||||
Application_Model_Preference::SetDefaultTimezone($values["timezone"]);
|
Application_Model_Preference::SetDefaultTimezone($values["timezone"]);
|
||||||
Application_Model_Preference::SetWeekStartDay($values["weekStartDay"]);
|
Application_Model_Preference::SetWeekStartDay($values["weekStartDay"]);
|
||||||
|
Application_Model_Preference::setRadioPageDisplayLoginButton($values["radioPageLoginButton"]);
|
||||||
|
|
||||||
$logoUploadElement = $form->getSubForm('preferences_general')->getElement('stationLogo');
|
$logoUploadElement = $form->getSubForm('preferences_general')->getElement('stationLogo');
|
||||||
$logoUploadElement->receive();
|
$logoUploadElement->receive();
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
ALTER TABLE cc_pref ALTER COLUMN subjid SET NULL;
|
|
||||||
ALTER TABLE cc_pref ALTER COLUMN subjid SET DEFAULT NULL;
|
ALTER TABLE cc_pref ALTER COLUMN subjid SET DEFAULT NULL;
|
||||||
CREATE UNIQUE INDEX cc_pref_key_idx ON cc_pref (keystr) WHERE subjid IS NULL;
|
CREATE UNIQUE INDEX cc_pref_key_idx ON cc_pref (keystr) WHERE subjid IS NULL;
|
||||||
ANALYZE cc_pref;
|
ANALYZE cc_pref;
|
|
@ -8,6 +8,7 @@ class Application_Form_AddShowLiveStream extends Zend_Form_SubForm
|
||||||
{
|
{
|
||||||
$cb_airtime_auth = new Zend_Form_Element_Checkbox("cb_airtime_auth");
|
$cb_airtime_auth = new Zend_Form_Element_Checkbox("cb_airtime_auth");
|
||||||
$cb_airtime_auth->setLabel(sprintf(_("Use %s Authentication:"), PRODUCT_NAME))
|
$cb_airtime_auth->setLabel(sprintf(_("Use %s Authentication:"), PRODUCT_NAME))
|
||||||
|
->setChecked(true)
|
||||||
->setRequired(false);
|
->setRequired(false);
|
||||||
$this->addElement($cb_airtime_auth);
|
$this->addElement($cb_airtime_auth);
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ class Application_Form_AddShowLiveStream extends Zend_Form_SubForm
|
||||||
$showSourceMount = new Zend_Form_Element_Text('show_source_mount');
|
$showSourceMount = new Zend_Form_Element_Text('show_source_mount');
|
||||||
$showSourceMount->setAttrib('readonly', true)
|
$showSourceMount->setAttrib('readonly', true)
|
||||||
->setLabel(_('Mount:'))
|
->setLabel(_('Mount:'))
|
||||||
->setValue(isset($showSourceParams["mount"])?$showSourceParams["mount"]:"");
|
->setValue(isset($showSourceParams["path"])?$showSourceParams["path"]:"");
|
||||||
$this->addElement($showSourceMount);
|
$this->addElement($showSourceMount);
|
||||||
|
|
||||||
$this->setDecorators(
|
$this->setDecorators(
|
||||||
|
|
|
@ -136,6 +136,21 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
||||||
$week_start_day->setMultiOptions($this->getWeekStartDays());
|
$week_start_day->setMultiOptions($this->getWeekStartDays());
|
||||||
$week_start_day->setValue(Application_Model_Preference::GetWeekStartDay());
|
$week_start_day->setValue(Application_Model_Preference::GetWeekStartDay());
|
||||||
$this->addElement($week_start_day);
|
$this->addElement($week_start_day);
|
||||||
|
|
||||||
|
$radioPageLoginButton = new Zend_Form_Element_Checkbox("radioPageLoginButton");
|
||||||
|
$radioPageLoginButton->setDecorators(array(
|
||||||
|
'ViewHelper',
|
||||||
|
'Errors',
|
||||||
|
'Label'
|
||||||
|
));
|
||||||
|
$displayRadioPageLoginButtonValue = Application_Model_Preference::getRadioPageDisplayLoginButton();
|
||||||
|
if ($displayRadioPageLoginButtonValue == "") {
|
||||||
|
$displayRadioPageLoginButtonValue = true;
|
||||||
|
}
|
||||||
|
$radioPageLoginButton->addDecorator('Label', array("class" => "enable-tunein"));
|
||||||
|
$radioPageLoginButton->setLabel(_("Display login button on your Radio Page?"));
|
||||||
|
$radioPageLoginButton->setValue($displayRadioPageLoginButtonValue);
|
||||||
|
$this->addElement($radioPageLoginButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getWeekStartDays()
|
private function getWeekStartDays()
|
||||||
|
|
|
@ -1522,4 +1522,13 @@ class Application_Model_Preference
|
||||||
self::setValue("using_custom_stream_settings", $value);
|
self::setValue("using_custom_stream_settings", $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getRadioPageDisplayLoginButton()
|
||||||
|
{
|
||||||
|
return self::getValue("radio_page_display_login_button");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function setRadioPageDisplayLoginButton($value)
|
||||||
|
{
|
||||||
|
self::setValue("radio_page_display_login_button", $value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><?php echo _("Show Source") ?></legend>
|
<legend><?php echo _("Show Source") ?></legend>
|
||||||
<p class="input-settings-inline-p">
|
<p class="input-settings-inline-p">
|
||||||
<?php echo _("DJs can use these settings to connect and broadcast live during this show (with compatible software)") ?>
|
<?php echo _("DJs can use these settings to connect with compatible software and broadcast live during this show. Assign a DJ below.") ?>
|
||||||
</p>
|
</p>
|
||||||
<?php echo $this->element->getElement("show_source_host")->render() ?>
|
<?php echo $this->element->getElement("show_source_host")->render() ?>
|
||||||
<?php echo $this->element->getElement("show_source_port")->render() ?>
|
<?php echo $this->element->getElement("show_source_port")->render() ?>
|
||||||
|
|
|
@ -37,5 +37,8 @@
|
||||||
|
|
||||||
<?php echo $this->element->getElement('thirdPartyApi')->render() ?>
|
<?php echo $this->element->getElement('thirdPartyApi')->render() ?>
|
||||||
|
|
||||||
|
<?php echo $this->element->getElement('radioPageLoginButton')->renderViewHelper() ?>
|
||||||
|
<?php echo $this->element->getElement('radioPageLoginButton')->renderLabel() ?>
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<fieldset class="padded stream-setting-global" style="margin-top: 15px">
|
<fieldset class="padded stream-setting-global" style="margin-top: 15px">
|
||||||
<legend><?php echo _("Master Source") ?></legend>
|
<legend><?php echo _("Master Source") ?></legend>
|
||||||
<p class="input-settings-inline-p">
|
<p class="input-settings-inline-p">
|
||||||
<?php echo _("Use these settings in your broadcasting software to connect to Master Source") ?>
|
<?php echo _("Use these settings in your broadcasting software to stream live at any time.") ?>
|
||||||
</p>
|
</p>
|
||||||
<?php echo $this->element->getElement('master_username')->render() ?>
|
<?php echo $this->element->getElement('master_username')->render() ?>
|
||||||
<span class="master_username_help_icon"></span>
|
<span class="master_username_help_icon"></span>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
<fieldset class="padded stream-setting-global" style="margin-top: 15px">
|
<fieldset class="padded stream-setting-global" style="margin-top: 15px">
|
||||||
<legend><?php echo _("Show Source") ?></legend>
|
<legend><?php echo _("Show Source") ?></legend>
|
||||||
<p class="input-settings-inline-p">
|
<p class="input-settings-inline-p">
|
||||||
<?php echo _("These settings allow DJs to connect to individual shows through Show Source") ?>
|
<?php echo _("DJs can use these settings in their broadcasting software to broadcast live only during shows assigned to them.") ?>
|
||||||
</p>
|
</p>
|
||||||
<?php echo $this->element->getElement("show_source_host")->render() ?>
|
<?php echo $this->element->getElement("show_source_host")->render() ?>
|
||||||
<?php echo $this->element->getElement("show_source_port")->render() ?>
|
<?php echo $this->element->getElement("show_source_port")->render() ?>
|
||||||
|
|
|
@ -24,12 +24,14 @@ document.getElementById(id).width= (newwidth) + "px";
|
||||||
echo "<a href='#' class='logo'><img src='data:image/png;base64," . $this->stationLogo . "'></a>";
|
echo "<a href='#' class='logo'><img src='data:image/png;base64," . $this->stationLogo . "'></a>";
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<div class="login-btn">
|
<?php if ($this->displayLoginButton) {
|
||||||
<a href="/login" target="_parent">
|
echo "<div class='login-btn'>
|
||||||
|
<a href='/login' target='_parent'>
|
||||||
<span>Login</span>
|
<span>Login</span>
|
||||||
<span class="login-img"></span>
|
<span class='login-img'></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>";
|
||||||
|
}?>
|
||||||
|
|
||||||
<div id="tab-1" class="schedule tab_content current">
|
<div id="tab-1" class="schedule tab_content current">
|
||||||
<iframe onLoad="autoResize('schedule_iframe');" id="schedule_iframe" height="300px" scrolling="yes" frameborder="0" src=<?php echo $this->stationUrl."embed/weekly-program?style=premium"?>></iframe>
|
<iframe onLoad="autoResize('schedule_iframe');" id="schedule_iframe" height="300px" scrolling="yes" frameborder="0" src=<?php echo $this->stationUrl."embed/weekly-program?style=premium"?>></iframe>
|
||||||
|
|
|
@ -217,11 +217,11 @@ background: rgba(53, 53, 53, 1.0);
|
||||||
|
|
||||||
@media (max-width: 400px) {
|
@media (max-width: 400px) {
|
||||||
.schedule_item div.time_grid {
|
.schedule_item div.time_grid {
|
||||||
width: 90%;
|
width: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.schedule_item div.name_grid {
|
.schedule_item div.name_grid {
|
||||||
width: 90%;
|
width: 95%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -167,11 +167,11 @@ body {
|
||||||
|
|
||||||
@media (max-width: 400px) {
|
@media (max-width: 400px) {
|
||||||
.schedule_item div.time_grid {
|
.schedule_item div.time_grid {
|
||||||
width: 90%;
|
width: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.schedule_item div.name_grid {
|
.schedule_item div.name_grid {
|
||||||
width: 90%;
|
width: 95%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ body {
|
||||||
.on_air {
|
.on_air {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-left: 40px;
|
margin-left: 40px;
|
||||||
|
width: 65%
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom_bar p.now_playing {
|
.bottom_bar p.now_playing {
|
||||||
|
@ -47,11 +48,19 @@ body {
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
float: left;
|
float: left;
|
||||||
margin: 28px 0px;
|
margin: 28px 0px;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom_bar p.now_playing span {
|
.bottom_bar p.now_playing span {
|
||||||
display: block;
|
display: block;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom_bar .button {
|
.bottom_bar .button {
|
||||||
|
@ -88,6 +97,30 @@ body {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1230px) {
|
||||||
|
.on_air {
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1075px) {
|
||||||
|
.on_air {
|
||||||
|
width: 55%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 960px) {
|
||||||
|
.on_air {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 850px) {
|
||||||
|
.on_air {
|
||||||
|
width: 45%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 780px) {
|
@media (max-width: 780px) {
|
||||||
.bottom_bar {
|
.bottom_bar {
|
||||||
height: 80px;
|
height: 80px;
|
||||||
|
@ -122,6 +155,7 @@ body {
|
||||||
left: 0px;
|
left: 0px;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
|
width: 100%;
|
||||||
background: rgba(0,0,0,0);
|
background: rgba(0,0,0,0);
|
||||||
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 69%, rgba(0,0,0,1) 100%);
|
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 69%, rgba(0,0,0,1) 100%);
|
||||||
background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(0,0,0,0)), color-stop(69%, rgba(0,0,0,1)), color-stop(100%, rgba(0,0,0,1)));
|
background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(0,0,0,0)), color-stop(69%, rgba(0,0,0,1)), color-stop(100%, rgba(0,0,0,1)));
|
||||||
|
|
|
@ -47,6 +47,11 @@ select {
|
||||||
border:1px solid #9d9d9d;
|
border:1px solid #9d9d9d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Fix for Firefox */
|
||||||
|
fieldset {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
background: transparent url(images/airtime_logo.png) no-repeat 0 0;
|
background: transparent url(images/airtime_logo.png) no-repeat 0 0;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
|
|
|
@ -9,7 +9,10 @@ import pickle
|
||||||
import threading
|
import threading
|
||||||
from urlparse import urlparse
|
from urlparse import urlparse
|
||||||
|
|
||||||
requests.packages.urllib3.disable_warnings()
|
# Disable urllib3 warnings because these can cause a rare deadlock due to Python 2's crappy internal non-reentrant locking
|
||||||
|
# around POSIX stuff. See SAAS-714. The hasattr() is for compatibility with older versions of requests.
|
||||||
|
if hasattr(requests, 'packages'):
|
||||||
|
requests.packages.urllib3.disable_warnings()
|
||||||
|
|
||||||
class PicklableHttpRequest:
|
class PicklableHttpRequest:
|
||||||
def __init__(self, method, url, data, api_key):
|
def __init__(self, method, url, data, api_key):
|
||||||
|
|
Loading…
Reference in New Issue