Merge branch 'saas' into saas-landing-page
This commit is contained in:
commit
f375115825
22 changed files with 4795 additions and 1207 deletions
|
@ -147,7 +147,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
|
||||
$view->headScript()->appendFile($baseUrl . 'js/libs/underscore-min.js?' . $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/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');
|
||||
|
|
|
@ -21,7 +21,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|||
|
||||
<?php echo $this->partial('partialviews/trialBox.phtml', array("is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining())) ?>
|
||||
|
||||
<div id="Panel">
|
||||
<div id="Panel" class="sticky">
|
||||
<?php if($this->suspended) : ?>
|
||||
<?php echo $this->partial('partialviews/suspended.phtml'); ?>
|
||||
<?php else : ?>
|
||||
|
|
|
@ -64,13 +64,6 @@ SQL;
|
|||
{
|
||||
//Everything in this function must be done in UTC. You will get a swift kick in the pants if you mess that up.
|
||||
|
||||
if (!is_int($p_prev) || !is_int($p_next)) {
|
||||
//must enter integers to specify ranges
|
||||
Logging::info("Invalid range parameters: $p_prev or $p_next");
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
// when timeEnd is unspecified, return to the default behaviour - set a range of 48 hours from current time
|
||||
if (!$utcTimeEnd) {
|
||||
$end = new DateTime();
|
||||
|
|
|
@ -238,8 +238,8 @@
|
|||
}
|
||||
|
||||
// variables for updating the player's metadata
|
||||
var time_to_next_track_starts;
|
||||
var metadataTimer;
|
||||
var time_to_next_track_starts = 0;
|
||||
var metadataTimer = null;
|
||||
|
||||
// Fetches the streams metadata from the Airtime live-info API
|
||||
// and attaches it to the player UI.
|
||||
|
@ -252,7 +252,12 @@
|
|||
success: function(data) {
|
||||
|
||||
if (data.current === null) {
|
||||
$("p.now_playing").html("Offline");
|
||||
if (data.currentShow != null) {
|
||||
//Master/show source have no current track but they do have a current show.
|
||||
$("p.now_playing").html(data.currentShow[0].name);
|
||||
} else {
|
||||
$("p.now_playing").html("Offline");
|
||||
}
|
||||
time_to_next_track_starts = 20000;
|
||||
} else {
|
||||
var artist = data.current.name.split(" - ")[0];
|
||||
|
@ -260,6 +265,12 @@
|
|||
$("p.now_playing").html(artist + "<span>" + track + "</span>");
|
||||
|
||||
var current_track_end_time = new Date(data.current.ends);
|
||||
if (current_track_end_time == "Invalid Date" || isNaN(current_track_end_time)) {
|
||||
// If the conversion didn't work (since the String is not in ISO format)
|
||||
// then change it to be ISO-compliant. This is somewhat hacky and may break
|
||||
// if the date string format in live-info changes!
|
||||
current_track_end_time = new Date((data.current.ends).replace(" ", "T"));
|
||||
}
|
||||
var current_time = new Date();
|
||||
//convert current_time to UTC to match the timezone of time_to_next_track_starts
|
||||
current_time = new Date(current_time.getTime() + current_time.getTimezoneOffset() * 60 * 1000);
|
||||
|
@ -271,9 +282,14 @@
|
|||
} else {
|
||||
$("ul.schedule_list").find("li").html(data.next.name);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//Preventative code if the local and remote clocks are out of sync.
|
||||
if (isNaN(time_to_next_track_starts) || time_to_next_track_starts < 0) {
|
||||
time_to_next_track_starts = 0;
|
||||
}
|
||||
|
||||
// Add 3 seconds to the timeout so Airtime has time to update the metadata before we fetch it
|
||||
metadataTimer = setTimeout(attachStreamMetadataToPlayer, time_to_next_track_starts+3000);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,10 @@
|
|||
</style>
|
||||
<?php if ($this->quotaLimitReached) { ?>
|
||||
<div class="errors quota-reached">
|
||||
Disk quota exceeded. You cannot upload files until you <a href="http://www.sourcefabric.org/en/airtime" target="_blank">upgrade your storage</a>.
|
||||
Disk quota exceeded. You cannot upload files until you
|
||||
<a target="_parent" href=<?php $baseUrl = Application_Common_OsPath::getBaseDir(); echo $baseUrl . "billing/upgrade"?>>
|
||||
upgrade your storage
|
||||
</a>.
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue