Merge branch 'saas-dev' into soundcloud
Conflicts: airtime_mvc/application/views/scripts/form/preferences.phtml airtime_mvc/public/js/airtime/preferences/preferences.js
This commit is contained in:
commit
c44bae8140
18 changed files with 150 additions and 182 deletions
|
@ -144,13 +144,14 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
||||
$view->headLink()->appendStylesheet($baseUrl . 'css/bootstrap.css?' . $CC_CONFIG['airtime_version']);
|
||||
$view->headLink()->appendStylesheet($baseUrl . 'css/redmond/jquery-ui-1.8.8.custom.css?' . $CC_CONFIG['airtime_version']);
|
||||
$view->headLink()->appendStylesheet($baseUrl . 'css/pro_dropdown_3.css?' . $CC_CONFIG['airtime_version']);
|
||||
$view->headLink()->appendStylesheet($baseUrl . 'css/qtip/jquery.qtip.min.css?' . $CC_CONFIG['airtime_version']);
|
||||
$view->headLink()->appendStylesheet($baseUrl . 'css/styles.css?' . $CC_CONFIG['airtime_version']);
|
||||
$view->headLink()->appendStylesheet($baseUrl . 'css/masterpanel.css?' . $CC_CONFIG['airtime_version']);
|
||||
$view->headLink()->appendStylesheet($baseUrl . 'css/tipsy/jquery.tipsy.css?' . $CC_CONFIG['airtime_version']);
|
||||
$view->headLink(array('rel' => 'icon', 'href' => $baseUrl . 'favicon.ico', 'type' => 'image/x-icon'), 'PREPEND')
|
||||
->appendStylesheet($baseUrl . 'css/bootstrap.css?' . $CC_CONFIG['airtime_version'])
|
||||
->appendStylesheet($baseUrl . 'css/redmond/jquery-ui-1.8.8.custom.css?' . $CC_CONFIG['airtime_version'])
|
||||
->appendStylesheet($baseUrl . 'css/pro_dropdown_3.css?' . $CC_CONFIG['airtime_version'])
|
||||
->appendStylesheet($baseUrl . 'css/qtip/jquery.qtip.min.css?' . $CC_CONFIG['airtime_version'])
|
||||
->appendStylesheet($baseUrl . 'css/styles.css?' . $CC_CONFIG['airtime_version'])
|
||||
->appendStylesheet($baseUrl . 'css/masterpanel.css?' . $CC_CONFIG['airtime_version'])
|
||||
->appendStylesheet($baseUrl . 'css/tipsy/jquery.tipsy.css?' . $CC_CONFIG['airtime_version']);
|
||||
}
|
||||
|
||||
protected function _initHeadScript()
|
||||
|
@ -161,22 +162,22 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
||||
$view->headScript()->appendFile($baseUrl . 'js/libs/jquery-1.8.3.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/libs/jquery-ui-1.8.24.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/bootstrap/bootstrap.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/libs/jquery-1.8.3.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/libs/jquery-ui-1.8.24.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/bootstrap/bootstrap.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/libs/underscore-min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
|
||||
$view->headScript()->appendFile($baseUrl . 'js/libs/underscore-min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// ->appendFile($baseUrl . 'js/libs/jquery.stickyPanel.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/qtip/jquery.qtip.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/jplayer/jquery.jplayer.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/sprintf/sprintf-0.7-beta1.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/cookie/jquery.cookie.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/i18n/jquery.i18n.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'locale/general-translation-table?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'locale/datatables-translation-table?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
|
||||
// $view->headScript()->appendFile($baseUrl . 'js/libs/jquery.stickyPanel.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/qtip/jquery.qtip.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/jplayer/jquery.jplayer.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/sprintf/sprintf-0.7-beta1.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/cookie/jquery.cookie.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/i18n/jquery.i18n.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'locale/general-translation-table?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'locale/datatables-translation-table?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendScript("$.i18n.setDictionary(general_dict)");
|
||||
$view->headScript()->appendScript("var baseUrl='$baseUrl'");
|
||||
->appendScript("$.i18n.setDictionary(general_dict)")
|
||||
->appendScript("var baseUrl='$baseUrl'");
|
||||
|
||||
//These timezones are needed to adjust javascript Date objects on the client to make sense to the user's set timezone
|
||||
//or the server's set timezone.
|
||||
|
@ -193,14 +194,14 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
}
|
||||
|
||||
//scripts for now playing bar
|
||||
$view->headScript()->appendFile($baseUrl . 'js/airtime/airtime_bootstrap.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/airtime/dashboard/helperfunctions.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/airtime/dashboard/dashboard.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/airtime/dashboard/versiontooltip.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/tipsy/jquery.tipsy.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/airtime/airtime_bootstrap.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/airtime/dashboard/helperfunctions.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/airtime/dashboard/dashboard.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/airtime/dashboard/versiontooltip.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/tipsy/jquery.tipsy.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
|
||||
$view->headScript()->appendFile($baseUrl . 'js/airtime/common/common.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl . 'js/airtime/common/audioplaytest.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
->appendFile($baseUrl . 'js/airtime/common/common.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
||||
->appendFile($baseUrl . 'js/airtime/common/audioplaytest.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
|
||||
$user = Application_Model_User::getCurrentUser();
|
||||
if (!is_null($user)) {
|
||||
|
@ -210,13 +211,10 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
}
|
||||
|
||||
$view->headScript()->appendScript("var userType = '$userType';");
|
||||
if (array_key_exists('REQUEST_URI', $_SERVER)) { //Doesn't exist for unit tests
|
||||
if (strpos($_SERVER['REQUEST_URI'], $baseUrl . 'Dashboard/stream-player') === false
|
||||
&& strpos($_SERVER['REQUEST_URI'], $baseUrl . 'audiopreview/audio-preview') === false
|
||||
&& strpos($_SERVER['REQUEST_URI'], $baseUrl . 'audiopreview/playlist-preview') === false
|
||||
&& strpos($_SERVER['REQUEST_URI'], $baseUrl . 'audiopreview/block-preview') === false
|
||||
&& $_SERVER['REQUEST_URI'] != "/"
|
||||
) {
|
||||
if (array_key_exists('REQUEST_URI', $_SERVER) //Doesn't exist for unit tests
|
||||
&& strpos($_SERVER['REQUEST_URI'], 'Dashboard/stream-player') === false
|
||||
&& strpos($_SERVER['REQUEST_URI'], 'audiopreview') === false
|
||||
&& $_SERVER['REQUEST_URI'] != "/") {
|
||||
$plan_level = strval(Application_Model_Preference::GetPlanLevel());
|
||||
// Since the Hobbyist plan doesn't come with Live Chat support, don't enable it
|
||||
if (Application_Model_Preference::GetLiveChatEnabled() && $plan_level !== 'hobbyist') {
|
||||
|
@ -228,7 +226,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
$view->headScript()->appendFile($baseUrl . 'js/airtime/common/livechat.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1) {
|
||||
|
|
|
@ -133,6 +133,11 @@ $pages = array(
|
|||
'action' => 'help',
|
||||
'resource' => 'dashboard'
|
||||
),
|
||||
array(
|
||||
'label' => _('FAQ'),
|
||||
'uri' => "https://sourcefabricberlin.zendesk.com/hc/en-us/sections/200994309-Airtime-FAQ",
|
||||
'target' => "_blank"
|
||||
),
|
||||
array(
|
||||
'label' => _('User Manual'),
|
||||
'uri' => "http://sourcefabric.booktype.pro/airtime-pro-for-broadcasters",
|
||||
|
|
|
@ -138,8 +138,13 @@ class UserController extends Zend_Controller_Action
|
|||
$formData['cu_last_name'] = "admin"; //ditto, avoid non-null DB constraint
|
||||
}
|
||||
}
|
||||
if (isset($formData['cu_first_name'])) {
|
||||
$user->setFirstName($formData['cu_first_name']);
|
||||
}
|
||||
|
||||
if (isset($formData['cu_last_name'])) {
|
||||
$user->setLastName($formData['cu_last_name']);
|
||||
}
|
||||
// We don't allow 6 x's as a password.
|
||||
// The reason is because we use that as a password placeholder
|
||||
// on the client side.
|
||||
|
|
|
@ -157,10 +157,13 @@ class Application_Form_EditUser extends Zend_Form
|
|||
|
||||
// We need to add the password identical validator here in case
|
||||
// Zend version is less than 1.10.5
|
||||
public function isValid($data) {
|
||||
public function isValid($data)
|
||||
{
|
||||
if (isset($data['cu_password'])) {
|
||||
$passwordIdenticalValidator = Application_Form_Helper_ValidationTypes::overridePasswordIdenticalValidator(
|
||||
$data['cu_password']);
|
||||
$this->getElement('cu_passwordVerify')->addValidator($passwordIdenticalValidator);
|
||||
}
|
||||
return parent::isValid($data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,16 +117,6 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
));
|
||||
$this->addElement($third_party_api);
|
||||
|
||||
// Add the description element
|
||||
$this->addElement('textarea', 'widgetCode', array(
|
||||
'label' => 'Javascript Code:',
|
||||
'required' => false,
|
||||
'readonly' => true,
|
||||
'style' => 'font-family: Consolas, "Liberation Mono", Courier,
|
||||
monospace;',
|
||||
'value' => self::getWidgetCode(),
|
||||
));
|
||||
|
||||
$locale = new Zend_Form_Element_Select("locale");
|
||||
$locale->setLabel(_("Default Language"));
|
||||
$locale->setMultiOptions(Application_Model_Locale::getLocales());
|
||||
|
@ -148,48 +138,6 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
$this->addElement($week_start_day);
|
||||
}
|
||||
|
||||
private static function getWidgetCode() {
|
||||
|
||||
$host = $_SERVER['SERVER_NAME'];
|
||||
$code = <<<CODE
|
||||
<!-- READ THESE INSTRUCTIONS CAREFULLY:
|
||||
Step 1 of 2: Paste these next 4 lines in the <head> section of your HTML page -->
|
||||
<script src="https://$host/widgets/js/jquery-1.6.1.min.js" type="text/javascript"></script>
|
||||
<script src="https://$host/widgets/js/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
|
||||
<script src="https://$host/widgets/js/jquery.showinfo.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="https://$host/widgets/css/airtime-widgets.css"></link>
|
||||
|
||||
<!-- Step 2 of 2: Paste these remaining lines in the <body> section of your HTML page -->
|
||||
<div id="headerLiveHolder" style="border: 1px solid #999999; padding: 10px;"></div>
|
||||
<div id="onAirToday"></div>
|
||||
<div id="scheduleTabs"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#headerLiveHolder").airtimeLiveInfo({
|
||||
sourceDomain: "http://$host",
|
||||
updatePeriod: 20 //seconds
|
||||
});
|
||||
|
||||
$("#onAirToday").airtimeShowSchedule({
|
||||
sourceDomain: "http://$host",
|
||||
updatePeriod: 5, //seconds
|
||||
showLimit: 10
|
||||
});
|
||||
|
||||
$("#scheduleTabs").airtimeWeekSchedule({
|
||||
sourceDomain:"http://$host",
|
||||
updatePeriod: 600 //seconds
|
||||
});
|
||||
var d = new Date().getDay();
|
||||
$('#scheduleTabs').tabs({selected: d === 0 ? 6 : d-1, fx: { opacity: 'toggle' }});
|
||||
});
|
||||
</script>
|
||||
CODE;
|
||||
|
||||
return $code;
|
||||
}
|
||||
|
||||
private function getWeekStartDays()
|
||||
{
|
||||
$days = array(
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,300,700' rel='stylesheet' type='text/css'>
|
||||
<script type="text/javascript">
|
||||
|
||||
var RETRY_DELAY_MSECS = 2000; //Delay before trying to reconnect to stream after an error.
|
||||
var MAX_MOBILE_SCREEN_WIDTH = 760;
|
||||
|
||||
// We are creating a custom player object that acts as a wrapper
|
||||
|
@ -31,6 +32,7 @@
|
|||
'title': 'test',
|
||||
'bgcolor': '#FFFFFF',
|
||||
'skin': 'mcclean',
|
||||
'reconnectTime' : 2000, //Doesn't seem to do anything
|
||||
'width': 180,
|
||||
'height': 60
|
||||
};
|
||||
|
@ -64,21 +66,19 @@
|
|||
if (!this.flashDetect) {
|
||||
|
||||
MRP.html.audio.addEventListener('error', function failed(e) {
|
||||
var streamUrl = "";
|
||||
if (musesPlayer.playerMode == "auto") {
|
||||
var nextAvailableStream = musesPlayer.getNextAvailableStream();
|
||||
streamUrl = nextAvailableStream["url"];
|
||||
} else {
|
||||
streamUrl = musesPlayer.settings.url;
|
||||
}
|
||||
|
||||
switch (e.target.error.code) {
|
||||
case e.target.error.MEDIA_ERR_NETWORK:
|
||||
// If there is a network error keep retrying to connect
|
||||
// to a stream.
|
||||
var stream;
|
||||
if (musesPlayer.playerMode == "auto") {
|
||||
var nextAvailableStream = musesPlayer.getNextAvailableStream();
|
||||
stream = nextAvailableStream["url"];
|
||||
} else {
|
||||
stream = musesPlayer.settings.url;
|
||||
}
|
||||
var audio = $(MRP.html.audio);
|
||||
audio[0].src = stream;
|
||||
audio[0].load();
|
||||
audio[0].play();
|
||||
musesPlayer.deferredPlay(streamUrl, RETRY_DELAY_MSECS);
|
||||
break;
|
||||
case e.target.error.MEDIA_ERR_DECODE:
|
||||
// If there was a corruption error or a problem with the browser
|
||||
|
@ -92,11 +92,7 @@
|
|||
// or the max number of listeners has been reached
|
||||
// retry connection with the next available stream.
|
||||
if (musesPlayer.playerMode == "auto") {
|
||||
var nextAvailableStream = musesPlayer.getNextAvailableStream();
|
||||
var audio = $(MRP.html.audio);
|
||||
audio[0].src = nextAvailableStream["url"];;
|
||||
audio[0].load();
|
||||
audio[0].play();
|
||||
musesPlayer.deferredPlay(nextAvailableStream["url"], RETRY_DELAY_MSECS);
|
||||
} else {
|
||||
// If in manual mode and the current stream format is not supported
|
||||
// or the max number of listeners has been reached
|
||||
|
@ -179,27 +175,44 @@
|
|||
MRP.setUrl(url);
|
||||
};
|
||||
|
||||
/** Retry playback after a few seconds (used to throttle attempts to reconnect/play). */
|
||||
MusesPlayer.prototype.deferredPlay = function(streamUrl, delayMSec) {
|
||||
if (!this.flashDetect) {
|
||||
setTimeout(function() {
|
||||
var audio = $(MRP.html.audio);
|
||||
audio[0].src = streamUrl;
|
||||
audio[0].load();
|
||||
audio[0].play();
|
||||
}, delayMSec);
|
||||
|
||||
} else {
|
||||
setTimeout(function() {
|
||||
musesPlayer.setURL(streamUrl);
|
||||
musesPlayer.play();
|
||||
}, delayMSec);
|
||||
}
|
||||
};
|
||||
|
||||
// detects errors in FLASH mode
|
||||
function musesCallback(event,value) {
|
||||
switch (event) {
|
||||
case "ioError":
|
||||
// problem connecting to stream
|
||||
var stream;
|
||||
var streamUrl = "";
|
||||
if (musesPlayer.playerMode == "auto") {
|
||||
stream = musesPlayer.getNextAvailableStream();
|
||||
musesPlayer.setURL(stream["url"]);
|
||||
streamUrl = musesPlayer.getNextAvailableStream()["url"];
|
||||
} else {
|
||||
stream = musesPlayer.settings.url;
|
||||
musesPlayer.setURL(stream);
|
||||
streamUrl = musesPlayer.settings.url;
|
||||
}
|
||||
musesPlayer.play();
|
||||
|
||||
//Retry playback but only after sleeping for a bit, to avoid spinning.
|
||||
musesPlayer.deferredPlay(streamUrl, RETRY_DELAY_MSECS);
|
||||
break;
|
||||
case "securityError":
|
||||
// max listeners reached
|
||||
if (musesPlayer.playerMode == "auto") {
|
||||
var stream = musesPlayer.getNextAvailableStream();
|
||||
musesPlayer.setURL(stream["url"]);
|
||||
musesPlayer.play();
|
||||
musesPlayer.deferredPlay(stream["url"], RETRY_DELAY_MSECS);
|
||||
} else {
|
||||
// If in manual mode and there is a problem connecting to
|
||||
// the stream display an error and stop play back.
|
||||
|
@ -275,7 +288,14 @@
|
|||
} else {
|
||||
var artist = data.current.name.split(" - ")[0];
|
||||
var track = data.current.name.split(" - ")[1];
|
||||
$("p.now_playing").html(artist + "<span>" + track + "</span>");
|
||||
var nowPlayingHtml = "";
|
||||
if (artist) {
|
||||
nowPlayingHtml += artist;
|
||||
}
|
||||
if (track) {
|
||||
nowPlayingHtml += "<span>" + track + "</span>";
|
||||
}
|
||||
$("p.now_playing").html(nowPlayingHtml);
|
||||
|
||||
var current_track_end_time = new Date(data.current.ends);
|
||||
if (current_track_end_time == "Invalid Date" || isNaN(current_track_end_time)) {
|
||||
|
|
|
@ -8,17 +8,14 @@
|
|||
<?php echo $this->element->getSubform('preferences_tunein') ?>
|
||||
</div>
|
||||
|
||||
|
||||
<?php //No soundcloud stuff on Airtime Pro -- Albert ?>
|
||||
|
||||
<h3 class="collapsible-header" id="soundcloud-heading"><span class="arrow-icon"></span><?php echo _("SoundCloud Settings") ?></h3>
|
||||
<div class="collapsible-content" id="soundcloud-settings">
|
||||
<?php echo $this->element->getSubform('preferences_soundcloud') ?>
|
||||
</div>
|
||||
|
||||
|
||||
<h3 class="collapsible-header" id="dangerous-heading"><span class="arrow-icon"></span><?php echo _("Dangerous Options") ?></h3>
|
||||
<div class="collapsible-content" id="dangerous-settings">
|
||||
<!-- Hide the 'dangerous settings' by default -->
|
||||
<h3 class="collapsible-header closed" id="dangerous-heading"><span class="arrow-icon"></span><?php echo _("Dangerous Options") ?></h3>
|
||||
<div class="collapsible-content" id="dangerous-settings" style="display:none;">
|
||||
<?php echo $this->element->getSubform('preferences_danger') ?>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -37,7 +37,5 @@
|
|||
|
||||
<?php echo $this->element->getElement('thirdPartyApi')->render() ?>
|
||||
|
||||
<?php echo $this->element->getElement('widgetCode')->render() ?>
|
||||
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
|
|
@ -1841,7 +1841,6 @@ span.errors.sp-errors{
|
|||
}
|
||||
.collapsible-content {
|
||||
margin-top:-1px;
|
||||
display:none;
|
||||
}
|
||||
.collapsible-header .arrow-icon, .collapsible-header-disabled .arrow-icon {
|
||||
display:block;
|
||||
|
@ -1853,9 +1852,8 @@ span.errors.sp-errors{
|
|||
top:8px;
|
||||
|
||||
}
|
||||
.collapsible-header.closed .arrow-icon, collapsible-header-disabled.close .arrow-icon {
|
||||
.collapsible-header.closed .arrow-icon, .collapsible-header-disabled.close .arrow-icon {
|
||||
background-position: 0 -11px !important;
|
||||
|
||||
}
|
||||
#schedule-add-show .button-bar {
|
||||
height: 28px;
|
||||
|
|
|
@ -247,6 +247,4 @@ function playOne(uri, mime) {
|
|||
_playlist_jplayer.setPlaylist(playlist);
|
||||
_playlist_jplayer.play(0);
|
||||
}
|
||||
|
||||
window.resizeTo(490, 167);
|
||||
}
|
||||
|
|
|
@ -143,7 +143,8 @@ function open_show_preview(p_showID, p_showIndex) {
|
|||
}
|
||||
|
||||
function openPreviewWindow(url) {
|
||||
_preview_window = window.open(url, $.i18n._('Audio Player'), 'width=450,height=100,scrollbars=yes');
|
||||
// Hardcoding this here is kinda gross, but the alternatives aren't much better...
|
||||
_preview_window = window.open(url, $.i18n._('Audio Player'), 'width=482,height=110,scrollbars=yes');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,9 @@ var AIRTIME = (function(AIRTIME) {
|
|||
$libTable,
|
||||
LIB_SELECTED_CLASS = "lib-selected",
|
||||
chosenItems = {},
|
||||
visibleChosenItems = {};
|
||||
visibleChosenItems = {},
|
||||
$previouslySelected;
|
||||
|
||||
|
||||
// we need to know whether the criteria value is string or
|
||||
// numeric in order to provide a single textbox or range textboxes
|
||||
|
@ -861,26 +863,33 @@ var AIRTIME = (function(AIRTIME) {
|
|||
$libTable.find("tbody").on("click", "input[type=checkbox]", function(ev) {
|
||||
|
||||
var $cb = $(this),
|
||||
$prev,
|
||||
$tr = $cb.parents("tr"),
|
||||
$trs;
|
||||
// Get the ID of the selected row
|
||||
$rowId = $tr.attr("id");
|
||||
|
||||
if ($cb.is(":checked")) {
|
||||
|
||||
if (ev.shiftKey) {
|
||||
$prev = $libTable.find("tbody").find("tr."+LIB_SELECTED_CLASS).eq(-1);
|
||||
$trs = $prev.nextUntil($tr);
|
||||
|
||||
$trs.each(function(i, el){
|
||||
if (ev.shiftKey && $previouslySelected !== undefined) {
|
||||
// If the selected row comes before the previously selected row,
|
||||
// we want to select previous rows, otherwise we select next
|
||||
if ($previouslySelected.prevAll("#"+$rowId).length !== 0) {
|
||||
$previouslySelected.prevUntil($tr).each(function(i, el){
|
||||
mod.selectItem($(el));
|
||||
});
|
||||
} else {
|
||||
$previouslySelected.nextUntil($tr).each(function(i, el){
|
||||
mod.selectItem($(el));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
mod.selectItem($tr);
|
||||
// Remember this row so we can properly multiselect
|
||||
$previouslySelected = $tr;
|
||||
}
|
||||
else {
|
||||
mod.deselectItem($tr);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// begin context menu initialization.
|
||||
|
|
|
@ -113,25 +113,6 @@ function setMsAuthenticationFieldsReadonly(ele) {
|
|||
}
|
||||
}
|
||||
|
||||
function setCollapsibleWidgetJsCode() {
|
||||
var x = function() {
|
||||
var val = $('input:radio[name=thirdPartyApi]:checked').val();
|
||||
if (val == "1") {
|
||||
//show js textarea
|
||||
$('#widgetCode-label').show("fast");
|
||||
$('#widgetCode-element').show("fast");
|
||||
} else {
|
||||
if ($('#widgetCode-label').is(":visible")) {
|
||||
//hide js textarea
|
||||
$('#widgetCode-label').hide();
|
||||
$('#widgetCode-element').hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
x();
|
||||
$('#thirdPartyApi-element input').click(x);
|
||||
}
|
||||
|
||||
function removeLogo() {
|
||||
$.post(baseUrl+'Preference/remove-logo', function(json){});
|
||||
location.reload();
|
||||
|
@ -151,7 +132,7 @@ $(document).ready(function() {
|
|||
$(this).next().toggle('fast');
|
||||
$(this).toggleClass("closed");
|
||||
return false;
|
||||
}).next().hide();
|
||||
});
|
||||
|
||||
if ($("#tunein-settings").find(".errors").length > 0) {
|
||||
$(".collapsible-content#tunein-settings").show();
|
||||
|
@ -178,7 +159,6 @@ $(document).ready(function() {
|
|||
setSystemFromEmailReadonly();
|
||||
setConfigureMailServerListener();
|
||||
setEnableSystemEmailsListener();
|
||||
setCollapsibleWidgetJsCode();
|
||||
setTuneInSettingsReadonly();
|
||||
setTuneInSettingsListener();
|
||||
setSoundCloudSettingsListener();
|
||||
|
|
|
@ -35,7 +35,7 @@ def postinst():
|
|||
os.chmod('/var/log/airtime', 0775)
|
||||
|
||||
# Create the Celery user
|
||||
call(['adduser', '--no-create-home', '--home', '/var/lib/celery', '--gecos', '""', '--disabled-login', 'celery'])
|
||||
call(['adduser', '--no-create-home', '--home', '/var/lib/celery', '--gecos', '', '--disabled-login', 'celery'])
|
||||
# Add celery to the www-data group
|
||||
call(['usermod', '-G', 'www-data', '-a', 'celery'])
|
||||
|
||||
|
|
|
@ -150,6 +150,7 @@ class ListenerStat(Thread):
|
|||
self.logger.error('Exception: %s', e)
|
||||
|
||||
time.sleep(120)
|
||||
self.logger.info('ListenerStat thread exiting')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -5,6 +5,8 @@ from Queue import Empty
|
|||
|
||||
import logging
|
||||
import shutil
|
||||
import time
|
||||
import traceback
|
||||
import os
|
||||
import sys
|
||||
import stat
|
||||
|
@ -203,5 +205,10 @@ class PypoFile(Thread):
|
|||
"""
|
||||
Entry point of the thread
|
||||
"""
|
||||
self.main()
|
||||
try: self.main()
|
||||
except Exception, e:
|
||||
top = traceback.format_exc()
|
||||
self.logger.error('PypoFile Exception: %s', top)
|
||||
time.sleep(5)
|
||||
self.logger.info('PypoFile thread exiting')
|
||||
|
||||
|
|
|
@ -153,4 +153,5 @@ class PypoPush(Thread):
|
|||
top = traceback.format_exc()
|
||||
self.logger.error('Pypo Push Exception: %s', top)
|
||||
time.sleep(5)
|
||||
self.logger.info('PypoPush thread exiting')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue